Index: src/v8globals.h |
diff --git a/src/v8globals.h b/src/v8globals.h |
index 560e36874c19102bb8a8be9343efe28d561820f1..3a29a64453aa70baf3df85f68babce4cdf51b8f3 100644 |
--- a/src/v8globals.h |
+++ b/src/v8globals.h |
@@ -29,6 +29,7 @@ |
#define V8_V8GLOBALS_H_ |
#include "globals.h" |
+#include "checks.h" |
namespace v8 { |
namespace internal { |
@@ -347,6 +348,25 @@ enum PropertyType { |
}; |
+inline bool IsTransitionType(PropertyType type) { |
+ switch (type) { |
+ case MAP_TRANSITION: |
+ case CONSTANT_TRANSITION: |
+ case ELEMENTS_TRANSITION: |
+ return true; |
+ case NORMAL: |
+ case FIELD: |
+ case CONSTANT_FUNCTION: |
+ case CALLBACKS: |
+ case HANDLER: |
+ case INTERCEPTOR: |
+ case NULL_DESCRIPTOR: |
+ return false; |
+ } |
+ UNREACHABLE(); // keep the compiler happy |
+ return false; |
+} |
+ |
// Whether to remove map transitions and constant transitions from a |
// DescriptorArray. |
enum TransitionFlag { |