| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index 98b05d147a290d67e10cbe57daae8bc2f73b02ea..b2e3fa7f8c64457eb1d2a9c677ddf236e6f85996 100644
|
| --- a/src/hydrogen.h
|
| +++ b/src/hydrogen.h
|
| @@ -370,6 +370,17 @@ class HGraph: public ZoneObject {
|
| uint32_instructions_->Add(instr, zone());
|
| }
|
|
|
| + // We record all HJSArrayLength instructions to process them later.
|
| + void RecordJSArrayLength(HJSArrayLength* inst) {
|
| + array_lengths_.Add(inst, zone());
|
| + }
|
| + // To make it likely that GVN will match two HJSArrayLength instructions
|
| + // we need to make sure that they depend on the same map check and that
|
| + // they have the same type (hopefully Smi and not Tagged).
|
| + // In this method we group all HJSArrayLength insts by the array they
|
| + // operate on and try to make the checks uniform in each group.
|
| + void ProcessJSArrayLengths();
|
| +
|
| private:
|
| HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
|
| Handle<Object> value);
|
| @@ -397,6 +408,7 @@ class HGraph: public ZoneObject {
|
| ZoneList<HBasicBlock*> blocks_;
|
| ZoneList<HValue*> values_;
|
| ZoneList<HPhi*>* phi_list_;
|
| + ZoneList<HJSArrayLength*> array_lengths_;
|
| ZoneList<HInstruction*>* uint32_instructions_;
|
| SetOncePointer<HConstant> undefined_constant_;
|
| SetOncePointer<HConstant> constant_1_;
|
|
|