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

#include <wasm-module.h>

Collaboration diagram for v8::internal::wasm::WasmModule:

Public Member Functions

 WasmModule (ModuleOrigin=kWasmOrigin)
 
 WasmModule (const WasmModule &)=delete
 
WasmModuleoperator= (const WasmModule &)=delete
 
void AddTypeForTesting (TypeDefinition type)
 
void AddSignatureForTesting (const FunctionSig *sig, ModuleTypeIndex supertype, bool is_final, bool is_shared)
 
void AddStructTypeForTesting (const StructType *type, ModuleTypeIndex supertype, bool is_final, bool is_shared)
 
void AddArrayTypeForTesting (const ArrayType *type, ModuleTypeIndex supertype, bool is_final, bool is_shared)
 
void AddContTypeForTesting (const ContType *type, ModuleTypeIndex supertype, bool is_final, bool is_shared)
 
bool has_type (ModuleTypeIndex index) const
 
const TypeDefinitiontype (ModuleTypeIndex index) const
 
HeapType heap_type (ModuleTypeIndex index) const
 
CanonicalTypeIndex canonical_type_id (ModuleTypeIndex index) const
 
CanonicalValueType canonical_type (ValueType type) const
 
bool has_signature (ModuleTypeIndex index) const
 
const FunctionSigsignature (ModuleTypeIndex index) const
 
bool has_cont_type (ModuleTypeIndex index) const
 
const ContTypecont_type (ModuleTypeIndex index) const
 
CanonicalTypeIndex canonical_sig_id (ModuleTypeIndex index) const
 
uint64_t signature_hash (const TypeCanonicalizer *, uint32_t function_index) const
 
bool has_struct (ModuleTypeIndex index) const
 
const StructTypestruct_type (ModuleTypeIndex index) const
 
bool has_array (ModuleTypeIndex index) const
 
const ArrayTypearray_type (ModuleTypeIndex index) const
 
ModuleTypeIndex supertype (ModuleTypeIndex index) const
 
bool has_supertype (ModuleTypeIndex index) const
 
CanonicalTypeIndex MaxCanonicalTypeIndex () const
 
bool function_is_shared (int func_index) const
 
bool function_was_validated (int func_index) const
 
void set_function_validated (int func_index) const
 
void set_all_functions_validated () const
 
base::Vector< const WasmFunctiondeclared_functions () const
 
size_t EstimateStoredSize () const
 
size_t EstimateCurrentMemoryConsumption () const
 

Public Attributes

Zone signature_zone
 
int start_function_index = -1
 
uint32_t untagged_globals_buffer_size = 0
 
uint32_t tagged_globals_buffer_size = 0
 
uint32_t num_imported_globals = 0
 
uint32_t num_imported_mutable_globals = 0
 
uint32_t num_imported_functions = 0
 
uint32_t num_imported_tables = 0
 
uint32_t num_imported_tags = 0
 
uint32_t num_declared_functions = 0
 
std::atomic< uint32_t > num_small_functions = 0
 
uint32_t num_exported_functions = 0
 
uint32_t num_declared_data_segments = 0
 
WireBytesRef code = {0, 0}
 
WireBytesRef name = {0, 0}
 
WireBytesRef name_section = {0, 0}
 
std::atomic< boolcanonical_typenames_decoded = false
 
bool is_wasm_gc = false
 
bool has_shared_part = false
 
std::vector< TypeDefinitiontypes
 
std::vector< CanonicalTypeIndexisorecursive_canonical_type_ids
 
std::vector< WasmFunctionfunctions
 
std::vector< WasmGlobalglobals
 
std::vector< WasmDataSegmentdata_segments
 
std::vector< WasmTabletables
 
std::vector< WasmMemorymemories
 
std::vector< WasmImportimport_table
 
std::vector< WasmExportexport_table
 
std::vector< WasmTagtags
 
std::vector< WasmStringRefLiteralstringref_literals
 
std::vector< WasmElemSegmentelem_segments
 
std::vector< WasmCompilationHintcompilation_hints
 
BranchHintInfo branch_hints
 
std::vector< std::pair< uint32_t, uint32_t > > inst_traces
 
TypeFeedbackStorage type_feedback
 
const ModuleOrigin origin
 
LazilyGeneratedNames lazily_generated_names
 
std::array< WasmDebugSymbols, WasmDebugSymbols::kNumTypesdebug_symbols {}
 
WireBytesRef build_id
 
std::unique_ptr< AsmJsOffsetInformationasm_js_offset_information
 
std::unique_ptr< std::atomic< uint8_t >[]> validated_functions
 

Detailed Description

Definition at line 705 of file wasm-module.h.

Constructor & Destructor Documentation

◆ WasmModule() [1/2]

v8::internal::wasm::WasmModule::WasmModule ( ModuleOrigin origin = kWasmOrigin)
explicit

Definition at line 215 of file wasm-module.cc.

◆ WasmModule() [2/2]

v8::internal::wasm::WasmModule::WasmModule ( const WasmModule & )
delete

Member Function Documentation

◆ AddArrayTypeForTesting()

void v8::internal::wasm::WasmModule::AddArrayTypeForTesting ( const ArrayType * type,
ModuleTypeIndex supertype,
bool is_final,
bool is_shared )
inline

Definition at line 821 of file wasm-module.h.

◆ AddContTypeForTesting()

void v8::internal::wasm::WasmModule::AddContTypeForTesting ( const ContType * type,
ModuleTypeIndex supertype,
bool is_final,
bool is_shared )
inline

Definition at line 827 of file wasm-module.h.

◆ AddSignatureForTesting()

void v8::internal::wasm::WasmModule::AddSignatureForTesting ( const FunctionSig * sig,
ModuleTypeIndex supertype,
bool is_final,
bool is_shared )
inline

Definition at line 808 of file wasm-module.h.

◆ AddStructTypeForTesting()

void v8::internal::wasm::WasmModule::AddStructTypeForTesting ( const StructType * type,
ModuleTypeIndex supertype,
bool is_final,
bool is_shared )
inline

Definition at line 814 of file wasm-module.h.

◆ AddTypeForTesting()

void v8::internal::wasm::WasmModule::AddTypeForTesting ( TypeDefinition type)
inline

Definition at line 794 of file wasm-module.h.

◆ array_type()

const ArrayType * v8::internal::wasm::WasmModule::array_type ( ModuleTypeIndex index) const
inline

Definition at line 913 of file wasm-module.h.

◆ canonical_sig_id()

CanonicalTypeIndex v8::internal::wasm::WasmModule::canonical_sig_id ( ModuleTypeIndex index) const
inline

Definition at line 887 of file wasm-module.h.

Here is the caller graph for this function:

◆ canonical_type()

CanonicalValueType v8::internal::wasm::WasmModule::canonical_type ( ValueType type) const
inline

Definition at line 857 of file wasm-module.h.

Here is the caller graph for this function:

◆ canonical_type_id()

CanonicalTypeIndex v8::internal::wasm::WasmModule::canonical_type_id ( ModuleTypeIndex index) const
inline

Definition at line 850 of file wasm-module.h.

Here is the caller graph for this function:

◆ cont_type()

const ContType * v8::internal::wasm::WasmModule::cont_type ( ModuleTypeIndex index) const
inline

Definition at line 880 of file wasm-module.h.

◆ declared_functions()

base::Vector< const WasmFunction > v8::internal::wasm::WasmModule::declared_functions ( ) const
inline

Definition at line 980 of file wasm-module.h.

Here is the caller graph for this function:

◆ EstimateCurrentMemoryConsumption()

size_t v8::internal::wasm::WasmModule::EstimateCurrentMemoryConsumption ( ) const

Definition at line 765 of file wasm-module.cc.

Here is the call graph for this function:

◆ EstimateStoredSize()

size_t v8::internal::wasm::WasmModule::EstimateStoredSize ( ) const

Definition at line 686 of file wasm-module.cc.

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

◆ function_is_shared()

bool v8::internal::wasm::WasmModule::function_is_shared ( int func_index) const
inline

Definition at line 938 of file wasm-module.h.

◆ function_was_validated()

bool v8::internal::wasm::WasmModule::function_was_validated ( int func_index) const
inline

Definition at line 942 of file wasm-module.h.

Here is the caller graph for this function:

◆ has_array()

bool v8::internal::wasm::WasmModule::has_array ( ModuleTypeIndex index) const
inline

Definition at line 909 of file wasm-module.h.

Here is the caller graph for this function:

◆ has_cont_type()

bool v8::internal::wasm::WasmModule::has_cont_type ( ModuleTypeIndex index) const
inline

Definition at line 875 of file wasm-module.h.

◆ has_signature()

bool v8::internal::wasm::WasmModule::has_signature ( ModuleTypeIndex index) const
inline

Definition at line 864 of file wasm-module.h.

Here is the caller graph for this function:

◆ has_struct()

bool v8::internal::wasm::WasmModule::has_struct ( ModuleTypeIndex index) const
inline

Definition at line 897 of file wasm-module.h.

Here is the caller graph for this function:

◆ has_supertype()

bool v8::internal::wasm::WasmModule::has_supertype ( ModuleTypeIndex index) const
inline

Definition at line 925 of file wasm-module.h.

◆ has_type()

bool v8::internal::wasm::WasmModule::has_type ( ModuleTypeIndex index) const
inline

Definition at line 834 of file wasm-module.h.

Here is the caller graph for this function:

◆ heap_type()

HeapType v8::internal::wasm::WasmModule::heap_type ( ModuleTypeIndex index) const
inline

Definition at line 844 of file wasm-module.h.

Here is the caller graph for this function:

◆ MaxCanonicalTypeIndex()

CanonicalTypeIndex v8::internal::wasm::WasmModule::MaxCanonicalTypeIndex ( ) const
inline

Definition at line 930 of file wasm-module.h.

◆ operator=()

WasmModule & v8::internal::wasm::WasmModule::operator= ( const WasmModule & )
delete

◆ set_all_functions_validated()

void v8::internal::wasm::WasmModule::set_all_functions_validated ( ) const
inline

Definition at line 970 of file wasm-module.h.

◆ set_function_validated()

void v8::internal::wasm::WasmModule::set_function_validated ( int func_index) const
inline

Definition at line 954 of file wasm-module.h.

◆ signature()

const FunctionSig * v8::internal::wasm::WasmModule::signature ( ModuleTypeIndex index) const
inline

Definition at line 868 of file wasm-module.h.

◆ signature_hash()

uint64_t v8::internal::wasm::WasmModule::signature_hash ( const TypeCanonicalizer * type_canonicalizer,
uint32_t function_index ) const

Definition at line 219 of file wasm-module.cc.

Here is the call graph for this function:

◆ struct_type()

const StructType * v8::internal::wasm::WasmModule::struct_type ( ModuleTypeIndex index) const
inline

Definition at line 902 of file wasm-module.h.

◆ supertype()

ModuleTypeIndex v8::internal::wasm::WasmModule::supertype ( ModuleTypeIndex index) const
inline

Definition at line 920 of file wasm-module.h.

Here is the caller graph for this function:

◆ type()

const TypeDefinition & v8::internal::wasm::WasmModule::type ( ModuleTypeIndex index) const
inline

Definition at line 838 of file wasm-module.h.

Here is the caller graph for this function:

Member Data Documentation

◆ asm_js_offset_information

std::unique_ptr<AsmJsOffsetInformation> v8::internal::wasm::WasmModule::asm_js_offset_information

Definition at line 778 of file wasm-module.h.

◆ branch_hints

BranchHintInfo v8::internal::wasm::WasmModule::branch_hints

Definition at line 762 of file wasm-module.h.

◆ build_id

WireBytesRef v8::internal::wasm::WasmModule::build_id

Definition at line 774 of file wasm-module.h.

◆ canonical_typenames_decoded

std::atomic<bool> v8::internal::wasm::WasmModule::canonical_typenames_decoded = false
mutable

Definition at line 741 of file wasm-module.h.

◆ code

WireBytesRef v8::internal::wasm::WasmModule::code = {0, 0}

Definition at line 735 of file wasm-module.h.

◆ compilation_hints

std::vector<WasmCompilationHint> v8::internal::wasm::WasmModule::compilation_hints

Definition at line 761 of file wasm-module.h.

◆ data_segments

std::vector<WasmDataSegment> v8::internal::wasm::WasmModule::data_segments

Definition at line 753 of file wasm-module.h.

◆ debug_symbols

std::array<WasmDebugSymbols, WasmDebugSymbols::kNumTypes> v8::internal::wasm::WasmModule::debug_symbols {}

Definition at line 773 of file wasm-module.h.

◆ elem_segments

std::vector<WasmElemSegment> v8::internal::wasm::WasmModule::elem_segments

Definition at line 760 of file wasm-module.h.

◆ export_table

std::vector<WasmExport> v8::internal::wasm::WasmModule::export_table

Definition at line 757 of file wasm-module.h.

◆ functions

std::vector<WasmFunction> v8::internal::wasm::WasmModule::functions

Definition at line 751 of file wasm-module.h.

◆ globals

std::vector<WasmGlobal> v8::internal::wasm::WasmModule::globals

Definition at line 752 of file wasm-module.h.

◆ has_shared_part

bool v8::internal::wasm::WasmModule::has_shared_part = false

Definition at line 745 of file wasm-module.h.

◆ import_table

std::vector<WasmImport> v8::internal::wasm::WasmModule::import_table

Definition at line 756 of file wasm-module.h.

◆ inst_traces

std::vector<std::pair<uint32_t, uint32_t> > v8::internal::wasm::WasmModule::inst_traces

Definition at line 764 of file wasm-module.h.

◆ is_wasm_gc

bool v8::internal::wasm::WasmModule::is_wasm_gc = false

Definition at line 743 of file wasm-module.h.

◆ isorecursive_canonical_type_ids

std::vector<CanonicalTypeIndex> v8::internal::wasm::WasmModule::isorecursive_canonical_type_ids

Definition at line 750 of file wasm-module.h.

◆ lazily_generated_names

LazilyGeneratedNames v8::internal::wasm::WasmModule::lazily_generated_names
mutable

Definition at line 772 of file wasm-module.h.

◆ memories

std::vector<WasmMemory> v8::internal::wasm::WasmModule::memories

Definition at line 755 of file wasm-module.h.

◆ name

WireBytesRef v8::internal::wasm::WasmModule::name = {0, 0}

Definition at line 736 of file wasm-module.h.

◆ name_section

WireBytesRef v8::internal::wasm::WasmModule::name_section = {0, 0}

Definition at line 739 of file wasm-module.h.

◆ num_declared_data_segments

uint32_t v8::internal::wasm::WasmModule::num_declared_data_segments = 0

Definition at line 732 of file wasm-module.h.

◆ num_declared_functions

uint32_t v8::internal::wasm::WasmModule::num_declared_functions = 0

Definition at line 723 of file wasm-module.h.

◆ num_exported_functions

uint32_t v8::internal::wasm::WasmModule::num_exported_functions = 0

Definition at line 731 of file wasm-module.h.

◆ num_imported_functions

uint32_t v8::internal::wasm::WasmModule::num_imported_functions = 0

Definition at line 720 of file wasm-module.h.

◆ num_imported_globals

uint32_t v8::internal::wasm::WasmModule::num_imported_globals = 0

Definition at line 718 of file wasm-module.h.

◆ num_imported_mutable_globals

uint32_t v8::internal::wasm::WasmModule::num_imported_mutable_globals = 0

Definition at line 719 of file wasm-module.h.

◆ num_imported_tables

uint32_t v8::internal::wasm::WasmModule::num_imported_tables = 0

Definition at line 721 of file wasm-module.h.

◆ num_imported_tags

uint32_t v8::internal::wasm::WasmModule::num_imported_tags = 0

Definition at line 722 of file wasm-module.h.

◆ num_small_functions

std::atomic<uint32_t> v8::internal::wasm::WasmModule::num_small_functions = 0

Definition at line 730 of file wasm-module.h.

◆ origin

const ModuleOrigin v8::internal::wasm::WasmModule::origin

Definition at line 771 of file wasm-module.h.

◆ signature_zone

Zone v8::internal::wasm::WasmModule::signature_zone
mutable

Definition at line 711 of file wasm-module.h.

◆ start_function_index

int v8::internal::wasm::WasmModule::start_function_index = -1

Definition at line 712 of file wasm-module.h.

◆ stringref_literals

std::vector<WasmStringRefLiteral> v8::internal::wasm::WasmModule::stringref_literals

Definition at line 759 of file wasm-module.h.

◆ tables

std::vector<WasmTable> v8::internal::wasm::WasmModule::tables

Definition at line 754 of file wasm-module.h.

◆ tagged_globals_buffer_size

uint32_t v8::internal::wasm::WasmModule::tagged_globals_buffer_size = 0

Definition at line 717 of file wasm-module.h.

◆ tags

std::vector<WasmTag> v8::internal::wasm::WasmModule::tags

Definition at line 758 of file wasm-module.h.

◆ type_feedback

TypeFeedbackStorage v8::internal::wasm::WasmModule::type_feedback
mutable

Definition at line 769 of file wasm-module.h.

◆ types

std::vector<TypeDefinition> v8::internal::wasm::WasmModule::types

Definition at line 747 of file wasm-module.h.

◆ untagged_globals_buffer_size

uint32_t v8::internal::wasm::WasmModule::untagged_globals_buffer_size = 0

Definition at line 716 of file wasm-module.h.

◆ validated_functions

std::unique_ptr<std::atomic<uint8_t>[]> v8::internal::wasm::WasmModule::validated_functions
mutable

Definition at line 784 of file wasm-module.h.


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