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

#include <wasm-engine.h>

Collaboration diagram for v8::internal::wasm::WasmEngine:

Classes

struct  CurrentGCInfo
 
struct  IsolateInfo
 
class  LogCodesTask
 
struct  NativeModuleInfo
 

Public Types

using DeadCodeMap = std::unordered_map<NativeModule*, std::vector<WasmCode*>>
 

Public Member Functions

 WasmEngine ()
 
 WasmEngine (const WasmEngine &)=delete
 
WasmEngineoperator= (const WasmEngine &)=delete
 
 ~WasmEngine ()
 
bool SyncValidate (Isolate *isolate, WasmEnabledFeatures enabled, CompileTimeImports compile_imports, base::Vector< const uint8_t > bytes)
 
MaybeHandle< AsmWasmDataSyncCompileTranslatedAsmJs (Isolate *isolate, ErrorThrower *thrower, base::OwnedVector< const uint8_t > bytes, DirectHandle< Script > script, base::Vector< const uint8_t > asm_js_offset_table_bytes, DirectHandle< HeapNumber > uses_bitset, LanguageMode language_mode)
 
DirectHandle< WasmModuleObjectFinalizeTranslatedAsmJs (Isolate *isolate, DirectHandle< AsmWasmData > asm_wasm_data, DirectHandle< Script > script)
 
MaybeDirectHandle< WasmModuleObjectSyncCompile (Isolate *isolate, WasmEnabledFeatures enabled, CompileTimeImports compile_imports, ErrorThrower *thrower, base::OwnedVector< const uint8_t > bytes)
 
MaybeDirectHandle< WasmInstanceObjectSyncInstantiate (Isolate *isolate, ErrorThrower *thrower, DirectHandle< WasmModuleObject > module_object, MaybeDirectHandle< JSReceiver > imports, MaybeDirectHandle< JSArrayBuffer > memory)
 
void AsyncCompile (Isolate *isolate, WasmEnabledFeatures enabled, CompileTimeImports compile_imports, std::shared_ptr< CompilationResultResolver > resolver, base::OwnedVector< const uint8_t > bytes, const char *api_method_name_for_errors)
 
void AsyncInstantiate (Isolate *isolate, std::unique_ptr< InstantiationResultResolver > resolver, DirectHandle< WasmModuleObject > module_object, MaybeDirectHandle< JSReceiver > imports)
 
std::shared_ptr< StreamingDecoderStartStreamingCompilation (Isolate *isolate, WasmEnabledFeatures enabled, CompileTimeImports compile_imports, DirectHandle< Context > context, const char *api_method_name, std::shared_ptr< CompilationResultResolver > resolver)
 
void CompileFunction (Counters *counters, NativeModule *native_module, uint32_t function_index, ExecutionTier tier)
 
void EnterDebuggingForIsolate (Isolate *isolate)
 
void LeaveDebuggingForIsolate (Isolate *isolate)
 
DirectHandle< WasmModuleObjectImportNativeModule (Isolate *isolate, std::shared_ptr< NativeModule > shared_module, base::Vector< const char > source_url)
 
std::pair< size_t, size_tFlushLiftoffCode ()
 
size_t GetLiftoffCodeSizeForTesting ()
 
AccountingAllocatorallocator ()
 
std::shared_ptr< CompilationStatisticsGetOrCreateTurboStatistics ()
 
void DumpAndResetTurboStatistics ()
 
void DumpTurboStatistics ()
 
CodeTracerGetCodeTracer ()
 
std::unique_ptr< AsyncCompileJobRemoveCompileJob (AsyncCompileJob *job)
 
bool HasRunningCompileJob (Isolate *isolate)
 
void DeleteCompileJobsOnContext (DirectHandle< Context > context)
 
void DeleteCompileJobsOnIsolate (Isolate *isolate)
 
void AddIsolate (Isolate *isolate)
 
void RemoveIsolate (Isolate *isolate)
 
void LogCode (base::Vector< WasmCode * >)
 
bool LogWrapperCode (WasmCode *)
 
void EnableCodeLogging (Isolate *)
 
void LogOutstandingCodesForIsolate (Isolate *)
 
std::shared_ptr< NativeModuleNewNativeModule (Isolate *isolate, WasmEnabledFeatures enabled_features, WasmDetectedFeatures detected_features, CompileTimeImports compile_imports, std::shared_ptr< const WasmModule > module, size_t code_size_estimate)
 
std::shared_ptr< NativeModuleMaybeGetNativeModule (ModuleOrigin origin, base::Vector< const uint8_t > wire_bytes, const CompileTimeImports &compile_imports, Isolate *isolate)
 
std::shared_ptr< NativeModuleUpdateNativeModuleCache (bool has_error, std::shared_ptr< NativeModule > native_module, Isolate *isolate)
 
bool GetStreamingCompilationOwnership (size_t prefix_hash, const CompileTimeImports &compile_imports)
 
void StreamingCompilationFailed (size_t prefix_hash, const CompileTimeImports &compile_imports)
 
void FreeNativeModule (NativeModule *)
 
void ClearWeakScriptHandle (Isolate *isolate, std::unique_ptr< Address * > location)
 
void SampleTopTierCodeSizeInAllIsolates (const std::shared_ptr< NativeModule > &)
 
void ReportLiveCodeForGC (Isolate *, std::unordered_set< WasmCode * > &live_code)
 
void ReportLiveCodeFromStackForGC (Isolate *)
 
void AddPotentiallyDeadCode (WasmCode *)
 
void TriggerCodeGCForTesting ()
 
void FreeDeadCode (const DeadCodeMap &, std::vector< WasmCode * > &)
 
void FreeDeadCodeLocked (const DeadCodeMap &, std::vector< WasmCode * > &)
 
DirectHandle< ScriptGetOrCreateScript (Isolate *, const std::shared_ptr< NativeModule > &, base::Vector< const char > source_url)
 
std::shared_ptr< OperationsBarrierGetBarrierForBackgroundCompile ()
 
TypeCanonicalizertype_canonicalizer ()
 
void DecodeAllNameSections (CanonicalTypeNamesProvider *target)
 
compiler::WasmCallDescriptorscall_descriptors ()
 
size_t EstimateCurrentMemoryConsumption () const
 
void PrintCurrentMemoryConsumptionEstimate () const
 
int GetDeoptsExecutedCount () const
 
int IncrementDeoptsExecutedCount ()
 
size_t NativeModuleCount () const
 

Static Public Member Functions

static void InitializeOncePerProcess ()
 
static void GlobalTearDown ()
 
static WasmOrphanedGlobalHandleNewOrphanedGlobalHandle (WasmOrphanedGlobalHandle **pointer)
 
static void FreeAllOrphanedGlobalHandles (WasmOrphanedGlobalHandle *start)
 
static Address GetNondeterminismAddr ()
 
static bool had_nondeterminism ()
 
static void set_had_nondeterminism ()
 
static bool clear_nondeterminism ()
 

Private Member Functions

AsyncCompileJobCreateAsyncCompileJob (Isolate *isolate, WasmEnabledFeatures enabled, CompileTimeImports compile_imports, base::OwnedVector< const uint8_t > bytes, DirectHandle< Context > context, const char *api_method_name, std::shared_ptr< CompilationResultResolver > resolver, int compilation_id)
 
void TriggerCodeGC_Locked (size_t dead_code_limit)
 
void TriggerGC (int8_t gc_sequence_index)
 
bool RemoveIsolateFromCurrentGC (Isolate *)
 
void PotentiallyFinishCurrentGC ()
 
void EnableCodeLogging (NativeModule *)
 
void DisableCodeLogging (NativeModule *)
 

Private Attributes

AccountingAllocator allocator_
 
std::atomic< int > next_compilation_id_ {0}
 
std::atomic< int > deopts_executed_ {0}
 
TypeCanonicalizer type_canonicalizer_
 
compiler::WasmCallDescriptors call_descriptors_
 
base::Mutex mutex_
 
std::unordered_map< AsyncCompileJob *, std::unique_ptr< AsyncCompileJob > > async_compile_jobs_
 
std::shared_ptr< CompilationStatisticscompilation_stats_
 
std::unique_ptr< CodeTracercode_tracer_
 
std::unordered_map< Isolate *, std::unique_ptr< IsolateInfo > > isolates_
 
std::unordered_map< NativeModule *, std::unique_ptr< NativeModuleInfo > > native_modules_
 
std::shared_ptr< OperationsBarrieroperations_barrier_
 
std::atomic< size_tnum_modules_with_code_logging_ {0}
 
size_t new_potentially_dead_code_size_ = 0
 
std::unordered_set< WasmCode * > potentially_dead_code_
 
int8_t num_code_gcs_triggered_ = 0
 
std::unique_ptr< CurrentGCInfocurrent_gc_info_
 
NativeModuleCache native_module_cache_
 

Static Private Attributes

static std::atomic< int32_t > had_nondeterminism_ {0}
 

Detailed Description

Definition at line 162 of file wasm-engine.h.

Member Typedef Documentation

◆ DeadCodeMap

using v8::internal::wasm::WasmEngine::DeadCodeMap = std::unordered_map<NativeModule*, std::vector<WasmCode*>>

Definition at line 381 of file wasm-engine.h.

Constructor & Destructor Documentation

◆ WasmEngine() [1/2]

v8::internal::wasm::WasmEngine::WasmEngine ( )

Definition at line 543 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ WasmEngine() [2/2]

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

◆ ~WasmEngine()

v8::internal::wasm::WasmEngine::~WasmEngine ( )

Definition at line 545 of file wasm-engine.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AddIsolate()

void v8::internal::wasm::WasmEngine::AddIsolate ( Isolate * isolate)

Definition at line 1244 of file wasm-engine.cc.

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

◆ AddPotentiallyDeadCode()

void v8::internal::wasm::WasmEngine::AddPotentiallyDeadCode ( WasmCode * code)

Definition at line 1826 of file wasm-engine.cc.

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

◆ allocator()

AccountingAllocator * v8::internal::wasm::WasmEngine::allocator ( )
inline

Definition at line 247 of file wasm-engine.h.

Here is the caller graph for this function:

◆ AsyncCompile()

void v8::internal::wasm::WasmEngine::AsyncCompile ( Isolate * isolate,
WasmEnabledFeatures enabled,
CompileTimeImports compile_imports,
std::shared_ptr< CompilationResultResolver > resolver,
base::OwnedVector< const uint8_t > bytes,
const char * api_method_name_for_errors )

Definition at line 790 of file wasm-engine.cc.

Here is the call graph for this function:

◆ AsyncInstantiate()

void v8::internal::wasm::WasmEngine::AsyncInstantiate ( Isolate * isolate,
std::unique_ptr< InstantiationResultResolver > resolver,
DirectHandle< WasmModuleObject > module_object,
MaybeDirectHandle< JSReceiver > imports )

Definition at line 753 of file wasm-engine.cc.

Here is the call graph for this function:

◆ call_descriptors()

compiler::WasmCallDescriptors * v8::internal::wasm::WasmEngine::call_descriptors ( )
inline

Definition at line 397 of file wasm-engine.h.

Here is the caller graph for this function:

◆ clear_nondeterminism()

static bool v8::internal::wasm::WasmEngine::clear_nondeterminism ( )
inlinestatic

Definition at line 438 of file wasm-engine.h.

◆ ClearWeakScriptHandle()

void v8::internal::wasm::WasmEngine::ClearWeakScriptHandle ( Isolate * isolate,
std::unique_ptr< Address * > location )

Definition at line 521 of file wasm-engine.cc.

Here is the call graph for this function:

◆ CompileFunction()

void v8::internal::wasm::WasmEngine::CompileFunction ( Counters * counters,
NativeModule * native_module,
uint32_t function_index,
ExecutionTier tier )

Definition at line 871 of file wasm-engine.cc.

Here is the call graph for this function:

◆ CreateAsyncCompileJob()

AsyncCompileJob * v8::internal::wasm::WasmEngine::CreateAsyncCompileJob ( Isolate * isolate,
WasmEnabledFeatures enabled,
CompileTimeImports compile_imports,
base::OwnedVector< const uint8_t > bytes,
DirectHandle< Context > context,
const char * api_method_name,
std::shared_ptr< CompilationResultResolver > resolver,
int compilation_id )
private

Definition at line 1156 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ DecodeAllNameSections()

void v8::internal::wasm::WasmEngine::DecodeAllNameSections ( CanonicalTypeNamesProvider * target)

Definition at line 2018 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ DeleteCompileJobsOnContext()

void v8::internal::wasm::WasmEngine::DeleteCompileJobsOnContext ( DirectHandle< Context > context)

Definition at line 1191 of file wasm-engine.cc.

◆ DeleteCompileJobsOnIsolate()

void v8::internal::wasm::WasmEngine::DeleteCompileJobsOnIsolate ( Isolate * isolate)

Definition at line 1209 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ DisableCodeLogging()

void v8::internal::wasm::WasmEngine::DisableCodeLogging ( NativeModule * native_module)
private

Definition at line 1507 of file wasm-engine.cc.

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

◆ DumpAndResetTurboStatistics()

void v8::internal::wasm::WasmEngine::DumpAndResetTurboStatistics ( )

Definition at line 1131 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ DumpTurboStatistics()

void v8::internal::wasm::WasmEngine::DumpTurboStatistics ( )

Definition at line 1141 of file wasm-engine.cc.

◆ EnableCodeLogging() [1/2]

void v8::internal::wasm::WasmEngine::EnableCodeLogging ( Isolate * isolate)

Definition at line 1478 of file wasm-engine.cc.

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

◆ EnableCodeLogging() [2/2]

void v8::internal::wasm::WasmEngine::EnableCodeLogging ( NativeModule * native_module)
private

Definition at line 1492 of file wasm-engine.cc.

Here is the call graph for this function:

◆ EnterDebuggingForIsolate()

void v8::internal::wasm::WasmEngine::EnterDebuggingForIsolate ( Isolate * isolate)

Definition at line 883 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ EstimateCurrentMemoryConsumption()

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

Definition at line 2025 of file wasm-engine.cc.

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

◆ FinalizeTranslatedAsmJs()

DirectHandle< WasmModuleObject > v8::internal::wasm::WasmEngine::FinalizeTranslatedAsmJs ( Isolate * isolate,
DirectHandle< AsmWasmData > asm_wasm_data,
DirectHandle< Script > script )

Definition at line 659 of file wasm-engine.cc.

Here is the call graph for this function:

◆ FlushLiftoffCode()

std::pair< size_t, size_t > v8::internal::wasm::WasmEngine::FlushLiftoffCode ( )

Definition at line 1090 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ FreeAllOrphanedGlobalHandles()

void v8::internal::wasm::WasmEngine::FreeAllOrphanedGlobalHandles ( WasmOrphanedGlobalHandle * start)
static

Definition at line 139 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ FreeDeadCode()

void v8::internal::wasm::WasmEngine::FreeDeadCode ( const DeadCodeMap & dead_code,
std::vector< WasmCode * > & dead_wrappers )

Definition at line 1878 of file wasm-engine.cc.

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

◆ FreeDeadCodeLocked()

void v8::internal::wasm::WasmEngine::FreeDeadCodeLocked ( const DeadCodeMap & dead_code,
std::vector< WasmCode * > & dead_wrappers )

Definition at line 1884 of file wasm-engine.cc.

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

◆ FreeNativeModule()

void v8::internal::wasm::WasmEngine::FreeNativeModule ( NativeModule * native_module)

Definition at line 1697 of file wasm-engine.cc.

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

◆ GetBarrierForBackgroundCompile()

std::shared_ptr< OperationsBarrier > v8::internal::wasm::WasmEngine::GetBarrierForBackgroundCompile ( )

Definition at line 1932 of file wasm-engine.cc.

◆ GetCodeTracer()

CodeTracer * v8::internal::wasm::WasmEngine::GetCodeTracer ( )

Definition at line 1150 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ GetDeoptsExecutedCount()

int v8::internal::wasm::WasmEngine::GetDeoptsExecutedCount ( ) const

Definition at line 2075 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ GetLiftoffCodeSizeForTesting()

size_t v8::internal::wasm::WasmEngine::GetLiftoffCodeSizeForTesting ( )

Definition at line 1113 of file wasm-engine.cc.

◆ GetNondeterminismAddr()

static Address v8::internal::wasm::WasmEngine::GetNondeterminismAddr ( )
inlinestatic

Definition at line 422 of file wasm-engine.h.

◆ GetOrCreateScript()

DirectHandle< Script > v8::internal::wasm::WasmEngine::GetOrCreateScript ( Isolate * isolate,
const std::shared_ptr< NativeModule > & native_module,
base::Vector< const char > source_url )

Definition at line 1902 of file wasm-engine.cc.

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

◆ GetOrCreateTurboStatistics()

std::shared_ptr< CompilationStatistics > v8::internal::wasm::WasmEngine::GetOrCreateTurboStatistics ( )

Definition at line 1123 of file wasm-engine.cc.

◆ GetStreamingCompilationOwnership()

bool v8::internal::wasm::WasmEngine::GetStreamingCompilationOwnership ( size_t prefix_hash,
const CompileTimeImports & compile_imports )

Definition at line 1678 of file wasm-engine.cc.

Here is the call graph for this function:

◆ GlobalTearDown()

void v8::internal::wasm::WasmEngine::GlobalTearDown ( )
static

Definition at line 2115 of file wasm-engine.cc.

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

◆ had_nondeterminism()

static bool v8::internal::wasm::WasmEngine::had_nondeterminism ( )
inlinestatic

Definition at line 427 of file wasm-engine.h.

◆ HasRunningCompileJob()

bool v8::internal::wasm::WasmEngine::HasRunningCompileJob ( Isolate * isolate)

Definition at line 1182 of file wasm-engine.cc.

◆ ImportNativeModule()

DirectHandle< WasmModuleObject > v8::internal::wasm::WasmEngine::ImportNativeModule ( Isolate * isolate,
std::shared_ptr< NativeModule > shared_module,
base::Vector< const char > source_url )

Definition at line 1063 of file wasm-engine.cc.

Here is the call graph for this function:

◆ IncrementDeoptsExecutedCount()

int v8::internal::wasm::WasmEngine::IncrementDeoptsExecutedCount ( )

Definition at line 2079 of file wasm-engine.cc.

◆ InitializeOncePerProcess()

void v8::internal::wasm::WasmEngine::InitializeOncePerProcess ( )
static

Definition at line 2101 of file wasm-engine.cc.

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

◆ LeaveDebuggingForIsolate()

void v8::internal::wasm::WasmEngine::LeaveDebuggingForIsolate ( Isolate * isolate)

Definition at line 909 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ LogCode()

void v8::internal::wasm::WasmEngine::LogCode ( base::Vector< WasmCode * > code_vec)

Definition at line 1373 of file wasm-engine.cc.

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

◆ LogOutstandingCodesForIsolate()

void v8::internal::wasm::WasmEngine::LogOutstandingCodesForIsolate ( Isolate * isolate)

Definition at line 1522 of file wasm-engine.cc.

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

◆ LogWrapperCode()

bool v8::internal::wasm::WasmEngine::LogWrapperCode ( WasmCode * code)

Definition at line 1431 of file wasm-engine.cc.

◆ MaybeGetNativeModule()

std::shared_ptr< NativeModule > v8::internal::wasm::WasmEngine::MaybeGetNativeModule ( ModuleOrigin origin,
base::Vector< const uint8_t > wire_bytes,
const CompileTimeImports & compile_imports,
Isolate * isolate )

Definition at line 1610 of file wasm-engine.cc.

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

◆ NativeModuleCount()

size_t v8::internal::wasm::WasmEngine::NativeModuleCount ( ) const

Definition at line 149 of file wasm-engine.cc.

◆ NewNativeModule()

std::shared_ptr< NativeModule > v8::internal::wasm::WasmEngine::NewNativeModule ( Isolate * isolate,
WasmEnabledFeatures enabled_features,
WasmDetectedFeatures detected_features,
CompileTimeImports compile_imports,
std::shared_ptr< const WasmModule > module,
size_t code_size_estimate )

Definition at line 1549 of file wasm-engine.cc.

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

◆ NewOrphanedGlobalHandle()

WasmOrphanedGlobalHandle * v8::internal::wasm::WasmEngine::NewOrphanedGlobalHandle ( WasmOrphanedGlobalHandle ** pointer)
static

Definition at line 125 of file wasm-engine.cc.

◆ operator=()

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

◆ PotentiallyFinishCurrentGC()

void v8::internal::wasm::WasmEngine::PotentiallyFinishCurrentGC ( )
private

Definition at line 1976 of file wasm-engine.cc.

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

◆ PrintCurrentMemoryConsumptionEstimate()

void v8::internal::wasm::WasmEngine::PrintCurrentMemoryConsumptionEstimate ( ) const

Definition at line 2069 of file wasm-engine.cc.

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

◆ RemoveCompileJob()

std::unique_ptr< AsyncCompileJob > v8::internal::wasm::WasmEngine::RemoveCompileJob ( AsyncCompileJob * job)

Definition at line 1172 of file wasm-engine.cc.

Here is the caller graph for this function:

◆ RemoveIsolate()

void v8::internal::wasm::WasmEngine::RemoveIsolate ( Isolate * isolate)

Definition at line 1297 of file wasm-engine.cc.

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

◆ RemoveIsolateFromCurrentGC()

bool v8::internal::wasm::WasmEngine::RemoveIsolateFromCurrentGC ( Isolate * isolate)
private

Definition at line 1970 of file wasm-engine.cc.

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

◆ ReportLiveCodeForGC()

void v8::internal::wasm::WasmEngine::ReportLiveCodeForGC ( Isolate * isolate,
std::unordered_set< WasmCode * > & live_code )

Definition at line 1751 of file wasm-engine.cc.

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

◆ ReportLiveCodeFromStackForGC()

void v8::internal::wasm::WasmEngine::ReportLiveCodeFromStackForGC ( Isolate * isolate)

Definition at line 1793 of file wasm-engine.cc.

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

◆ SampleTopTierCodeSizeInAllIsolates()

void v8::internal::wasm::WasmEngine::SampleTopTierCodeSizeInAllIsolates ( const std::shared_ptr< NativeModule > & )

◆ set_had_nondeterminism()

static void v8::internal::wasm::WasmEngine::set_had_nondeterminism ( )
inlinestatic

Definition at line 432 of file wasm-engine.h.

Here is the caller graph for this function:

◆ StartStreamingCompilation()

std::shared_ptr< StreamingDecoder > v8::internal::wasm::WasmEngine::StartStreamingCompilation ( Isolate * isolate,
WasmEnabledFeatures enabled,
CompileTimeImports compile_imports,
DirectHandle< Context > context,
const char * api_method_name,
std::shared_ptr< CompilationResultResolver > resolver )

Definition at line 852 of file wasm-engine.cc.

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

◆ StreamingCompilationFailed()

void v8::internal::wasm::WasmEngine::StreamingCompilationFailed ( size_t prefix_hash,
const CompileTimeImports & compile_imports )

Definition at line 1692 of file wasm-engine.cc.

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

◆ SyncCompile()

MaybeDirectHandle< WasmModuleObject > v8::internal::wasm::WasmEngine::SyncCompile ( Isolate * isolate,
WasmEnabledFeatures enabled,
CompileTimeImports compile_imports,
ErrorThrower * thrower,
base::OwnedVector< const uint8_t > bytes )

Definition at line 669 of file wasm-engine.cc.

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

◆ SyncCompileTranslatedAsmJs()

MaybeHandle< AsmWasmData > v8::internal::wasm::WasmEngine::SyncCompileTranslatedAsmJs ( Isolate * isolate,
ErrorThrower * thrower,
base::OwnedVector< const uint8_t > bytes,
DirectHandle< Script > script,
base::Vector< const uint8_t > asm_js_offset_table_bytes,
DirectHandle< HeapNumber > uses_bitset,
LanguageMode language_mode )

Definition at line 603 of file wasm-engine.cc.

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

◆ SyncInstantiate()

MaybeDirectHandle< WasmInstanceObject > v8::internal::wasm::WasmEngine::SyncInstantiate ( Isolate * isolate,
ErrorThrower * thrower,
DirectHandle< WasmModuleObject > module_object,
MaybeDirectHandle< JSReceiver > imports,
MaybeDirectHandle< JSArrayBuffer > memory )

Definition at line 743 of file wasm-engine.cc.

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

◆ SyncValidate()

bool v8::internal::wasm::WasmEngine::SyncValidate ( Isolate * isolate,
WasmEnabledFeatures enabled,
CompileTimeImports compile_imports,
base::Vector< const uint8_t > bytes )

Definition at line 585 of file wasm-engine.cc.

Here is the call graph for this function:

◆ TriggerCodeGC_Locked()

void v8::internal::wasm::WasmEngine::TriggerCodeGC_Locked ( size_t dead_code_limit)
private

Definition at line 1845 of file wasm-engine.cc.

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

◆ TriggerCodeGCForTesting()

void v8::internal::wasm::WasmEngine::TriggerCodeGCForTesting ( )

Definition at line 1865 of file wasm-engine.cc.

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

◆ TriggerGC()

void v8::internal::wasm::WasmEngine::TriggerGC ( int8_t gc_sequence_index)
private

Definition at line 1936 of file wasm-engine.cc.

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

◆ type_canonicalizer()

TypeCanonicalizer * v8::internal::wasm::WasmEngine::type_canonicalizer ( )
inline

Definition at line 393 of file wasm-engine.h.

Here is the caller graph for this function:

◆ UpdateNativeModuleCache()

std::shared_ptr< NativeModule > v8::internal::wasm::WasmEngine::UpdateNativeModuleCache ( bool has_error,
std::shared_ptr< NativeModule > native_module,
Isolate * isolate )

Definition at line 1645 of file wasm-engine.cc.

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

Member Data Documentation

◆ allocator_

AccountingAllocator v8::internal::wasm::WasmEngine::allocator_
private

Definition at line 482 of file wasm-engine.h.

◆ async_compile_jobs_

std::unordered_map<AsyncCompileJob*, std::unique_ptr<AsyncCompileJob> > v8::internal::wasm::WasmEngine::async_compile_jobs_
private

Definition at line 508 of file wasm-engine.h.

◆ call_descriptors_

compiler::WasmCallDescriptors v8::internal::wasm::WasmEngine::call_descriptors_
private

Definition at line 496 of file wasm-engine.h.

◆ code_tracer_

std::unique_ptr<CodeTracer> v8::internal::wasm::WasmEngine::code_tracer_
private

Definition at line 511 of file wasm-engine.h.

◆ compilation_stats_

std::shared_ptr<CompilationStatistics> v8::internal::wasm::WasmEngine::compilation_stats_
private

Definition at line 510 of file wasm-engine.h.

◆ current_gc_info_

std::unique_ptr<CurrentGCInfo> v8::internal::wasm::WasmEngine::current_gc_info_
private

Definition at line 539 of file wasm-engine.h.

◆ deopts_executed_

std::atomic<int> v8::internal::wasm::WasmEngine::deopts_executed_ {0}
private

Definition at line 492 of file wasm-engine.h.

◆ had_nondeterminism_

std::atomic< int32_t > v8::internal::wasm::WasmEngine::had_nondeterminism_ {0}
staticprivate

Definition at line 480 of file wasm-engine.h.

◆ isolates_

std::unordered_map<Isolate*, std::unique_ptr<IsolateInfo> > v8::internal::wasm::WasmEngine::isolates_
private

Definition at line 514 of file wasm-engine.h.

◆ mutex_

base::Mutex v8::internal::wasm::WasmEngine::mutex_
mutableprivate

Definition at line 500 of file wasm-engine.h.

◆ native_module_cache_

NativeModuleCache v8::internal::wasm::WasmEngine::native_module_cache_
private

Definition at line 541 of file wasm-engine.h.

◆ native_modules_

std::unordered_map<NativeModule*, std::unique_ptr<NativeModuleInfo> > v8::internal::wasm::WasmEngine::native_modules_
private

Definition at line 518 of file wasm-engine.h.

◆ new_potentially_dead_code_size_

size_t v8::internal::wasm::WasmEngine::new_potentially_dead_code_size_ = 0
private

Definition at line 530 of file wasm-engine.h.

◆ next_compilation_id_

std::atomic<int> v8::internal::wasm::WasmEngine::next_compilation_id_ {0}
private

Definition at line 489 of file wasm-engine.h.

◆ num_code_gcs_triggered_

int8_t v8::internal::wasm::WasmEngine::num_code_gcs_triggered_ = 0
private

Definition at line 535 of file wasm-engine.h.

◆ num_modules_with_code_logging_

std::atomic<size_t> v8::internal::wasm::WasmEngine::num_modules_with_code_logging_ {0}
private

Definition at line 526 of file wasm-engine.h.

◆ operations_barrier_

std::shared_ptr<OperationsBarrier> v8::internal::wasm::WasmEngine::operations_barrier_
private
Initial value:
{
std::make_shared<OperationsBarrier>()}

Definition at line 520 of file wasm-engine.h.

◆ potentially_dead_code_

std::unordered_set<WasmCode*> v8::internal::wasm::WasmEngine::potentially_dead_code_
private

Definition at line 534 of file wasm-engine.h.

◆ type_canonicalizer_

TypeCanonicalizer v8::internal::wasm::WasmEngine::type_canonicalizer_
private

Definition at line 494 of file wasm-engine.h.


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