Chromium Code Reviews| Index: src/hydrogen.h |
| diff --git a/src/hydrogen.h b/src/hydrogen.h |
| index e9b8a2fa836c01e2316a3c884614c497657b7709..de99e8c1f36a7cb05a9191a0ddf20f33391269e2 100644 |
| --- a/src/hydrogen.h |
| +++ b/src/hydrogen.h |
| @@ -912,6 +912,28 @@ class HGraphBuilder { |
| HInstruction* BuildStoreMap(HValue* object, HValue* map, BailoutId id); |
| HInstruction* BuildStoreMap(HValue* object, Handle<Map> map, BailoutId id); |
| + class CheckBuilder { |
| + public: |
| + CheckBuilder(HGraphBuilder* builder, |
| + BailoutId id = BailoutId::StubEntry()); |
|
danno
2013/02/11 14:34:27
I think it's a good idea to not provide a default.
Michael Starzinger
2013/02/11 16:31:11
Done (also for the other builders below).
|
| + ~CheckBuilder() { |
| + if (!finished_) End(); |
| + } |
| + |
| + void CheckNotUndefined(HValue* value); |
| + void CheckIntegerEq(HValue* left, HValue* right); |
| + void End(); |
| + |
| + private: |
| + Zone* zone() { return builder_->zone(); } |
| + |
| + HGraphBuilder* builder_; |
| + bool finished_; |
| + HBasicBlock* failure_block_; |
| + HBasicBlock* merge_block_; |
| + BailoutId id_; |
| + }; |
| + |
| class IfBuilder { |
| public: |
| IfBuilder(HGraphBuilder* builder, |
| @@ -925,14 +947,14 @@ class HGraphBuilder { |
| void End(); |
| private: |
| + Zone* zone() { return builder_->zone(); } |
| + |
| HGraphBuilder* builder_; |
| bool finished_; |
| HBasicBlock* true_block_; |
| HBasicBlock* false_block_; |
| HBasicBlock* merge_block_; |
| BailoutId id_; |
| - |
| - Zone* zone() { return builder_->zone(); } |
| }; |
| class LoopBuilder { |
| @@ -956,6 +978,8 @@ class HGraphBuilder { |
| void EndBody(); |
| private: |
| + Zone* zone() { return builder_->zone(); } |
| + |
| HGraphBuilder* builder_; |
| HValue* context_; |
| HInstruction* increment_; |
| @@ -966,8 +990,6 @@ class HGraphBuilder { |
| Direction direction_; |
| BailoutId id_; |
| bool finished_; |
| - |
| - Zone* zone() { return builder_->zone(); } |
| }; |
| HValue* BuildAllocateElements(HContext* context, |