| 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 #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 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 // condition should be handled in the graph builder | 1772 // condition should be handled in the graph builder |
| 1773 successor_ = instr; | 1773 successor_ = instr; |
| 1774 } | 1774 } |
| 1775 | 1775 |
| 1776 Instruction* previous() const { return previous_; } | 1776 Instruction* previous() const { return previous_; } |
| 1777 void set_previous(Instruction* instr) { | 1777 void set_previous(Instruction* instr) { |
| 1778 ASSERT(!IsBlockEntry()); | 1778 ASSERT(!IsBlockEntry()); |
| 1779 previous_ = instr; | 1779 previous_ = instr; |
| 1780 } | 1780 } |
| 1781 | 1781 |
| 1782 // Remove instruction from the graph. | 1782 // Remove instruction from the graph and return the instruction following the |
| 1783 void RemoveFromGraph(); | 1783 // removed instruction. |
| 1784 Instruction* RemoveFromGraph(); |
| 1784 | 1785 |
| 1785 // Normal instructions can have 0 (inside a block) or 1 (last instruction in | 1786 // Normal instructions can have 0 (inside a block) or 1 (last instruction in |
| 1786 // a block) successors. Branch instruction with >1 successors override this | 1787 // a block) successors. Branch instruction with >1 successors override this |
| 1787 // function. | 1788 // function. |
| 1788 virtual intptr_t SuccessorCount() const; | 1789 virtual intptr_t SuccessorCount() const; |
| 1789 virtual BlockEntryInstr* SuccessorAt(intptr_t index) const; | 1790 virtual BlockEntryInstr* SuccessorAt(intptr_t index) const; |
| 1790 | 1791 |
| 1791 virtual void replace_computation(Computation* value) { | 1792 virtual void replace_computation(Computation* value) { |
| 1792 UNREACHABLE(); | 1793 UNREACHABLE(); |
| 1793 } | 1794 } |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2389 const GrowableArray<BlockEntryInstr*>& block_order_; | 2390 const GrowableArray<BlockEntryInstr*>& block_order_; |
| 2390 | 2391 |
| 2391 private: | 2392 private: |
| 2392 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 2393 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 2393 }; | 2394 }; |
| 2394 | 2395 |
| 2395 | 2396 |
| 2396 } // namespace dart | 2397 } // namespace dart |
| 2397 | 2398 |
| 2398 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 2399 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |