| Index: src/objects-printer.cc
|
| diff --git a/src/objects-printer.cc b/src/objects-printer.cc
|
| index 501c3db35b15dc32e94a3838a4597843744674b6..f2fee648f9b662759874797d905fea20c885f75a 100644
|
| --- a/src/objects-printer.cc
|
| +++ b/src/objects-printer.cc
|
| @@ -33,7 +33,7 @@
|
|
|
|
|
| void HeapObject::PrintHeader(std::ostream& os, const char* id) { // NOLINT
|
| - os << reinterpret_cast<void*>(this) << ": [" << id << "]\n";
|
| + os << "" << reinterpret_cast<void*>(this) << ": [" << id << "]\n";
|
| }
|
|
|
|
|
| @@ -117,7 +117,8 @@
|
| JSBuiltinsObject::cast(this)->JSBuiltinsObjectPrint(os);
|
| break;
|
| case JS_VALUE_TYPE:
|
| - JSValue::cast(this)->JSValuePrint(os);
|
| + os << "Value wrapper around:";
|
| + JSValue::cast(this)->value()->Print(os);
|
| break;
|
| case JS_DATE_TYPE:
|
| JSDate::cast(this)->JSDatePrint(os);
|
| @@ -387,30 +388,19 @@
|
| }
|
|
|
|
|
| -static void JSObjectPrintHeader(std::ostream& os, JSObject* obj,
|
| - const char* id) { // NOLINT
|
| - obj->PrintHeader(os, id);
|
| +void JSObject::JSObjectPrint(std::ostream& os) { // NOLINT
|
| + HeapObject::PrintHeader(os, "JSObject");
|
| // Don't call GetElementsKind, its validation code can cause the printer to
|
| // fail when debugging.
|
| - PrototypeIterator iter(obj->GetIsolate(), obj);
|
| - os << " - map = " << reinterpret_cast<void*>(obj->map()) << " ["
|
| - << ElementsKindToString(obj->map()->elements_kind())
|
| - << "]\n - prototype = " << reinterpret_cast<void*>(iter.GetCurrent());
|
| -}
|
| -
|
| -
|
| -static void JSObjectPrintBody(std::ostream& os, JSObject* obj) { // NOLINT
|
| - os << "\n {\n";
|
| - obj->PrintProperties(os);
|
| - obj->PrintTransitions(os);
|
| - obj->PrintElements(os);
|
| + PrototypeIterator iter(GetIsolate(), this);
|
| + os << " - map = " << reinterpret_cast<void*>(map()) << " ["
|
| + << ElementsKindToString(this->map()->elements_kind())
|
| + << "]\n - prototype = " << reinterpret_cast<void*>(iter.GetCurrent())
|
| + << "\n {\n";
|
| + PrintProperties(os);
|
| + PrintTransitions(os);
|
| + PrintElements(os);
|
| os << " }\n";
|
| -}
|
| -
|
| -
|
| -void JSObject::JSObjectPrint(std::ostream& os) { // NOLINT
|
| - JSObjectPrintHeader(os, this, "JSObject");
|
| - JSObjectPrintBody(os, this);
|
| }
|
|
|
|
|
| @@ -471,7 +461,6 @@
|
| if (is_access_check_needed()) os << " - access_check_needed\n";
|
| if (!is_extensible()) os << " - non-extensible\n";
|
| if (is_observed()) os << " - observed\n";
|
| - if (is_strong()) os << " - strong_map\n";
|
| if (is_prototype_map()) {
|
| os << " - prototype_map\n";
|
| os << " - prototype info: " << Brief(prototype_info());
|
| @@ -645,21 +634,20 @@
|
|
|
|
|
| void JSValue::JSValuePrint(std::ostream& os) { // NOLINT
|
| - JSObjectPrintHeader(os, this, "JSValue");
|
| - os << "\n - value = " << Brief(value());
|
| - JSObjectPrintBody(os, this);
|
| + HeapObject::PrintHeader(os, "ValueObject");
|
| + value()->Print(os);
|
| }
|
|
|
|
|
| void JSMessageObject::JSMessageObjectPrint(std::ostream& os) { // NOLINT
|
| - JSObjectPrintHeader(os, this, "JSMessageObject");
|
| - os << "\n - type: " << type();
|
| + HeapObject::PrintHeader(os, "JSMessageObject");
|
| + os << " - type: " << type();
|
| os << "\n - arguments: " << Brief(argument());
|
| os << "\n - start_position: " << start_position();
|
| os << "\n - end_position: " << end_position();
|
| os << "\n - script: " << Brief(script());
|
| os << "\n - stack_frames: " << Brief(stack_frames());
|
| - JSObjectPrintBody(os, this);
|
| + os << "\n";
|
| }
|
|
|
|
|
|
|