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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 void Advance() { current_++; } | 226 void Advance() { current_++; } |
227 | 227 |
228 private: | 228 private: |
229 const ZoneList<HBasicBlock*>* predecessor_list_; | 229 const ZoneList<HBasicBlock*>* predecessor_list_; |
230 int current_; | 230 int current_; |
231 }; | 231 }; |
232 | 232 |
233 | 233 |
234 class HInstructionIterator BASE_EMBEDDED { | 234 class HInstructionIterator BASE_EMBEDDED { |
235 public: | 235 public: |
236 explicit HInstructionIterator(HBasicBlock* block) : instr_(block->first()) { } | 236 explicit HInstructionIterator(HBasicBlock* block) |
237 : instr_(block->first()) { | |
238 next_ = Done() ? NULL : instr_->next(); | |
239 } | |
237 | 240 |
238 bool Done() { return instr_ == NULL; } | 241 bool Done() { return instr_ == NULL; } |
titzer
2013/07/09 08:34:39
While you're here, would you mind adding "inline"
Hannes Payer (out of office)
2013/07/09 09:01:33
Done.
| |
239 HInstruction* Current() { return instr_; } | 242 HInstruction* Current() { return instr_; } |
240 void Advance() { instr_ = instr_->next(); } | 243 void Advance() { |
244 instr_ = next_; | |
245 next_ = Done() ? NULL : instr_->next(); | |
246 } | |
241 | 247 |
242 private: | 248 private: |
243 HInstruction* instr_; | 249 HInstruction* instr_; |
250 HInstruction* next_; | |
244 }; | 251 }; |
245 | 252 |
246 | 253 |
247 class HLoopInformation: public ZoneObject { | 254 class HLoopInformation: public ZoneObject { |
248 public: | 255 public: |
249 HLoopInformation(HBasicBlock* loop_header, Zone* zone) | 256 HLoopInformation(HBasicBlock* loop_header, Zone* zone) |
250 : back_edges_(4, zone), | 257 : back_edges_(4, zone), |
251 loop_header_(loop_header), | 258 loop_header_(loop_header), |
252 blocks_(8, zone), | 259 blocks_(8, zone), |
253 stack_check_(NULL) { | 260 stack_check_(NULL) { |
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2105 EmbeddedVector<char, 64> filename_; | 2112 EmbeddedVector<char, 64> filename_; |
2106 HeapStringAllocator string_allocator_; | 2113 HeapStringAllocator string_allocator_; |
2107 StringStream trace_; | 2114 StringStream trace_; |
2108 int indent_; | 2115 int indent_; |
2109 }; | 2116 }; |
2110 | 2117 |
2111 | 2118 |
2112 } } // namespace v8::internal | 2119 } } // namespace v8::internal |
2113 | 2120 |
2114 #endif // V8_HYDROGEN_H_ | 2121 #endif // V8_HYDROGEN_H_ |
OLD | NEW |