| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 return (other_constant != NULL) && | 105 return (other_constant != NULL) && |
| 106 (value().raw() == other_constant->value().raw()); | 106 (value().raw() == other_constant->value().raw()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 | 109 |
| 110 GraphEntryInstr::GraphEntryInstr(TargetEntryInstr* normal_entry) | 110 GraphEntryInstr::GraphEntryInstr(TargetEntryInstr* normal_entry) |
| 111 : BlockEntryInstr(CatchClauseNode::kInvalidTryIndex), | 111 : BlockEntryInstr(CatchClauseNode::kInvalidTryIndex), |
| 112 normal_entry_(normal_entry), | 112 normal_entry_(normal_entry), |
| 113 catch_entries_(), | 113 catch_entries_(), |
| 114 start_env_(NULL), | 114 start_env_(NULL), |
| 115 constant_null_(new BindInstr(BindInstr::kUsed, | 115 constant_null_(new BindInstr(Definition::kValue, |
| 116 new ConstantComp(Object::ZoneHandle()))), | 116 new ConstantComp(Object::ZoneHandle()))), |
| 117 spill_slot_count_(0) { | 117 spill_slot_count_(0) { |
| 118 } | 118 } |
| 119 | 119 |
| 120 | 120 |
| 121 MethodRecognizer::Kind MethodRecognizer::RecognizeKind( | 121 MethodRecognizer::Kind MethodRecognizer::RecognizeKind( |
| 122 const Function& function) { | 122 const Function& function) { |
| 123 // Only core and math library methods can be recognized. | 123 // Only core and math library methods can be recognized. |
| 124 const Library& core_lib = Library::Handle(Library::CoreLibrary()); | 124 const Library& core_lib = Library::Handle(Library::CoreLibrary()); |
| 125 const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary()); | 125 const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary()); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 prev_instr->set_next(next_instr); | 192 prev_instr->set_next(next_instr); |
| 193 next_instr->set_previous(prev_instr); | 193 next_instr->set_previous(prev_instr); |
| 194 // Reset successor and previous instruction to indicate | 194 // Reset successor and previous instruction to indicate |
| 195 // that the instruction is removed from the graph. | 195 // that the instruction is removed from the graph. |
| 196 set_previous(NULL); | 196 set_previous(NULL); |
| 197 set_next(NULL); | 197 set_next(NULL); |
| 198 return return_previous ? prev_instr : next_instr; | 198 return return_previous ? prev_instr : next_instr; |
| 199 } | 199 } |
| 200 | 200 |
| 201 | 201 |
| 202 void BindInstr::InsertBefore(Instruction* next) { | 202 void Definition::InsertBefore(Instruction* next) { |
| 203 ASSERT(previous_ == NULL); | 203 ASSERT(previous_ == NULL); |
| 204 ASSERT(next_ == NULL); | 204 ASSERT(next_ == NULL); |
| 205 next_ = next; | 205 next_ = next; |
| 206 previous_ = next->previous_; | 206 previous_ = next->previous_; |
| 207 next->previous_ = this; | 207 next->previous_ = this; |
| 208 previous_->next_ = this; | 208 previous_->next_ = this; |
| 209 } | 209 } |
| 210 | 210 |
| 211 | 211 |
| 212 void BindInstr::InsertAfter(Instruction* prev) { | 212 void Definition::InsertAfter(Instruction* prev) { |
| 213 ASSERT(previous_ == NULL); | 213 ASSERT(previous_ == NULL); |
| 214 ASSERT(next_ == NULL); | 214 ASSERT(next_ == NULL); |
| 215 previous_ = prev; | 215 previous_ = prev; |
| 216 next_ = prev->next_; | 216 next_ = prev->next_; |
| 217 next_->previous_ = this; | 217 next_->previous_ = this; |
| 218 previous_->next_ = this; | 218 previous_->next_ = this; |
| 219 } | 219 } |
| 220 | 220 |
| 221 | 221 |
| 222 void ForwardInstructionIterator::RemoveCurrentFromGraph() { | 222 void ForwardInstructionIterator::RemoveCurrentFromGraph() { |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 value->set_use_index(i); | 1516 value->set_use_index(i); |
| 1517 value->AddToEnvUseList(); | 1517 value->AddToEnvUseList(); |
| 1518 } | 1518 } |
| 1519 instr->set_env(copy); | 1519 instr->set_env(copy); |
| 1520 } | 1520 } |
| 1521 | 1521 |
| 1522 | 1522 |
| 1523 #undef __ | 1523 #undef __ |
| 1524 | 1524 |
| 1525 } // namespace dart | 1525 } // namespace dart |
| OLD | NEW |