Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 6b43f53da731a6ff2f5826b8ce1943898b2296a3..12ec4981f6631e70b134cfed40ba39b90fe237f7 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -171,6 +171,7 @@ class LChunkBuilder; |
V(Throw) \ |
V(ToFastProperties) \ |
V(ToInt32) \ |
+ V(TransitionElementsKind) \ |
V(Typeof) \ |
V(TypeofIsAndBranch) \ |
V(UnaryMathOperation) \ |
@@ -3886,6 +3887,44 @@ class HStoreKeyedGeneric: public HTemplateInstruction<4> { |
}; |
+class HTransitionElementsKind: public HTemplateInstruction<1> { |
+ public: |
+ HTransitionElementsKind(HValue* object, |
+ Handle<Map> original_map, |
+ Handle<Map> transitioned_map) |
+ : original_map_(original_map), |
+ transitioned_map_(transitioned_map) { |
+ SetOperandAt(0, object); |
+ SetFlag(kUseGVN); |
+ SetFlag(kDependsOnMaps); |
+ set_representation(Representation::Tagged()); |
+ } |
+ |
+ virtual Representation RequiredInputRepresentation(int index) { |
+ return Representation::Tagged(); |
+ } |
+ |
+ HValue* object() { return OperandAt(0); } |
+ Handle<Map> original_map() { return original_map_; } |
+ Handle<Map> transitioned_map() { return transitioned_map_; } |
+ |
+ virtual void PrintDataTo(StringStream* stream); |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind) |
+ |
+ protected: |
+ virtual bool DataEquals(HValue* other) { |
+ HTransitionElementsKind* instr = HTransitionElementsKind::cast(other); |
+ return original_map_.is_identical_to(instr->original_map()) && |
+ transitioned_map_.is_identical_to(instr->transitioned_map()); |
+ } |
+ |
+ private: |
+ Handle<Map> original_map_; |
+ Handle<Map> transitioned_map_; |
+}; |
+ |
+ |
class HStringAdd: public HBinaryOperation { |
public: |
HStringAdd(HValue* context, HValue* left, HValue* right) |