OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 V(LeaveInlined) \ | 120 V(LeaveInlined) \ |
121 V(LoadContextSlot) \ | 121 V(LoadContextSlot) \ |
122 V(LoadElements) \ | 122 V(LoadElements) \ |
123 V(LoadExternalArrayPointer) \ | 123 V(LoadExternalArrayPointer) \ |
124 V(LoadFunctionPrototype) \ | 124 V(LoadFunctionPrototype) \ |
125 V(LoadGlobal) \ | 125 V(LoadGlobal) \ |
126 V(LoadKeyedFastElement) \ | 126 V(LoadKeyedFastElement) \ |
127 V(LoadKeyedGeneric) \ | 127 V(LoadKeyedGeneric) \ |
128 V(LoadNamedField) \ | 128 V(LoadNamedField) \ |
129 V(LoadNamedGeneric) \ | 129 V(LoadNamedGeneric) \ |
| 130 V(LoadNamedFieldPolymorphic) \ |
130 V(LoadPixelArrayElement) \ | 131 V(LoadPixelArrayElement) \ |
131 V(Mod) \ | 132 V(Mod) \ |
132 V(Mul) \ | 133 V(Mul) \ |
133 V(ObjectLiteral) \ | 134 V(ObjectLiteral) \ |
134 V(OsrEntry) \ | 135 V(OsrEntry) \ |
135 V(OuterContext) \ | 136 V(OuterContext) \ |
136 V(Parameter) \ | 137 V(Parameter) \ |
137 V(Power) \ | 138 V(Power) \ |
138 V(PushArgument) \ | 139 V(PushArgument) \ |
139 V(RegExpLiteral) \ | 140 V(RegExpLiteral) \ |
(...skipping 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2964 HLoadNamedField* b = HLoadNamedField::cast(other); | 2965 HLoadNamedField* b = HLoadNamedField::cast(other); |
2965 return is_in_object_ == b->is_in_object_ && offset_ == b->offset_; | 2966 return is_in_object_ == b->is_in_object_ && offset_ == b->offset_; |
2966 } | 2967 } |
2967 | 2968 |
2968 private: | 2969 private: |
2969 bool is_in_object_; | 2970 bool is_in_object_; |
2970 int offset_; | 2971 int offset_; |
2971 }; | 2972 }; |
2972 | 2973 |
2973 | 2974 |
| 2975 class HLoadNamedFieldPolymorphic: public HUnaryOperation { |
| 2976 public: |
| 2977 HLoadNamedFieldPolymorphic(HValue* object, |
| 2978 ZoneMapList* types, |
| 2979 Handle<String> name); |
| 2980 |
| 2981 HValue* object() { return OperandAt(0); } |
| 2982 ZoneMapList* types() { return &types_; } |
| 2983 Handle<String> name() { return name_; } |
| 2984 bool need_generic() { return need_generic_; } |
| 2985 |
| 2986 virtual Representation RequiredInputRepresentation(int index) const { |
| 2987 return Representation::Tagged(); |
| 2988 } |
| 2989 |
| 2990 DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic, |
| 2991 "load_named_field_polymorphic") |
| 2992 |
| 2993 protected: |
| 2994 virtual bool DataEquals(HValue* value); |
| 2995 |
| 2996 private: |
| 2997 ZoneMapList types_; |
| 2998 Handle<String> name_; |
| 2999 bool need_generic_; |
| 3000 }; |
| 3001 |
| 3002 |
| 3003 |
2974 class HLoadNamedGeneric: public HBinaryOperation { | 3004 class HLoadNamedGeneric: public HBinaryOperation { |
2975 public: | 3005 public: |
2976 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name) | 3006 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name) |
2977 : HBinaryOperation(context, object), name_(name) { | 3007 : HBinaryOperation(context, object), name_(name) { |
2978 set_representation(Representation::Tagged()); | 3008 set_representation(Representation::Tagged()); |
2979 SetAllSideEffects(); | 3009 SetAllSideEffects(); |
2980 } | 3010 } |
2981 | 3011 |
2982 HValue* context() { return OperandAt(0); } | 3012 HValue* context() { return OperandAt(0); } |
2983 HValue* object() { return OperandAt(1); } | 3013 HValue* object() { return OperandAt(1); } |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3521 HValue* object() { return left(); } | 3551 HValue* object() { return left(); } |
3522 HValue* key() { return right(); } | 3552 HValue* key() { return right(); } |
3523 }; | 3553 }; |
3524 | 3554 |
3525 #undef DECLARE_INSTRUCTION | 3555 #undef DECLARE_INSTRUCTION |
3526 #undef DECLARE_CONCRETE_INSTRUCTION | 3556 #undef DECLARE_CONCRETE_INSTRUCTION |
3527 | 3557 |
3528 } } // namespace v8::internal | 3558 } } // namespace v8::internal |
3529 | 3559 |
3530 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3560 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |