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

#include <wasm-interpreter.h>

Collaboration diagram for v8::internal::wasm::WasmInterpreterThread:

Classes

class  Activation
 
struct  TrapStatus
 

Public Types

enum  State {
  STOPPED , RUNNING , FINISHED , TRAPPED ,
  EH_UNWINDING
}
 
enum  ExceptionHandlingResult { HANDLED , UNWOUND }
 

Public Member Functions

 WasmInterpreterThread (Isolate *isolate)
 
 ~WasmInterpreterThread ()
 
Handle< FixedArrayreference_stack () const
 
bool ExpandStack (size_t additional_required_size)
 
const IsolateGetIsolate () const
 
State state () const
 
void Run ()
 
void Stop ()
 
void Trap (TrapReason trap_reason, int trap_function_index, int trap_pc, const FrameState &current_frame)
 
TrapReason GetTrapReason () const
 
void Unwinding ()
 
WasmInterpreterThread::ActivationStartActivation (WasmInterpreterRuntime *wasm_runtime, Address frame_pointer, uint8_t *interpreter_fp, const FrameState &frame_state)
 
void FinishActivation ()
 
const FrameStateGetCurrentActivationFor (const WasmInterpreterRuntime *wasm_runtime) const
 
void SetCurrentFrame (const FrameState &frame_state)
 
void SetCurrentActivationFrame (uint32_t *fp, uint32_t current_frame_size, uint32_t current_stack_size, uint32_t current_ref_stack_fp, uint32_t current_ref_stack_frame_size)
 
WasmInterpreterThread::ActivationGetActivation (Address frame_pointer) const
 
uint8_t * NextFrameAddress () const
 
uint32_t NextRefStackOffset () const
 
const uint8_t * StackLimitAddress () const
 
void EnsureRefStackSpace (size_t new_size)
 
void ClearRefStackValues (size_t index, size_t count)
 
void StartExecutionTimer ()
 
void StopExecutionTimer ()
 
void TerminateExecutionTimers ()
 
void RaiseException (Isolate *isolate, MessageTemplate message)
 

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static void NotifyIsolateDisposal (Isolate *isolate)
 
static WasmInterpreterThreadGetCurrentInterpreterThread (Isolate *isolate)
 
static void SetRuntimeLastWasmError (Isolate *isolate, MessageTemplate message)
 
static TrapReason GetRuntimeLastWasmError (Isolate *isolate)
 

Private Member Functions

void Finish ()
 
uint8_t * stack_mem () const
 

Private Attributes

Isolateisolate_
 
State state_
 
TrapReason trap_reason_
 
uint32_t current_stack_size_
 
voidstack_mem_
 
std::vector< std::unique_ptr< Activation > > activations_
 
Handle< FixedArrayreference_stack_
 
size_t current_ref_stack_size_
 
WasmExecutionTimer execution_timer_
 

Static Private Attributes

static WasmInterpreterThreadMapthread_interpreter_map_s
 
static constexpr uint32_t kInitialStackSize = 1 * MB
 
static constexpr uint32_t kStackSizeIncrement = 1 * MB
 
static constexpr uint32_t kMaxStackSize = 32 * MB
 

Detailed Description

Definition at line 200 of file wasm-interpreter.h.

Member Enumeration Documentation

◆ ExceptionHandlingResult

Enumerator
HANDLED 
UNWOUND 

Definition at line 278 of file wasm-interpreter.h.

◆ State

Enumerator
STOPPED 
RUNNING 
FINISHED 
TRAPPED 
EH_UNWINDING 

Definition at line 276 of file wasm-interpreter.h.

Constructor & Destructor Documentation

◆ WasmInterpreterThread()

v8::internal::wasm::WasmInterpreterThread::WasmInterpreterThread ( Isolate * isolate)
explicit

Definition at line 441 of file wasm-interpreter.cc.

Here is the call graph for this function:

◆ ~WasmInterpreterThread()

v8::internal::wasm::WasmInterpreterThread::~WasmInterpreterThread ( )

Definition at line 465 of file wasm-interpreter.cc.

Here is the call graph for this function:

Member Function Documentation

◆ ClearRefStackValues()

void v8::internal::wasm::WasmInterpreterThread::ClearRefStackValues ( size_t index,
size_t count )

Definition at line 486 of file wasm-interpreter.cc.

Here is the caller graph for this function:

◆ EnsureRefStackSpace()

