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 3231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3242 Handle<Object> optional_handle = Handle<Object>::null()); | 3242 Handle<Object> optional_handle = Handle<Object>::null()); |
3243 HConstant(Handle<Object> handle, | 3243 HConstant(Handle<Object> handle, |
3244 UniqueValueId unique_id, | 3244 UniqueValueId unique_id, |
3245 Representation r, | 3245 Representation r, |
3246 HType type, | 3246 HType type, |
3247 bool is_internalized_string, | 3247 bool is_internalized_string, |
3248 bool boolean_value); | 3248 bool boolean_value); |
3249 | 3249 |
3250 Handle<Object> handle() { | 3250 Handle<Object> handle() { |
3251 if (handle_.is_null()) { | 3251 if (handle_.is_null()) { |
3252 handle_ = isolate()->factory()->NewNumber(double_value_, TENURED); | 3252 handle_ = FACTORY->NewNumber(double_value_, TENURED); |
3253 } | 3253 } |
3254 ALLOW_HANDLE_DEREF(isolate(), "smi check"); | 3254 ALLOW_HANDLE_DEREF(Isolate::Current(), "smi check"); |
3255 ASSERT(has_int32_value_ || !handle_->IsSmi()); | 3255 ASSERT(has_int32_value_ || !handle_->IsSmi()); |
3256 return handle_; | 3256 return handle_; |
3257 } | 3257 } |
3258 | 3258 |
3259 bool IsSpecialDouble() const { | 3259 bool IsSpecialDouble() const { |
3260 return has_double_value_ && | 3260 return has_double_value_ && |
3261 (BitCast<int64_t>(double_value_) == BitCast<int64_t>(-0.0) || | 3261 (BitCast<int64_t>(double_value_) == BitCast<int64_t>(-0.0) || |
3262 FixedDoubleArray::is_the_hole_nan(double_value_) || | 3262 FixedDoubleArray::is_the_hole_nan(double_value_) || |
3263 std::isnan(double_value_)); | 3263 std::isnan(double_value_)); |
3264 } | 3264 } |
(...skipping 3285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6550 virtual bool IsDeletable() const { return true; } | 6550 virtual bool IsDeletable() const { return true; } |
6551 }; | 6551 }; |
6552 | 6552 |
6553 | 6553 |
6554 #undef DECLARE_INSTRUCTION | 6554 #undef DECLARE_INSTRUCTION |
6555 #undef DECLARE_CONCRETE_INSTRUCTION | 6555 #undef DECLARE_CONCRETE_INSTRUCTION |
6556 | 6556 |
6557 } } // namespace v8::internal | 6557 } } // namespace v8::internal |
6558 | 6558 |
6559 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6559 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |