Index: src/objects-printer.cc |
diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
index 98868f29cb263efe61d4823ed30317049af157e8..471afc9c37b8bc34af5ebf4b0ff9d6721a044ef2 100644 |
--- a/src/objects-printer.cc |
+++ b/src/objects-printer.cc |
@@ -76,6 +76,9 @@ void HeapObject::HeapObjectPrint(FILE* out) { |
} |
switch (instance_type) { |
+ case SYMBOL_TYPE: |
+ Symbol::cast(this)->SymbolPrint(out); |
+ break; |
case MAP_TYPE: |
Map::cast(this)->MapPrint(out); |
break; |
@@ -477,6 +480,7 @@ static const char* TypeToString(InstanceType type) { |
case INVALID_TYPE: return "INVALID"; |
case MAP_TYPE: return "MAP"; |
case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; |
+ case SYMBOL_TYPE: return "SYMBOL"; |
case STRING_TYPE: return "TWO_BYTE_STRING"; |
case ASCII_STRING_TYPE: return "ASCII_STRING"; |
case CONS_STRING_TYPE: |
@@ -545,6 +549,12 @@ static const char* TypeToString(InstanceType type) { |
} |
+void Symbol::SymbolPrint(FILE* out) { |
+ HeapObject::PrintHeader(out, "Symbol"); |
+ PrintF(out, " - hash: %d\n", Hash()); |
+} |
+ |
+ |
void Map::MapPrint(FILE* out) { |
HeapObject::PrintHeader(out, "Map"); |
PrintF(out, " - type: %s\n", TypeToString(instance_type())); |