Index: src/objects-printer.cc |
diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
index 2353a9520beba20495ec237ddc405f249dea68ae..7d6ef67a30780135544660dd7cc1d90f9032b299 100644 |
--- a/src/objects-printer.cc |
+++ b/src/objects-printer.cc |
@@ -135,6 +135,9 @@ void HeapObject::HeapObjectPrint(FILE* out) { |
case ODDBALL_TYPE: |
Oddball::cast(this)->to_string()->Print(out); |
break; |
+ case JS_MODULE_TYPE: |
+ JSModule::cast(this)->JSModulePrint(out); |
+ break; |
case JS_FUNCTION_TYPE: |
JSFunction::cast(this)->JSFunctionPrint(out); |
break; |
@@ -152,7 +155,7 @@ void HeapObject::HeapObjectPrint(FILE* out) { |
JSValue::cast(this)->value()->Print(out); |
break; |
case JS_DATE_TYPE: |
- JSDate::cast(this)->value()->Print(out); |
+ JSDate::cast(this)->JSDatePrint(out); |
break; |
case CODE_TYPE: |
Code::cast(this)->CodePrint(out); |
@@ -437,6 +440,19 @@ void JSObject::JSObjectPrint(FILE* out) { |
} |
+void JSModule::JSModulePrint(FILE* out) { |
+ HeapObject::PrintHeader(out, "JSModule"); |
+ PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); |
+ PrintF(out, " - context = "); |
+ context()->Print(out); |
+ PrintElementsKind(out, this->map()->elements_kind()); |
+ PrintF(out, " {\n"); |
+ PrintProperties(out); |
+ PrintElements(out); |
+ PrintF(out, " }\n"); |
+} |
+ |
+ |
static const char* TypeToString(InstanceType type) { |
switch (type) { |
case INVALID_TYPE: return "INVALID"; |
@@ -483,6 +499,7 @@ static const char* TypeToString(InstanceType type) { |
case ODDBALL_TYPE: return "ODDBALL"; |
case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL"; |
case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; |
+ case JS_MODULE_TYPE: return "JS_MODULE"; |
case JS_FUNCTION_TYPE: return "JS_FUNCTION"; |
case CODE_TYPE: return "CODE"; |
case JS_ARRAY_TYPE: return "JS_ARRAY"; |