OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 bool Done() { return current_ >= predecessor_list_->length(); } | 223 bool Done() { return current_ >= predecessor_list_->length(); } |
224 HBasicBlock* Current() { return predecessor_list_->at(current_); } | 224 HBasicBlock* Current() { return predecessor_list_->at(current_); } |
225 void Advance() { current_++; } | 225 void Advance() { current_++; } |
226 | 226 |
227 private: | 227 private: |
228 const ZoneList<HBasicBlock*>* predecessor_list_; | 228 const ZoneList<HBasicBlock*>* predecessor_list_; |
229 int current_; | 229 int current_; |
230 }; | 230 }; |
231 | 231 |
232 | 232 |
| 233 class HInstructionIterator BASE_EMBEDDED { |
| 234 public: |
| 235 explicit HInstructionIterator(HBasicBlock* block) |
| 236 : block_(block), instr_(block->first()) { } |
| 237 |
| 238 bool Done() { return instr_ == block_->last(); } |
| 239 HInstruction* Current() { return instr_; } |
| 240 void Advance() { instr_ = instr_->next(); } |
| 241 |
| 242 private: |
| 243 HBasicBlock* block_; |
| 244 HInstruction* instr_; |
| 245 }; |
| 246 |
| 247 |
233 class HLoopInformation: public ZoneObject { | 248 class HLoopInformation: public ZoneObject { |
234 public: | 249 public: |
235 HLoopInformation(HBasicBlock* loop_header, Zone* zone) | 250 HLoopInformation(HBasicBlock* loop_header, Zone* zone) |
236 : back_edges_(4, zone), | 251 : back_edges_(4, zone), |
237 loop_header_(loop_header), | 252 loop_header_(loop_header), |
238 blocks_(8, zone), | 253 blocks_(8, zone), |
239 stack_check_(NULL) { | 254 stack_check_(NULL) { |
240 blocks_.Add(loop_header, zone); | 255 blocks_.Add(loop_header, zone); |
241 } | 256 } |
242 virtual ~HLoopInformation() {} | 257 virtual ~HLoopInformation() {} |
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 EmbeddedVector<char, 64> filename_; | 2062 EmbeddedVector<char, 64> filename_; |
2048 HeapStringAllocator string_allocator_; | 2063 HeapStringAllocator string_allocator_; |
2049 StringStream trace_; | 2064 StringStream trace_; |
2050 int indent_; | 2065 int indent_; |
2051 }; | 2066 }; |
2052 | 2067 |
2053 | 2068 |
2054 } } // namespace v8::internal | 2069 } } // namespace v8::internal |
2055 | 2070 |
2056 #endif // V8_HYDROGEN_H_ | 2071 #endif // V8_HYDROGEN_H_ |
OLD | NEW |