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/objects.h" | 5 #include "src/objects.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/interpreter/bytecodes.h" | 9 #include "src/interpreter/bytecodes.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 | 1182 |
1183 void LayoutDescriptor::Print() { | 1183 void LayoutDescriptor::Print() { |
1184 OFStream os(stdout); | 1184 OFStream os(stdout); |
1185 this->Print(os); | 1185 this->Print(os); |
1186 os << std::flush; | 1186 os << std::flush; |
1187 } | 1187 } |
1188 | 1188 |
1189 | 1189 |
1190 void LayoutDescriptor::Print(std::ostream& os) { // NOLINT | 1190 void LayoutDescriptor::Print(std::ostream& os) { // NOLINT |
1191 os << "Layout descriptor: "; | 1191 os << "Layout descriptor: "; |
1192 if (IsOddball() && IsUninitialized(HeapObject::cast(this)->GetIsolate())) { | 1192 if (IsUninitialized()) { |
1193 os << "<uninitialized>"; | 1193 os << "<uninitialized>"; |
1194 } else if (IsFastPointerLayout()) { | 1194 } else if (IsFastPointerLayout()) { |
1195 os << "<all tagged>"; | 1195 os << "<all tagged>"; |
1196 } else if (IsSmi()) { | 1196 } else if (IsSmi()) { |
1197 os << "fast"; | 1197 os << "fast"; |
1198 PrintBitMask(os, static_cast<uint32_t>(Smi::cast(this)->value())); | 1198 PrintBitMask(os, static_cast<uint32_t>(Smi::cast(this)->value())); |
1199 } else { | 1199 } else { |
1200 os << "slow"; | 1200 os << "slow"; |
1201 int len = length(); | 1201 int len = length(); |
1202 for (int i = 0; i < len; i++) { | 1202 for (int i = 0; i < len; i++) { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT | 1339 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT |
1340 Object* transitions = map()->raw_transitions(); | 1340 Object* transitions = map()->raw_transitions(); |
1341 int num_transitions = TransitionArray::NumberOfTransitions(transitions); | 1341 int num_transitions = TransitionArray::NumberOfTransitions(transitions); |
1342 if (num_transitions == 0) return; | 1342 if (num_transitions == 0) return; |
1343 os << "\n - transitions"; | 1343 os << "\n - transitions"; |
1344 TransitionArray::PrintTransitions(os, transitions, false); | 1344 TransitionArray::PrintTransitions(os, transitions, false); |
1345 } | 1345 } |
1346 #endif // defined(DEBUG) || defined(OBJECT_PRINT) | 1346 #endif // defined(DEBUG) || defined(OBJECT_PRINT) |
1347 } // namespace internal | 1347 } // namespace internal |
1348 } // namespace v8 | 1348 } // namespace v8 |
OLD | NEW |