| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 intptr_t phi_count_; | 1107 intptr_t phi_count_; |
| 1108 | 1108 |
| 1109 DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr); | 1109 DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr); |
| 1110 }; | 1110 }; |
| 1111 | 1111 |
| 1112 | 1112 |
| 1113 class PhiIterator : public ValueObject { | 1113 class PhiIterator : public ValueObject { |
| 1114 public: | 1114 public: |
| 1115 explicit PhiIterator(JoinEntryInstr* join) | 1115 explicit PhiIterator(JoinEntryInstr* join) |
| 1116 : phis_(join->phis()), index_(-1) { | 1116 : phis_(join->phis()), index_(-1) { |
| 1117 if (!Done()) Advance(); // Advance to the first smi. | 1117 if (!Done()) Advance(); // Advance to the first phi. |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 void Advance() { | 1120 void Advance() { |
| 1121 ASSERT(!Done()); | 1121 ASSERT(!Done()); |
| 1122 do { | 1122 do { |
| 1123 index_++; | 1123 index_++; |
| 1124 } while (!Done() && (Current() == NULL)); | 1124 } while (!Done() && (Current() == NULL)); |
| 1125 } | 1125 } |
| 1126 | 1126 |
| 1127 bool Done() const { | 1127 bool Done() const { |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 | 1355 |
| 1356 void SetInputAt(intptr_t i, Value* value) { inputs_[i] = value; } | 1356 void SetInputAt(intptr_t i, Value* value) { inputs_[i] = value; } |
| 1357 | 1357 |
| 1358 virtual bool CanDeoptimize() const { return false; } | 1358 virtual bool CanDeoptimize() const { return false; } |
| 1359 | 1359 |
| 1360 virtual bool HasSideEffect() const { return false; } | 1360 virtual bool HasSideEffect() const { return false; } |
| 1361 | 1361 |
| 1362 // Phi is alive if it reaches a non-environment use. | 1362 // Phi is alive if it reaches a non-environment use. |
| 1363 bool is_alive() const { return is_alive_; } | 1363 bool is_alive() const { return is_alive_; } |
| 1364 void mark_alive() { is_alive_ = true; } | 1364 void mark_alive() { is_alive_ = true; } |
| 1365 void mark_dead() { is_alive_ = false; } | |
| 1366 | 1365 |
| 1367 virtual Representation RequiredInputRepresentation(intptr_t i) const { | 1366 virtual Representation RequiredInputRepresentation(intptr_t i) const { |
| 1368 return representation_; | 1367 return representation_; |
| 1369 } | 1368 } |
| 1370 | 1369 |
| 1371 virtual Representation representation() const { | 1370 virtual Representation representation() const { |
| 1372 return representation_; | 1371 return representation_; |
| 1373 } | 1372 } |
| 1374 | 1373 |
| 1375 virtual void set_representation(Representation r) { | 1374 virtual void set_representation(Representation r) { |
| (...skipping 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4474 ForwardInstructionIterator* current_iterator_; | 4473 ForwardInstructionIterator* current_iterator_; |
| 4475 | 4474 |
| 4476 private: | 4475 private: |
| 4477 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4476 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4478 }; | 4477 }; |
| 4479 | 4478 |
| 4480 | 4479 |
| 4481 } // namespace dart | 4480 } // namespace dart |
| 4482 | 4481 |
| 4483 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4482 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |