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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 // HChange | 126 // HChange |
127 // HCheckFunction | 127 // HCheckFunction |
128 // HCheckInstanceType | 128 // HCheckInstanceType |
129 // HCheckMap | 129 // HCheckMap |
130 // HCheckNonSmi | 130 // HCheckNonSmi |
131 // HCheckSmi | 131 // HCheckSmi |
132 // HDeleteProperty | 132 // HDeleteProperty |
133 // HFixedArrayLength | 133 // HFixedArrayLength |
134 // HJSArrayLength | 134 // HJSArrayLength |
135 // HLoadElements | 135 // HLoadElements |
136 // HTypeofIs | 136 // HLoadFunctionPrototype |
137 // HLoadNamedField | 137 // HLoadNamedField |
138 // HLoadNamedGeneric | 138 // HLoadNamedGeneric |
139 // HLoadFunctionPrototype | |
140 // HPushArgument | 139 // HPushArgument |
141 // HStringLength | 140 // HStringLength |
142 // HTypeof | 141 // HTypeof |
143 // HUnaryMathOperation | 142 // HUnaryMathOperation |
144 // HUnaryPredicate | 143 // HUnaryPredicate |
145 // HClassOfTest | 144 // HClassOfTest |
146 // HHasCachedArrayIndex | 145 // HHasCachedArrayIndex |
147 // HHasInstanceType | 146 // HHasInstanceType |
148 // HIsNull | 147 // HIsNull |
149 // HIsObject | 148 // HIsObject |
150 // HIsSmi | 149 // HIsSmi |
150 // HTypeofIs | |
151 // HValueOf | 151 // HValueOf |
152 // HUnknownOSRValue | 152 // HUnknownOSRValue |
153 // HPhi | 153 // HPhi |
154 | 154 |
155 #define HYDROGEN_ALL_INSTRUCTION_LIST(V) \ | 155 #define HYDROGEN_ALL_INSTRUCTION_LIST(V) \ |
156 V(ArithmeticBinaryOperation) \ | 156 V(ArithmeticBinaryOperation) \ |
157 V(BinaryOperation) \ | 157 V(BinaryOperation) \ |
158 V(BitwiseBinaryOperation) \ | 158 V(BitwiseBinaryOperation) \ |
159 V(Call) \ | 159 V(Call) \ |
160 V(ControlInstruction) \ | 160 V(ControlInstruction) \ |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 V(IsNull) \ | 217 V(IsNull) \ |
218 V(IsObject) \ | 218 V(IsObject) \ |
219 V(IsSmi) \ | 219 V(IsSmi) \ |
220 V(HasInstanceType) \ | 220 V(HasInstanceType) \ |
221 V(HasCachedArrayIndex) \ | 221 V(HasCachedArrayIndex) \ |
222 V(JSArrayLength) \ | 222 V(JSArrayLength) \ |
223 V(ClassOfTest) \ | 223 V(ClassOfTest) \ |
224 V(LeaveInlined) \ | 224 V(LeaveInlined) \ |
225 V(LoadContextSlot) \ | 225 V(LoadContextSlot) \ |
226 V(LoadElements) \ | 226 V(LoadElements) \ |
227 V(LoadFunctionPrototype) \ | |
227 V(LoadGlobal) \ | 228 V(LoadGlobal) \ |
228 V(LoadKeyedFastElement) \ | 229 V(LoadKeyedFastElement) \ |
229 V(LoadKeyedGeneric) \ | 230 V(LoadKeyedGeneric) \ |
230 V(LoadNamedField) \ | 231 V(LoadNamedField) \ |
231 V(LoadNamedGeneric) \ | 232 V(LoadNamedGeneric) \ |
232 V(LoadFunctionPrototype) \ | |
233 V(Mod) \ | 233 V(Mod) \ |
234 V(Mul) \ | 234 V(Mul) \ |
235 V(ObjectLiteral) \ | 235 V(ObjectLiteral) \ |
236 V(OsrEntry) \ | 236 V(OsrEntry) \ |
237 V(Parameter) \ | 237 V(Parameter) \ |
238 V(Power) \ | 238 V(Power) \ |
239 V(PushArgument) \ | 239 V(PushArgument) \ |
240 V(RegExpLiteral) \ | 240 V(RegExpLiteral) \ |
241 V(Return) \ | 241 V(Return) \ |
242 V(Sar) \ | 242 V(Sar) \ |
(...skipping 18 matching lines...) Expand all Loading... | |
261 V(ValueOf) | 261 V(ValueOf) |
262 | 262 |
263 #define GVN_FLAG_LIST(V) \ | 263 #define GVN_FLAG_LIST(V) \ |
264 V(Calls) \ | 264 V(Calls) \ |
265 V(InobjectFields) \ | 265 V(InobjectFields) \ |
266 V(BackingStoreFields) \ | 266 V(BackingStoreFields) \ |
267 V(ArrayElements) \ | 267 V(ArrayElements) \ |
268 V(GlobalVars) \ | 268 V(GlobalVars) \ |
269 V(Maps) \ | 269 V(Maps) \ |
270 V(ArrayLengths) \ | 270 V(ArrayLengths) \ |
271 V(FunctionPrototypes) \ | |
272 V(OsrEntries) | 271 V(OsrEntries) |
273 | 272 |
274 #define DECLARE_INSTRUCTION(type) \ | 273 #define DECLARE_INSTRUCTION(type) \ |
275 virtual bool Is##type() const { return true; } \ | 274 virtual bool Is##type() const { return true; } \ |
276 static H##type* cast(HValue* value) { \ | 275 static H##type* cast(HValue* value) { \ |
277 ASSERT(value->Is##type()); \ | 276 ASSERT(value->Is##type()); \ |
278 return reinterpret_cast<H##type*>(value); \ | 277 return reinterpret_cast<H##type*>(value); \ |
279 } \ | 278 } \ |
280 Opcode opcode() const { return HValue::k##type; } | 279 Opcode opcode() const { return HValue::k##type; } |
281 | 280 |
(...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2725 private: | 2724 private: |
2726 Handle<Object> name_; | 2725 Handle<Object> name_; |
2727 }; | 2726 }; |
2728 | 2727 |
2729 | 2728 |
2730 class HLoadFunctionPrototype: public HUnaryOperation { | 2729 class HLoadFunctionPrototype: public HUnaryOperation { |
2731 public: | 2730 public: |
2732 explicit HLoadFunctionPrototype(HValue* function) | 2731 explicit HLoadFunctionPrototype(HValue* function) |
2733 : HUnaryOperation(function) { | 2732 : HUnaryOperation(function) { |
2734 set_representation(Representation::Tagged()); | 2733 set_representation(Representation::Tagged()); |
2735 SetFlagMask(kDependsOnFunctionPrototypes); | 2734 SetFlag(kUseGVN); |
2735 SetFlag(kDependsOnCalls); | |
2736 } | 2736 } |
2737 | 2737 |
2738 HValue* function() const { return OperandAt(0); } | 2738 HValue* function() const { return OperandAt(0); } |
2739 | 2739 |
2740 virtual Representation RequiredInputRepresentation(int index) const { | 2740 virtual Representation RequiredInputRepresentation(int index) const { |
2741 return Representation::Tagged(); | 2741 return Representation::Tagged(); |
2742 } | 2742 } |
2743 | 2743 |
2744 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load_function_prototype") | 2744 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load_function_prototype") |
2745 | |
2746 protected: | |
2747 virtual bool DataEquals(HValue* other) const { return true; } | |
fschneider
2011/01/26 13:26:55
The default implementation of DataEquals is unsafe
| |
2748 }; | 2745 }; |
2749 | 2746 |
2750 | 2747 |
2751 class HLoadKeyed: public HBinaryOperation { | 2748 class HLoadKeyed: public HBinaryOperation { |
2752 public: | 2749 public: |
2753 HLoadKeyed(HValue* obj, HValue* key) : HBinaryOperation(obj, key) { | 2750 HLoadKeyed(HValue* obj, HValue* key) : HBinaryOperation(obj, key) { |
2754 set_representation(Representation::Tagged()); | 2751 set_representation(Representation::Tagged()); |
2755 } | 2752 } |
2756 | 2753 |
2757 virtual void PrintDataTo(StringStream* stream) const; | 2754 virtual void PrintDataTo(StringStream* stream) const; |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3140 HValue* object() const { return left(); } | 3137 HValue* object() const { return left(); } |
3141 HValue* key() const { return right(); } | 3138 HValue* key() const { return right(); } |
3142 }; | 3139 }; |
3143 | 3140 |
3144 #undef DECLARE_INSTRUCTION | 3141 #undef DECLARE_INSTRUCTION |
3145 #undef DECLARE_CONCRETE_INSTRUCTION | 3142 #undef DECLARE_CONCRETE_INSTRUCTION |
3146 | 3143 |
3147 } } // namespace v8::internal | 3144 } } // namespace v8::internal |
3148 | 3145 |
3149 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3146 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |