| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ | 44 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ |
| 45 V(AbnormalExit) \ | 45 V(AbnormalExit) \ |
| 46 V(AccessArgumentsAt) \ | 46 V(AccessArgumentsAt) \ |
| 47 V(Add) \ | 47 V(Add) \ |
| 48 V(Allocate) \ | 48 V(Allocate) \ |
| 49 V(ApplyArguments) \ | 49 V(ApplyArguments) \ |
| 50 V(ArgumentsElements) \ | 50 V(ArgumentsElements) \ |
| 51 V(ArgumentsLength) \ | 51 V(ArgumentsLength) \ |
| 52 V(ArgumentsObject) \ | 52 V(ArgumentsObject) \ |
| 53 V(ArrayShift) \ |
| 53 V(Bitwise) \ | 54 V(Bitwise) \ |
| 54 V(BlockEntry) \ | 55 V(BlockEntry) \ |
| 55 V(BoundsCheck) \ | 56 V(BoundsCheck) \ |
| 56 V(BoundsCheckBaseIndexInformation) \ | 57 V(BoundsCheckBaseIndexInformation) \ |
| 57 V(Branch) \ | 58 V(Branch) \ |
| 58 V(CallWithDescriptor) \ | 59 V(CallWithDescriptor) \ |
| 59 V(CallJSFunction) \ | 60 V(CallJSFunction) \ |
| 60 V(CallFunction) \ | 61 V(CallFunction) \ |
| 61 V(CallNew) \ | 62 V(CallNew) \ |
| 62 V(CallNewArray) \ | 63 V(CallNewArray) \ |
| (...skipping 7007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7070 set_representation(Representation::Tagged()); | 7071 set_representation(Representation::Tagged()); |
| 7071 } | 7072 } |
| 7072 | 7073 |
| 7073 Unique<Map> original_map_; | 7074 Unique<Map> original_map_; |
| 7074 Unique<Map> transitioned_map_; | 7075 Unique<Map> transitioned_map_; |
| 7075 ElementsKind from_kind_; | 7076 ElementsKind from_kind_; |
| 7076 ElementsKind to_kind_; | 7077 ElementsKind to_kind_; |
| 7077 }; | 7078 }; |
| 7078 | 7079 |
| 7079 | 7080 |
| 7081 class HArrayShift V8_FINAL : public HTemplateInstruction<2> { |
| 7082 public: |
| 7083 static HArrayShift* New(Zone* zone, |
| 7084 HValue* context, |
| 7085 HValue* object, |
| 7086 ElementsKind kind) { |
| 7087 return new(zone) HArrayShift(context, object, kind); |
| 7088 } |
| 7089 |
| 7090 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| 7091 return Representation::Tagged(); |
| 7092 } |
| 7093 |
| 7094 HValue* context() const { return OperandAt(0); } |
| 7095 HValue* object() const { return OperandAt(1); } |
| 7096 ElementsKind kind() const { return kind_; } |
| 7097 |
| 7098 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 7099 |
| 7100 DECLARE_CONCRETE_INSTRUCTION(ArrayShift); |
| 7101 |
| 7102 protected: |
| 7103 virtual bool DataEquals(HValue* other) V8_OVERRIDE { |
| 7104 HArrayShift* that = HArrayShift::cast(other); |
| 7105 return this->kind_ == that->kind_; |
| 7106 } |
| 7107 |
| 7108 private: |
| 7109 HArrayShift(HValue* context, HValue* object, ElementsKind kind) |
| 7110 : kind_(kind) { |
| 7111 SetOperandAt(0, context); |
| 7112 SetOperandAt(1, object); |
| 7113 SetChangesFlag(kNewSpacePromotion); |
| 7114 set_representation(Representation::Tagged()); |
| 7115 if (IsFastSmiOrObjectElementsKind(kind)) { |
| 7116 SetChangesFlag(kArrayElements); |
| 7117 } else { |
| 7118 SetChangesFlag(kDoubleArrayElements); |
| 7119 } |
| 7120 } |
| 7121 |
| 7122 ElementsKind kind_; |
| 7123 }; |
| 7124 |
| 7125 |
| 7080 class HStringAdd V8_FINAL : public HBinaryOperation { | 7126 class HStringAdd V8_FINAL : public HBinaryOperation { |
| 7081 public: | 7127 public: |
| 7082 static HInstruction* New(Zone* zone, | 7128 static HInstruction* New(Zone* zone, |
| 7083 HValue* context, | 7129 HValue* context, |
| 7084 HValue* left, | 7130 HValue* left, |
| 7085 HValue* right, | 7131 HValue* right, |
| 7086 PretenureFlag pretenure_flag = NOT_TENURED, | 7132 PretenureFlag pretenure_flag = NOT_TENURED, |
| 7087 StringAddFlags flags = STRING_ADD_CHECK_BOTH, | 7133 StringAddFlags flags = STRING_ADD_CHECK_BOTH, |
| 7088 Handle<AllocationSite> allocation_site = | 7134 Handle<AllocationSite> allocation_site = |
| 7089 Handle<AllocationSite>::null()); | 7135 Handle<AllocationSite>::null()); |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7651 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7697 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7652 }; | 7698 }; |
| 7653 | 7699 |
| 7654 | 7700 |
| 7655 #undef DECLARE_INSTRUCTION | 7701 #undef DECLARE_INSTRUCTION |
| 7656 #undef DECLARE_CONCRETE_INSTRUCTION | 7702 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7657 | 7703 |
| 7658 } } // namespace v8::internal | 7704 } } // namespace v8::internal |
| 7659 | 7705 |
| 7660 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7706 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |