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

Unified Diff: src/objects-inl.h

Issue 2362083002: [modules] Do basic linking. (Closed)
Patch Set: Created 4 years, 3 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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 33c9bb870f26a176ab51f790ffb36e1af764e50d..ae0fa72fade46c60bdd5e09f4f17d55e06c9ad74 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -7961,6 +7961,17 @@ Object* ModuleInfoEntry::module_request() const {
return get(kModuleRequestIndex);
}
+ModuleInfo* Module::info() const {
+ DisallowHeapAllocation no_gc;
+ SharedFunctionInfo* shared;
+ if (code()->IsSharedFunctionInfo()) {
+ shared = SharedFunctionInfo::cast(code());
+ } else {
+ shared = JSFunction::cast(code())->shared();
+ }
+ return shared->scope_info()->ModuleDescriptorInfo();
+}
+
FixedArray* ModuleInfo::module_requests() const {
return FixedArray::cast(get(kModuleRequestsIndex));
}

Powered by Google App Engine
This is Rietveld 408576698