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

Public Member Functions

 InstanceBuilder (Isolate *isolate, v8::metrics::Recorder::ContextId context_id, ErrorThrower *thrower, DirectHandle< WasmModuleObject > module_object, MaybeDirectHandle< JSReceiver > ffi, MaybeDirectHandle< JSArrayBuffer > memory_buffer)
 
MaybeDirectHandle< WasmInstanceObjectBuild ()
 
bool ExecuteStartFunction ()
 

Private Member Functions

std::string ImportName (uint32_t index)
 
std::string ImportName (uint32_t index, DirectHandle< String > module_name)
 
MaybeDirectHandle< ObjectLookupImport (uint32_t index, DirectHandle< String > module_name, DirectHandle< String > import_name)
 
MaybeDirectHandle< ObjectLookupImportAsm (uint32_t index, DirectHandle< String > import_name)
 
void LoadDataSegments (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data)
 
void WriteGlobalValue (const WasmGlobal &global, const WasmValue &value)
 
void SanitizeImports ()
 
MaybeDirectHandle< WasmTrustedInstanceDataBuild_Phase1 (const DisallowJavascriptExecution &no_js)
 
void Build_Phase1_Infallible (DirectHandle< WasmTrustedInstanceData > trusted_data, DirectHandle< WasmTrustedInstanceData > shared_trusted_data)
 
MaybeDirectHandle< WasmTrustedInstanceDataBuild_Phase2 (DirectHandle< WasmTrustedInstanceData > trusted_data)
 
MaybeDirectHandle< WasmMemoryObjectAllocateMemory (uint32_t memory_index)
 
bool ProcessImportedFunction (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, int import_index, int func_index, DirectHandle< Object > value, WellKnownImport preknown_import)
 
bool ProcessImportedTable (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, int import_index, int table_index, DirectHandle< Object > value)
 
bool ProcessImportedGlobal (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, int import_index, int global_index, DirectHandle< Object > value)
 
bool ProcessImportedWasmGlobalObject (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, int import_index, const WasmGlobal &global, DirectHandle< WasmGlobalObject > global_object)
 
int ProcessImports (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data)
 
bool ProcessImportedMemories (DirectHandle< FixedArray > imported_memory_objects)
 
template<typename T >
TGetRawUntaggedGlobalPtr (const WasmGlobal &global)
 
void InitGlobals (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data)
 
void ProcessExports (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data)
 
void SetTableInitialValues (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data)
 
void LoadTableSegments (DirectHandle< WasmTrustedInstanceData > trusted_instance_data, DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data)
 
void InitializeTags (DirectHandle< WasmTrustedInstanceData > trusted_instance_data)
 

Private Attributes

Isolateisolate_
 
v8::metrics::Recorder::ContextId context_id_
 
const WasmEnabledFeatures enabled_
 
const WasmModule *const module_
 
ErrorThrowerthrower_
 
DirectHandle< WasmModuleObjectmodule_object_
 
MaybeDirectHandle< JSReceiverffi_
 
MaybeDirectHandle< JSArrayBufferasmjs_memory_buffer_
 
DirectHandle< JSArrayBufferuntagged_globals_
 
DirectHandle< JSArrayBuffershared_untagged_globals_
 
DirectHandle< FixedArraytagged_globals_
 
DirectHandle< FixedArrayshared_tagged_globals_
 
DirectHandleVector< WasmTagObjecttags_wrappers_
 
DirectHandleVector< WasmTagObjectshared_tags_wrappers_
 
DirectHandle< JSFunctionstart_function_
 
DirectHandleVector< Objectsanitized_imports_
 
std::vector< WellKnownImportwell_known_imports_
 
Zone init_expr_zone_
 

Detailed Description

Definition at line 798 of file module-instantiate.cc.

Constructor & Destructor Documentation

◆ InstanceBuilder()

v8::internal::wasm::InstanceBuilder::InstanceBuilder ( Isolate * isolate,
v8::metrics::Recorder::ContextId context_id,
ErrorThrower * thrower,
DirectHandle< WasmModuleObject > module_object,
MaybeDirectHandle< JSReceiver > ffi,
MaybeDirectHandle< JSArrayBuffer > memory_buffer )

Definition at line 1024 of file module-instantiate.cc.

Member Function Documentation

◆ AllocateMemory()

MaybeDirectHandle< WasmMemoryObject > v8::internal::wasm::InstanceBuilder::AllocateMemory ( uint32_t memory_index)
private

Definition at line 2508 of file module-instantiate.cc.

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

◆ Build()

MaybeDirectHandle< WasmInstanceObject > v8::internal::wasm::InstanceBuilder::Build ( )

Definition at line 1046 of file module-instantiate.cc.

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

◆ Build_Phase1()

MaybeDirectHandle< WasmTrustedInstanceData > v8::internal::wasm::InstanceBuilder::Build_Phase1 ( const DisallowJavascriptExecution & no_js)
private

Definition at line 1087 of file module-instantiate.cc.

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

◆ Build_Phase1_Infallible()

void v8::internal::wasm::InstanceBuilder::Build_Phase1_Infallible ( DirectHandle< WasmTrustedInstanceData > trusted_data,
DirectHandle< WasmTrustedInstanceData > shared_trusted_data )
private

Definition at line 1473 of file module-instantiate.cc.

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

◆ Build_Phase2()

MaybeDirectHandle< WasmTrustedInstanceData > v8::internal::wasm::InstanceBuilder::Build_Phase2 ( DirectHandle< WasmTrustedInstanceData > trusted_data)
private

Definition at line 1505 of file module-instantiate.cc.

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

◆ ExecuteStartFunction()

bool v8::internal::wasm::InstanceBuilder::ExecuteStartFunction ( )

Definition at line 1531 of file module-instantiate.cc.

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

◆ GetRawUntaggedGlobalPtr()

template<typename T >
T * v8::internal::wasm::InstanceBuilder::GetRawUntaggedGlobalPtr ( const WasmGlobal & global)
private

Definition at line 2479 of file module-instantiate.cc.

Here is the caller graph for this function:

◆ ImportName() [1/2]

std::string v8::internal::wasm::InstanceBuilder::ImportName ( uint32_t index)
inlineprivate

Definition at line 835 of file module-instantiate.cc.

Here is the caller graph for this function:

◆ ImportName() [2/2]

std::string v8::internal::wasm::InstanceBuilder::ImportName ( uint32_t index,
DirectHandle< String > module_name )
inlineprivate

Definition at line 850 of file module-instantiate.cc.

◆ InitGlobals()

void v8::internal::wasm::InstanceBuilder::InitGlobals ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data )
private

Definition at line 2486 of file module-instantiate.cc.

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

◆ InitializeTags()

void v8::internal::wasm::InstanceBuilder::InitializeTags ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data)
private

Definition at line 3050 of file module-instantiate.cc.

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

◆ LoadDataSegments()

void v8::internal::wasm::InstanceBuilder::LoadDataSegments ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data )
private

Definition at line 1682 of file module-instantiate.cc.

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

◆ LoadTableSegments()

void v8::internal::wasm::InstanceBuilder::LoadTableSegments ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data )
private

Definition at line 2953 of file module-instantiate.cc.

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

◆ LookupImport()

MaybeDirectHandle< Object > v8::internal::wasm::InstanceBuilder::LookupImport ( uint32_t index,
DirectHandle< String > module_name,
DirectHandle< String > import_name )
private

Definition at line 1560 of file module-instantiate.cc.

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

◆ LookupImportAsm()

MaybeDirectHandle< Object > v8::internal::wasm::InstanceBuilder::LookupImportAsm ( uint32_t index,
DirectHandle< String > import_name )
private

Definition at line 1637 of file module-instantiate.cc.

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

◆ ProcessExports()

void v8::internal::wasm::InstanceBuilder::ProcessExports ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data )
private

Definition at line 2530 of file module-instantiate.cc.

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

◆ ProcessImportedFunction()

bool v8::internal::wasm::InstanceBuilder::ProcessImportedFunction ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
int import_index,
int func_index,
DirectHandle< Object > value,
WellKnownImport preknown_import )
private

Definition at line 1855 of file module-instantiate.cc.

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

◆ ProcessImportedGlobal()

bool v8::internal::wasm::InstanceBuilder::ProcessImportedGlobal ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
int import_index,
int global_index,
DirectHandle< Object > value )
private

Definition at line 2214 of file module-instantiate.cc.

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

◆ ProcessImportedMemories()

bool v8::internal::wasm::InstanceBuilder::ProcessImportedMemories ( DirectHandle< FixedArray > imported_memory_objects)
private

Definition at line 2405 of file module-instantiate.cc.

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

◆ ProcessImportedTable()

bool v8::internal::wasm::InstanceBuilder::ProcessImportedTable ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
int import_index,
int table_index,
DirectHandle< Object > value )
private

Definition at line 2034 of file module-instantiate.cc.

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

