| 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 Instruction* prev_instr = previous(); | 131 Instruction* prev_instr = previous(); |
| 132 Instruction* next_instr = next(); | 132 Instruction* next_instr = next(); |
| 133 ASSERT(next_instr != NULL); | 133 ASSERT(next_instr != NULL); |
| 134 ASSERT(!next_instr->IsBlockEntry()); | 134 ASSERT(!next_instr->IsBlockEntry()); |
| 135 prev_instr->set_next(next_instr); | 135 prev_instr->set_next(next_instr); |
| 136 next_instr->set_previous(prev_instr); | 136 next_instr->set_previous(prev_instr); |
| 137 // Reset successor and previous instruction to indicate | 137 // Reset successor and previous instruction to indicate |
| 138 // that the instruction is removed from the graph. | 138 // that the instruction is removed from the graph. |
| 139 set_previous(NULL); | 139 set_previous(NULL); |
| 140 set_next(NULL); | 140 set_next(NULL); |
| 141 ASSERT(!IsDefinition() || AsDefinition()->use_list() == NULL); |
| 141 return return_previous ? prev_instr : next_instr; | 142 return return_previous ? prev_instr : next_instr; |
| 142 } | 143 } |
| 143 | 144 |
| 144 | 145 |
| 145 void ForwardInstructionIterator::RemoveCurrentFromGraph() { | 146 void ForwardInstructionIterator::RemoveCurrentFromGraph() { |
| 146 current_ = current_->RemoveFromGraph(true); // Set current_ to previous. | 147 current_ = current_->RemoveFromGraph(true); // Set current_ to previous. |
| 147 } | 148 } |
| 148 | 149 |
| 149 | 150 |
| 150 // Default implementation of visiting basic blocks. Can be overridden. | 151 // Default implementation of visiting basic blocks. Can be overridden. |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 if (compiler->is_ssa()) { | 1310 if (compiler->is_ssa()) { |
| 1310 ASSERT(locs()->in(0).IsRegister()); | 1311 ASSERT(locs()->in(0).IsRegister()); |
| 1311 __ PushRegister(locs()->in(0).reg()); | 1312 __ PushRegister(locs()->in(0).reg()); |
| 1312 } | 1313 } |
| 1313 } | 1314 } |
| 1314 | 1315 |
| 1315 | 1316 |
| 1316 #undef __ | 1317 #undef __ |
| 1317 | 1318 |
| 1318 } // namespace dart | 1319 } // namespace dart |
| OLD | NEW |