Index: src/property-details.h |
diff --git a/src/property-details.h b/src/property-details.h |
index 9df99880846d6df101827163fe738abce670679d..135c2ca01321fb67fbadba602f7f47b6b6fb792e 100644 |
--- a/src/property-details.h |
+++ b/src/property-details.h |
@@ -61,12 +61,11 @@ enum PropertyType { |
CALLBACKS = 3, |
HANDLER = 4, // only in lookup results, not in descriptors |
INTERCEPTOR = 5, // only in lookup results, not in descriptors |
+ // All properties before MAP_TRANSITION are real. |
MAP_TRANSITION = 6, // only in fast mode |
ELEMENTS_TRANSITION = 7, |
CONSTANT_TRANSITION = 8, // only in fast mode |
NULL_DESCRIPTOR = 9, // only in fast mode |
- // All properties before MAP_TRANSITION are real. |
- FIRST_PHANTOM_PROPERTY_TYPE = MAP_TRANSITION, |
// There are no IC stubs for NULL_DESCRIPTORS. Therefore, |
// NULL_DESCRIPTOR can be used as the type flag for IC stubs for |
// nonexistent properties. |
@@ -94,6 +93,26 @@ inline bool IsTransitionType(PropertyType type) { |
} |
+inline bool IsRealProperty(PropertyType type) { |
+ switch (type) { |
+ case NORMAL: |
+ case FIELD: |
+ case CONSTANT_FUNCTION: |
+ case CALLBACKS: |
+ case HANDLER: |
+ case INTERCEPTOR: |
+ return true; |
+ case MAP_TRANSITION: |
+ case ELEMENTS_TRANSITION: |
+ case CONSTANT_TRANSITION: |
+ case NULL_DESCRIPTOR: |
+ return false; |
+ } |
+ UNREACHABLE(); // keep the compiler happy |
+ return false; |
+} |
+ |
+ |
// PropertyDetails captures type and attributes for a property. |
// They are used both in property dictionaries and instance descriptors. |
class PropertyDetails BASE_EMBEDDED { |
@@ -127,7 +146,7 @@ class PropertyDetails BASE_EMBEDDED { |
} |
bool IsProperty() { |
- return type() < FIRST_PHANTOM_PROPERTY_TYPE; |
+ return IsRealProperty(type()); |
} |
PropertyAttributes attributes() { return AttributesField::decode(value_); } |