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

Side by Side Diff: src/objects-printer.cc

Issue 677633003: Improve printing for Symbols. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 420 }
421 UNREACHABLE(); 421 UNREACHABLE();
422 return "UNKNOWN"; // Keep the compiler happy. 422 return "UNKNOWN"; // Keep the compiler happy.
423 } 423 }
424 424
425 425
426 void Symbol::SymbolPrint(std::ostream& os) { // NOLINT 426 void Symbol::SymbolPrint(std::ostream& os) { // NOLINT
427 HeapObject::PrintHeader(os, "Symbol"); 427 HeapObject::PrintHeader(os, "Symbol");
428 os << " - hash: " << Hash(); 428 os << " - hash: " << Hash();
429 os << "\n - name: " << Brief(name()); 429 os << "\n - name: " << Brief(name());
430 if (name()->IsUndefined()) {
431 os << " (" << PrivateSymbolToName() << ")";
432 }
430 os << "\n - private: " << is_private(); 433 os << "\n - private: " << is_private();
431 os << "\n - own: " << is_own(); 434 os << "\n - own: " << is_own();
432 os << "\n"; 435 os << "\n";
433 } 436 }
434 437
435 438
436 void Map::MapPrint(std::ostream& os) { // NOLINT 439 void Map::MapPrint(std::ostream& os) { // NOLINT
437 HeapObject::PrintHeader(os, "Map"); 440 HeapObject::PrintHeader(os, "Map");
438 os << " - type: " << TypeToString(instance_type()) << "\n"; 441 os << " - type: " << TypeToString(instance_type()) << "\n";
439 os << " - instance size: " << instance_size() << "\n"; 442 os << " - instance size: " << instance_size() << "\n";
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1120 }
1118 } 1121 }
1119 os << "\n"; 1122 os << "\n";
1120 } 1123 }
1121 1124
1122 1125
1123 #endif // OBJECT_PRINT 1126 #endif // OBJECT_PRINT
1124 1127
1125 1128
1126 } } // namespace v8::internal 1129 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698