Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: src/property.cc

Issue 9320066: Removed IsTransitionType predicate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698