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

Unified Diff: src/objects-printer.cc

Issue 1480873003: Introduce instance type for transition arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix zapping Created 5 years, 1 month 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-inl.h ('k') | src/transitions.h » ('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 9f809d7e3853e90618152dcdbe7d2daaf06b4e80..53c0a21c52837a308757ae70226c53649b942d94 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -76,6 +76,9 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
case BYTECODE_ARRAY_TYPE:
BytecodeArray::cast(this)->BytecodeArrayPrint(os);
break;
+ case TRANSITION_ARRAY_TYPE:
+ TransitionArray::cast(this)->TransitionArrayPrint(os);
+ break;
case FREE_SPACE_TYPE:
FreeSpace::cast(this)->FreeSpacePrint(os);
break;
@@ -553,6 +556,19 @@ void FixedDoubleArray::FixedDoubleArrayPrint(std::ostream& os) { // NOLINT
}
+void TransitionArray::TransitionArrayPrint(std::ostream& os) { // NOLINT
+ HeapObject::PrintHeader(os, "TransitionArray");
+ os << " - capacity: " << length();
+ for (int i = 0; i < length(); i++) {
+ os << "\n [" << i << "]: " << Brief(get(i));
+ if (i == kNextLinkIndex) os << " (next link)";
+ if (i == kPrototypeTransitionsIndex) os << " (prototype transitions)";
+ if (i == kTransitionLengthIndex) os << " (number of transitions)";
+ }
+ os << "\n";
+}
+
+
void TypeFeedbackMetadata::Print() {
OFStream os(stdout);
TypeFeedbackMetadataPrint(os);
« no previous file with comments | « src/objects-inl.h ('k') | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698