Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "vm/flow_graph_allocator.h" | 5 #include "vm/flow_graph_allocator.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 #include "vm/il_printer.h" | 9 #include "vm/il_printer.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1346 if (Start() == split_pos) return this; | 1346 if (Start() == split_pos) return this; |
| 1347 | 1347 |
| 1348 UseInterval* interval = finger_.first_pending_use_interval(); | 1348 UseInterval* interval = finger_.first_pending_use_interval(); |
| 1349 if (interval == NULL) { | 1349 if (interval == NULL) { |
| 1350 finger_.Initialize(this); | 1350 finger_.Initialize(this); |
| 1351 interval = finger_.first_pending_use_interval(); | 1351 interval = finger_.first_pending_use_interval(); |
| 1352 } | 1352 } |
| 1353 | 1353 |
| 1354 ASSERT(split_pos < End()); | 1354 ASSERT(split_pos < End()); |
| 1355 | 1355 |
| 1356 // Corner case. We need to start over to find previous interval. | 1356 // Corner case. Split position can be inside the lifetime hole or at its |
|
Florian Schneider
2012/10/22 13:08:53
did you mean: inside _a_ lifetime hole?
| |
| 1357 if (interval->start() == split_pos) interval = first_use_interval_; | 1357 // end. We need to start over to find the previous interval. |
| 1358 if (split_pos <= interval->start()) interval = first_use_interval_; | |
| 1358 | 1359 |
| 1359 UseInterval* last_before_split = NULL; | 1360 UseInterval* last_before_split = NULL; |
| 1360 while (interval->end() <= split_pos) { | 1361 while (interval->end() <= split_pos) { |
| 1361 last_before_split = interval; | 1362 last_before_split = interval; |
| 1362 interval = interval->next(); | 1363 interval = interval->next(); |
| 1363 } | 1364 } |
| 1364 | 1365 |
| 1365 const bool split_at_start = (interval->start() == split_pos); | 1366 const bool split_at_start = (interval->start() == split_pos); |
| 1366 | 1367 |
| 1367 UseInterval* first_after_split = interval; | 1368 UseInterval* first_after_split = interval; |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2235 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", | 2236 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", |
| 2236 function.ToFullyQualifiedCString()); | 2237 function.ToFullyQualifiedCString()); |
| 2237 FlowGraphPrinter printer(flow_graph_, true); | 2238 FlowGraphPrinter printer(flow_graph_, true); |
| 2238 printer.PrintBlocks(); | 2239 printer.PrintBlocks(); |
| 2239 OS::Print("----------------------------------------------\n"); | 2240 OS::Print("----------------------------------------------\n"); |
| 2240 } | 2241 } |
| 2241 } | 2242 } |
| 2242 | 2243 |
| 2243 | 2244 |
| 2244 } // namespace dart | 2245 } // namespace dart |
| OLD | NEW |