Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 8ee841937e8a145ed33ad1796e431a467003f0d3..ac9f41d4b6711e9c4e92185c41971050f349fc73 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -1668,29 +1668,6 @@ class HCallRuntime: public HCall<0> { |
}; |
-class HJSArrayLength: public HUnaryOperation { |
- public: |
- explicit HJSArrayLength(HValue* value) : HUnaryOperation(value) { |
- // 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. |
- set_representation(Representation::Tagged()); |
- SetFlag(kUseGVN); |
- SetFlag(kDependsOnArrayLengths); |
- SetFlag(kDependsOnMaps); |
- } |
- |
- virtual Representation RequiredInputRepresentation(int index) const { |
- return Representation::Tagged(); |
- } |
- |
- DECLARE_CONCRETE_INSTRUCTION(JSArrayLength) |
- |
- protected: |
- virtual bool DataEquals(HValue* other) { return true; } |
-}; |
- |
- |
class HFixedArrayLength: public HUnaryOperation { |
public: |
explicit HFixedArrayLength(HValue* value) : HUnaryOperation(value) { |
@@ -1848,25 +1825,6 @@ class HUnaryMathOperation: public HUnaryOperation { |
}; |
-class HLoadElements: public HUnaryOperation { |
- public: |
- explicit HLoadElements(HValue* value) : HUnaryOperation(value) { |
- set_representation(Representation::Tagged()); |
- SetFlag(kUseGVN); |
- SetFlag(kDependsOnMaps); |
- } |
- |
- virtual Representation RequiredInputRepresentation(int index) const { |
- return Representation::Tagged(); |
- } |
- |
- DECLARE_CONCRETE_INSTRUCTION(LoadElements) |
- |
- protected: |
- virtual bool DataEquals(HValue* other) { return true; } |
-}; |
- |
- |
class HLoadExternalArrayPointer: public HUnaryOperation { |
public: |
explicit HLoadExternalArrayPointer(HValue* value) |
@@ -1905,10 +1863,6 @@ class HCheckMap: public HUnaryOperation { |
virtual void PrintDataTo(StringStream* stream); |
virtual HType CalculateInferredType(); |
-#ifdef DEBUG |
- virtual void Verify(); |
-#endif |
- |
Handle<Map> map() const { return map_; } |
DECLARE_CONCRETE_INSTRUCTION(CheckMap) |
@@ -1976,10 +1930,6 @@ class HCheckInstanceType: public HUnaryOperation { |
return Representation::Tagged(); |
} |
-#ifdef DEBUG |
- virtual void Verify(); |
-#endif |
- |
virtual HValue* Canonicalize() { |
if (!value()->type().IsUninitialized() && |
value()->type().IsString() && |
@@ -2446,6 +2396,32 @@ class HAccessArgumentsAt: public HTemplateInstruction<3> { |
}; |
+class HJSArrayLength: public HBinaryOperation { |
+ public: |
+ explicit HJSArrayLength(HValue* value, HValue* typecheck) |
Kevin Millikin (Chromium)
2011/07/11 15:03:54
No need for explicit.
Jakob Kummerow
2011/07/19 14:55:44
Done.
|
+ : HBinaryOperation(value, typecheck) { |
+ // 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. |
+ set_representation(Representation::Tagged()); |
+ SetFlag(kUseGVN); |
+ SetFlag(kDependsOnArrayLengths); |
+ SetFlag(kDependsOnMaps); |
Kevin Millikin (Chromium)
2011/07/11 15:03:54
I'm not positive we need this flag anymore, becaus
|
+ } |
+ |
+ virtual Representation RequiredInputRepresentation(int index) const { |
+ return Representation::Tagged(); |
+ } |
+ |
+ HValue* value() { return OperandAt(0); } |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(JSArrayLength) |
+ |
+ protected: |
+ virtual bool DataEquals(HValue* other) { return true; } |
+}; |
+ |
+ |
class HBoundsCheck: public HBinaryOperation { |
public: |
HBoundsCheck(HValue* index, HValue* length) |
@@ -2458,10 +2434,6 @@ class HBoundsCheck: public HBinaryOperation { |
return Representation::Integer32(); |
} |
-#ifdef DEBUG |
- virtual void Verify(); |
-#endif |
- |
HValue* index() { return left(); } |
HValue* length() { return right(); } |
@@ -3461,6 +3433,28 @@ class HLoadFunctionPrototype: public HUnaryOperation { |
}; |
+class HLoadElements: public HBinaryOperation { |
+ public: |
+ explicit HLoadElements(HValue* value, HValue* typecheck) |
Kevin Millikin (Chromium)
2011/07/11 15:03:54
Same, no need for explicit.
Jakob Kummerow
2011/07/19 14:55:44
Obsolete (I undid the changes to HLoadElements).
|
+ : HBinaryOperation(value, typecheck) { |
+ set_representation(Representation::Tagged()); |
+ SetFlag(kUseGVN); |
+ SetFlag(kDependsOnMaps); |
+ } |
+ |
+ virtual Representation RequiredInputRepresentation(int index) const { |
+ return Representation::Tagged(); |
+ } |
+ |
+ HValue* value() { return OperandAt(0); } |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(LoadElements) |
+ |
+ protected: |
+ virtual bool DataEquals(HValue* other) { return true; } |
+}; |
+ |
+ |
class HLoadKeyedFastElement: public HBinaryOperation { |
public: |
HLoadKeyedFastElement(HValue* obj, HValue* key) : HBinaryOperation(obj, key) { |