[FIR] Fix building cfg for binary or

This commit is contained in:
Dmitriy Novozhilov
2019-08-23 13:31:31 +03:00
parent 2d3e9fe539
commit 7a81c37f5c
2 changed files with 3 additions and 4 deletions
@@ -305,7 +305,6 @@ class ControlFlowGraphBuilder : ControlFlowGraphNodeBuilder() {
assert(binaryLogicExpression.kind == FirBinaryLogicExpression.OperationKind.OR) assert(binaryLogicExpression.kind == FirBinaryLogicExpression.OperationKind.OR)
levelCounter-- levelCounter--
return binaryOrExitNodes.pop().also { return binaryOrExitNodes.pop().also {
addEdge(lastNodes.pop(), it)
addEdge(lastNodes.pop(), it) addEdge(lastNodes.pop(), it)
lastNodes.push(it) lastNodes.push(it)
} }
@@ -27,7 +27,7 @@ subgraph test_1 {
1 -> {2}; 1 -> {2};
2 -> {3}; 2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {5 8}; 4 -> {5};
5 -> {8 6}; 5 -> {8 6};
6 -> {7}; 6 -> {7};
7 -> {8}; 7 -> {8};
@@ -122,7 +122,7 @@ subgraph test_3 {
44 -> {45}; 44 -> {45};
45 -> {46}; 45 -> {46};
46 -> {47}; 46 -> {47};
47 -> {48 54}; 47 -> {48};
48 -> {49}; 48 -> {49};
49 -> {51 50}; 49 -> {51 50};
50 -> {51}; 50 -> {51};
@@ -175,7 +175,7 @@ subgraph test_4 {
69 -> {70}; 69 -> {70};
70 -> {71}; 70 -> {71};
71 -> {72}; 71 -> {72};
72 -> {73 79}; 72 -> {73};
73 -> {79 74}; 73 -> {79 74};
74 -> {75}; 74 -> {75};
75 -> {76}; 75 -> {76};