[modules] Add internal printer method for JSModuleNamespace.

R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2410003002
Cr-Commit-Position: refs/heads/master@{#40181}
This commit is contained in:
neis 2016-10-11 09:28:54 -07:00 committed by Commit bot
parent 8d18f42fae
commit a78afeb6cd
2 changed files with 10 additions and 0 deletions

View File

@ -166,6 +166,9 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
case JS_WEAK_SET_TYPE:
JSWeakSet::cast(this)->JSWeakSetPrint(os);
break;
case JS_MODULE_NAMESPACE_TYPE:
JSModuleNamespace::cast(this)->JSModuleNamespacePrint(os);
break;
case FOREIGN_TYPE:
Foreign::cast(this)->ForeignPrint(os);
break;
@ -1168,6 +1171,12 @@ void Module::ModulePrint(std::ostream& os) { // NOLINT
os << "\n";
}
void JSModuleNamespace::JSModuleNamespacePrint(std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, "JSModuleNamespace");
os << "\n - module: " << Brief(module());
os << "\n";
}
void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, "PrototypeInfo");
os << "\n - prototype users: " << Brief(prototype_users());

View File

@ -7881,6 +7881,7 @@ class JSGeneratorObject: public JSObject {
class JSModuleNamespace : public JSObject {
public:
DECLARE_CAST(JSModuleNamespace)
DECLARE_PRINTER(JSModuleNamespace)
DECLARE_VERIFIER(JSModuleNamespace)
// The actual module whose namespace is being represented.