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

Unified Diff: src/objects-printer.cc

Issue 1488023002: Fix inobject slack tracking for both subclassing and non-subclassing cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moved and updated comments about slack tracking Created 5 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-inl.h ('k') | src/runtime/runtime-object.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 74649430df13a357d7c4b85e24a478b63bef297f..092afaeb44dc790501af3197995bdbeee06c2c36 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -428,17 +428,6 @@ void JSModule::JSModulePrint(std::ostream& os) { // NOLINT
}
-static const char* TypeToString(InstanceType type) {
- switch (type) {
-#define TYPE_TO_STRING(TYPE) case TYPE: return #TYPE;
- INSTANCE_TYPE_LIST(TYPE_TO_STRING)
-#undef TYPE_TO_STRING
- }
- UNREACHABLE();
- return "UNKNOWN"; // Keep the compiler happy.
-}
-
-
void Symbol::SymbolPrint(std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, "Symbol");
os << " - hash: " << Hash();
@@ -453,7 +442,7 @@ void Symbol::SymbolPrint(std::ostream& os) { // NOLINT
void Map::MapPrint(std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, "Map");
- os << " - type: " << TypeToString(instance_type()) << "\n";
+ os << " - type: " << instance_type() << "\n";
os << " - instance size: " << instance_size() << "\n";
if (IsJSObjectMap()) {
os << " - inobject properties: " << GetInObjectProperties() << "\n";
@@ -495,6 +484,7 @@ void Map::MapPrint(std::ostream& os) { // NOLINT
os << "\n - constructor: " << Brief(GetConstructor());
os << "\n - code cache: " << Brief(code_cache());
os << "\n - dependent code: " << Brief(dependent_code());
+ os << "\n - counter: " << counter();
os << "\n";
}
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698