Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Unified Diff: src/objects-debug.cc

Issue 2388153003: [modules] Implement namespace imports. (Closed)
Patch Set: Add comment on VisitModuleNamespaceImports. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 3c43f230745e539046e24005c12bfa6ee05c725b..28ab96dc883c47847d05053cd1cc493c7f9f643b 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -140,6 +140,9 @@ void HeapObject::HeapObjectVerify() {
case JS_ARRAY_TYPE:
JSArray::cast(this)->JSArrayVerify();
break;
+ case JS_MODULE_NAMESPACE_TYPE:
+ JSModuleNamespace::cast(this)->JSModuleNamespaceVerify();
+ break;
case JS_SET_TYPE:
JSSet::cast(this)->JSSetVerify();
break;
@@ -919,7 +922,13 @@ void PromiseContainer::PromiseContainerVerify() {
after_debug_event()->ObjectVerify();
}
+void JSModuleNamespace::JSModuleNamespaceVerify() {
+ CHECK(IsJSModuleNamespace());
+ module()->ObjectVerify();
+}
+
void Module::ModuleVerify() {
+ Isolate* isolate = GetIsolate();
CHECK(IsModule());
CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction());
code()->ObjectVerify();
@@ -928,6 +937,8 @@ void Module::ModuleVerify() {
VerifySmiField(kFlagsOffset);
embedder_data()->ObjectVerify();
CHECK(shared()->name()->IsSymbol());
+ CHECK(module_namespace()->IsUndefined(isolate) ||
+ module_namespace()->IsJSModuleNamespace());
// TODO(neis): Check more.
}
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698