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

#include <wasm-interpreter.h>

Collaboration diagram for v8::internal::wasm::WasmBytecode:

Public Member Functions

 WasmBytecode (int func_index, const uint8_t *code_data, size_t code_length, uint32_t stack_frame_size, const FunctionSig *signature, const CanonicalSig *canonical_signature, const InterpreterCode *interpreter_code, size_t blocks_count, const uint8_t *const_slots_data, size_t const_slots_length, uint32_t ref_slots_count, const WasmEHData &&eh_data, const std::map< CodeOffset, pc_t > &&code_pc_map)
 
const uint8_t * GetCode () const
 
size_t GetCodeSize () const
 
bool InitializeSlots (uint8_t *sp, size_t stack_space) const
 
pc_t GetPcFromTrapCode (const uint8_t *current_code) const
 
int GetFunctionIndex () const
 
uint32_t GetBlocksCount () const
 
const FunctionSigGetFunctionSignature () const
 
const CanonicalSigGetCanonicalFunctionSignature () const
 
ValueType return_type (size_t index) const
 
ValueType arg_type (size_t index) const
 
ValueType local_type (size_t index) const
 
uint32_t args_count () const
 
uint32_t args_slots_size () const
 
uint32_t return_count () const
 
uint32_t rets_slots_size () const
 
uint32_t locals_count () const
 
uint32_t locals_slots_size () const
 
uint32_t const_slots_size_in_bytes () const
 
uint32_t ref_args_count () const
 
uint32_t ref_rets_count () const
 
uint32_t ref_locals_count () const
 
uint32_t ref_slots_count () const
 
uint32_t internal_ref_slots_count () const
 
uint32_t frame_size ()
 
const WasmEHData::TryBlockGetTryBlock (CodeOffset code_offset) const
 
const WasmEHData::TryBlockGetParentTryBlock (const WasmEHData::TryBlock *try_block) const
 
WasmEHData::ExceptionPayloadSlotOffsets GetExceptionPayloadStartSlotOffsets (WasmEHData::BlockIndex catch_block_index) const
 
DirectHandle< ObjectGetCaughtException (Isolate *isolate, uint32_t catch_block_index) const
 

Static Public Member Functions

static uint32_t ArgsSizeInSlots (const FunctionSig *sig)
 
static uint32_t RetsSizeInSlots (const FunctionSig *sig)
 
static uint32_t RefArgsCount (const FunctionSig *sig)
 
static uint32_t RefRetsCount (const FunctionSig *sig)
 
static bool ContainsSimd (const FunctionSig *sig)
 
static bool HasRefOrSimdArgs (const FunctionSig *sig)
 
static uint32_t JSToWasmWrapperPackedArraySize (const FunctionSig *sig)
 
static uint32_t RefLocalsCount (const InterpreterCode *wasm_code)
 
static uint32_t LocalsSizeInSlots (const InterpreterCode *wasm_code)
 

Private Attributes

std::vector< uint8_t > code_
 
const uint8_t * code_bytes_
 
const FunctionSigsignature_
 
const CanonicalSigcanonical_signature_
 
const InterpreterCodeinterpreter_code_
 
std::vector< uint8_t > const_slots_values_
 
int func_index_
 
uint32_t blocks_count_
 
uint32_t args_count_
 
uint32_t args_slots_size_
 
uint32_t return_count_
 
uint32_t rets_slots_size_
 
uint32_t locals_count_
 
uint32_t locals_slots_size_
 
uint32_t total_frame_size_in_bytes_
 
uint32_t ref_args_count_
 
uint32_t ref_rets_count_
 
uint32_t ref_locals_count_
 
uint32_t ref_slots_count_
 
WasmEHData eh_data_
 
std::map< CodeOffset, pc_tcode_pc_map_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ WasmBytecode()

v8::internal::wasm::WasmBytecode::WasmBytecode ( int func_index,
const uint8_t * code_data,
size_t code_length,
uint32_t stack_frame_size,
const FunctionSig * signature,
const CanonicalSig * canonical_signature,
const InterpreterCode * interpreter_code,
size_t blocks_count,
const uint8_t * const_slots_data,
size_t const_slots_length,
uint32_t ref_slots_count,
const WasmEHData && eh_data,
const std::map< CodeOffset, pc_t > && code_pc_map )

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

Member Function Documentation

◆ arg_type()

ValueType v8::internal::wasm::WasmBytecode::arg_type ( size_t index) const
inline

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

Here is the caller graph for this function:

◆ args_count()

uint32_t v8::internal::wasm::WasmBytecode::args_count ( ) const
inline

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

Here is the caller graph for this function:

◆ args_slots_size()

uint32_t v8::internal::wasm::WasmBytecode::args_slots_size ( ) const
inline

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

◆ ArgsSizeInSlots()

uint32_t v8::internal::wasm::WasmBytecode::ArgsSizeInSlots ( const FunctionSig * sig)
inlinestatic

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

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

◆ const_slots_size_in_bytes()

uint32_t v8::internal::wasm::WasmBytecode::const_slots_size_in_bytes ( ) const
inline

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

Here is the caller graph for this function:

◆ ContainsSimd()

bool v8::internal::wasm::WasmBytecode::ContainsSimd ( const FunctionSig * sig)
inlinestatic

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

Here is the caller graph for this function:

◆ frame_size()

uint32_t v8::internal::wasm::WasmBytecode::frame_size ( )
inline

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

Here is the caller graph for this function:

◆ GetBlocksCount()

uint32_t v8::internal::wasm::WasmBytecode::GetBlocksCount ( ) const
inline

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

◆ GetCanonicalFunctionSignature()

const CanonicalSig * v8::internal::wasm::WasmBytecode::GetCanonicalFunctionSignature ( ) const
inline

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

Here is the caller graph for this function:

◆ GetCaughtException()

DirectHandle< Object > v8::internal::wasm::WasmBytecode::GetCaughtException ( Isolate * isolate,
uint32_t catch_block_index ) const
inline

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

Here is the call graph for this function:

◆ GetCode()

const uint8_t * v8::internal::wasm::WasmBytecode::GetCode ( ) const
inline

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

Here is the caller graph for this function:

◆ GetCodeSize()

size_t v8::internal::wasm::WasmBytecode::GetCodeSize ( ) const
inline

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

◆ GetExceptionPayloadStartSlotOffsets()

WasmEHData::ExceptionPayloadSlotOffsets v8::internal::wasm::WasmBytecode::GetExceptionPayloadStartSlotOffsets ( WasmEHData::BlockIndex catch_block_index) const
inline

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

Here is the call graph for this function:

◆ GetFunctionIndex()

int v8::internal::wasm::WasmBytecode::GetFunctionIndex ( ) const
inline

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

◆ GetFunctionSignature()

const FunctionSig * v8::internal::wasm::WasmBytecode::GetFunctionSignature ( ) const
inline

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

Here is the caller graph for this function:

◆ GetParentTryBlock()

const WasmEHData::TryBlock * v8::internal::wasm::WasmBytecode::GetParentTryBlock ( const WasmEHData::TryBlock * try_block) const
inline

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

Here is the call graph for this function:

◆ GetPcFromTrapCode()

pc_t v8::internal::wasm::WasmBytecode::GetPcFromTrapCode ( const uint8_t * current_code) const

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

◆ GetTryBlock()

const WasmEHData::TryBlock * v8::internal::wasm::WasmBytecode::GetTryBlock ( CodeOffset code_offset) const
inline

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

Here is the call graph for this function:

◆ HasRefOrSimdArgs()

bool v8::internal::wasm::WasmBytecode::HasRefOrSimdArgs ( const FunctionSig * sig)
inlinestatic

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

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

◆ InitializeSlots()

bool v8::internal::wasm::WasmBytecode::InitializeSlots ( uint8_t * sp,
size_t stack_space ) const
inline

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

Here is the caller graph for this function:

◆ internal_ref_slots_count()

uint32_t v8::internal::wasm::WasmBytecode::internal_ref_slots_count ( ) const
inline

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

◆ JSToWasmWrapperPackedArraySize()

uint32_t v8::internal::wasm::WasmBytecode::JSToWasmWrapperPackedArraySize ( const FunctionSig * sig)
inlinestatic

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

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

◆ local_type()

ValueType v8::internal::wasm::WasmBytecode::local_type ( size_t index) const
inline

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

Here is the caller graph for this function:

◆ locals_count()

uint32_t v8::internal::wasm::WasmBytecode::locals_count ( ) const
inline

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

Here is the caller graph for this function:

◆ locals_slots_size()

uint32_t v8::internal::wasm::WasmBytecode::locals_slots_size ( ) const
inline

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

◆ LocalsSizeInSlots()

uint32_t v8::internal::wasm::WasmBytecode::LocalsSizeInSlots ( const InterpreterCode * wasm_code)
inlinestatic

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

Here is the call graph for this function:

◆ ref_args_count()

uint32_t v8::internal::wasm::WasmBytecode::ref_args_count ( ) const
inline

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

Here is the caller graph for this function:

◆ ref_locals_count()

uint32_t v8::internal::wasm::WasmBytecode::ref_locals_count ( ) const
inline

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

Here is the caller graph for this function:

◆ ref_rets_count()

uint32_t v8::internal::wasm::WasmBytecode::ref_rets_count ( ) const
inline

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

Here is the caller graph for this function:

◆ ref_slots_count()

uint32_t v8::internal::wasm::WasmBytecode::ref_slots_count ( ) const
inline

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

Here is the caller graph for this function:

◆ RefArgsCount()

uint32_t v8::internal::wasm::WasmBytecode::RefArgsCount ( const FunctionSig * sig)
inlinestatic

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

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

◆ RefLocalsCount()

uint32_t v8::internal::wasm::WasmBytecode::RefLocalsCount ( const InterpreterCode * wasm_code)
inlinestatic

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

Here is the call graph for this function:

◆ RefRetsCount()

uint32_t v8::internal::wasm::WasmBytecode::RefRetsCount ( const FunctionSig * sig)
inlinestatic

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

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

◆ rets_slots_size()

uint32_t v8::internal::wasm::WasmBytecode::rets_slots_size ( ) const
inline

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

Here is the caller graph for this function:

◆ RetsSizeInSlots()

uint32_t v8::internal::wasm::WasmBytecode::RetsSizeInSlots ( const FunctionSig * sig)
inlinestatic

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

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

◆ return_count()

uint32_t v8::internal::wasm::WasmBytecode::return_count ( ) const
inline

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

Here is the caller graph for this function:

◆ return_type()

ValueType v8::internal::wasm::WasmBytecode::return_type ( size_t index) const
inline

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

Here is the caller graph for this function:

Member Data Documentation

◆ args_count_

uint32_t v8::internal::wasm::WasmBytecode::args_count_
private

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

◆ args_slots_size_

uint32_t v8::internal::wasm::WasmBytecode::args_slots_size_
private

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

◆ blocks_count_

uint32_t v8::internal::wasm::WasmBytecode::blocks_count_
private

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

◆ canonical_signature_

const CanonicalSig* v8::internal::wasm::WasmBytecode::canonical_signature_
private

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

◆ code_

std::vector<uint8_t> v8::internal::wasm::WasmBytecode::code_
private

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

◆ code_bytes_

const uint8_t* v8::internal::wasm::WasmBytecode::code_bytes_
private

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

◆ code_pc_map_

std::map<CodeOffset, pc_t> v8::internal::wasm::WasmBytecode::code_pc_map_
private

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

◆ const_slots_values_

std::vector<uint8_t> v8::internal::wasm::WasmBytecode::const_slots_values_
private

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

◆ eh_data_

WasmEHData v8::internal::wasm::WasmBytecode::eh_data_
private

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

◆ func_index_

int v8::internal::wasm::WasmBytecode::func_index_
private

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

◆ interpreter_code_

const InterpreterCode* v8::internal::wasm::WasmBytecode::interpreter_code_
private

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

◆ locals_count_

uint32_t v8::internal::wasm::WasmBytecode::locals_count_
private

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

◆ locals_slots_size_

uint32_t v8::internal::wasm::WasmBytecode::locals_slots_size_
private

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

◆ ref_args_count_

uint32_t v8::internal::wasm::WasmBytecode::ref_args_count_
private

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

◆ ref_locals_count_

uint32_t v8::internal::wasm::WasmBytecode::ref_locals_count_
private

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

◆ ref_rets_count_

uint32_t v8::internal::wasm::WasmBytecode::ref_rets_count_
private

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

◆ ref_slots_count_

uint32_t v8::internal::wasm::WasmBytecode::ref_slots_count_
private

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

◆ rets_slots_size_

uint32_t v8::internal::wasm::WasmBytecode::rets_slots_size_
private

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

◆ return_count_

uint32_t v8::internal::wasm::WasmBytecode::return_count_
private

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

◆ signature_

const FunctionSig* v8::internal::wasm::WasmBytecode::signature_
private

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

◆ total_frame_size_in_bytes_

uint32_t v8::internal::wasm::WasmBytecode::total_frame_size_in_bytes_
private

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


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