◆ ProcessImportedWasmGlobalObject()

bool v8::internal::wasm::InstanceBuilder::ProcessImportedWasmGlobalObject ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
int import_index,
const WasmGlobal & global,
DirectHandle< WasmGlobalObject > global_object )
private

Definition at line 2116 of file module-instantiate.cc.

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

◆ ProcessImports()

int v8::internal::wasm::InstanceBuilder::ProcessImports ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data )
private

Definition at line 2314 of file module-instantiate.cc.

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

◆ SanitizeImports()

void v8::internal::wasm::InstanceBuilder::SanitizeImports ( )
private

Definition at line 1794 of file module-instantiate.cc.

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

◆ SetTableInitialValues()

void v8::internal::wasm::InstanceBuilder::SetTableInitialValues ( DirectHandle< WasmTrustedInstanceData > trusted_instance_data,
DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data )
private

Definition at line 2775 of file module-instantiate.cc.

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

◆ WriteGlobalValue()

void v8::internal::wasm::InstanceBuilder::WriteGlobalValue ( const WasmGlobal & global,
const WasmValue & value )
private

Definition at line 1730 of file module-instantiate.cc.

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

Member Data Documentation

◆ asmjs_memory_buffer_

MaybeDirectHandle<JSArrayBuffer> v8::internal::wasm::InstanceBuilder::asmjs_memory_buffer_
private

Definition at line 819 of file module-instantiate.cc.

◆ context_id_

v8::metrics::Recorder::ContextId v8::internal::wasm::InstanceBuilder::context_id_
private

Definition at line 813 of file module-instantiate.cc.

◆ enabled_

const WasmEnabledFeatures v8::internal::wasm::InstanceBuilder::enabled_
private

Definition at line 814 of file module-instantiate.cc.

◆ ffi_

MaybeDirectHandle<JSReceiver> v8::internal::wasm::InstanceBuilder::ffi_
private

Definition at line 818 of file module-instantiate.cc.

◆ init_expr_zone_

Zone v8::internal::wasm::InstanceBuilder::init_expr_zone_
private

Definition at line 833 of file module-instantiate.cc.

◆ isolate_

Isolate* v8::internal::wasm::InstanceBuilder::isolate_
private

Definition at line 812 of file module-instantiate.cc.

◆ module_

const WasmModule* const v8::internal::wasm::InstanceBuilder::module_
private

Definition at line 815 of file module-instantiate.cc.

◆ module_object_

DirectHandle<WasmModuleObject> v8::internal::wasm::InstanceBuilder::module_object_
private

Definition at line 817 of file module-instantiate.cc.

◆ sanitized_imports_

DirectHandleVector<Object> v8::internal::wasm::InstanceBuilder::sanitized_imports_
private

Definition at line 827 of file module-instantiate.cc.

◆ shared_tagged_globals_

DirectHandle<FixedArray> v8::internal::wasm::InstanceBuilder::shared_tagged_globals_
private

Definition at line 823 of file module-instantiate.cc.

◆ shared_tags_wrappers_

DirectHandleVector<WasmTagObject> v8::internal::wasm::InstanceBuilder::shared_tags_wrappers_
private

Definition at line 825 of file module-instantiate.cc.

◆ shared_untagged_globals_

DirectHandle<JSArrayBuffer> v8::internal::wasm::InstanceBuilder::shared_untagged_globals_
private

Definition at line 821 of file module-instantiate.cc.

◆ start_function_

DirectHandle<JSFunction> v8::internal::wasm::InstanceBuilder::start_function_
private

Definition at line 826 of file module-instantiate.cc.

◆ tagged_globals_

DirectHandle<FixedArray> v8::internal::wasm::InstanceBuilder::tagged_globals_
private

Definition at line 822 of file module-instantiate.cc.

◆ tags_wrappers_

DirectHandleVector<WasmTagObject> v8::internal::wasm::InstanceBuilder::tags_wrappers_
private

Definition at line 824 of file module-instantiate.cc.

◆ thrower_

ErrorThrower* v8::internal::wasm::InstanceBuilder::thrower_
private

Definition at line 816 of file module-instantiate.cc.

◆ untagged_globals_

DirectHandle<JSArrayBuffer> v8::internal::wasm::InstanceBuilder::untagged_globals_
private

Definition at line 820 of file module-instantiate.cc.

◆ well_known_imports_

std::vector<WellKnownImport> v8::internal::wasm::InstanceBuilder::well_known_imports_
private

Definition at line 828 of file module-instantiate.cc.


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