Index: src/objects-printer.cc |
diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
index 53c35e9c639d5255c545b7b6819fb19d41a25c5d..f080eb3c41f5ac5d3d1095d83cea48b4073edfc7 100644 |
--- a/src/objects-printer.cc |
+++ b/src/objects-printer.cc |
@@ -1235,10 +1235,19 @@ void ModuleInfoEntry::ModuleInfoEntryPrint(std::ostream& os) { // NOLINT |
void Module::ModulePrint(std::ostream& os) { // NOLINT |
HeapObject::PrintHeader(os, "Module"); |
+ // TODO(neis): Simplify once modules have a script field. |
+ if (!evaluated()) { |
+ SharedFunctionInfo* shared = code()->IsSharedFunctionInfo() |
+ ? SharedFunctionInfo::cast(code()) |
+ : JSFunction::cast(code())->shared(); |
+ Object* origin = Script::cast(shared->script())->GetNameOrSourceURL(); |
+ os << "\n - origin: " << Brief(origin); |
+ } |
os << "\n - code: " << Brief(code()); |
os << "\n - exports: " << Brief(exports()); |
os << "\n - requested_modules: " << Brief(requested_modules()); |
- os << "\n - evaluated: " << evaluated(); |
+ os << "\n - instantiated, evaluated: " << instantiated() << ", " |
+ << evaluated(); |
os << "\n"; |
} |