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

Unified Diff: src/objects-printer.cc

Issue 888623002: Property reconfiguring implemented. Tests added. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 357d7b8b3b42750014844a4929678273105fa9ae..6116c6380b711079cdca4ae5227fdd6406641f3f 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -442,6 +442,24 @@ void Map::MapPrint(std::ostream& os) { // NOLINT
}
+// TODO(ishell): Move prototype transitions to separate class.
+void Map::PrintPrototypeTransitions(std::ostream& os) { // NOLINT
+ FixedArray* cache = GetPrototypeTransitions();
+ int number_of_transitions = NumberOfProtoTransitions();
+ os << "Prototype transition array " << number_of_transitions << "\n";
+ const int proto_offset =
+ kProtoTransitionHeaderSize + kProtoTransitionPrototypeOffset;
+ const int map_offset = kProtoTransitionHeaderSize + kProtoTransitionMapOffset;
+ const int step = kProtoTransitionElementsPerEntry;
+ for (int i = 0; i < number_of_transitions; i++) {
+ Object* prototype = cache->get(proto_offset + i * step);
+ Object* map = cache->get(map_offset + i * step);
+ os << " " << Brief(prototype) << " -> " << Brief(map) << "\n";
+ }
+ os << "\n";
+}
+
+
void CodeCache::CodeCachePrint(std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, "CodeCache");
os << "\n - default_cache: " << Brief(default_cache());

Powered by Google App Engine
This is Rietveld 408576698