OLD | NEW |
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 Loading... |
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 |
OLD | NEW |