OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // HBitAnd | 66 // HBitAnd |
67 // HBitOr | 67 // HBitOr |
68 // HBitXor | 68 // HBitXor |
69 // HSar | 69 // HSar |
70 // HShl | 70 // HShl |
71 // HShr | 71 // HShr |
72 // HBoundsCheck | 72 // HBoundsCheck |
73 // HCompare | 73 // HCompare |
74 // HCompareJSObjectEq | 74 // HCompareJSObjectEq |
75 // HInstanceOf | 75 // HInstanceOf |
| 76 // HInstanceOfKnownGlobal |
76 // HLoadKeyed | 77 // HLoadKeyed |
77 // HLoadKeyedFastElement | 78 // HLoadKeyedFastElement |
78 // HLoadKeyedGeneric | 79 // HLoadKeyedGeneric |
79 // HLoadNamedGeneric | 80 // HLoadNamedGeneric |
80 // HPower | 81 // HPower |
81 // HStoreNamed | 82 // HStoreNamed |
82 // HStoreNamedField | 83 // HStoreNamedField |
83 // HStoreNamedGeneric | 84 // HStoreNamedGeneric |
84 // HBlockEntry | 85 // HBlockEntry |
85 // HCall | 86 // HCall |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 V(Constant) \ | 202 V(Constant) \ |
202 V(DeleteProperty) \ | 203 V(DeleteProperty) \ |
203 V(Deoptimize) \ | 204 V(Deoptimize) \ |
204 V(Div) \ | 205 V(Div) \ |
205 V(EnterInlined) \ | 206 V(EnterInlined) \ |
206 V(FunctionLiteral) \ | 207 V(FunctionLiteral) \ |
207 V(GlobalObject) \ | 208 V(GlobalObject) \ |
208 V(GlobalReceiver) \ | 209 V(GlobalReceiver) \ |
209 V(Goto) \ | 210 V(Goto) \ |
210 V(InstanceOf) \ | 211 V(InstanceOf) \ |
| 212 V(InstanceOfKnownGlobal) \ |
211 V(IsNull) \ | 213 V(IsNull) \ |
212 V(IsObject) \ | 214 V(IsObject) \ |
213 V(IsSmi) \ | 215 V(IsSmi) \ |
214 V(HasInstanceType) \ | 216 V(HasInstanceType) \ |
215 V(HasCachedArrayIndex) \ | 217 V(HasCachedArrayIndex) \ |
216 V(ClassOfTest) \ | 218 V(ClassOfTest) \ |
217 V(LeaveInlined) \ | 219 V(LeaveInlined) \ |
218 V(LoadElements) \ | 220 V(LoadElements) \ |
219 V(LoadGlobal) \ | 221 V(LoadGlobal) \ |
220 V(LoadKeyedFastElement) \ | 222 V(LoadKeyedFastElement) \ |
(...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2229 virtual bool EmitAtUses() const { return uses()->length() <= 1; } | 2231 virtual bool EmitAtUses() const { return uses()->length() <= 1; } |
2230 | 2232 |
2231 virtual Representation RequiredInputRepresentation(int index) const { | 2233 virtual Representation RequiredInputRepresentation(int index) const { |
2232 return Representation::Tagged(); | 2234 return Representation::Tagged(); |
2233 } | 2235 } |
2234 | 2236 |
2235 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance_of") | 2237 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance_of") |
2236 }; | 2238 }; |
2237 | 2239 |
2238 | 2240 |
| 2241 class HInstanceOfKnownGlobal: public HUnaryOperation { |
| 2242 public: |
| 2243 HInstanceOfKnownGlobal(HValue* left, Handle<JSFunction> right) |
| 2244 : HUnaryOperation(left), function_(right) { |
| 2245 set_representation(Representation::Tagged()); |
| 2246 SetFlagMask(AllSideEffects()); |
| 2247 } |
| 2248 |
| 2249 Handle<JSFunction> function() { return function_; } |
| 2250 |
| 2251 virtual Representation RequiredInputRepresentation(int index) const { |
| 2252 return Representation::Tagged(); |
| 2253 } |
| 2254 |
| 2255 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, |
| 2256 "instance_of_known_global") |
| 2257 |
| 2258 private: |
| 2259 Handle<JSFunction> function_; |
| 2260 }; |
| 2261 |
| 2262 |
2239 class HPower: public HBinaryOperation { | 2263 class HPower: public HBinaryOperation { |
2240 public: | 2264 public: |
2241 HPower(HValue* left, HValue* right) | 2265 HPower(HValue* left, HValue* right) |
2242 : HBinaryOperation(left, right) { | 2266 : HBinaryOperation(left, right) { |
2243 set_representation(Representation::Double()); | 2267 set_representation(Representation::Double()); |
2244 SetFlag(kUseGVN); | 2268 SetFlag(kUseGVN); |
2245 } | 2269 } |
2246 | 2270 |
2247 virtual Representation RequiredInputRepresentation(int index) const { | 2271 virtual Representation RequiredInputRepresentation(int index) const { |
2248 return (index == 1) ? Representation::None() : Representation::Double(); | 2272 return (index == 1) ? Representation::None() : Representation::Double(); |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2944 HValue* object() const { return left(); } | 2968 HValue* object() const { return left(); } |
2945 HValue* key() const { return right(); } | 2969 HValue* key() const { return right(); } |
2946 }; | 2970 }; |
2947 | 2971 |
2948 #undef DECLARE_INSTRUCTION | 2972 #undef DECLARE_INSTRUCTION |
2949 #undef DECLARE_CONCRETE_INSTRUCTION | 2973 #undef DECLARE_CONCRETE_INSTRUCTION |
2950 | 2974 |
2951 } } // namespace v8::internal | 2975 } } // namespace v8::internal |
2952 | 2976 |
2953 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 2977 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |