OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 V(LeaveInlined) \ | 135 V(LeaveInlined) \ |
136 V(LoadContextSlot) \ | 136 V(LoadContextSlot) \ |
137 V(LoadExternalArrayPointer) \ | 137 V(LoadExternalArrayPointer) \ |
138 V(LoadFieldByIndex) \ | 138 V(LoadFieldByIndex) \ |
139 V(LoadFunctionPrototype) \ | 139 V(LoadFunctionPrototype) \ |
140 V(LoadGlobalCell) \ | 140 V(LoadGlobalCell) \ |
141 V(LoadGlobalGeneric) \ | 141 V(LoadGlobalGeneric) \ |
142 V(LoadKeyed) \ | 142 V(LoadKeyed) \ |
143 V(LoadKeyedGeneric) \ | 143 V(LoadKeyedGeneric) \ |
144 V(LoadNamedField) \ | 144 V(LoadNamedField) \ |
145 V(LoadNamedFieldPolymorphic) \ | |
146 V(LoadNamedGeneric) \ | 145 V(LoadNamedGeneric) \ |
147 V(MapEnumLength) \ | 146 V(MapEnumLength) \ |
148 V(MathFloorOfDiv) \ | 147 V(MathFloorOfDiv) \ |
149 V(MathMinMax) \ | 148 V(MathMinMax) \ |
150 V(Mod) \ | 149 V(Mod) \ |
151 V(Mul) \ | 150 V(Mul) \ |
152 V(OsrEntry) \ | 151 V(OsrEntry) \ |
153 V(OuterContext) \ | 152 V(OuterContext) \ |
154 V(Parameter) \ | 153 V(Parameter) \ |
155 V(Power) \ | 154 V(Power) \ |
(...skipping 5435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5591 } | 5590 } |
5592 access.SetGVNFlags(this, false); | 5591 access.SetGVNFlags(this, false); |
5593 } | 5592 } |
5594 | 5593 |
5595 virtual bool IsDeletable() const { return true; } | 5594 virtual bool IsDeletable() const { return true; } |
5596 | 5595 |
5597 HObjectAccess access_; | 5596 HObjectAccess access_; |
5598 }; | 5597 }; |
5599 | 5598 |
5600 | 5599 |
5601 class HLoadNamedFieldPolymorphic: public HTemplateInstruction<2> { | |
5602 public: | |
5603 HLoadNamedFieldPolymorphic(HValue* context, | |
5604 HValue* object, | |
5605 SmallMapList* types, | |
5606 Handle<String> name, | |
5607 Zone* zone); | |
5608 | |
5609 HValue* context() { return OperandAt(0); } | |
5610 HValue* object() { return OperandAt(1); } | |
5611 SmallMapList* types() { return &types_; } | |
5612 Handle<String> name() { return name_; } | |
5613 bool need_generic() { return need_generic_; } | |
5614 | |
5615 virtual Representation RequiredInputRepresentation(int index) { | |
5616 return Representation::Tagged(); | |
5617 } | |
5618 | |
5619 virtual void PrintDataTo(StringStream* stream); | |
5620 | |
5621 DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic) | |
5622 | |
5623 static const int kMaxLoadPolymorphism = 4; | |
5624 | |
5625 virtual void FinalizeUniqueValueId(); | |
5626 | |
5627 protected: | |
5628 virtual bool DataEquals(HValue* value); | |
5629 | |
5630 private: | |
5631 SmallMapList types_; | |
5632 Handle<String> name_; | |
5633 ZoneList<UniqueValueId> types_unique_ids_; | |
5634 UniqueValueId name_unique_id_; | |
5635 bool need_generic_; | |
5636 }; | |
5637 | |
5638 | |
5639 | |
5640 class HLoadNamedGeneric: public HTemplateInstruction<2> { | 5600 class HLoadNamedGeneric: public HTemplateInstruction<2> { |
5641 public: | 5601 public: |
5642 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name) | 5602 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name) |
5643 : name_(name) { | 5603 : name_(name) { |
5644 SetOperandAt(0, context); | 5604 SetOperandAt(0, context); |
5645 SetOperandAt(1, object); | 5605 SetOperandAt(1, object); |
5646 set_representation(Representation::Tagged()); | 5606 set_representation(Representation::Tagged()); |
5647 SetAllSideEffects(); | 5607 SetAllSideEffects(); |
5648 } | 5608 } |
5649 | 5609 |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6778 virtual bool IsDeletable() const { return true; } | 6738 virtual bool IsDeletable() const { return true; } |
6779 }; | 6739 }; |
6780 | 6740 |
6781 | 6741 |
6782 #undef DECLARE_INSTRUCTION | 6742 #undef DECLARE_INSTRUCTION |
6783 #undef DECLARE_CONCRETE_INSTRUCTION | 6743 #undef DECLARE_CONCRETE_INSTRUCTION |
6784 | 6744 |
6785 } } // namespace v8::internal | 6745 } } // namespace v8::internal |
6786 | 6746 |
6787 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6747 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |