Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 10939031: Replace start_env with initial_definitions in GraphEntryInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 GrowableArray<BlockEntryInstr*>* postorder, 792 GrowableArray<BlockEntryInstr*>* postorder,
793 GrowableArray<intptr_t>* parent, 793 GrowableArray<intptr_t>* parent,
794 GrowableArray<BitVector*>* assigned_vars, 794 GrowableArray<BitVector*>* assigned_vars,
795 intptr_t variable_count, 795 intptr_t variable_count,
796 intptr_t fixed_parameter_count); 796 intptr_t fixed_parameter_count);
797 797
798 void AddCatchEntry(TargetEntryInstr* entry) { catch_entries_.Add(entry); } 798 void AddCatchEntry(TargetEntryInstr* entry) { catch_entries_.Add(entry); }
799 799
800 virtual void PrepareEntry(FlowGraphCompiler* compiler); 800 virtual void PrepareEntry(FlowGraphCompiler* compiler);
801 801
802 Environment* start_env() const { return start_env_; } 802 GrowableArray<Definition*>& initial_definitions() {
803 void set_start_env(Environment* env) { start_env_ = env; } 803 return initial_definitions_;
804 804 }
805 ConstantInstr* constant_null() const { return constant_null_; } 805 ConstantInstr* constant_null();
806 void set_constant_null(ConstantInstr* instr) { constant_null_ = instr; }
807 806
808 intptr_t spill_slot_count() const { return spill_slot_count_; } 807 intptr_t spill_slot_count() const { return spill_slot_count_; }
809 void set_spill_slot_count(intptr_t count) { 808 void set_spill_slot_count(intptr_t count) {
810 ASSERT(count >= 0); 809 ASSERT(count >= 0);
811 spill_slot_count_ = count; 810 spill_slot_count_ = count;
812 } 811 }
813 812
814 TargetEntryInstr* normal_entry() const { return normal_entry_; } 813 TargetEntryInstr* normal_entry() const { return normal_entry_; }
815 814
816 virtual void PrintTo(BufferFormatter* f) const; 815 virtual void PrintTo(BufferFormatter* f) const;
817 virtual void PrintToVisualizer(BufferFormatter* f) const; 816 virtual void PrintToVisualizer(BufferFormatter* f) const;
818 817
819 private: 818 private:
820 TargetEntryInstr* normal_entry_; 819 TargetEntryInstr* normal_entry_;
821 GrowableArray<TargetEntryInstr*> catch_entries_; 820 GrowableArray<TargetEntryInstr*> catch_entries_;
822 Environment* start_env_; 821 GrowableArray<Definition*> initial_definitions_;
823 ConstantInstr* constant_null_;
824 intptr_t spill_slot_count_; 822 intptr_t spill_slot_count_;
825 823
826 DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr); 824 DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr);
827 }; 825 };
828 826
829 827
830 class JoinEntryInstr : public BlockEntryInstr { 828 class JoinEntryInstr : public BlockEntryInstr {
831 public: 829 public:
832 explicit JoinEntryInstr(intptr_t try_index) 830 explicit JoinEntryInstr(intptr_t try_index)
833 : BlockEntryInstr(try_index), 831 : BlockEntryInstr(try_index),
(...skipping 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after
3668 ForwardInstructionIterator* current_iterator_; 3666 ForwardInstructionIterator* current_iterator_;
3669 3667
3670 private: 3668 private:
3671 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3669 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3672 }; 3670 };
3673 3671
3674 3672
3675 } // namespace dart 3673 } // namespace dart
3676 3674
3677 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3675 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698