v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::SourceTextModuleDescriptor Class Reference

#include <modules.h>

Inheritance diagram for v8::internal::SourceTextModuleDescriptor:
Collaboration diagram for v8::internal::SourceTextModuleDescriptor:

Classes

class  AstModuleRequest
 
struct  AstRawStringComparer
 
struct  Entry
 
struct  ModuleRequestComparer
 

Public Types

enum  CellIndexKind { kInvalid , kExport , kImport }
 
using ModuleRequestMap
 
using RegularExportMap
 
using RegularImportMap
 

Public Member Functions

 SourceTextModuleDescriptor (Zone *zone)
 
void AddImport (const AstRawString *import_name, const AstRawString *local_name, const AstRawString *specifier, const ModuleImportPhase import_phase, const ImportAttributes *import_attributes, const Scanner::Location loc, const Scanner::Location specifier_loc, Zone *zone)
 
void AddStarImport (const AstRawString *local_name, const AstRawString *specifier, const ImportAttributes *import_attributes, const Scanner::Location loc, const Scanner::Location specifier_loc, Zone *zone)
 
void AddEmptyImport (const AstRawString *specifier, const ImportAttributes *import_attributes, const Scanner::Location specifier_loc, Zone *zone)
 
void AddExport (const AstRawString *local_name, const AstRawString *export_name, const Scanner::Location loc, Zone *zone)
 
void AddExport (const AstRawString *export_name, const AstRawString *import_name, const AstRawString *specifier, const ImportAttributes *import_attributes, const Scanner::Location loc, const Scanner::Location specifier_loc, Zone *zone)
 
void AddStarExport (const AstRawString *specifier, const ImportAttributes *import_attributes, const Scanner::Location loc, const Scanner::Location specifier_loc, Zone *zone)
 
bool Validate (ModuleScope *module_scope, PendingCompilationErrorHandler *error_handler, Zone *zone)
 
const ModuleRequestMapmodule_requests () const
 
const ZoneVector< const Entry * > & namespace_imports () const
 
const RegularImportMapregular_imports () const
 
const ZoneVector< const Entry * > & special_exports () const
 
const RegularExportMapregular_exports () const
 
void AddRegularExport (Entry *entry)
 
void AddSpecialExport (const Entry *entry, Zone *zone)
 
void AddRegularImport (Entry *entry)
 
void AddNamespaceImport (const Entry *entry, Zone *zone)
 
template<typename IsolateT >
DirectHandle< FixedArraySerializeRegularExports (IsolateT *isolate, Zone *zone) const
 
- Public Member Functions inherited from v8::internal::ZoneObject
void * operator new (size_t, Zone *)=delete
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)=delete
 

Static Public Member Functions

static CellIndexKind GetCellIndexKind (int cell_index)
 

Private Member Functions

const EntryFindDuplicateExport (Zone *zone) const
 
void MakeIndirectExportsExplicit (Zone *zone)
 
void AssignCellIndices ()
 
int AddModuleRequest (const AstRawString *specifier, const ModuleImportPhase import_phase, const ImportAttributes *import_attributes, Scanner::Location specifier_loc, Zone *zone)
 

Private Attributes

ModuleRequestMap module_requests_
 
ZoneVector< const Entry * > special_exports_
 
ZoneVector< const Entry * > namespace_imports_
 
RegularExportMap regular_exports_
 
RegularImportMap regular_imports_
 

Detailed Description

Definition at line 23 of file modules.h.

Member Typedef Documentation

◆ ModuleRequestMap

Initial value:
ZoneSet<const AstModuleRequest*, ModuleRequestComparer>

Definition at line 173 of file modules.h.

◆ RegularExportMap

Initial value:
ZoneMultimap<const AstRawString*, Entry*, AstRawStringComparer>

Definition at line 175 of file modules.h.

◆ RegularImportMap

Initial value:
ZoneMap<const AstRawString*, Entry*, AstRawStringComparer>

Definition at line 177 of file modules.h.

Member Enumeration Documentation

◆ CellIndexKind

Enumerator
kInvalid 
kExport 
kImport 

Definition at line 121 of file modules.h.

Constructor & Destructor Documentation

◆ SourceTextModuleDescriptor()

v8::internal::SourceTextModuleDescriptor::SourceTextModuleDescriptor ( Zone * zone)
inlineexplicit

Definition at line 25 of file modules.h.

Member Function Documentation

◆ AddEmptyImport()

void v8::internal::SourceTextModuleDescriptor::AddEmptyImport ( const AstRawString * specifier,
const ImportAttributes * import_attributes,
const Scanner::Location specifier_loc,
Zone * zone )

Definition at line 83 of file modules.cc.

Here is the call graph for this function:

◆ AddExport() [1/2]

void v8::internal::SourceTextModuleDescriptor::AddExport ( const AstRawString * export_name,
const AstRawString * import_name,
const AstRawString * specifier,
const ImportAttributes * import_attributes,
const Scanner::Location loc,
const Scanner::Location specifier_loc,
Zone * zone )

Definition at line 99 of file modules.cc.

Here is the call graph for this function:

◆ AddExport() [2/2]

void v8::internal::SourceTextModuleDescriptor::AddExport ( const AstRawString * local_name,
const AstRawString * export_name,
const Scanner::Location loc,
Zone * zone )

Definition at line 90 of file modules.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddImport()

void v8::internal::SourceTextModuleDescriptor::AddImport ( const AstRawString * import_name,
const AstRawString * local_name,
const AstRawString * specifier,
const ModuleImportPhase import_phase,
const ImportAttributes * import_attributes,
const Scanner::Location loc,
const Scanner::Location specifier_loc,
Zone * zone )

Definition at line 58 of file modules.cc.

Here is the call graph for this function:

◆ AddModuleRequest()

int v8::internal::SourceTextModuleDescriptor::AddModuleRequest ( const AstRawString * specifier,
const ModuleImportPhase import_phase,
const ImportAttributes * import_attributes,
Scanner::Location specifier_loc,
Zone * zone )
inlineprivate

Definition at line 270 of file modules.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddNamespaceImport()

void v8::internal::SourceTextModuleDescriptor::AddNamespaceImport ( const Entry * entry,
Zone * zone )
inline

Definition at line 224 of file modules.h.

Here is the caller graph for this function:

◆ AddRegularExport()

void v8::internal::SourceTextModuleDescriptor::AddRegularExport ( Entry * entry)
inline

Definition at line 200 of file modules.h.

Here is the caller graph for this function:

◆ AddRegularImport()

void v8::internal::SourceTextModuleDescriptor::AddRegularImport ( Entry * entry)
inline

Definition at line 214 of file modules.h.

Here is the caller graph for this function:

◆ AddSpecialExport()

void v8::internal::SourceTextModuleDescriptor::AddSpecialExport ( const Entry * entry,
Zone * zone )
inline

Definition at line 208 of file modules.h.

Here is the caller graph for this function:

◆ AddStarExport()

void v8::internal::SourceTextModuleDescriptor::AddStarExport ( const AstRawString * specifier,
const ImportAttributes * import_attributes,
const Scanner::Location loc,
const Scanner::Location specifier_loc,
Zone * zone )

Definition at line 115 of file modules.cc.

Here is the call graph for this function:

◆ AddStarImport()

void v8::internal::SourceTextModuleDescriptor::AddStarImport ( const AstRawString * local_name,
const AstRawString * specifier,
const ImportAttributes * import_attributes,
const Scanner::Location loc,
const Scanner::Location specifier_loc,
Zone * zone )

Definition at line 71 of file modules.cc.

Here is the call graph for this function:

◆ AssignCellIndices()

void v8::internal::SourceTextModuleDescriptor::AssignCellIndices ( )
private

Definition at line 285 of file modules.cc.

Here is the caller graph for this function:

◆ FindDuplicateExport()

const SourceTextModuleDescriptor::Entry * v8::internal::SourceTextModuleDescriptor::FindDuplicateExport ( Zone * zone) const
private

Definition at line 338 of file modules.cc.

Here is the caller graph for this function:

◆ GetCellIndexKind()

SourceTextModuleDescriptor::CellIndexKind v8::internal::SourceTextModuleDescriptor::GetCellIndexKind ( int cell_index)
static

Definition at line 279 of file modules.cc.

Here is the caller graph for this function:

◆ MakeIndirectExportsExplicit()

void v8::internal::SourceTextModuleDescriptor::MakeIndirectExportsExplicit ( Zone * zone)
private

Definition at line 246 of file modules.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ module_requests()

const ModuleRequestMap & v8::internal::SourceTextModuleDescriptor::module_requests ( ) const
inline

Definition at line 181 of file modules.h.

Here is the caller graph for this function:

◆ namespace_imports()

const ZoneVector< const Entry * > & v8::internal::SourceTextModuleDescriptor::namespace_imports ( ) const
inline

Definition at line 184 of file modules.h.

Here is the caller graph for this function:

◆ regular_exports()

const RegularExportMap & v8::internal::SourceTextModuleDescriptor::regular_exports ( ) const
inline

Definition at line 198 of file modules.h.

◆ regular_imports()

const RegularImportMap & v8::internal::SourceTextModuleDescriptor::regular_imports ( ) const
inline

Definition at line 189 of file modules.h.

Here is the caller graph for this function:

◆ SerializeRegularExports()

template<typename IsolateT >
template DirectHandle< FixedArray > v8::internal::SourceTextModuleDescriptor::SerializeRegularExports ( IsolateT * isolate,
Zone * zone ) const

Definition at line 185 of file modules.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ special_exports()

const ZoneVector< const Entry * > & v8::internal::SourceTextModuleDescriptor::special_exports ( ) const
inline

Definition at line 192 of file modules.h.

Here is the caller graph for this function:

◆ Validate()

bool v8::internal::SourceTextModuleDescriptor::Validate ( ModuleScope * module_scope,
PendingCompilationErrorHandler * error_handler,
Zone * zone )

Definition at line 352 of file modules.cc.

Here is the call graph for this function:

Member Data Documentation

◆ module_requests_

ModuleRequestMap v8::internal::SourceTextModuleDescriptor::module_requests_
private

Definition at line 237 of file modules.h.

◆ namespace_imports_

ZoneVector<const Entry*> v8::internal::SourceTextModuleDescriptor::namespace_imports_
private

Definition at line 239 of file modules.h.

◆ regular_exports_

RegularExportMap v8::internal::SourceTextModuleDescriptor::regular_exports_
private

Definition at line 240 of file modules.h.

◆ regular_imports_

RegularImportMap v8::internal::SourceTextModuleDescriptor::regular_imports_
private

Definition at line 241 of file modules.h.

◆ special_exports_

ZoneVector<const Entry*> v8::internal::SourceTextModuleDescriptor::special_exports_
private

Definition at line 238 of file modules.h.


The documentation for this class was generated from the following files: