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 3192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3203 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); | 3203 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); |
3204 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); | 3204 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); |
3205 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double); | 3205 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double); |
3206 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>); | 3206 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>); |
3207 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, Handle<Map>, UniqueValueId); | 3207 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, Handle<Map>, UniqueValueId); |
3208 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference); | 3208 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference); |
3209 | 3209 |
3210 static HConstant* CreateAndInsertAfter(Zone* zone, | 3210 static HConstant* CreateAndInsertAfter(Zone* zone, |
3211 HValue* context, | 3211 HValue* context, |
3212 int32_t value, | 3212 int32_t value, |
| 3213 Representation representation, |
3213 HInstruction* instruction) { | 3214 HInstruction* instruction) { |
3214 HConstant* new_constant = HConstant::New(zone, context, value); | 3215 HConstant* new_constant = |
| 3216 HConstant::New(zone, context, value, representation); |
3215 new_constant->InsertAfter(instruction); | 3217 new_constant->InsertAfter(instruction); |
3216 return new_constant; | 3218 return new_constant; |
3217 } | 3219 } |
3218 | 3220 |
3219 static HConstant* CreateAndInsertBefore(Zone* zone, | 3221 static HConstant* CreateAndInsertBefore(Zone* zone, |
3220 HValue* context, | 3222 HValue* context, |
3221 int32_t value, | 3223 int32_t value, |
| 3224 Representation representation, |
3222 HInstruction* instruction) { | 3225 HInstruction* instruction) { |
3223 HConstant* new_constant = HConstant::New(zone, context, value); | 3226 HConstant* new_constant = |
| 3227 HConstant::New(zone, context, value, representation); |
3224 new_constant->InsertBefore(instruction); | 3228 new_constant->InsertBefore(instruction); |
3225 return new_constant; | 3229 return new_constant; |
3226 } | 3230 } |
3227 | 3231 |
3228 Handle<Object> handle() { | 3232 Handle<Object> handle() { |
3229 if (handle_.is_null()) { | 3233 if (handle_.is_null()) { |
3230 Factory* factory = Isolate::Current()->factory(); | 3234 Factory* factory = Isolate::Current()->factory(); |
3231 // Default arguments to is_not_in_new_space depend on this heap number | 3235 // Default arguments to is_not_in_new_space depend on this heap number |
3232 // to be tenured so that it's guaranteed not be be located in new space. | 3236 // to be tenured so that it's guaranteed not be be located in new space. |
3233 handle_ = factory->NewNumber(double_value_, TENURED); | 3237 handle_ = factory->NewNumber(double_value_, TENURED); |
(...skipping 3599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6833 virtual bool IsDeletable() const { return true; } | 6837 virtual bool IsDeletable() const { return true; } |
6834 }; | 6838 }; |
6835 | 6839 |
6836 | 6840 |
6837 #undef DECLARE_INSTRUCTION | 6841 #undef DECLARE_INSTRUCTION |
6838 #undef DECLARE_CONCRETE_INSTRUCTION | 6842 #undef DECLARE_CONCRETE_INSTRUCTION |
6839 | 6843 |
6840 } } // namespace v8::internal | 6844 } } // namespace v8::internal |
6841 | 6845 |
6842 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6846 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |