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

#include <module-compiler.h>

Collaboration diagram for v8::internal::wasm::AsyncCompileJob:

Classes

class  CompilationStateCallback
 
class  CompileStep
 
class  CompileTask
 
class  DecodeModule
 
class  Fail
 
class  FinishCompilation
 
class  PrepareAndStartCompile
 

Public Member Functions

 AsyncCompileJob (Isolate *isolate, WasmEnabledFeatures enabled_features, CompileTimeImports compile_imports, base::OwnedVector< const uint8_t > bytes, DirectHandle< Context > context, DirectHandle< NativeContext > incumbent_context, const char *api_method_name, std::shared_ptr< CompilationResultResolver > resolver, int compilation_id)
 
 ~AsyncCompileJob ()
 
void Start ()
 
std::shared_ptr< StreamingDecoderCreateStreamingDecoder ()
 
void Abort ()
 
void CancelPendingForegroundTask ()
 
Isolateisolate () const
 
DirectHandle< NativeContextcontext () const
 
v8::metrics::Recorder::ContextId context_id () const
 

Private Types

enum  UseExistingForegroundTask : bool { kUseExistingForegroundTask = true , kAssertNoExistingForegroundTask = false }
 

Private Member Functions

V8_WARN_UNUSED_RESULT bool DecrementAndCheckFinisherCount ()
 
void CreateNativeModule (std::shared_ptr< const WasmModule > module, size_t code_size_estimate)
 
bool GetOrCreateNativeModule (std::shared_ptr< const WasmModule > module, size_t code_size_estimate)
 
void PrepareRuntimeObjects ()
 
void FinishCompile (bool is_after_cache_hit)
 
void Failed ()
 
void AsyncCompileSucceeded (DirectHandle< WasmModuleObject > result)
 
void FinishSuccessfully ()
 
void StartForegroundTask ()
 
void ExecuteForegroundTaskImmediately ()
 
void StartBackgroundTask ()
 
template<typename Step , UseExistingForegroundTask = kAssertNoExistingForegroundTask, typename... Args>
void DoSync (Args &&... args)
 
template<typename Step , typename... Args>
void DoImmediately (Args &&... args)
 
template<typename Step , typename... Args>
void DoAsync (Args &&... args)
 
template<typename Step , typename... Args>
void NextStep (Args &&... args)
 

Private Attributes

Isolate *const isolate_
 
const char *const api_method_name_
 
const WasmEnabledFeatures enabled_features_
 
WasmDetectedFeatures detected_features_
 
CompileTimeImports compile_imports_
 
base::TimeTicks start_time_
 
base::OwnedVector< const uint8_t > bytes_copy_
 
ModuleWireBytes wire_bytes_
 
IndirectHandle< NativeContextnative_context_
 
IndirectHandle< NativeContextincumbent_context_
 
v8::metrics::Recorder::ContextId context_id_
 
v8::metrics::WasmModuleDecoded metrics_event_
 
const std::shared_ptr< CompilationResultResolverresolver_
 
IndirectHandle< WasmModuleObjectmodule_object_
 
std::shared_ptr< NativeModulenative_module_
 
std::unique_ptr< CompileStepstep_
 
CancelableTaskManager background_task_manager_
 
std::shared_ptr< v8::TaskRunnerforeground_task_runner_
 
std::atomic< int32_t > outstanding_finishers_ {1}
 
CompileTaskpending_foreground_task_ = nullptr
 
std::shared_ptr< StreamingDecoderstream_
 
const int compilation_id_
 

Friends

class AsyncStreamingProcessor
 

Detailed Description

Definition at line 115 of file module-compiler.h.

Member Enumeration Documentation

◆ UseExistingForegroundTask

Enumerator
kUseExistingForegroundTask 
kAssertNoExistingForegroundTask 

Definition at line 195 of file module-compiler.h.

Constructor & Destructor Documentation

◆ AsyncCompileJob()

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

Definition at line 2440 of file module-compiler.cc.

Here is the call graph for this function:

◆ ~AsyncCompileJob()

v8::internal::wasm::AsyncCompileJob::~AsyncCompileJob ( )

Definition at line 2667 of file module-compiler.cc.

Here is the call graph for this function:

Member Function Documentation

◆ Abort()

void v8::internal::wasm::AsyncCompileJob::Abort ( )

Definition at line 2475 of file module-compiler.cc.

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

◆ AsyncCompileSucceeded()

void v8::internal::wasm::AsyncCompileJob::AsyncCompileSucceeded ( DirectHandle< WasmModuleObject > result)
private

◆ CancelPendingForegroundTask()

void v8::internal::wasm::AsyncCompileJob::CancelPendingForegroundTask ( )

Definition at line 2985 of file module-compiler.cc.

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

◆ context()

DirectHandle< NativeContext > v8::internal::wasm::AsyncCompileJob::context ( ) const
inline

Definition at line 136 of file module-compiler.h.

◆ context_id()

v8::metrics::Recorder::ContextId v8::internal::wasm::AsyncCompileJob::context_id ( ) const
inline

Definition at line 137 of file module-compiler.h.

Here is the caller graph for this function:

◆ CreateNativeModule()

void v8::internal::wasm::AsyncCompileJob::CreateNativeModule ( std::shared_ptr< const WasmModule > module,
size_t code_size_estimate )
private

Definition at line 2686 of file module-compiler.cc.

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

◆ CreateStreamingDecoder()

std::shared_ptr< StreamingDecoder > v8::internal::wasm::AsyncCompileJob::CreateStreamingDecoder ( )

Definition at line 2660 of file module-compiler.cc.

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

◆ DecrementAndCheckFinisherCount()

V8_WARN_UNUSED_RESULT bool v8::internal::wasm::AsyncCompileJob::DecrementAndCheckFinisherCount ( )
inlineprivate

Definition at line 170 of file module-compiler.h.

Here is the caller graph for this function:

◆ DoAsync()

template<typename Step , typename... Args>
void v8::internal::wasm::AsyncCompileJob::DoAsync ( Args &&... args)
private

Definition at line 3020 of file module-compiler.cc.

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

◆ DoImmediately()

template<typename Step , typename... Args>
void v8::internal::wasm::AsyncCompileJob::DoImmediately ( Args &&... args)
private

Definition at line 3014 of file module-compiler.cc.

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

◆ DoSync()

template<typename Step , AsyncCompileJob::UseExistingForegroundTask use_existing_fg_task, typename... Args>
void v8::internal::wasm::AsyncCompileJob::DoSync ( Args &&... args)
private

Definition at line 3007 of file module-compiler.cc.

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

◆ ExecuteForegroundTaskImmediately()

void v8::internal::wasm::AsyncCompileJob::ExecuteForegroundTaskImmediately ( )
private

Definition at line 2977 of file module-compiler.cc.

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

◆ Failed()

void v8::internal::wasm::AsyncCompileJob::Failed ( )
private

Definition at line 2828 of file module-compiler.cc.

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

◆ FinishCompile()

void v8::internal::wasm::AsyncCompileJob::FinishCompile ( bool is_after_cache_hit)
private

Definition at line 2733 of file module-compiler.cc.

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

◆ FinishSuccessfully()

void v8::internal::wasm::AsyncCompileJob::FinishSuccessfully ( )
private

Definition at line 3207 of file module-compiler.cc.

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

◆ GetOrCreateNativeModule()

bool v8::internal::wasm::AsyncCompileJob::GetOrCreateNativeModule ( std::shared_ptr< const WasmModule > module,
size_t code_size_estimate )
private

Definition at line 2706 of file module-compiler.cc.

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

◆ isolate()

Isolate * v8::internal::wasm::AsyncCompileJob::isolate ( ) const
inline

Definition at line 134 of file module-compiler.h.

Here is the caller graph for this function:

◆ NextStep()

template<typename Step , typename... Args>
void v8::internal::wasm::AsyncCompileJob::NextStep ( Args &&... args)
private

Definition at line 3026 of file module-compiler.cc.

Here is the caller graph for this function:

◆ PrepareRuntimeObjects()

void v8::internal::wasm::AsyncCompileJob::PrepareRuntimeObjects ( )
private

Definition at line 2717 of file module-compiler.cc.

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

◆ Start()

void v8::internal::wasm::AsyncCompileJob::Start ( )

Definition at line 2470 of file module-compiler.cc.

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

◆ StartBackgroundTask()

