| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_PROPERTY_DETAILS_H_ | 5 #ifndef V8_PROPERTY_DETAILS_H_ |
| 6 #define V8_PROPERTY_DETAILS_H_ | 6 #define V8_PROPERTY_DETAILS_H_ |
| 7 | 7 |
| 8 #include "include/v8.h" | 8 #include "include/v8.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/utils.h" | 10 #include "src/utils.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 if (IsHeapObject()) return other.IsNone(); | 117 if (IsHeapObject()) return other.IsNone(); |
| 118 if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false; | 118 if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false; |
| 119 if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false; | 119 if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false; |
| 120 return kind_ > other.kind_; | 120 return kind_ > other.kind_; |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool fits_into(const Representation& other) const { | 123 bool fits_into(const Representation& other) const { |
| 124 return other.is_more_general_than(*this) || other.Equals(*this); | 124 return other.is_more_general_than(*this) || other.Equals(*this); |
| 125 } | 125 } |
| 126 | 126 |
| 127 bool CanContainDouble(double value); | |
| 128 | |
| 129 Representation generalize(Representation other) { | 127 Representation generalize(Representation other) { |
| 130 if (other.fits_into(*this)) return *this; | 128 if (other.fits_into(*this)) return *this; |
| 131 if (other.is_more_general_than(*this)) return other; | 129 if (other.is_more_general_than(*this)) return other; |
| 132 return Representation::Tagged(); | 130 return Representation::Tagged(); |
| 133 } | 131 } |
| 134 | 132 |
| 135 int size() const { | 133 int size() const { |
| 136 ASSERT(!IsNone()); | 134 ASSERT(!IsNone()); |
| 137 if (IsInteger8() || IsUInteger8()) { | 135 if (IsInteger8() || IsUInteger8()) { |
| 138 return sizeof(uint8_t); | 136 return sizeof(uint8_t); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 PropertyDetails(int value, PropertyAttributes attributes) { | 296 PropertyDetails(int value, PropertyAttributes attributes) { |
| 299 value_ = AttributesField::update(value, attributes); | 297 value_ = AttributesField::update(value, attributes); |
| 300 } | 298 } |
| 301 | 299 |
| 302 uint32_t value_; | 300 uint32_t value_; |
| 303 }; | 301 }; |
| 304 | 302 |
| 305 } } // namespace v8::internal | 303 } } // namespace v8::internal |
| 306 | 304 |
| 307 #endif // V8_PROPERTY_DETAILS_H_ | 305 #endif // V8_PROPERTY_DETAILS_H_ |
| OLD | NEW |