OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_H_ | 5 #ifndef V8_PROPERTY_H_ |
6 #define V8_PROPERTY_H_ | 6 #define V8_PROPERTY_H_ |
7 | 7 |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/field-index-inl.h" | 10 #include "src/field-index-inl.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 253 |
254 bool IsNormal() const { | 254 bool IsNormal() const { |
255 return IsFound() && IsDescriptorOrDictionary() && type() == NORMAL; | 255 return IsFound() && IsDescriptorOrDictionary() && type() == NORMAL; |
256 } | 256 } |
257 | 257 |
258 bool IsConstant() const { | 258 bool IsConstant() const { |
259 DCHECK(!(details_.type() == CONSTANT && !IsFound())); | 259 DCHECK(!(details_.type() == CONSTANT && !IsFound())); |
260 return IsDescriptorOrDictionary() && type() == CONSTANT; | 260 return IsDescriptorOrDictionary() && type() == CONSTANT; |
261 } | 261 } |
262 | 262 |
263 bool IsDontDelete() const { return details_.IsDontDelete(); } | 263 bool IsConfigurable() const { return details_.IsConfigurable(); } |
264 bool IsDontEnum() const { return details_.IsDontEnum(); } | 264 bool IsDontEnum() const { return details_.IsDontEnum(); } |
265 bool IsFound() const { return lookup_type_ != NOT_FOUND; } | 265 bool IsFound() const { return lookup_type_ != NOT_FOUND; } |
266 bool IsDescriptorOrDictionary() const { | 266 bool IsDescriptorOrDictionary() const { |
267 return lookup_type_ == DESCRIPTOR_TYPE || lookup_type_ == DICTIONARY_TYPE; | 267 return lookup_type_ == DESCRIPTOR_TYPE || lookup_type_ == DICTIONARY_TYPE; |
268 } | 268 } |
269 bool IsTransition() const { return lookup_type_ == TRANSITION_TYPE; } | 269 bool IsTransition() const { return lookup_type_ == TRANSITION_TYPE; } |
270 bool IsHandler() const { return lookup_type_ == HANDLER_TYPE; } | 270 bool IsHandler() const { return lookup_type_ == HANDLER_TYPE; } |
271 bool IsInterceptor() const { return lookup_type_ == INTERCEPTOR_TYPE; } | 271 bool IsInterceptor() const { return lookup_type_ == INTERCEPTOR_TYPE; } |
272 | 272 |
273 // Is the result is a property excluding transitions and the null descriptor? | 273 // Is the result is a property excluding transitions and the null descriptor? |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 int number_; | 384 int number_; |
385 bool cacheable_; | 385 bool cacheable_; |
386 PropertyDetails details_; | 386 PropertyDetails details_; |
387 }; | 387 }; |
388 | 388 |
389 | 389 |
390 OStream& operator<<(OStream& os, const LookupResult& r); | 390 OStream& operator<<(OStream& os, const LookupResult& r); |
391 } } // namespace v8::internal | 391 } } // namespace v8::internal |
392 | 392 |
393 #endif // V8_PROPERTY_H_ | 393 #endif // V8_PROPERTY_H_ |
OLD | NEW |