Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 45153ee0edbb759425442a5b4bb69a3c998f567e..7048af8f07ef500f0414eaac4ce747d6d8e98426 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1318,6 +1318,9 @@ void HeapObject::HeapObjectShortPrint(StringStream* accumulator) { |
accumulator->Add("<Odd Oddball>"); |
break; |
} |
+ case SYMBOL_TYPE: |
+ accumulator->Add("<Symbol: %d>", Symbol::cast(this)->Hash()); |
+ break; |
case HEAP_NUMBER_TYPE: |
accumulator->Add("<Number: "); |
HeapNumber::cast(this)->HeapNumberPrint(accumulator); |
@@ -1426,6 +1429,7 @@ void HeapObject::IterateBody(InstanceType type, int object_size, |
case JS_GLOBAL_PROPERTY_CELL_TYPE: |
JSGlobalPropertyCell::BodyDescriptor::IterateBody(this, v); |
break; |
+ case SYMBOL_TYPE: |
case HEAP_NUMBER_TYPE: |
case FILLER_TYPE: |
case BYTE_ARRAY_TYPE: |
@@ -1480,6 +1484,12 @@ Object* HeapNumber::HeapNumberToBoolean() { |
} |
+void Symbol::SymbolPrint(FILE* out) { |
+ HeapObject::PrintHeader(out, "Symbol"); |
+ PrintF(out, " - hash: %d\n", Hash()); |
+} |
+ |
+ |
void HeapNumber::HeapNumberPrint(FILE* out) { |
PrintF(out, "%.16g", Number()); |
} |