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

Side by Side Diff: src/hydrogen.h

Issue 363323003: More OStreamsUse OStreams more often. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and polished. Created 6 years, 5 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
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // For blocks marked as inline return target: the block with HEnterInlined. 207 // For blocks marked as inline return target: the block with HEnterInlined.
208 HBasicBlock* inlined_entry_block_; 208 HBasicBlock* inlined_entry_block_;
209 bool is_inline_return_target_ : 1; 209 bool is_inline_return_target_ : 1;
210 bool is_reachable_ : 1; 210 bool is_reachable_ : 1;
211 bool dominates_loop_successors_ : 1; 211 bool dominates_loop_successors_ : 1;
212 bool is_osr_entry_ : 1; 212 bool is_osr_entry_ : 1;
213 bool is_ordered_ : 1; 213 bool is_ordered_ : 1;
214 }; 214 };
215 215
216 216
217 OStream& operator<<(OStream& os, const HBasicBlock& b);
218
219
217 class HPredecessorIterator V8_FINAL BASE_EMBEDDED { 220 class HPredecessorIterator V8_FINAL BASE_EMBEDDED {
218 public: 221 public:
219 explicit HPredecessorIterator(HBasicBlock* block) 222 explicit HPredecessorIterator(HBasicBlock* block)
220 : predecessor_list_(block->predecessors()), current_(0) { } 223 : predecessor_list_(block->predecessors()), current_(0) { }
221 224
222 bool Done() { return current_ >= predecessor_list_->length(); } 225 bool Done() { return current_ >= predecessor_list_->length(); }
223 HBasicBlock* Current() { return predecessor_list_->at(current_); } 226 HBasicBlock* Current() { return predecessor_list_->at(current_); }
224 void Advance() { current_++; } 227 void Advance() { current_++; }
225 228
226 private: 229 private:
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 } 694 }
692 695
693 bool is_parameter_index(int i) const { 696 bool is_parameter_index(int i) const {
694 return i >= 0 && i < parameter_count(); 697 return i >= 0 && i < parameter_count();
695 } 698 }
696 699
697 bool is_special_index(int i) const { 700 bool is_special_index(int i) const {
698 return i >= parameter_count() && i < parameter_count() + specials_count(); 701 return i >= parameter_count() && i < parameter_count() + specials_count();
699 } 702 }
700 703
701 void PrintTo(StringStream* stream);
702 void PrintToStd();
703
704 Zone* zone() const { return zone_; } 704 Zone* zone() const { return zone_; }
705 705
706 private: 706 private:
707 HEnvironment(const HEnvironment* other, Zone* zone); 707 HEnvironment(const HEnvironment* other, Zone* zone);
708 708
709 HEnvironment(HEnvironment* outer, 709 HEnvironment(HEnvironment* outer,
710 Handle<JSFunction> closure, 710 Handle<JSFunction> closure,
711 FrameType frame_type, 711 FrameType frame_type,
712 int arguments, 712 int arguments,
713 Zone* zone); 713 Zone* zone);
(...skipping 21 matching lines...) Expand all
735 int local_count_; 735 int local_count_;
736 HEnvironment* outer_; 736 HEnvironment* outer_;
737 HEnterInlined* entry_; 737 HEnterInlined* entry_;
738 int pop_count_; 738 int pop_count_;
739 int push_count_; 739 int push_count_;
740 BailoutId ast_id_; 740 BailoutId ast_id_;
741 Zone* zone_; 741 Zone* zone_;
742 }; 742 };
743 743
744 744
745 OStream& operator<<(OStream& os, const HEnvironment& env);
746
747
745 class HOptimizedGraphBuilder; 748 class HOptimizedGraphBuilder;
746 749
747 enum ArgumentsAllowedFlag { 750 enum ArgumentsAllowedFlag {
748 ARGUMENTS_NOT_ALLOWED, 751 ARGUMENTS_NOT_ALLOWED,
749 ARGUMENTS_ALLOWED 752 ARGUMENTS_ALLOWED
750 }; 753 };
751 754
752 755
753 class HIfContinuation; 756 class HIfContinuation;
754 757
(...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2901 } 2904 }
2902 2905
2903 private: 2906 private:
2904 HGraphBuilder* builder_; 2907 HGraphBuilder* builder_;
2905 }; 2908 };
2906 2909
2907 2910
2908 } } // namespace v8::internal 2911 } } // namespace v8::internal
2909 2912
2910 #endif // V8_HYDROGEN_H_ 2913 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698