| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 GrowableArray<BlockEntryInstr*>* postorder, | 796 GrowableArray<BlockEntryInstr*>* postorder, |
| 797 GrowableArray<intptr_t>* parent, | 797 GrowableArray<intptr_t>* parent, |
| 798 GrowableArray<BitVector*>* assigned_vars, | 798 GrowableArray<BitVector*>* assigned_vars, |
| 799 intptr_t variable_count, | 799 intptr_t variable_count, |
| 800 intptr_t fixed_parameter_count); | 800 intptr_t fixed_parameter_count); |
| 801 | 801 |
| 802 void AddCatchEntry(TargetEntryInstr* entry) { catch_entries_.Add(entry); } | 802 void AddCatchEntry(TargetEntryInstr* entry) { catch_entries_.Add(entry); } |
| 803 | 803 |
| 804 virtual void PrepareEntry(FlowGraphCompiler* compiler); | 804 virtual void PrepareEntry(FlowGraphCompiler* compiler); |
| 805 | 805 |
| 806 Environment* start_env() const { return start_env_; } | 806 GrowableArray<Definition*>* initial_definitions() { |
| 807 void set_start_env(Environment* env) { start_env_ = env; } | 807 return &initial_definitions_; |
| 808 | 808 } |
| 809 ConstantInstr* constant_null() const { return constant_null_; } | 809 ConstantInstr* constant_null(); |
| 810 void set_constant_null(ConstantInstr* instr) { constant_null_ = instr; } | |
| 811 | 810 |
| 812 intptr_t spill_slot_count() const { return spill_slot_count_; } | 811 intptr_t spill_slot_count() const { return spill_slot_count_; } |
| 813 void set_spill_slot_count(intptr_t count) { | 812 void set_spill_slot_count(intptr_t count) { |
| 814 ASSERT(count >= 0); | 813 ASSERT(count >= 0); |
| 815 spill_slot_count_ = count; | 814 spill_slot_count_ = count; |
| 816 } | 815 } |
| 817 | 816 |
| 818 TargetEntryInstr* normal_entry() const { return normal_entry_; } | 817 TargetEntryInstr* normal_entry() const { return normal_entry_; } |
| 819 | 818 |
| 820 virtual void PrintTo(BufferFormatter* f) const; | 819 virtual void PrintTo(BufferFormatter* f) const; |
| 821 virtual void PrintToVisualizer(BufferFormatter* f) const; | 820 virtual void PrintToVisualizer(BufferFormatter* f) const; |
| 822 | 821 |
| 823 private: | 822 private: |
| 824 TargetEntryInstr* normal_entry_; | 823 TargetEntryInstr* normal_entry_; |
| 825 GrowableArray<TargetEntryInstr*> catch_entries_; | 824 GrowableArray<TargetEntryInstr*> catch_entries_; |
| 826 Environment* start_env_; | 825 GrowableArray<Definition*> initial_definitions_; |
| 827 ConstantInstr* constant_null_; | |
| 828 intptr_t spill_slot_count_; | 826 intptr_t spill_slot_count_; |
| 829 | 827 |
| 830 DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr); | 828 DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr); |
| 831 }; | 829 }; |
| 832 | 830 |
| 833 | 831 |
| 834 class JoinEntryInstr : public BlockEntryInstr { | 832 class JoinEntryInstr : public BlockEntryInstr { |
| 835 public: | 833 public: |
| 836 explicit JoinEntryInstr(intptr_t try_index) | 834 explicit JoinEntryInstr(intptr_t try_index) |
| 837 : BlockEntryInstr(try_index), | 835 : BlockEntryInstr(try_index), |
| (...skipping 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3641 ForwardInstructionIterator* current_iterator_; | 3639 ForwardInstructionIterator* current_iterator_; |
| 3642 | 3640 |
| 3643 private: | 3641 private: |
| 3644 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 3642 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 3645 }; | 3643 }; |
| 3646 | 3644 |
| 3647 | 3645 |
| 3648 } // namespace dart | 3646 } // namespace dart |
| 3649 | 3647 |
| 3650 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 3648 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |