| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index 0837bf9634e33cc088a7a8dea90e479161c65902..236369ce64a11ae539113bcc2eb5c5a20b005867 100644
|
| --- a/src/hydrogen.h
|
| +++ b/src/hydrogen.h
|
| @@ -161,6 +161,29 @@ class HBasicBlock: public ZoneObject {
|
|
|
| inline Zone* zone() const;
|
|
|
| + void BuildSsiRecursively() {
|
| + BuildSsi();
|
| + for (int i = 0; i < dominated_blocks()->length(); ++i) {
|
| + dominated_blocks()->at(i)->BuildSsiRecursively();
|
| + }
|
| + }
|
| + void BuildSsi() {
|
| + for (int i = 0; i < phis()->length(); i++) {
|
| + HPhi* current = phis()->at(i);
|
| + current->SetFlag(HValue::kProcessedBySsi);
|
| + current->BuildSsi();
|
| + }
|
| +
|
| + for (HInstruction* current = first();
|
| + current != NULL;
|
| + current = current->next()) {
|
| + // We set the flag before calling BuildSsi so that, while creating new
|
| + // SSI definitions, uses inside current will not be updated.
|
| + current->SetFlag(HValue::kProcessedBySsi);
|
| + current->BuildSsi();
|
| + }
|
| + }
|
| +
|
| #ifdef DEBUG
|
| void Verify();
|
| #endif
|
| @@ -290,6 +313,7 @@ class HGraph: public ZoneObject {
|
| undefined_constant_.set(constant);
|
| }
|
| HConstant* GetConstantUndefined() const { return undefined_constant_.get(); }
|
| + HConstant* GetConstant0();
|
| HConstant* GetConstant1();
|
| HConstant* GetConstantMinus1();
|
| HConstant* GetConstantTrue();
|
| @@ -370,6 +394,9 @@ class HGraph: public ZoneObject {
|
| uint32_instructions_->Add(instr, zone());
|
| }
|
|
|
| + void BuildSsi();
|
| + void CleanupSsi();
|
| +
|
| private:
|
| HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
|
| Handle<Object> value);
|
| @@ -399,6 +426,7 @@ class HGraph: public ZoneObject {
|
| ZoneList<HPhi*>* phi_list_;
|
| ZoneList<HInstruction*>* uint32_instructions_;
|
| SetOncePointer<HConstant> undefined_constant_;
|
| + SetOncePointer<HConstant> constant_0_;
|
| SetOncePointer<HConstant> constant_1_;
|
| SetOncePointer<HConstant> constant_minus1_;
|
| SetOncePointer<HConstant> constant_true_;
|
|
|