void v8::internal::wasm::WasmInterpreterThread::EnsureRefStackSpace ( size_t new_size)

Definition at line 470 of file wasm-interpreter.cc.

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

◆ ExpandStack()

bool v8::internal::wasm::WasmInterpreterThread::ExpandStack ( size_t additional_required_size)
inline

Definition at line 398 of file wasm-interpreter.h.

Here is the call graph for this function:

◆ Finish()

void v8::internal::wasm::WasmInterpreterThread::Finish ( )
inlineprivate

Definition at line 545 of file wasm-interpreter.h.

◆ FinishActivation()

void v8::internal::wasm::WasmInterpreterThread::FinishActivation ( )
inline

Definition at line 64 of file wasm-interpreter-inl.h.

◆ GetActivation()

WasmInterpreterThread::Activation * v8::internal::wasm::WasmInterpreterThread::GetActivation ( Address frame_pointer) const
inline

Definition at line 484 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GetCurrentActivationFor()

const FrameState * v8::internal::wasm::WasmInterpreterThread::GetCurrentActivationFor ( const WasmInterpreterRuntime * wasm_runtime) const
inline

Definition at line 74 of file wasm-interpreter-inl.h.

Here is the call graph for this function:

◆ GetCurrentInterpreterThread()

static WasmInterpreterThread * v8::internal::wasm::WasmInterpreterThread::GetCurrentInterpreterThread ( Isolate * isolate)
inlinestatic

Definition at line 431 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ GetIsolate()

const Isolate * v8::internal::wasm::WasmInterpreterThread::GetIsolate ( ) const
inline

Definition at line 436 of file wasm-interpreter.h.

◆ GetRuntimeLastWasmError()

TrapReason v8::internal::wasm::WasmInterpreterThread::GetRuntimeLastWasmError ( Isolate * isolate)
static

Definition at line 513 of file wasm-interpreter.cc.

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

◆ GetTrapReason()

TrapReason v8::internal::wasm::WasmInterpreterThread::GetTrapReason ( ) const
inline

Definition at line 457 of file wasm-interpreter.h.

◆ Initialize()

static void v8::internal::wasm::WasmInterpreterThread::Initialize ( )
inlinestatic

Definition at line 416 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ NextFrameAddress()

uint8_t * v8::internal::wasm::WasmInterpreterThread::NextFrameAddress ( ) const
inline

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

◆ NextRefStackOffset()

uint32_t v8::internal::wasm::WasmInterpreterThread::NextRefStackOffset ( ) const
inline

Definition at line 502 of file wasm-interpreter.h.

◆ NotifyIsolateDisposal()

static void v8::internal::wasm::WasmInterpreterThread::NotifyIsolateDisposal ( Isolate * isolate)
inlinestatic

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

Here is the caller graph for this function:

◆ RaiseException()

void v8::internal::wasm::WasmInterpreterThread::RaiseException ( Isolate * isolate,
MessageTemplate message )

Definition at line 491 of file wasm-interpreter.cc.

Here is the call graph for this function:

◆ reference_stack()

Handle< FixedArray > v8::internal::wasm::WasmInterpreterThread::reference_stack ( ) const
inline

Definition at line 396 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ Run()

void v8::internal::wasm::WasmInterpreterThread::Run ( )
inline

Definition at line 440 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ SetCurrentActivationFrame()

void v8::internal::wasm::WasmInterpreterThread::SetCurrentActivationFrame ( uint32_t * fp,
uint32_t current_frame_size,
uint32_t current_stack_size,
uint32_t current_ref_stack_fp,
uint32_t current_ref_stack_frame_size )
inline

Definition at line 473 of file wasm-interpreter.h.

◆ SetCurrentFrame()

void v8::internal::wasm::WasmInterpreterThread::SetCurrentFrame ( const FrameState & frame_state)
inline

Definition at line 468 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ SetRuntimeLastWasmError()

void v8::internal::wasm::WasmInterpreterThread::SetRuntimeLastWasmError ( Isolate * isolate,
MessageTemplate message )
static

Definition at line 506 of file wasm-interpreter.cc.

Here is the call graph for this function:

◆ stack_mem()

uint8_t * v8::internal::wasm::WasmInterpreterThread::stack_mem ( ) const
inlineprivate

Definition at line 547 of file wasm-interpreter.h.

◆ StackLimitAddress()

