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

Unified Diff: src/objects-printer.cc

Issue 805453002: Introduced PropertyType ACCESSOR_FIELD. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 6 years 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/objects.cc ('k') | src/property.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index fc72800d16e68b2bc34e304d698c8786013affbd..9805490c31ab3157f9421a3c94079398b169ec18 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -241,11 +241,16 @@ void JSObject::PrintProperties(std::ostream& os) { // NOLINT
os << " (field at offset " << index.property_index() << ")\n";
break;
}
+ case ACCESSOR_FIELD: {
+ FieldIndex index = FieldIndex::ForDescriptor(map(), i);
+ os << " (accessor at offset " << index.property_index() << ")\n";
+ break;
+ }
case CONSTANT:
os << Brief(descs->GetConstant(i)) << " (constant)\n";
break;
case CALLBACKS:
- os << Brief(descs->GetCallbacksObject(i)) << " (callback)\n";
+ os << Brief(descs->GetCallbacksObject(i)) << " (callbacks)\n";
break;
}
}
@@ -1189,19 +1194,15 @@ void TransitionArray::PrintTransitions(std::ostream& os,
os << " (transition to Object.observe)";
} else {
PropertyDetails details = GetTargetDetails(key, target);
- switch (details.type()) {
- case FIELD: {
- os << " (transition to field)";
- break;
- }
- case CONSTANT:
- os << " (transition to constant " << Brief(GetTargetValue(i)) << ")";
- break;
- case CALLBACKS:
- os << " (transition to callback " << Brief(GetTargetValue(i)) << ")";
- break;
+ os << " (transition to ";
+ if (details.location() == IN_DESCRIPTOR) {
+ os << "immutable ";
+ }
+ os << (details.kind() == DATA ? "data" : "accessor");
+ if (details.location() == IN_DESCRIPTOR) {
+ os << " " << Brief(GetTargetValue(i));
}
- os << ", attrs: " << details.attributes();
+ os << "), attrs: " << details.attributes();
}
os << " -> " << Brief(target) << "\n";
}
« no previous file with comments | « src/objects.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698