OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library dominator_tree; | 5 library dominator_tree; |
6 | 6 |
7 // Flowgraph dominators in O(m log n) time. Implements the algorithm from | 7 // Flowgraph dominators in O(m log n) time. Implements the algorithm from |
8 // [Lengauer & Tarjan 1979] | 8 // [Lengauer & Tarjan 1979] |
9 // T. Lengauer and R.E. Tarjan, | 9 // T. Lengauer and R.E. Tarjan, |
10 // "A fast algorithm for finding dominators in a flowgraph", | 10 // "A fast algorithm for finding dominators in a flowgraph", |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 112 } |
113 for (int i = 1; i < n; ++i) { | 113 for (int i = 1; i < n; ++i) { |
114 _Vertex w = _vertex[i]; | 114 _Vertex w = _vertex[i]; |
115 if (w.dom != _vertex[w.semi]) { | 115 if (w.dom != _vertex[w.semi]) { |
116 w.dom = w.dom.dom; | 116 w.dom = w.dom.dom; |
117 } | 117 } |
118 } | 118 } |
119 r.dom = null; | 119 r.dom = null; |
120 } | 120 } |
121 } | 121 } |
OLD | NEW |