| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 47a9da3b45deb917e7b4a5c213b4db57a3625d1d..d07c1d5135a60222b53a4c46339149c7ae24a696 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -1929,19 +1929,10 @@ class HCallRuntime: public HCall<1> {
|
|
|
| class HJSArrayLength: public HTemplateInstruction<2> {
|
| public:
|
| - HJSArrayLength(HValue* value, HValue* typecheck,
|
| - HType type = HType::Tagged()) {
|
| - set_type(type);
|
| - // The length of an array is stored as a tagged value in the array
|
| - // object. It is guaranteed to be 32 bit integer, but it can be
|
| - // represented as either a smi or heap number.
|
| - SetOperandAt(0, value);
|
| - SetOperandAt(1, typecheck);
|
| - set_representation(Representation::Tagged());
|
| - SetFlag(kUseGVN);
|
| - SetGVNFlag(kDependsOnArrayLengths);
|
| - SetGVNFlag(kDependsOnMaps);
|
| - }
|
| + static HJSArrayLength* Create(HGraph* graph,
|
| + HValue* value,
|
| + HValue* typecheck,
|
| + HType type = HType::Tagged());
|
|
|
| virtual Representation RequiredInputRepresentation(int index) {
|
| return Representation::Tagged();
|
| @@ -1949,6 +1940,7 @@ class HJSArrayLength: public HTemplateInstruction<2> {
|
|
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| + const HValue* value() const { return OperandAt(0); }
|
| HValue* value() { return OperandAt(0); }
|
| HValue* typecheck() { return OperandAt(1); }
|
|
|
| @@ -1959,6 +1951,20 @@ class HJSArrayLength: public HTemplateInstruction<2> {
|
|
|
| private:
|
| virtual bool IsDeletable() const { return true; }
|
| +
|
| + HJSArrayLength(HValue* value, HValue* typecheck,
|
| + HType type = HType::Tagged()) {
|
| + set_type(type);
|
| + // The length of an array is stored as a tagged value in the array
|
| + // object. It is guaranteed to be 32 bit integer, but it can be
|
| + // represented as either a smi or heap number.
|
| + SetOperandAt(0, value);
|
| + SetOperandAt(1, typecheck);
|
| + set_representation(Representation::Tagged());
|
| + SetFlag(kUseGVN);
|
| + SetGVNFlag(kDependsOnArrayLengths);
|
| + SetGVNFlag(kDependsOnMaps);
|
| + }
|
| };
|
|
|
|
|
| @@ -2261,6 +2267,7 @@ class HCheckMaps: public HTemplateInstruction<2> {
|
|
|
| HValue* value() { return OperandAt(0); }
|
| SmallMapList* map_set() { return &map_set_; }
|
| + bool has_dependency() { return OperandAt(1) != OperandAt(0); }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CheckMaps)
|
|
|
|
|