Chromium Code Reviews| Index: src/property.cc |
| diff --git a/src/property.cc b/src/property.cc |
| index 6e043e2685e6609fb305ebf477920e8c3d4b188b..f4616bbe77e286a5673ec5c6ef2006d9424c0d03 100644 |
| --- a/src/property.cc |
| +++ b/src/property.cc |
| @@ -91,6 +91,9 @@ void LookupResult::Print(FILE* out) { |
| break; |
| case CONSTANT_TRANSITION: |
| PrintF(out, " -type = constant property transition\n"); |
| + PrintF(out, " -map:\n"); |
| + GetTransitionMap()->Print(out); |
| + PrintF(out, "\n"); |
| break; |
| case NULL_DESCRIPTOR: |
| PrintF(out, " =type = null descriptor\n"); |
| @@ -111,4 +114,28 @@ void Descriptor::Print(FILE* out) { |
| #endif |
| +bool Descriptor::ContainsTransition() { |
| + switch (details_.type()) { |
| + case MAP_TRANSITION: |
| + case CONSTANT_TRANSITION: |
| + case ELEMENTS_TRANSITION: |
| + return true; |
| + case CALLBACKS: { |
| + 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: |
|
Jakob Kummerow
2012/02/03 13:17:14
nit: indentation
Sven Panne
2012/02/03 13:33:14
Done.
|
| + case NULL_DESCRIPTOR: |
| + return false; |
| + } |
| + UNREACHABLE(); // keep the compiler happy |
|
Jakob Kummerow
2012/02/03 13:17:14
Missing capital letter and period.
Sven Panne
2012/02/03 13:33:14
Done.
|
| + return false; |
| +} |
| + |
| + |
| } } // namespace v8::internal |