| Index: src/objects-printer.cc
|
| diff --git a/src/objects-printer.cc b/src/objects-printer.cc
|
| index ba05b474e4b2aca5e302660e108748d2b060351e..2fb924cfc99a19b94d964ddd364c7545d16f3d81 100644
|
| --- a/src/objects-printer.cc
|
| +++ b/src/objects-printer.cc
|
| @@ -1129,4 +1129,38 @@ void TransitionArray::PrintTransitions(std::ostream& os,
|
| #endif // OBJECT_PRINT
|
|
|
|
|
| +#if TRACE_MAPS
|
| +
|
| +
|
| +void Name::NameShortPrint() {
|
| + if (this->IsString()) {
|
| + PrintF("%s", String::cast(this)->ToCString().get());
|
| + } else {
|
| + DCHECK(this->IsSymbol());
|
| + Symbol* s = Symbol::cast(this);
|
| + if (s->name()->IsUndefined()) {
|
| + PrintF("#<%s>", s->PrivateSymbolToName());
|
| + } else {
|
| + PrintF("<%s>", String::cast(s->name())->ToCString().get());
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| +int Name::NameShortPrint(Vector<char> str) {
|
| + if (this->IsString()) {
|
| + return SNPrintF(str, "%s", String::cast(this)->ToCString().get());
|
| + } else {
|
| + DCHECK(this->IsSymbol());
|
| + Symbol* s = Symbol::cast(this);
|
| + if (s->name()->IsUndefined()) {
|
| + return SNPrintF(str, "#<%s>", s->PrivateSymbolToName());
|
| + } else {
|
| + return SNPrintF(str, "<%s>", String::cast(s->name())->ToCString().get());
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| +#endif // TRACE_MAPS
|
| } } // namespace v8::internal
|
|
|