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

Side by Side Diff: src/hydrogen.h

Issue 18068002: Use HInstructionIterator more broadly for hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | 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 // 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 { 233 class HInstructionIterator BASE_EMBEDDED {
234 public: 234 public:
235 explicit HInstructionIterator(HBasicBlock* block) 235 explicit HInstructionIterator(HBasicBlock* block) : instr_(block->first()) { }
236 : block_(block), instr_(block->first()) { }
237 236
238 bool Done() { return instr_ == block_->last(); } 237 bool Done() { return instr_ == NULL; }
239 HInstruction* Current() { return instr_; } 238 HInstruction* Current() { return instr_; }
240 void Advance() { instr_ = instr_->next(); } 239 void Advance() { instr_ = instr_->next(); }
241 240
242 private: 241 private:
243 HBasicBlock* block_;
244 HInstruction* instr_; 242 HInstruction* instr_;
245 }; 243 };
246 244
247 245
248 class HLoopInformation: public ZoneObject { 246 class HLoopInformation: public ZoneObject {
249 public: 247 public:
250 HLoopInformation(HBasicBlock* loop_header, Zone* zone) 248 HLoopInformation(HBasicBlock* loop_header, Zone* zone)
251 : back_edges_(4, zone), 249 : back_edges_(4, zone),
252 loop_header_(loop_header), 250 loop_header_(loop_header),
253 blocks_(8, zone), 251 blocks_(8, zone),
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 EmbeddedVector<char, 64> filename_; 2060 EmbeddedVector<char, 64> filename_;
2063 HeapStringAllocator string_allocator_; 2061 HeapStringAllocator string_allocator_;
2064 StringStream trace_; 2062 StringStream trace_;
2065 int indent_; 2063 int indent_;
2066 }; 2064 };
2067 2065
2068 2066
2069 } } // namespace v8::internal 2067 } } // namespace v8::internal
2070 2068
2071 #endif // V8_HYDROGEN_H_ 2069 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698