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

Unified Diff: src/objects-inl.h

Issue 2367623004: [modules] Detect and throw exceptions for cyclic dependencies (Closed)
Patch Set: Handled review comments, added a test 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
« no previous file with comments | « src/objects-debug.cc ('k') | test/cctest/interpreter/bytecode_expectations/ForOf.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index b1cfceea7742c36b479aa1c5e75d91677e42244d..b72a94a52ea35fca5bd6e0c7c60d756bf1765be0 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5719,6 +5719,17 @@ SMI_ACCESSORS(Module, flags, kFlagsOffset)
BOOL_ACCESSORS(Module, flags, evaluated, kEvaluatedBit)
ACCESSORS(Module, embedder_data, Object, kEmbedderDataOffset)
+SharedFunctionInfo* Module::shared() const {
+ return code()->IsSharedFunctionInfo() ? SharedFunctionInfo::cast(code())
+ : JSFunction::cast(code())->shared();
+}
+
+ModuleInfo* Module::info() const {
+ return shared()->scope_info()->ModuleDescriptorInfo();
+}
+
+uint32_t Module::Hash() const { return Symbol::cast(shared()->name())->Hash(); }
+
ACCESSORS(AccessorPair, getter, Object, kGetterOffset)
ACCESSORS(AccessorPair, setter, Object, kSetterOffset)
@@ -7961,14 +7972,6 @@ Object* ModuleInfoEntry::module_request() const {
return get(kModuleRequestIndex);
}
-ModuleInfo* Module::info() const {
- DisallowHeapAllocation no_gc;
- SharedFunctionInfo* shared = code()->IsSharedFunctionInfo()
- ? SharedFunctionInfo::cast(code())
- : JSFunction::cast(code())->shared();
- return shared->scope_info()->ModuleDescriptorInfo();
-}
-
FixedArray* ModuleInfo::module_requests() const {
return FixedArray::cast(get(kModuleRequestsIndex));
}
« no previous file with comments | « src/objects-debug.cc ('k') | test/cctest/interpreter/bytecode_expectations/ForOf.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698