void v8::internal::wasm::AsyncCompileJob::StartBackgroundTask ( )
private

Definition at line 2991 of file module-compiler.cc.

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

◆ StartForegroundTask()

void v8::internal::wasm::AsyncCompileJob::StartForegroundTask ( )
private

Definition at line 2969 of file module-compiler.cc.

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

Friends And Related Symbol Documentation

◆ AsyncStreamingProcessor

friend class AsyncStreamingProcessor
friend

Definition at line 165 of file module-compiler.h.

Member Data Documentation

◆ api_method_name_

const char* const v8::internal::wasm::AsyncCompileJob::api_method_name_
private

Definition at line 223 of file module-compiler.h.

◆ background_task_manager_

CancelableTaskManager v8::internal::wasm::AsyncCompileJob::background_task_manager_
private

Definition at line 244 of file module-compiler.h.

◆ bytes_copy_

base::OwnedVector<const uint8_t> v8::internal::wasm::AsyncCompileJob::bytes_copy_
private

Definition at line 230 of file module-compiler.h.

◆ compilation_id_

const int v8::internal::wasm::AsyncCompileJob::compilation_id_
private

Definition at line 263 of file module-compiler.h.

◆ compile_imports_

CompileTimeImports v8::internal::wasm::AsyncCompileJob::compile_imports_
private

Definition at line 226 of file module-compiler.h.

◆ context_id_

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

Definition at line 236 of file module-compiler.h.

◆ detected_features_

WasmDetectedFeatures v8::internal::wasm::AsyncCompileJob::detected_features_
private

Definition at line 225 of file module-compiler.h.

◆ enabled_features_

const WasmEnabledFeatures v8::internal::wasm::AsyncCompileJob::enabled_features_
private

Definition at line 224 of file module-compiler.h.

◆ foreground_task_runner_

std::shared_ptr<v8::TaskRunner> v8::internal::wasm::AsyncCompileJob::foreground_task_runner_
private

Definition at line 246 of file module-compiler.h.

◆ incumbent_context_

IndirectHandle<NativeContext> v8::internal::wasm::AsyncCompileJob::incumbent_context_
private

Definition at line 235 of file module-compiler.h.

◆ isolate_

Isolate* const v8::internal::wasm::AsyncCompileJob::isolate_
private

Definition at line 222 of file module-compiler.h.

◆ metrics_event_

v8::metrics::WasmModuleDecoded v8::internal::wasm::AsyncCompileJob::metrics_event_
private

Definition at line 237 of file module-compiler.h.

◆ module_object_

IndirectHandle<WasmModuleObject> v8::internal::wasm::AsyncCompileJob::module_object_
private

Definition at line 240 of file module-compiler.h.

◆ native_context_

IndirectHandle<NativeContext> v8::internal::wasm::AsyncCompileJob::native_context_
private

Definition at line 234 of file module-compiler.h.

◆ native_module_

std::shared_ptr<NativeModule> v8::internal::wasm::AsyncCompileJob::native_module_
private

Definition at line 241 of file module-compiler.h.

◆ outstanding_finishers_

std::atomic<int32_t> v8::internal::wasm::AsyncCompileJob::outstanding_finishers_ {1}
private

Definition at line 251 of file module-compiler.h.

◆ pending_foreground_task_

CompileTask* v8::internal::wasm::AsyncCompileJob::pending_foreground_task_ = nullptr
private

Definition at line 254 of file module-compiler.h.

◆ resolver_

const std::shared_ptr<CompilationResultResolver> v8::internal::wasm::AsyncCompileJob::resolver_
private

Definition at line 238 of file module-compiler.h.

◆ start_time_

base::TimeTicks v8::internal::wasm::AsyncCompileJob::start_time_
private

Definition at line 227 of file module-compiler.h.

◆ step_

std::unique_ptr<CompileStep> v8::internal::wasm::AsyncCompileJob::step_
private

Definition at line 243 of file module-compiler.h.

◆ stream_

std::shared_ptr<StreamingDecoder> v8::internal::wasm::AsyncCompileJob::stream_
private

Definition at line 260 of file module-compiler.h.

◆ wire_bytes_

ModuleWireBytes v8::internal::wasm::AsyncCompileJob::wire_bytes_
private

Definition at line 233 of file module-compiler.h.


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