diff --git a/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.cfg.txt deleted file mode 100644 index 27a9fe71e68..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.cfg.txt +++ /dev/null @@ -1,97 +0,0 @@ - 0: Enter function "test_1" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter when -> 3 | <- 1 - 3: Enter when branch condition -> 4 | <- 2 - 4: Enter || -> 5, 8 | <- 3 - 5: Access variable R|/b1| -> 6, 8 | <- 4 - 6: Exit left part of || -> 7 | <- 5 - 7: Access variable R|/b2| -> 8 | <- 6 - 8: Exit || -> 9 | <- 4, 5, 7 - 9: Exit when branch condition -> 10, 14 | <- 8 -10: Enter block -> 11 | <- 9 -11: Const: Int(1) -> 12 | <- 10 -12: Exit block -> 13 | <- 11 -13: Exit when branch result -> 19 | <- 12 -14: Enter when branch condition "else" -> 15 | <- 9 -15: Exit when branch condition -> 16 | <- 14 -16: Enter block -> 17 | <- 15 -17: Exit block -> 18 | <- 16 -18: Exit when branch result -> 19 | <- 17 -19: Exit when -> 20 | <- 13, 18 -20: Exit block -> 21 | <- 19 -21: Exit function "test_1" -> | <- 20 - - 0: Enter function "test_2" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter when -> 3 | <- 1 - 3: Enter when branch condition -> 4 | <- 2 - 4: Enter && -> 5 | <- 3 - 5: Access variable R|/b1| -> 6, 7 | <- 4 - 6: Access variable R|/b2| -> 7 | <- 5 - 7: Exit && -> 8 | <- 5, 6 - 8: Exit when branch condition -> 9, 13 | <- 7 - 9: Enter block -> 10 | <- 8 -10: Const: Int(1) -> 11 | <- 9 -11: Exit block -> 12 | <- 10 -12: Exit when branch result -> 18 | <- 11 -13: Enter when branch condition "else" -> 14 | <- 8 -14: Exit when branch condition -> 15 | <- 13 -15: Enter block -> 16 | <- 14 -16: Exit block -> 17 | <- 15 -17: Exit when branch result -> 18 | <- 16 -18: Exit when -> 19 | <- 12, 17 -19: Exit block -> 20 | <- 18 -20: Exit function "test_2" -> | <- 19 - - 0: Enter function "test_3" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter when -> 3 | <- 1 - 3: Enter when branch condition -> 4 | <- 2 - 4: Enter || -> 5, 11 | <- 3 - 5: Enter && -> 6 | <- 4 - 6: Access variable R|/b1| -> 7, 8 | <- 5 - 7: Access variable R|/b2| -> 8 | <- 6 - 8: Exit && -> 9, 11 | <- 6, 7 - 9: Exit left part of || -> 10 | <- 8 -10: Access variable R|/b3| -> 11 | <- 9 -11: Exit || -> 12 | <- 4, 8, 10 -12: Exit when branch condition -> 13, 17 | <- 11 -13: Enter block -> 14 | <- 12 -14: Const: Int(1) -> 15 | <- 13 -15: Exit block -> 16 | <- 14 -16: Exit when branch result -> 22 | <- 15 -17: Enter when branch condition "else" -> 18 | <- 12 -18: Exit when branch condition -> 19 | <- 17 -19: Enter block -> 20 | <- 18 -20: Exit block -> 21 | <- 19 -21: Exit when branch result -> 22 | <- 20 -22: Exit when -> 23 | <- 16, 21 -23: Exit block -> 24 | <- 22 -24: Exit function "test_3" -> | <- 23 - - 0: Enter function "test_4" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter when -> 3 | <- 1 - 3: Enter when branch condition -> 4 | <- 2 - 4: Enter || -> 5, 11 | <- 3 - 5: Access variable R|/b1| -> 6, 11 | <- 4 - 6: Exit left part of || -> 7 | <- 5 - 7: Enter && -> 8 | <- 6 - 8: Access variable R|/b2| -> 9, 10 | <- 7 - 9: Access variable R|/b3| -> 10 | <- 8 -10: Exit && -> 11 | <- 8, 9 -11: Exit || -> 12 | <- 4, 5, 10 -12: Exit when branch condition -> 13, 17 | <- 11 -13: Enter block -> 14 | <- 12 -14: Const: Int(1) -> 15 | <- 13 -15: Exit block -> 16 | <- 14 -16: Exit when branch result -> 22 | <- 15 -17: Enter when branch condition "else" -> 18 | <- 12 -18: Exit when branch condition -> 19 | <- 17 -19: Enter block -> 20 | <- 18 -20: Exit block -> 21 | <- 19 -21: Exit when branch result -> 22 | <- 20 -22: Exit when -> 23 | <- 16, 21 -23: Exit block -> 24 | <- 22 -24: Exit function "test_4" -> | <- 23 - diff --git a/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/cfg/binaryOperations.cfg.dot rename to compiler/fir/resolve/testData/resolve/cfg/binaryOperations.dot diff --git a/compiler/fir/resolve/testData/resolve/cfg/complex.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/complex.cfg.txt deleted file mode 100644 index b45bccefb9d..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/complex.cfg.txt +++ /dev/null @@ -1,46 +0,0 @@ - 0: Enter function "fetchPluginReleaseDate" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Const: String(https://plugins.jetbrains.com/api/plugins/) -> 3 | <- 1 - 3: Access variable R|/pluginId| -> 4 | <- 2 - 4: Access variable # -> 5 | <- 3 - 5: Const: String(/updates?version=) -> 6 | <- 4 - 6: Access variable R|/version| -> 7 | <- 5 - 7: Variable declaration: lval url: R|kotlin/String| -> 8 | <- 6 - 8: Try expression enter -> 9 | <- 7 - 9: Try main block enter -> 10, 17, 26, 41 | <- 8 -10: Enter block -> 11 | <- 9 -11: Access variable # -> 12 | <- 10 -12: Access variable R|/url| -> 13 | <- 11 -13: Function call: #.#(R|/url|) -> 14 | <- 12 -14: Function call: #.#(R|/url|).#( = connect@fun .(): { - GsonBuilder#().create#().fromJson#(it#.inputStream#.reader#(), (Array#()).java#) -} -) -> 15 | <- 13 -15: Exit block -> 16 | <- 14 -16: Try main block exit -> 34 | <- 15 -17: Catch enter -> 18, 41 | <- 9 -18: Enter block -> 19 | <- 17 -19: Const: String(Can't parse json response) -> 20 | <- 18 -20: Access variable R|/syntaxException| -> 21 | <- 19 -21: Function call: #(String(Can't parse json response), R|/syntaxException|) -> 22 | <- 20 -22: Throw: throw #(String(Can't parse json response), R|/syntaxException|) -> 23[DEAD], 41 | <- 21 -23: Stub[DEAD] -> 24 | <- 22 -24: Exit block[DEAD] -> 25 | <- 23 -25: Catch exit[DEAD] -> 34 | <- 24 -26: Catch enter -> 27, 41 | <- 9 -27: Enter block -> 28 | <- 26 -28: Access variable R|/ioException| -> 29 | <- 27 -29: Function call: #(R|/ioException|) -> 30 | <- 28 -30: Throw: throw #(R|/ioException|) -> 31[DEAD], 41 | <- 29 -31: Stub[DEAD] -> 32 | <- 30 -32: Exit block[DEAD] -> 33 | <- 31 -33: Catch exit[DEAD] -> 34 | <- 32 -34: Try expression exit -> 35 | <- 16, 25[DEAD], 33[DEAD] -35: Variable declaration: lval pluginDTOs: R|kotlin/Array| -> 36 | <- 34 -36: Exit block -> 37 | <- 35 -37: Enter annotation -> 38 | <- 36 -38: Access variable # -> 39 | <- 37 -39: Access variable # -> 40 | <- 38 -40: Exit annotation -> 41 | <- 39 -41: Exit function "fetchPluginReleaseDate" -> | <- 9, 17, 22, 26, 30, 40 - diff --git a/compiler/fir/resolve/testData/resolve/cfg/complex.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/complex.dot similarity index 99% rename from compiler/fir/resolve/testData/resolve/cfg/complex.cfg.dot rename to compiler/fir/resolve/testData/resolve/cfg/complex.dot index d0be423887b..e1ed1f663e8 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/complex.cfg.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/complex.dot @@ -14,7 +14,7 @@ subgraph fetchPluginReleaseDate { 11 [shape=box label="Access variable #"]; 12 [shape=box label="Access variable R|/url|"]; 13 [shape=box label="Function call: #.#(R|/url|)"]; - 14 [shape=box label="Function call: #.#(R|/url|).#( = connect@fun .(): { + 14 [shape=box label="Function call: #.#(R|/url|).#( = connect@fun .(): { GsonBuilder#().create#().fromJson#(it#.inputStream#.reader#(), (Array#()).java#) } )"]; diff --git a/compiler/fir/resolve/testData/resolve/cfg/initBlock.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/initBlock.cfg.dot deleted file mode 100644 index 938afe430e0..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/initBlock.cfg.dot +++ /dev/null @@ -1,2 +0,0 @@ -digraph initBlock_kt { -} diff --git a/compiler/fir/resolve/testData/resolve/cfg/initBlock.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/initBlock.cfg.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/compiler/fir/resolve/testData/resolve/cfg/initBlock.dot b/compiler/fir/resolve/testData/resolve/cfg/initBlock.dot new file mode 100644 index 00000000000..5ca8190728c --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/cfg/initBlock.dot @@ -0,0 +1,16 @@ +digraph initBlock_kt { +subgraph { + 0 [shape=box label="Enter function "]; + 1 [shape=box label="Exit function "]; + + 0 -> {1}; +} + +subgraph { + 2 [shape=box label="Enter function "]; + 3 [shape=box label="Exit function "]; + + 2 -> {3}; +} + +} diff --git a/compiler/fir/resolve/testData/resolve/cfg/jumps.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/jumps.cfg.txt deleted file mode 100644 index d2803768826..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/jumps.cfg.txt +++ /dev/null @@ -1,92 +0,0 @@ - 0: Enter function "test_1" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter when -> 3 | <- 1 - 3: Enter when branch condition -> 4 | <- 2 - 4: Access variable R|/x| -> 5 | <- 3 - 5: Const: Null(null) -> 6 | <- 4 - 6: Operator == -> 7 | <- 5 - 7: Exit when branch condition -> 8, 14 | <- 6 - 8: Enter block -> 9 | <- 7 - 9: Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|() -> 10 | <- 8 -10: Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|() -> 11[DEAD], 25 | <- 9 -11: Stub[DEAD] -> 12 | <- 10 -12: Exit block[DEAD] -> 13 | <- 11 -13: Exit when branch result[DEAD] -> 20 | <- 12 -14: Enter when branch condition "else" -> 15 | <- 7 -15: Exit when branch condition -> 16 | <- 14 -16: Enter block -> 17 | <- 15 -17: Access variable R|/x| -> 18 | <- 16 -18: Exit block -> 19 | <- 17 -19: Exit when branch result -> 20 | <- 18 -20: Exit when -> 21 | <- 13[DEAD], 19 -21: Variable declaration: lval y: R|kotlin/Int| -> 22 | <- 20 -22: Access variable R|/y| -> 23 | <- 21 -23: Function call: R|/y|.R|kotlin/Int.inc|() -> 24 | <- 22 -24: Exit block -> 25 | <- 23 -25: Exit function "test_1" -> | <- 10, 24 - - 0: Enter function "test_2" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter when -> 3 | <- 1 - 3: Enter when branch condition -> 4 | <- 2 - 4: Access variable R|/x| -> 5 | <- 3 - 5: Const: Null(null) -> 6 | <- 4 - 6: Operator == -> 7 | <- 5 - 7: Exit when branch condition -> 8, 12 | <- 6 - 8: Enter block -> 9 | <- 7 - 9: Access variable R|/x| -> 10 | <- 8 -10: Exit block -> 11 | <- 9 -11: Exit when branch result -> 18 | <- 10 -12: Enter when branch condition "else" -> 13 | <- 7 -13: Exit when branch condition -> 14 | <- 12 -14: Enter block -> 15 | <- 13 -15: Access variable R|/x| -> 16 | <- 14 -16: Exit block -> 17 | <- 15 -17: Exit when branch result -> 18 | <- 16 -18: Exit when -> 19 | <- 11, 17 -19: Variable declaration: lval y: R|kotlin/Int?| -> 20 | <- 18 -20: Access variable R|/y| -> 21 | <- 19 -21: Function call: R|/y|.#() -> 22 | <- 20 -22: Exit block -> 23 | <- 21 -23: Exit function "test_2" -> | <- 22 - - 0: Enter function "test_3" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter while loop -> 3 | <- 1 - 3: Enter loop condition -> 4 | <- 2, 13[DEAD] - 4: Const: Boolean(true) -> 5 | <- 3 - 5: Exit loop condition -> 6, 14 | <- 4 - 6: Enter loop block -> 7 | <- 5 - 7: Enter block -> 8 | <- 6 - 8: Access variable R|/x| -> 9 | <- 7 - 9: Type operator: "x as Int" -> 10 | <- 8 -10: Jump: break@@@[Boolean(true)] -> 11[DEAD], 14 | <- 9 -11: Stub[DEAD] -> 12 | <- 10 -12: Exit block[DEAD] -> 13 | <- 11 -13: Exit loop block[DEAD] -> 3 | <- 12 -14: Exit whileloop -> 15 | <- 5, 10 -15: Access variable R|/x| -> 16 | <- 14 -16: Function call: R|/x|.#() -> 17 | <- 15 -17: Exit block -> 18 | <- 16 -18: Exit function "test_3" -> | <- 17 - - 0: Enter function "test_4" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter do-while loop -> 3 | <- 1 - 3: Enter loop block -> 4 | <- 2, 13[DEAD] - 4: Enter block -> 5 | <- 3 - 5: Access variable R|/x| -> 6 | <- 4 - 6: Type operator: "x as int" -> 7 | <- 5 - 7: Jump: break@@@[Boolean(true)] -> 8[DEAD], 14[DEAD] | <- 6 - 8: Stub[DEAD] -> 9 | <- 7 - 9: Exit block[DEAD] -> 10 | <- 8 -10: Exit loop block[DEAD] -> 11 | <- 9 -11: Enter loop condition[DEAD] -> 12 | <- 10 -12: Const: Boolean(true)[DEAD] -> 13 | <- 11 -13: Exit loop condition[DEAD] -> 3, 14 | <- 12 -14: Exit do-whileloop[DEAD] -> 15 | <- 7, 13 -15: Access variable R|/x|[DEAD] -> 16 | <- 14 -16: Function call: R|/x|.#()[DEAD] -> 17 | <- 15 -17: Exit block[DEAD] -> 18 | <- 16 -18: Exit function "test_4"[DEAD] -> | <- 17 - diff --git a/compiler/fir/resolve/testData/resolve/cfg/jumps.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/jumps.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/cfg/jumps.cfg.dot rename to compiler/fir/resolve/testData/resolve/cfg/jumps.dot diff --git a/compiler/fir/resolve/testData/resolve/cfg/lambdas.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/cfg/lambdas.cfg.dot rename to compiler/fir/resolve/testData/resolve/cfg/lambdas.dot diff --git a/compiler/fir/resolve/testData/resolve/cfg/loops.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/loops.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/cfg/loops.cfg.dot rename to compiler/fir/resolve/testData/resolve/cfg/loops.dot diff --git a/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.cfg.dot deleted file mode 100644 index c1dd22a635d..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.cfg.dot +++ /dev/null @@ -1,216 +0,0 @@ -digraph propertiesAndInitBlocks_kt { -subgraph run { - 0 [shape=box label="Enter function run"]; - 1 [shape=box label="Enter block"]; - 2 [shape=box label="Function call: R|/block|.R|FakeOverride|()"]; - 3 [shape=box label="Exit block"]; - 4 [shape=box label="Exit function run"]; - - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; - 3 -> {4}; -} - -subgraph val_x1 { - 5 [shape=box label="Enter property"]; - 6 [shape=box label="Const: Int(1)"]; - 7 [shape=box label="Exit property"]; - - 5 -> {6}; - 6 -> {7}; -} - -subgraph { - 8 [shape=box label="Enter function getter"]; - 9 [shape=box label="Enter block"]; - 10 [shape=box label="Const: Int(1)"]; - 11 [shape=box label="Jump: ^ Int(1)"]; - 12 [shape=box label="Stub[DEAD]"]; - 13 [shape=box label="Exit block[DEAD]"]; - 14 [shape=box label="Exit function getter[DEAD]"]; - - 8 -> {9}; - 9 -> {10}; - 10 -> {11}; - 11 -> {14 12} [style=dotted]; - 12 -> {13} [style=dotted]; - 13 -> {14} [style=dotted]; -} - -subgraph { - 15 [shape=box label="Enter function setter"]; - 16 [shape=box label="Enter block"]; - 17 [shape=box label="Const: Int(1)"]; - 18 [shape=box label="Assignmenet: F|/x2|"]; - 19 [shape=box label="Exit block"]; - 20 [shape=box label="Exit function setter"]; - - 15 -> {16}; - 16 -> {17}; - 17 -> {18}; - 18 -> {19}; - 19 -> {20}; -} - -subgraph val_x2 { - 21 [shape=box label="Enter property"]; - 22 [shape=box label="Const: Int(1)"]; - 23 [shape=box label="Exit property"]; - - 21 -> {22}; - 22 -> {23}; -} - -subgraph { - 24 [shape=box label="Enter init block"]; - 25 [shape=box label="Enter block"]; - 26 [shape=box label="Function call: #()"]; - 27 [shape=box label="Throw: throw #()"]; - 28 [shape=box label="Stub[DEAD]"]; - 29 [shape=box label="Const: Int(1)[DEAD]"]; - 30 [shape=box label="Exit block[DEAD]"]; - 31 [shape=box label="Exit init block[DEAD]"]; - 32 [shape=box label="Enter function anonymousFunction"]; - 33 [shape=box label="Enter block"]; - 34 [shape=box label="Function call: #()"]; - 35 [shape=box label="Throw: throw #()"]; - 36 [shape=box label="Stub[DEAD]"]; - 37 [shape=box label="Exit block[DEAD]"]; - 38 [shape=box label="Exit function anonymousFunction[DEAD]"]; - - 24 -> {25}; - 25 -> {26}; - 26 -> {27}; - 27 -> {31 28} [style=dotted]; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; - 30 -> {31} [style=dotted]; - 32 -> {33}; - 33 -> {34}; - 34 -> {35}; - 35 -> {38 36} [style=dotted]; - 36 -> {37} [style=dotted]; - 37 -> {38} [style=dotted]; -} - -subgraph foo { - 39 [shape=box label="Enter function foo"]; - 40 [shape=box label="Enter block"]; - 41 [shape=box label="Const: Int(1)"]; - 42 [shape=box label="Const: Int(1)"]; - 43 [shape=box label="Function call: Int(1).R|kotlin/Int.plus|(Int(1))"]; - 44 [shape=box label="Variable declaration: lval c: R|kotlin/Int|"]; - 45 [shape=box label="Function call: #()"]; - 46 [shape=box label="Throw: throw #()"]; - 47 [shape=box label="Stub[DEAD]"]; - 48 [shape=box label="Exit block[DEAD]"]; - 49 [shape=box label="Exit function foo[DEAD]"]; - - 39 -> {40}; - 40 -> {41}; - 41 -> {42}; - 42 -> {43}; - 43 -> {44}; - 44 -> {45}; - 45 -> {46}; - 46 -> {49 47} [style=dotted]; - 47 -> {48} [style=dotted]; - 48 -> {49} [style=dotted]; -} - -subgraph { - 50 [shape=box label="Enter init block"]; - 51 [shape=box label="Enter block"]; - 52 [shape=box label="Function call: #()"]; - 53 [shape=box label="Throw: throw #()"]; - 54 [shape=box label="Stub[DEAD]"]; - 55 [shape=box label="Exit block[DEAD]"]; - 56 [shape=box label="Exit init block[DEAD]"]; - 57 [shape=box label="Enter function getter"]; - 58 [shape=box label="Enter block"]; - 59 [shape=box label="Exit block"]; - 60 [shape=box label="Exit function getter"]; - - 50 -> {51}; - 51 -> {52}; - 52 -> {53}; - 53 -> {56 54} [style=dotted]; - 54 -> {55} [style=dotted]; - 55 -> {56} [style=dotted]; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; -} - -subgraph val_x3 { - 61 [shape=box label="Enter property"]; - 62 [shape=box label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { - local final fun foo(): R|kotlin/Unit| { - lval c: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1)) - throw #() - } - - local final class LocalClass : R|kotlin/Any| { - public constructor(): R|LocalClass| { - super() - } - - init { - throw #() - Int(1) - } - - } - - throw #() -} -)"]; - 63 [shape=box label="Exit property"]; - - 61 -> {62}; - 62 -> {63}; -} - -subgraph val_x4 { - 64 [shape=box label="Enter property"]; - 65 [shape=box label="Try expression enter"]; - 66 [shape=box label="Try main block enter"]; - 67 [shape=box label="Enter block"]; - 68 [shape=box label="Const: Int(1)"]; - 69 [shape=box label="Exit block"]; - 70 [shape=box label="Try main block exit"]; - 71 [shape=box label="Enter finally"]; - 72 [shape=box label="Enter block"]; - 73 [shape=box label="Const: Int(0)"]; - 74 [shape=box label="Exit block"]; - 75 [shape=box label="Exit finally"]; - 76 [shape=box label="Catch enter"]; - 77 [shape=box label="Enter block"]; - 78 [shape=box label="Const: Int(2)"]; - 79 [shape=box label="Exit block"]; - 80 [shape=box label="Catch exit"]; - 81 [shape=box label="Try expression exit"]; - 82 [shape=box label="Exit property"]; - - 64 -> {65}; - 65 -> {66}; - 66 -> {82 76 71 67}; - 67 -> {68}; - 68 -> {69}; - 69 -> {70}; - 70 -> {81}; - 71 -> {72}; - 72 -> {73}; - 73 -> {74}; - 74 -> {75}; - 75 -> {81}; - 76 -> {82 77}; - 77 -> {78}; - 78 -> {79}; - 79 -> {80}; - 80 -> {81}; - 81 -> {82}; -} - -} diff --git a/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.cfg.txt deleted file mode 100644 index 1790f860cc9..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.cfg.txt +++ /dev/null @@ -1,113 +0,0 @@ -0: Enter function "run" -> 1 -1: Enter block -> 2 | <- 0 -2: Function call: R|/block|.R|FakeOverride|() -> 3 | <- 1 -3: Exit block -> 4 | <- 2 -4: Exit function "run" -> | <- 3 - -0: Enter property -> 1 -1: Const: Int(1) -> 2 | <- 0 -2: Exit property -> | <- 1 - -0: Enter function "getter" -> 1 -1: Enter block -> 2 | <- 0 -2: Const: Int(1) -> 3 | <- 1 -3: Jump: ^ Int(1) -> 4[DEAD], 6[DEAD] | <- 2 -4: Stub[DEAD] -> 5 | <- 3 -5: Exit block[DEAD] -> 6 | <- 4 -6: Exit function "getter"[DEAD] -> | <- 3, 5 - -0: Enter function "setter" -> 1 -1: Enter block -> 2 | <- 0 -2: Const: Int(1) -> 3 | <- 1 -3: Assignmenet: F|/x2| -> 4 | <- 2 -4: Exit block -> 5 | <- 3 -5: Exit function "setter" -> | <- 4 - -0: Enter property -> 1 -1: Const: Int(1) -> 2 | <- 0 -2: Exit property -> | <- 1 - - 0: Enter init block -> 1 - 1: Enter block -> 2 | <- 0 - 2: Function call: #() -> 3 | <- 1 - 3: Throw: throw #() -> 4[DEAD], 7[DEAD] | <- 2 - 4: Stub[DEAD] -> 5 | <- 3 - 5: Const: Int(1)[DEAD] -> 6 | <- 4 - 6: Exit block[DEAD] -> 7 | <- 5 - 7: Exit init block[DEAD] -> | <- 3, 6 - 8: Enter function "anonymousFunction" -> 9 - 9: Enter block -> 10 | <- 8 -10: Function call: #() -> 11 | <- 9 -11: Throw: throw #() -> 12[DEAD], 14[DEAD] | <- 10 -12: Stub[DEAD] -> 13 | <- 11 -13: Exit block[DEAD] -> 14 | <- 12 -14: Exit function "anonymousFunction"[DEAD] -> | <- 11, 13 - - 0: Enter function "foo" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Const: Int(1) -> 3 | <- 1 - 3: Const: Int(1) -> 4 | <- 2 - 4: Function call: Int(1).R|kotlin/Int.plus|(Int(1)) -> 5 | <- 3 - 5: Variable declaration: lval c: R|kotlin/Int| -> 6 | <- 4 - 6: Function call: #() -> 7 | <- 5 - 7: Throw: throw #() -> 8[DEAD], 10[DEAD] | <- 6 - 8: Stub[DEAD] -> 9 | <- 7 - 9: Exit block[DEAD] -> 10 | <- 8 -10: Exit function "foo"[DEAD] -> | <- 7, 9 - - 0: Enter init block -> 1 - 1: Enter block -> 2 | <- 0 - 2: Function call: #() -> 3 | <- 1 - 3: Throw: throw #() -> 4[DEAD], 6[DEAD] | <- 2 - 4: Stub[DEAD] -> 5 | <- 3 - 5: Exit block[DEAD] -> 6 | <- 4 - 6: Exit init block[DEAD] -> | <- 3, 5 - 7: Enter function "getter" -> 8 - 8: Enter block -> 9 | <- 7 - 9: Exit block -> 10 | <- 8 -10: Exit function "getter" -> | <- 9 - -0: Enter property -> 1 -1: Function call: R|/run|( = run@fun (): R|kotlin/Unit| { - local final fun foo(): R|kotlin/Unit| { - lval c: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1)) - throw #() - } - - local final class LocalClass : R|kotlin/Any| { - public constructor(): R|LocalClass| { - super() - } - - init { - throw #() - Int(1) - } - - } - - throw #() -} -) -> 2 | <- 0 -2: Exit property -> | <- 1 - - 0: Enter property -> 1 - 1: Try expression enter -> 2 | <- 0 - 2: Try main block enter -> 3, 7, 12, 18 | <- 1 - 3: Enter block -> 4 | <- 2 - 4: Const: Int(1) -> 5 | <- 3 - 5: Exit block -> 6 | <- 4 - 6: Try main block exit -> 17 | <- 5 - 7: Enter finally -> 8 | <- 2 - 8: Enter block -> 9 | <- 7 - 9: Const: Int(0) -> 10 | <- 8 -10: Exit block -> 11 | <- 9 -11: Exit finally -> 17 | <- 10 -12: Catch enter -> 13, 18 | <- 2 -13: Enter block -> 14 | <- 12 -14: Const: Int(2) -> 15 | <- 13 -15: Exit block -> 16 | <- 14 -16: Catch exit -> 17 | <- 15 -17: Try expression exit -> 18 | <- 6, 11, 16 -18: Exit property -> | <- 2, 12, 17 - diff --git a/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.dot b/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.dot new file mode 100644 index 00000000000..9781dad7df5 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/cfg/propertiesAndInitBlocks.dot @@ -0,0 +1,227 @@ +digraph propertiesAndInitBlocks_kt { +subgraph run { + 0 [shape=box label="Enter function run"]; + 1 [shape=box label="Enter block"]; + 2 [shape=box label="Function call: R|/block|.R|FakeOverride|()"]; + 3 [shape=box label="Exit block"]; + 4 [shape=box label="Exit function run"]; + + 0 -> {1}; + 1 -> {2}; + 2 -> {3}; + 3 -> {4}; +} + +subgraph val_x1 { + 5 [shape=box label="Enter property"]; + 6 [shape=box label="Const: Int(1)"]; + 7 [shape=box label="Exit property"]; + + 5 -> {6}; + 6 -> {7}; +} + +subgraph { + 8 [shape=box label="Enter function getter"]; + 9 [shape=box label="Enter block"]; + 10 [shape=box label="Const: Int(1)"]; + 11 [shape=box label="Jump: ^ Int(1)"]; + 12 [shape=box label="Stub[DEAD]"]; + 13 [shape=box label="Exit block[DEAD]"]; + 14 [shape=box label="Exit function getter[DEAD]"]; + + 8 -> {9}; + 9 -> {10}; + 10 -> {11}; + 11 -> {14 12} [style=dotted]; + 12 -> {13} [style=dotted]; + 13 -> {14} [style=dotted]; +} + +subgraph { + 15 [shape=box label="Enter function setter"]; + 16 [shape=box label="Enter block"]; + 17 [shape=box label="Const: Int(1)"]; + 18 [shape=box label="Assignmenet: F|/x2|"]; + 19 [shape=box label="Exit block"]; + 20 [shape=box label="Exit function setter"]; + + 15 -> {16}; + 16 -> {17}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; +} + +subgraph val_x2 { + 21 [shape=box label="Enter property"]; + 22 [shape=box label="Const: Int(1)"]; + 23 [shape=box label="Exit property"]; + + 21 -> {22}; + 22 -> {23}; +} + +subgraph foo { + 24 [shape=box label="Enter function foo"]; + 25 [shape=box label="Enter block"]; + 26 [shape=box label="Const: Int(1)"]; + 27 [shape=box label="Const: Int(1)"]; + 28 [shape=box label="Function call: Int(1).R|kotlin/Int.plus|(Int(1))"]; + 29 [shape=box label="Variable declaration: lval c: R|kotlin/Int|"]; + 30 [shape=box label="Function call: #()"]; + 31 [shape=box label="Throw: throw #()"]; + 32 [shape=box label="Stub[DEAD]"]; + 33 [shape=box label="Exit block[DEAD]"]; + 34 [shape=box label="Exit function foo[DEAD]"]; + + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29}; + 29 -> {30}; + 30 -> {31}; + 31 -> {34 32} [style=dotted]; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; +} + +subgraph { + 35 [shape=box label="Enter function "]; + 36 [shape=box label="Exit function "]; + + 35 -> {36}; +} + +subgraph { + 37 [shape=box label="Enter init block"]; + 38 [shape=box label="Enter block"]; + 39 [shape=box label="Function call: #()"]; + 40 [shape=box label="Throw: throw #()"]; + 41 [shape=box label="Stub[DEAD]"]; + 42 [shape=box label="Exit block[DEAD]"]; + 43 [shape=box label="Exit init block[DEAD]"]; + 44 [shape=box label="Enter function getter"]; + 45 [shape=box label="Enter block"]; + 46 [shape=box label="Exit block"]; + 47 [shape=box label="Exit function getter"]; + + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; + 40 -> {43 41} [style=dotted]; + 41 -> {42} [style=dotted]; + 42 -> {43} [style=dotted]; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; +} + +subgraph { + 48 [shape=box label="Enter function "]; + 49 [shape=box label="Exit function "]; + + 48 -> {49}; +} + +subgraph val_x3 { + 50 [shape=box label="Enter init block"]; + 51 [shape=box label="Enter block"]; + 52 [shape=box label="Function call: #()"]; + 53 [shape=box label="Throw: throw #()"]; + 54 [shape=box label="Stub[DEAD]"]; + 55 [shape=box label="Const: Int(1)[DEAD]"]; + 56 [shape=box label="Exit block[DEAD]"]; + 57 [shape=box label="Exit init block[DEAD]"]; + 58 [shape=box label="Enter property"]; + 59 [shape=box label="Enter function anonymousFunction"]; + 60 [shape=box label="Enter block"]; + 61 [shape=box label="Function call: #()"]; + 62 [shape=box label="Throw: throw #()"]; + 63 [shape=box label="Stub[DEAD]"]; + 64 [shape=box label="Exit block[DEAD]"]; + 65 [shape=box label="Exit function anonymousFunction[DEAD]"]; + 66 [shape=box label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { + local final fun foo(): R|kotlin/Unit| { + lval c: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1)) + throw #() + } + + local final class LocalClass : R|kotlin/Any| { + public constructor(): R|LocalClass| { + super() + } + + init { + throw #() + Int(1) + } + + } + + throw #() +} +)[DEAD]"]; + 67 [shape=box label="Exit property[DEAD]"]; + + 50 -> {51}; + 51 -> {52}; + 52 -> {53}; + 53 -> {57 54} [style=dotted]; + 54 -> {55} [style=dotted]; + 55 -> {56} [style=dotted]; + 56 -> {57} [style=dotted]; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; + 61 -> {62}; + 62 -> {65 63} [style=dotted]; + 63 -> {64} [style=dotted]; + 64 -> {65} [style=dotted]; + 65 -> {66} [style=dotted]; + 66 -> {67} [style=dotted]; +} + +subgraph val_x4 { + 68 [shape=box label="Enter property"]; + 69 [shape=box label="Try expression enter"]; + 70 [shape=box label="Try main block enter"]; + 71 [shape=box label="Enter block"]; + 72 [shape=box label="Const: Int(1)"]; + 73 [shape=box label="Exit block"]; + 74 [shape=box label="Try main block exit"]; + 75 [shape=box label="Enter finally"]; + 76 [shape=box label="Enter block"]; + 77 [shape=box label="Const: Int(0)"]; + 78 [shape=box label="Exit block"]; + 79 [shape=box label="Exit finally"]; + 80 [shape=box label="Catch enter"]; + 81 [shape=box label="Enter block"]; + 82 [shape=box label="Const: Int(2)"]; + 83 [shape=box label="Exit block"]; + 84 [shape=box label="Catch exit"]; + 85 [shape=box label="Try expression exit"]; + 86 [shape=box label="Exit property"]; + + 68 -> {69}; + 69 -> {70}; + 70 -> {86 80 75 71}; + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {85}; + 75 -> {76}; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; + 79 -> {85}; + 80 -> {86 81}; + 81 -> {82}; + 82 -> {83}; + 83 -> {84}; + 84 -> {85}; + 85 -> {86}; +} + +} diff --git a/compiler/fir/resolve/testData/resolve/cfg/simple.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/simple.cfg.txt deleted file mode 100644 index 98224f6350d..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/simple.cfg.txt +++ /dev/null @@ -1,17 +0,0 @@ -0: Enter function "foo" -> 1 -1: Enter block -> 2 | <- 0 -2: Exit block -> 3 | <- 1 -3: Exit function "foo" -> | <- 2 - - 0: Enter function "test" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Const: Int(1) -> 3 | <- 1 - 3: Variable declaration: lval x: R|kotlin/Int| -> 4 | <- 2 - 4: Access variable R|/x| -> 5 | <- 3 - 5: Const: Int(1) -> 6 | <- 4 - 6: Function call: R|/x|.R|kotlin/Int.plus|(Int(1)) -> 7 | <- 5 - 7: Variable declaration: lval y: R|kotlin/Int| -> 8 | <- 6 - 8: Function call: R|/foo|() -> 9 | <- 7 - 9: Exit block -> 10 | <- 8 -10: Exit function "test" -> | <- 9 - diff --git a/compiler/fir/resolve/testData/resolve/cfg/simple.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/simple.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/cfg/simple.cfg.dot rename to compiler/fir/resolve/testData/resolve/cfg/simple.dot diff --git a/compiler/fir/resolve/testData/resolve/cfg/tryCatch.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/tryCatch.cfg.txt deleted file mode 100644 index 42ee6b77b17..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/tryCatch.cfg.txt +++ /dev/null @@ -1,112 +0,0 @@ - 0: Enter function "test_1" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Try expression enter -> 3 | <- 1 - 3: Try main block enter -> 4, 9, 15, 23 | <- 2 - 4: Enter block -> 5 | <- 3 - 5: Const: Int(1) -> 6 | <- 4 - 6: Variable declaration: lval x: R|kotlin/Int| -> 7 | <- 5 - 7: Exit block -> 8 | <- 6 - 8: Try main block exit -> 21 | <- 7 - 9: Catch enter -> 10, 23 | <- 3 -10: Enter block -> 11 | <- 9 -11: Const: Int(3) -> 12 | <- 10 -12: Variable declaration: lval z: R|kotlin/Int| -> 13 | <- 11 -13: Exit block -> 14 | <- 12 -14: Catch exit -> 21 | <- 13 -15: Catch enter -> 16, 23 | <- 3 -16: Enter block -> 17 | <- 15 -17: Const: Int(2) -> 18 | <- 16 -18: Variable declaration: lval y: R|kotlin/Int| -> 19 | <- 17 -19: Exit block -> 20 | <- 18 -20: Catch exit -> 21 | <- 19 -21: Try expression exit -> 22 | <- 8, 14, 20 -22: Exit block -> 23 | <- 21 -23: Exit function "test_1" -> | <- 3, 9, 15, 22 - - 0: Enter function "test_2" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Try expression enter -> 3 | <- 1 - 3: Try main block enter -> 4, 8, 16 | <- 2 - 4: Enter block -> 5 | <- 3 - 5: Const: Int(1) -> 6 | <- 4 - 6: Exit block -> 7 | <- 5 - 7: Try main block exit -> 13 | <- 6 - 8: Catch enter -> 9, 16 | <- 3 - 9: Enter block -> 10 | <- 8 -10: Const: Int(2) -> 11 | <- 9 -11: Exit block -> 12 | <- 10 -12: Catch exit -> 13 | <- 11 -13: Try expression exit -> 14 | <- 7, 12 -14: Variable declaration: lval x: R|kotlin/Int| -> 15 | <- 13 -15: Exit block -> 16 | <- 14 -16: Exit function "test_2" -> | <- 3, 8, 15 - - 0: Enter function "test_3" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter while loop -> 3 | <- 1 - 3: Enter loop condition -> 4 | <- 2, 54, 62 - 4: Const: Boolean(true) -> 5 | <- 3 - 5: Exit loop condition -> 6, 63 | <- 4 - 6: Enter loop block -> 7 | <- 5 - 7: Enter block -> 8 | <- 6 - 8: Try expression enter -> 9 | <- 7 - 9: Try main block enter -> 10, 46, 52, 67 | <- 8 -10: Enter block -> 11 | <- 9 -11: Enter when -> 12 | <- 10 -12: Enter when branch condition -> 13 | <- 11 -13: Access variable R|/b| -> 14 | <- 12 -14: Exit when branch condition -> 15, 20 | <- 13 -15: Enter block -> 16 | <- 14 -16: Jump: ^test_3 Unit -> 17[DEAD], 67 | <- 15 -17: Stub[DEAD] -> 18 | <- 16 -18: Exit block[DEAD] -> 19 | <- 17 -19: Exit when branch result[DEAD] -> 25 | <- 18 -20: Enter when branch condition "else" -> 21 | <- 14 -21: Exit when branch condition -> 22 | <- 20 -22: Enter block -> 23 | <- 21 -23: Exit block -> 24 | <- 22 -24: Exit when branch result -> 25 | <- 23 -25: Exit when -> 26 | <- 19[DEAD], 24 -26: Const: Int(1) -> 27 | <- 25 -27: Variable declaration: lval x: R|kotlin/Int| -> 28 | <- 26 -28: Enter when -> 29 | <- 27 -29: Enter when branch condition -> 30 | <- 28 -30: Access variable R|/b| -> 31 | <- 29 -31: Function call: R|/b|.R|kotlin/Boolean.not|() -> 32 | <- 30 -32: Exit when branch condition -> 33, 38 | <- 31 -33: Enter block -> 34 | <- 32 -34: Jump: break@@@[Boolean(true)] -> 35[DEAD], 63 | <- 33 -35: Stub[DEAD] -> 36 | <- 34 -36: Exit block[DEAD] -> 37 | <- 35 -37: Exit when branch result[DEAD] -> 43 | <- 36 -38: Enter when branch condition "else" -> 39 | <- 32 -39: Exit when branch condition -> 40 | <- 38 -40: Enter block -> 41 | <- 39 -41: Exit block -> 42 | <- 40 -42: Exit when branch result -> 43 | <- 41 -43: Exit when -> 44 | <- 37[DEAD], 42 -44: Exit block -> 45 | <- 43 -45: Try main block exit -> 58 | <- 44 -46: Catch enter -> 47, 67 | <- 9 -47: Enter block -> 48 | <- 46 -48: Jump: break@@@[Boolean(true)] -> 49[DEAD], 63 | <- 47 -49: Stub[DEAD] -> 50 | <- 48 -50: Exit block[DEAD] -> 51 | <- 49 -51: Catch exit[DEAD] -> 58 | <- 50 -52: Catch enter -> 53, 67 | <- 9 -53: Enter block -> 54 | <- 52 -54: Jump: continue@@@[Boolean(true)] -> 3, 55[DEAD] | <- 53 -55: Stub[DEAD] -> 56 | <- 54 -56: Exit block[DEAD] -> 57 | <- 55 -57: Catch exit[DEAD] -> 58 | <- 56 -58: Try expression exit -> 59 | <- 45, 51[DEAD], 57[DEAD] -59: Const: Int(2) -> 60 | <- 58 -60: Variable declaration: lval y: R|kotlin/Int| -> 61 | <- 59 -61: Exit block -> 62 | <- 60 -62: Exit loop block -> 3 | <- 61 -63: Exit whileloop -> 64 | <- 5, 34, 48 -64: Const: Int(3) -> 65 | <- 63 -65: Variable declaration: lval z: R|kotlin/Int| -> 66 | <- 64 -66: Exit block -> 67 | <- 65 -67: Exit function "test_3" -> | <- 9, 16, 46, 52, 66 - diff --git a/compiler/fir/resolve/testData/resolve/cfg/tryCatch.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/tryCatch.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/cfg/tryCatch.cfg.dot rename to compiler/fir/resolve/testData/resolve/cfg/tryCatch.dot diff --git a/compiler/fir/resolve/testData/resolve/cfg/when.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/when.cfg.txt deleted file mode 100644 index d0c1a470c56..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/when.cfg.txt +++ /dev/null @@ -1,71 +0,0 @@ - 0: Enter function "test_1" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter when -> 3 | <- 1 - 3: Enter when branch condition -> 4 | <- 2 - 4: Access variable R|/x| -> 5 | <- 3 - 5: Const: Int(1) -> 6 | <- 4 - 6: Operator == -> 7 | <- 5 - 7: Exit when branch condition -> 8, 12 | <- 6 - 8: Enter block -> 9 | <- 7 - 9: Const: Int(10) -> 10 | <- 8 -10: Exit block -> 11 | <- 9 -11: Exit when branch result -> 41 | <- 10 -12: Enter when branch condition -> 13 | <- 7 -13: Access variable R|/x| -> 14 | <- 12 -14: Const: Int(2) -> 15 | <- 13 -15: Function call: R|/x|.R|kotlin/Int.rem|(Int(2)) -> 16 | <- 14 -16: Const: Int(0) -> 17 | <- 15 -17: Operator == -> 18 | <- 16 -18: Exit when branch condition -> 19, 23 | <- 17 -19: Enter block -> 20 | <- 18 -20: Const: Int(20) -> 21 | <- 19 -21: Exit block -> 22 | <- 20 -22: Exit when branch result -> 41 | <- 21 -23: Enter when branch condition -> 24 | <- 18 -24: Const: Int(1) -> 25 | <- 23 -25: Const: Int(1) -> 26 | <- 24 -26: Function call: Int(1).R|kotlin/Int.minus|(Int(1)) -> 27 | <- 25 -27: Const: Int(0) -> 28 | <- 26 -28: Operator == -> 29 | <- 27 -29: Exit when branch condition -> 30, 35 | <- 28 -30: Enter block -> 31 | <- 29 -31: Jump: ^test_1 Unit -> 32[DEAD], 44 | <- 30 -32: Stub[DEAD] -> 33 | <- 31 -33: Exit block[DEAD] -> 34 | <- 32 -34: Exit when branch result[DEAD] -> 41 | <- 33 -35: Enter when branch condition "else" -> 36 | <- 29 -36: Exit when branch condition -> 37 | <- 35 -37: Enter block -> 38 | <- 36 -38: Const: Int(5) -> 39 | <- 37 -39: Exit block -> 40 | <- 38 -40: Exit when branch result -> 41 | <- 39 -41: Exit when -> 42 | <- 11, 22, 34[DEAD], 40 -42: Variable declaration: lval y: R|kotlin/Int| -> 43 | <- 41 -43: Exit block -> 44 | <- 42 -44: Exit function "test_1" -> | <- 31, 43 - - 0: Enter function "test_2" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter when -> 3 | <- 1 - 3: Enter when branch condition -> 4 | <- 2 - 4: Enter && -> 5 | <- 3 - 5: Access variable R|/x| -> 6 | <- 4 - 6: Type operator: "x is A" -> 7, 9 | <- 5 - 7: Access variable R|/x| -> 8 | <- 6 - 8: Type operator: "x is B" -> 9 | <- 7 - 9: Exit && -> 10 | <- 6, 8 -10: Exit when branch condition -> 11, 16 | <- 9 -11: Enter block -> 12 | <- 10 -12: Access variable R|/x| -> 13 | <- 11 -13: Type operator: "x is A" -> 14 | <- 12 -14: Exit block -> 15 | <- 13 -15: Exit when branch result -> 21 | <- 14 -16: Enter when branch condition "else" -> 17 | <- 10 -17: Exit when branch condition -> 18 | <- 16 -18: Enter block -> 19 | <- 17 -19: Exit block -> 20 | <- 18 -20: Exit when branch result -> 21 | <- 19 -21: Exit when -> 22 | <- 15, 20 -22: Exit block -> 23 | <- 21 -23: Exit function "test_2" -> | <- 22 - diff --git a/compiler/fir/resolve/testData/resolve/cfg/when.cfg.dot b/compiler/fir/resolve/testData/resolve/cfg/when.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/cfg/when.cfg.dot rename to compiler/fir/resolve/testData/resolve/cfg/when.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/booleanOperators.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/booleanOperators.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/booleanOperators.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/booleanOperators.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/casts.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/casts.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/casts.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/casts.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/elvis.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/elvis.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/elvis.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/elvis.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/equalsAndIdentity.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/equalsAndIdentity.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/equalsAndIdentity.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/equalsAndIdentity.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/equalsToBoolean.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/equalsToBoolean.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/equalsToBoolean.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/equalsToBoolean.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/nullability.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/nullability.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/nullability.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/nullability.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/returns.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/returns.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/returns.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/returns.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/simpleIf.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/simpleIf.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/simpleIf.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/simpleIf.dot diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/when.cfg.dot b/compiler/fir/resolve/testData/resolve/smartcasts/when.dot similarity index 100% rename from compiler/fir/resolve/testData/resolve/smartcasts/when.cfg.dot rename to compiler/fir/resolve/testData/resolve/smartcasts/when.dot diff --git a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/AbstractFirCfgBuildingTest.kt b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/AbstractFirCfgBuildingTest.kt index b73a694b8b8..2a0267113af 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/AbstractFirCfgBuildingTest.kt +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/AbstractFirCfgBuildingTest.kt @@ -31,7 +31,7 @@ abstract class AbstractFirCfgBuildingTest : AbstractFirResolveTestCase() { firFiles.first().accept(FirControlFlowGraphRenderVisitor(simpleBuilder, dotBuilder), null) val dotCfgDump = dotBuilder.toString() - val dotExpectedPath = path.replace(".kt", ".cfg.dot") + val dotExpectedPath = path.replace(".kt", ".dot") KotlinTestUtils.assertEqualsToFile(File(dotExpectedPath), dotCfgDump) }