Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index b4fc65635f47b6db2396208e73b0b3b9e124f996..060066de4809fcbc049aadab68ef1976b4b8aa46 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -1359,6 +1359,9 @@ class HCompareMap: public HUnaryControlInstruction { |
DECLARE_CONCRETE_INSTRUCTION(CompareMap) |
+ protected: |
+ virtual int RedefinedOperandIndex() { return 0; } |
+ |
private: |
Handle<Map> map_; |
}; |
@@ -2598,6 +2601,8 @@ class HCheckMaps: public HTemplateInstruction<2> { |
return true; |
} |
+ virtual int RedefinedOperandIndex() { return 0; } |
+ |
private: |
// Clients should use one of the static New* methods above. |
HCheckMaps(HValue* value, Zone *zone, HValue* typecheck) |
@@ -2714,6 +2719,8 @@ class HCheckInstanceType: public HUnaryOperation { |
return check_ == b->check_; |
} |
+ virtual int RedefinedOperandIndex() { return 0; } |
+ |
private: |
enum Check { |
IS_SPEC_OBJECT, |
@@ -5555,20 +5562,13 @@ class HObjectAccess { |
}; |
-class HLoadNamedField: public HTemplateInstruction<2> { |
+class HLoadNamedField: public HTemplateInstruction<1> { |
public: |
DECLARE_INSTRUCTION_FACTORY_P2(HLoadNamedField, HValue*, HObjectAccess); |
- DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue*, HObjectAccess, |
- HValue*); |
HValue* object() { return OperandAt(0); } |
- HValue* typecheck() { |
- ASSERT(HasTypeCheck()); |
- return OperandAt(1); |
- } |
- |
- bool HasTypeCheck() const { return OperandAt(0) != OperandAt(1); } |
- void ClearTypeCheck() { SetOperandAt(1, object()); } |
+ bool HasTypeCheck() { return object()->IsCheckMaps(); } |
+ void ClearTypeCheck() { SetOperandAt(0, object()->ActualValue()); } |
HObjectAccess access() const { return access_; } |
Representation field_representation() const { |
return access_.representation(); |
@@ -5594,13 +5594,9 @@ class HLoadNamedField: public HTemplateInstruction<2> { |
} |
private: |
- HLoadNamedField(HValue* object, |
- HObjectAccess access, |
- HValue* typecheck = NULL) |
- : access_(access) { |
+ HLoadNamedField(HValue* object, HObjectAccess access) : access_(access) { |
ASSERT(object != NULL); |
SetOperandAt(0, object); |
- SetOperandAt(1, typecheck != NULL ? typecheck : object); |
Representation representation = access.representation(); |
if (representation.IsSmi()) { |