OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 #include "allocation.h" | 10 #include "allocation.h" |
(...skipping 7105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7116 virtual bool DataEquals(HValue* other) V8_OVERRIDE { | 7116 virtual bool DataEquals(HValue* other) V8_OVERRIDE { |
7117 HArrayShift* that = HArrayShift::cast(other); | 7117 HArrayShift* that = HArrayShift::cast(other); |
7118 return this->kind_ == that->kind_; | 7118 return this->kind_ == that->kind_; |
7119 } | 7119 } |
7120 | 7120 |
7121 private: | 7121 private: |
7122 HArrayShift(HValue* context, HValue* object, ElementsKind kind) | 7122 HArrayShift(HValue* context, HValue* object, ElementsKind kind) |
7123 : kind_(kind) { | 7123 : kind_(kind) { |
7124 SetOperandAt(0, context); | 7124 SetOperandAt(0, context); |
7125 SetOperandAt(1, object); | 7125 SetOperandAt(1, object); |
| 7126 SetChangesFlag(kArrayLengths); |
7126 SetChangesFlag(kNewSpacePromotion); | 7127 SetChangesFlag(kNewSpacePromotion); |
7127 set_representation(Representation::Tagged()); | 7128 set_representation(Representation::Tagged()); |
7128 if (IsFastSmiOrObjectElementsKind(kind)) { | 7129 if (IsFastSmiOrObjectElementsKind(kind)) { |
7129 SetChangesFlag(kArrayElements); | 7130 SetChangesFlag(kArrayElements); |
7130 } else { | 7131 } else { |
7131 SetChangesFlag(kDoubleArrayElements); | 7132 SetChangesFlag(kDoubleArrayElements); |
7132 } | 7133 } |
7133 } | 7134 } |
7134 | 7135 |
7135 ElementsKind kind_; | 7136 ElementsKind kind_; |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7710 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7711 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7711 }; | 7712 }; |
7712 | 7713 |
7713 | 7714 |
7714 #undef DECLARE_INSTRUCTION | 7715 #undef DECLARE_INSTRUCTION |
7715 #undef DECLARE_CONCRETE_INSTRUCTION | 7716 #undef DECLARE_CONCRETE_INSTRUCTION |
7716 | 7717 |
7717 } } // namespace v8::internal | 7718 } } // namespace v8::internal |
7718 | 7719 |
7719 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7720 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |