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 115 matching lines...) Loading... |
126 if (other.is_more_general_than(*this)) return other; | 126 if (other.is_more_general_than(*this)) return other; |
127 return Representation::Tagged(); | 127 return Representation::Tagged(); |
128 } | 128 } |
129 | 129 |
130 Kind kind() const { return static_cast<Kind>(kind_); } | 130 Kind kind() const { return static_cast<Kind>(kind_); } |
131 bool IsNone() const { return kind_ == kNone; } | 131 bool IsNone() const { return kind_ == kNone; } |
132 bool IsTagged() const { return kind_ == kTagged; } | 132 bool IsTagged() const { return kind_ == kTagged; } |
133 bool IsSmi() const { return kind_ == kSmi; } | 133 bool IsSmi() const { return kind_ == kSmi; } |
134 bool IsSmiOrTagged() const { return IsSmi() || IsTagged(); } | 134 bool IsSmiOrTagged() const { return IsSmi() || IsTagged(); } |
135 bool IsInteger32() const { return kind_ == kInteger32; } | 135 bool IsInteger32() const { return kind_ == kInteger32; } |
| 136 bool IsSmiOrInteger32() const { return IsSmi() || IsInteger32(); } |
136 bool IsDouble() const { return kind_ == kDouble; } | 137 bool IsDouble() const { return kind_ == kDouble; } |
137 bool IsHeapObject() const { return kind_ == kHeapObject; } | 138 bool IsHeapObject() const { return kind_ == kHeapObject; } |
138 bool IsExternal() const { return kind_ == kExternal; } | 139 bool IsExternal() const { return kind_ == kExternal; } |
139 bool IsSpecialization() const { | 140 bool IsSpecialization() const { |
140 return kind_ == kInteger32 || kind_ == kDouble; | 141 return kind_ == kInteger32 || kind_ == kDouble; |
141 } | 142 } |
142 const char* Mnemonic() const; | 143 const char* Mnemonic() const; |
143 | 144 |
144 private: | 145 private: |
145 explicit Representation(Kind k) : kind_(k) { } | 146 explicit Representation(Kind k) : kind_(k) { } |
(...skipping 100 matching lines...) Loading... |
246 PropertyDetails(int value, PropertyAttributes attributes) { | 247 PropertyDetails(int value, PropertyAttributes attributes) { |
247 value_ = AttributesField::update(value, attributes); | 248 value_ = AttributesField::update(value, attributes); |
248 } | 249 } |
249 | 250 |
250 uint32_t value_; | 251 uint32_t value_; |
251 }; | 252 }; |
252 | 253 |
253 } } // namespace v8::internal | 254 } } // namespace v8::internal |
254 | 255 |
255 #endif // V8_PROPERTY_DETAILS_H_ | 256 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |