Chromium Code Reviews| Index: src/hydrogen.h |
| diff --git a/src/hydrogen.h b/src/hydrogen.h |
| index 6c1aba5db66d709231b996207965af7146b758e9..ef2ac73f32283c7e178bfd3da0a4ecb4d52c378a 100644 |
| --- a/src/hydrogen.h |
| +++ b/src/hydrogen.h |
| @@ -233,14 +233,27 @@ class HPredecessorIterator BASE_EMBEDDED { |
| class HInstructionIterator BASE_EMBEDDED { |
| public: |
| - explicit HInstructionIterator(HBasicBlock* block) : instr_(block->first()) { } |
| + explicit HInstructionIterator(HBasicBlock* block) |
| + : instr_(block->first()), next_(NULL) { |
|
Michael Starzinger
2013/07/08 14:02:43
nit: Use a ternary operator, easier to read.
Hannes Payer (out of office)
2013/07/09 08:26:15
Done.
|
| + if (!Done()) { |
| + next_ = instr_->next(); |
| + } |
| + } |
| bool Done() { return instr_ == NULL; } |
| HInstruction* Current() { return instr_; } |
| - void Advance() { instr_ = instr_->next(); } |
| + void Advance() { |
| + instr_ = next_; |
| + if (!Done()) { |
|
Michael Starzinger
2013/07/08 14:02:43
nit: Use a ternary operator, easier to read.
Hannes Payer (out of office)
2013/07/09 08:26:15
Done.
|
| + next_ = instr_->next(); |
| + } else { |
| + next_ = NULL; |
| + } |
| + } |
| private: |
| HInstruction* instr_; |
| + HInstruction* next_; |
| }; |
| @@ -332,6 +345,7 @@ class HGraph: public ZoneObject { |
| HConstant* GetConstantHole(); |
| HConstant* GetConstantNull(); |
| HConstant* GetInvalidContext(); |
| + HConstant* GetConstantFreeSpaceMap(); |
| bool IsStandardConstant(HConstant* constant); |
| @@ -489,6 +503,7 @@ class HGraph: public ZoneObject { |
| SetOncePointer<HConstant> constant_null_; |
| SetOncePointer<HConstant> constant_invalid_context_; |
| SetOncePointer<HArgumentsObject> arguments_object_; |
| + SetOncePointer<HConstant> constant_free_space_map_; |
| HOsrBuilder* osr_; |