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 3228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3239 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); | 3239 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); |
3240 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); | 3240 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); |
3241 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double); | 3241 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double); |
3242 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>); | 3242 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>); |
3243 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, Handle<Map>, UniqueValueId); | 3243 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, Handle<Map>, UniqueValueId); |
3244 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference); | 3244 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference); |
3245 | 3245 |
3246 static HConstant* CreateAndInsertAfter(Zone* zone, | 3246 static HConstant* CreateAndInsertAfter(Zone* zone, |
3247 HValue* context, | 3247 HValue* context, |
3248 int32_t value, | 3248 int32_t value, |
| 3249 Representation representation, |
3249 HInstruction* instruction) { | 3250 HInstruction* instruction) { |
3250 HConstant* new_constant = HConstant::New(zone, context, value); | 3251 HConstant* new_constant = |
| 3252 HConstant::New(zone, context, value, representation); |
3251 new_constant->InsertAfter(instruction); | 3253 new_constant->InsertAfter(instruction); |
3252 return new_constant; | 3254 return new_constant; |
3253 } | 3255 } |
3254 | 3256 |
3255 static HConstant* CreateAndInsertBefore(Zone* zone, | 3257 static HConstant* CreateAndInsertBefore(Zone* zone, |
3256 HValue* context, | 3258 HValue* context, |
3257 int32_t value, | 3259 int32_t value, |
| 3260 Representation representation, |
3258 HInstruction* instruction) { | 3261 HInstruction* instruction) { |
3259 HConstant* new_constant = HConstant::New(zone, context, value); | 3262 HConstant* new_constant = |
| 3263 HConstant::New(zone, context, value, representation); |
3260 new_constant->InsertBefore(instruction); | 3264 new_constant->InsertBefore(instruction); |
3261 return new_constant; | 3265 return new_constant; |
3262 } | 3266 } |
3263 | 3267 |
3264 Handle<Object> handle() { | 3268 Handle<Object> handle() { |
3265 if (handle_.is_null()) { | 3269 if (handle_.is_null()) { |
3266 Factory* factory = Isolate::Current()->factory(); | 3270 Factory* factory = Isolate::Current()->factory(); |
3267 // Default arguments to is_not_in_new_space depend on this heap number | 3271 // Default arguments to is_not_in_new_space depend on this heap number |
3268 // to be tenured so that it's guaranteed not be be located in new space. | 3272 // to be tenured so that it's guaranteed not be be located in new space. |
3269 handle_ = factory->NewNumber(double_value_, TENURED); | 3273 handle_ = factory->NewNumber(double_value_, TENURED); |
(...skipping 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6844 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 6848 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
6845 }; | 6849 }; |
6846 | 6850 |
6847 | 6851 |
6848 #undef DECLARE_INSTRUCTION | 6852 #undef DECLARE_INSTRUCTION |
6849 #undef DECLARE_CONCRETE_INSTRUCTION | 6853 #undef DECLARE_CONCRETE_INSTRUCTION |
6850 | 6854 |
6851 } } // namespace v8::internal | 6855 } } // namespace v8::internal |
6852 | 6856 |
6853 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6857 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |