#include "src/objects/source-text-module.h"
#include "src/api/api-inl.h"
#include "src/ast/modules.h"
#include "src/builtins/accessors.h"
#include "src/common/assert-scope.h"
#include "src/objects/js-generator-inl.h"
#include "src/objects/module-inl.h"
#include "src/objects/objects-inl.h"
#include "src/objects/shared-function-info.h"
#include "src/utils/ostreams.h"
namespace v8 {
namespace internal {
struct StringHandleHash { … };
struct StringHandleEqual { … };
class UnorderedStringSet
: public std::unordered_set<Handle<String>, StringHandleHash,
StringHandleEqual,
ZoneAllocator<Handle<String>>> { … };
class UnorderedStringMap
: public std::unordered_map<
Handle<String>, Handle<Object>, StringHandleHash, StringHandleEqual,
ZoneAllocator<std::pair<const Handle<String>, Handle<Object>>>> { … };
class Module::ResolveSet
: public std::unordered_map<
Handle<Module>, UnorderedStringSet*, ModuleHandleHash,
ModuleHandleEqual,
ZoneAllocator<std::pair<const Handle<Module>, UnorderedStringSet*>>> { … };
struct SourceTextModule::AsyncEvaluationOrdinalCompare { … };
Tagged<SharedFunctionInfo> SourceTextModule::GetSharedFunctionInfo() const { … }
Tagged<Script> SourceTextModule::GetScript() const { … }
int SourceTextModule::ExportIndex(int cell_index) { … }
int SourceTextModule::ImportIndex(int cell_index) { … }
void SourceTextModule::CreateIndirectExport(
Isolate* isolate, DirectHandle<SourceTextModule> module,
Handle<String> name, Handle<SourceTextModuleInfoEntry> entry) { … }
void SourceTextModule::CreateExport(Isolate* isolate,
DirectHandle<SourceTextModule> module,
int cell_index,
DirectHandle<FixedArray> names) { … }
Tagged<Cell> SourceTextModule::GetCell(int cell_index) { … }
Handle<Object> SourceTextModule::LoadVariable(
Isolate* isolate, DirectHandle<SourceTextModule> module, int cell_index) { … }
void SourceTextModule::StoreVariable(DirectHandle<SourceTextModule> module,
int cell_index,
DirectHandle<Object> value) { … }
MaybeHandle<Cell> SourceTextModule::ResolveExport(
Isolate* isolate, Handle<SourceTextModule> module,
Handle<String> module_specifier, Handle<String> export_name,
MessageLocation loc, bool must_resolve, Module::ResolveSet* resolve_set) { … }
MaybeHandle<Cell> SourceTextModule::ResolveImport(
Isolate* isolate, DirectHandle<SourceTextModule> module,
Handle<String> name, int module_request_index, MessageLocation loc,
bool must_resolve, Module::ResolveSet* resolve_set) { … }
MaybeHandle<Cell> SourceTextModule::ResolveExportUsingStarExports(
Isolate* isolate, DirectHandle<SourceTextModule> module,
Handle<String> module_specifier, Handle<String> export_name,
MessageLocation loc, bool must_resolve, Module::ResolveSet* resolve_set) { … }
bool SourceTextModule::PrepareInstantiate(
Isolate* isolate, Handle<SourceTextModule> module,
v8::Local<v8::Context> context,
v8::Module::ResolveModuleCallback callback) { … }
bool SourceTextModule::RunInitializationCode(
Isolate* isolate, DirectHandle<SourceTextModule> module) { … }
bool SourceTextModule::MaybeTransitionComponent(
Isolate* isolate, DirectHandle<SourceTextModule> module,
ZoneForwardList<Handle<SourceTextModule>>* stack, Status new_status) { … }
bool SourceTextModule::FinishInstantiate(
Isolate* isolate, Handle<SourceTextModule> module,
ZoneForwardList<Handle<SourceTextModule>>* stack, unsigned* dfs_index,
Zone* zone) { … }
void SourceTextModule::FetchStarExports(Isolate* isolate,
Handle<SourceTextModule> module,
Zone* zone,
UnorderedModuleSet* visited) { … }
void SourceTextModule::GatherAvailableAncestors(
Isolate* isolate, Zone* zone, Handle<SourceTextModule> start,
AvailableAncestorsSet* exec_list) { … }
Handle<JSModuleNamespace> SourceTextModule::GetModuleNamespace(
Isolate* isolate, DirectHandle<SourceTextModule> module,
int module_request) { … }
MaybeHandle<JSObject> SourceTextModule::GetImportMeta(
Isolate* isolate, Handle<SourceTextModule> module) { … }
bool SourceTextModule::MaybeHandleEvaluationException(
Isolate* isolate, ZoneForwardList<Handle<SourceTextModule>>* stack) { … }
MaybeHandle<Object> SourceTextModule::Evaluate(
Isolate* isolate, Handle<SourceTextModule> module) { … }
Maybe<bool> SourceTextModule::AsyncModuleExecutionFulfilled(
Isolate* isolate, Handle<SourceTextModule> module) { … }
void SourceTextModule::AsyncModuleExecutionRejected(
Isolate* isolate, DirectHandle<SourceTextModule> module,
Handle<Object> exception) { … }
Maybe<bool> SourceTextModule::ExecuteAsyncModule(
Isolate* isolate, DirectHandle<SourceTextModule> module) { … }
MaybeHandle<Object> SourceTextModule::InnerExecuteAsyncModule(
Isolate* isolate, DirectHandle<SourceTextModule> module,
DirectHandle<JSPromise> capability) { … }
MaybeHandle<Object> SourceTextModule::ExecuteModule(
Isolate* isolate, DirectHandle<SourceTextModule> module,
MaybeHandle<Object>* exception_out) { … }
MaybeHandle<Object> SourceTextModule::InnerModuleEvaluation(
Isolate* isolate, Handle<SourceTextModule> module,
ZoneForwardList<Handle<SourceTextModule>>* stack, unsigned* dfs_index) { … }
void SourceTextModule::Reset(Isolate* isolate,
DirectHandle<SourceTextModule> module) { … }
std::vector<std::tuple<Handle<SourceTextModule>, Handle<JSMessageObject>>>
SourceTextModule::GetStalledTopLevelAwaitMessages(Isolate* isolate) { … }
void SourceTextModule::InnerGetStalledTopLevelAwaitModule(
Isolate* isolate, UnorderedModuleSet* visited,
std::vector<Handle<SourceTextModule>>* result) { … }
}
}