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

Unified Diff: src/property.cc

Issue 223193005: Get rid of the TRANSITION PropertyType and consistently use CanHoldValue(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use number_ for LastAdded in transition results. Created 6 years, 9 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
« no previous file with comments | « src/property.h ('k') | src/property-details.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.cc
diff --git a/src/property.cc b/src/property.cc
index 591ea0bbdbf64ad70f6069c45ee2385d9b87ce6b..406caec671aa5238739441c3961977ff18099597 100644
--- a/src/property.cc
+++ b/src/property.cc
@@ -29,59 +29,61 @@ void LookupResult::Print(FILE* out) {
PrintF(out, "LookupResult:\n");
PrintF(out, " -cacheable = %s\n", IsCacheable() ? "true" : "false");
PrintF(out, " -attributes = %x\n", GetAttributes());
- switch (type()) {
- case NORMAL:
- PrintF(out, " -type = normal\n");
- PrintF(out, " -entry = %d", GetDictionaryEntry());
- break;
- case CONSTANT:
- PrintF(out, " -type = constant\n");
- PrintF(out, " -value:\n");
- GetConstant()->Print(out);
- PrintF(out, "\n");
- break;
- case FIELD:
- PrintF(out, " -type = field\n");
- PrintF(out, " -index = %d", GetFieldIndex().field_index());
- PrintF(out, "\n");
- break;
- case CALLBACKS:
- PrintF(out, " -type = call backs\n");
- PrintF(out, " -callback object:\n");
- GetCallbackObject()->Print(out);
- break;
- case HANDLER:
- PrintF(out, " -type = lookup proxy\n");
- break;
- case INTERCEPTOR:
- PrintF(out, " -type = lookup interceptor\n");
- break;
- case TRANSITION:
- switch (GetTransitionDetails().type()) {
- case FIELD:
- PrintF(out, " -type = map transition\n");
- PrintF(out, " -map:\n");
- GetTransitionTarget()->Print(out);
- PrintF(out, "\n");
- return;
- case CONSTANT:
- PrintF(out, " -type = constant property transition\n");
- PrintF(out, " -map:\n");
- GetTransitionTarget()->Print(out);
- PrintF(out, "\n");
- return;
- case CALLBACKS:
- PrintF(out, " -type = callbacks transition\n");
- PrintF(out, " -callback object:\n");
- GetCallbackObject()->Print(out);
- return;
- default:
- UNREACHABLE();
- return;
- }
- case NONEXISTENT:
- UNREACHABLE();
- break;
+ if (IsTransition()) {
+ switch (type()) {
+ case FIELD:
+ PrintF(out, " -type = map transition\n");
+ PrintF(out, " -map:\n");
+ GetTransitionTarget()->Print(out);
+ PrintF(out, "\n");
+ break;
+ case CONSTANT:
+ PrintF(out, " -type = constant property transition\n");
+ PrintF(out, " -map:\n");
+ GetTransitionTarget()->Print(out);
+ PrintF(out, "\n");
+ break;
+ case CALLBACKS:
+ PrintF(out, " -type = callbacks transition\n");
+ PrintF(out, " -callback object:\n");
+ GetCallbackObject()->Print(out);
+ break;
+ default:
+ UNREACHABLE();
+ break;
+ }
+ } else {
+ switch (type()) {
+ case NORMAL:
+ PrintF(out, " -type = normal\n");
+ PrintF(out, " -entry = %d", GetDictionaryEntry());
+ break;
+ case CONSTANT:
+ PrintF(out, " -type = constant\n");
+ PrintF(out, " -value:\n");
+ GetConstant()->Print(out);
+ PrintF(out, "\n");
+ break;
+ case FIELD:
+ PrintF(out, " -type = field\n");
+ PrintF(out, " -index = %d", GetFieldIndex().field_index());
+ PrintF(out, "\n");
+ break;
+ case CALLBACKS:
+ PrintF(out, " -type = call backs\n");
+ PrintF(out, " -callback object:\n");
+ GetCallbackObject()->Print(out);
+ break;
+ case HANDLER:
+ PrintF(out, " -type = lookup proxy\n");
+ break;
+ case INTERCEPTOR:
+ PrintF(out, " -type = lookup interceptor\n");
+ break;
+ case NONEXISTENT:
+ UNREACHABLE();
+ break;
+ }
}
}
« no previous file with comments | « src/property.h ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698