Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 7901f0892d94ea7361b23c22fc98877bfd3af666..6cc6bd7e1528dde2e23966e1078f06d5468ba0ae 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1991,8 +1991,28 @@ bool DescriptorArray::IsProperty(int descriptor_number) { |
} |
-bool DescriptorArray::IsTransition(int descriptor_number) { |
- return IsTransitionType(GetType(descriptor_number)); |
+bool DescriptorArray::IsTransitionOnly(int descriptor_number) { |
+ switch (GetType(descriptor_number)) { |
+ case MAP_TRANSITION: |
+ case CONSTANT_TRANSITION: |
+ case ELEMENTS_TRANSITION: |
+ return true; |
+ case CALLBACKS: { |
+ Object* value = GetValue(descriptor_number); |
+ if (!value->IsAccessorPair()) return false; |
+ AccessorPair* accessors = AccessorPair::cast(value); |
+ return accessors->getter()->IsMap() && accessors->setter()->IsMap(); |
+ } |
+ case NORMAL: |
+ case FIELD: |
+ case CONSTANT_FUNCTION: |
+ case HANDLER: |
+ case INTERCEPTOR: |
+ case NULL_DESCRIPTOR: |
+ return false; |
+ } |
+ UNREACHABLE(); // keep the compiler happy |
Jakob Kummerow
2012/02/03 13:17:14
nit: Leading capital letter and trailing period.
Sven Panne
2012/02/03 13:33:14
Done.
|
+ return false; |
} |