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

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

Issue 694533003: Add FLAG_trace_maps (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 1 month 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-inl.h ('k') | src/runtime/runtime-debug.cc » ('j') | 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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 os << ", attrs: " << details.attributes(); 1122 os << ", attrs: " << details.attributes();
1123 } 1123 }
1124 os << " -> " << Brief(target) << "\n"; 1124 os << " -> " << Brief(target) << "\n";
1125 } 1125 }
1126 } 1126 }
1127 1127
1128 1128
1129 #endif // OBJECT_PRINT 1129 #endif // OBJECT_PRINT
1130 1130
1131 1131
1132 #if TRACE_MAPS
1133
1134
1135 void Name::NameShortPrint() {
1136 if (this->IsString()) {
1137 PrintF("%s", String::cast(this)->ToCString().get());
1138 } else {
1139 DCHECK(this->IsSymbol());
1140 Symbol* s = Symbol::cast(this);
1141 if (s->name()->IsUndefined()) {
1142 PrintF("#<%s>", s->PrivateSymbolToName());
1143 } else {
1144 PrintF("<%s>", String::cast(s->name())->ToCString().get());
1145 }
1146 }
1147 }
1148
1149
1150 int Name::NameShortPrint(Vector<char> str) {
1151 if (this->IsString()) {
1152 return SNPrintF(str, "%s", String::cast(this)->ToCString().get());
1153 } else {
1154 DCHECK(this->IsSymbol());
1155 Symbol* s = Symbol::cast(this);
1156 if (s->name()->IsUndefined()) {
1157 return SNPrintF(str, "#<%s>", s->PrivateSymbolToName());
1158 } else {
1159 return SNPrintF(str, "<%s>", String::cast(s->name())->ToCString().get());
1160 }
1161 }
1162 }
1163
1164
1165 #endif // TRACE_MAPS
1132 } } // namespace v8::internal 1166 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698