| Index: src/objects-printer.cc
|
| diff --git a/src/objects-printer.cc b/src/objects-printer.cc
|
| index e6b2e6b24b78034f7211759c6a59f50819e4d477..a6a321747a9d9457e7e68cb837e81e838a765c64 100644
|
| --- a/src/objects-printer.cc
|
| +++ b/src/objects-printer.cc
|
| @@ -228,8 +228,12 @@ void JSObject::PrintProperties(OStream& os) { // NOLINT
|
| switch (descs->GetType(i)) {
|
| case FIELD: {
|
| FieldIndex index = FieldIndex::ForDescriptor(map(), i);
|
| - os << Brief(RawFastPropertyAt(index)) << " (field at offset "
|
| - << index.property_index() << ")\n";
|
| + if (map()->IsUnboxedDoubleField(index)) {
|
| + os << "<unboxed double> " << RawFastDoublePropertyAt(index);
|
| + } else {
|
| + os << Brief(RawFastPropertyAt(index));
|
| + }
|
| + os << " (field at offset " << index.property_index() << ")\n";
|
| break;
|
| }
|
| case CONSTANT:
|
| @@ -457,6 +461,9 @@ void Map::MapPrint(OStream& os) { // NOLINT
|
| os << "\n - instance descriptors " << (owns_descriptors() ? "(own) " : "")
|
| << "#" << NumberOfOwnDescriptors() << ": "
|
| << Brief(instance_descriptors());
|
| + if (FLAG_unbox_double_fields) {
|
| + os << "\n - layout descriptor: " << Brief(layout_descriptor());
|
| + }
|
| if (HasTransitionArray()) {
|
| os << "\n - transitions: " << Brief(transitions());
|
| }
|
| @@ -465,6 +472,9 @@ void Map::MapPrint(OStream& os) { // NOLINT
|
| os << "\n - code cache: " << Brief(code_cache());
|
| os << "\n - dependent code: " << Brief(dependent_code());
|
| os << "\n";
|
| + instance_descriptors()->PrintDescriptors(os);
|
| + os << "\n";
|
| + if (FLAG_unbox_double_fields) layout_descriptor()->Print(os);
|
| }
|
|
|
|
|
| @@ -1072,18 +1082,48 @@ void BreakPointInfo::BreakPointInfoPrint(OStream& os) { // NOLINT
|
|
|
|
|
| void DescriptorArray::PrintDescriptors(OStream& os) { // NOLINT
|
| - os << "Descriptor array " << number_of_descriptors() << "\n";
|
| + os << "Descriptor array " << number_of_descriptors() << "\n";
|
| for (int i = 0; i < number_of_descriptors(); i++) {
|
| Descriptor desc;
|
| Get(i, &desc);
|
| - os << " " << i << ": " << desc;
|
| + os << " " << i << ": " << desc << "\n";
|
| + }
|
| + os << "\n";
|
| +}
|
| +
|
| +
|
| +static void PrintBitMask(OStream& os, uint32_t value) { // NOLINT
|
| + for (int i = 0; i < 32; i++) {
|
| + if ((i & 7) == 0) os << " ";
|
| + os << (((value & 1) == 0) ? "_" : "x");
|
| + value >>= 1;
|
| + }
|
| +}
|
| +
|
| +
|
| +void LayoutDescriptor::Print(OStream& os) { // NOLINT
|
| + os << "Layout descriptor: ";
|
| + if (IsUninitialized()) {
|
| + os << "<uninitialized>";
|
| + } else if (IsFastPointerLayout()) {
|
| + os << "<all tagged>";
|
| + } else if (IsSmi()) {
|
| + os << "fast";
|
| + PrintBitMask(os, static_cast<uint32_t>(Smi::cast(this)->value()));
|
| + } else {
|
| + os << "slow";
|
| + int len = length();
|
| + for (int i = 0; i < len; i++) {
|
| + if (i > 0) os << " |";
|
| + PrintBitMask(os, get_scalar(i));
|
| + }
|
| }
|
| os << "\n";
|
| }
|
|
|
|
|
| void TransitionArray::PrintTransitions(OStream& os) { // NOLINT
|
| - os << "Transition array %d\n", number_of_transitions();
|
| + os << "Transition array " << number_of_transitions() << "\n";
|
| for (int i = 0; i < number_of_transitions(); i++) {
|
| os << " " << i << ": ";
|
| GetKey(i)->NamePrint(os);
|
|
|