const uint8_t * v8::internal::wasm::WasmInterpreterThread::StackLimitAddress ( ) const
inline

Definition at line 509 of file wasm-interpreter.h.

◆ StartActivation()

WasmInterpreterThread::Activation * v8::internal::wasm::WasmInterpreterThread::StartActivation ( WasmInterpreterRuntime * wasm_runtime,
Address frame_pointer,
uint8_t * interpreter_fp,
const FrameState & frame_state )
inline

Definition at line 54 of file wasm-interpreter-inl.h.

◆ StartExecutionTimer()

void v8::internal::wasm::WasmInterpreterThread::StartExecutionTimer ( )

Definition at line 519 of file wasm-interpreter.cc.

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

◆ state()

State v8::internal::wasm::WasmInterpreterThread::state ( ) const
inline

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

Here is the caller graph for this function:

◆ Stop()

void v8::internal::wasm::WasmInterpreterThread::Stop ( )
inline

Definition at line 446 of file wasm-interpreter.h.

◆ StopExecutionTimer()

void v8::internal::wasm::WasmInterpreterThread::StopExecutionTimer ( )

Definition at line 525 of file wasm-interpreter.cc.

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

◆ Terminate()

static void v8::internal::wasm::WasmInterpreterThread::Terminate ( )
inlinestatic

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

Here is the caller graph for this function:

◆ TerminateExecutionTimers()

void v8::internal::wasm::WasmInterpreterThread::TerminateExecutionTimers ( )

Definition at line 531 of file wasm-interpreter.cc.

Here is the call graph for this function:

◆ Trap()

void v8::internal::wasm::WasmInterpreterThread::Trap ( TrapReason trap_reason,
int trap_function_index,
int trap_pc,
const FrameState & current_frame )
inline

Definition at line 448 of file wasm-interpreter.h.

Here is the caller graph for this function:

◆ Unwinding()

void v8::internal::wasm::WasmInterpreterThread::Unwinding ( )
inline

Definition at line 459 of file wasm-interpreter.h.

Here is the caller graph for this function:

Member Data Documentation

◆ activations_

std::vector<std::unique_ptr<Activation> > v8::internal::wasm::WasmInterpreterThread::activations_
private

Definition at line 563 of file wasm-interpreter.h.

◆ current_ref_stack_size_

size_t v8::internal::wasm::WasmInterpreterThread::current_ref_stack_size_
private

Definition at line 578 of file wasm-interpreter.h.

◆ current_stack_size_

uint32_t v8::internal::wasm::WasmInterpreterThread::current_stack_size_
private

Definition at line 560 of file wasm-interpreter.h.

◆ execution_timer_

WasmExecutionTimer v8::internal::wasm::WasmInterpreterThread::execution_timer_
private

Definition at line 580 of file wasm-interpreter.h.

◆ isolate_

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

Definition at line 553 of file wasm-interpreter.h.

◆ kInitialStackSize

uint32_t v8::internal::wasm::WasmInterpreterThread::kInitialStackSize = 1 * MB
staticconstexprprivate

Definition at line 557 of file wasm-interpreter.h.

◆ kMaxStackSize

uint32_t v8::internal::wasm::WasmInterpreterThread::kMaxStackSize = 32 * MB
staticconstexprprivate

Definition at line 559 of file wasm-interpreter.h.

◆ kStackSizeIncrement

uint32_t v8::internal::wasm::WasmInterpreterThread::kStackSizeIncrement = 1 * MB
staticconstexprprivate

Definition at line 558 of file wasm-interpreter.h.

◆ reference_stack_

Handle<FixedArray> v8::internal::wasm::WasmInterpreterThread::reference_stack_
private

Definition at line 577 of file wasm-interpreter.h.

◆ stack_mem_

void* v8::internal::wasm::WasmInterpreterThread::stack_mem_
private

Definition at line 561 of file wasm-interpreter.h.

◆ state_

State v8::internal::wasm::WasmInterpreterThread::state_
private

Definition at line 554 of file wasm-interpreter.h.

◆ thread_interpreter_map_s

WasmInterpreterThreadMap * v8::internal::wasm::WasmInterpreterThread::thread_interpreter_map_s
staticprivate
Initial value:
=
nullptr

Definition at line 551 of file wasm-interpreter.h.

◆ trap_reason_

TrapReason v8::internal::wasm::WasmInterpreterThread::trap_reason_
private

Definition at line 555 of file wasm-interpreter.h.


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