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

#include <interpreter.h>

Collaboration diagram for v8::internal::interpreter::Interpreter:

Public Member Functions

 Interpreter (Isolate *isolate)
 
virtual ~Interpreter ()=default
 
 Interpreter (const Interpreter &)=delete
 
Interpreteroperator= (const Interpreter &)=delete
 
V8_EXPORT_PRIVATE Tagged< CodeGetBytecodeHandler (Bytecode bytecode, OperandScale operand_scale)
 
void SetBytecodeHandler (Bytecode bytecode, OperandScale operand_scale, Tagged< Code > handler)
 
V8_EXPORT_PRIVATE DirectHandle< JSObjectGetDispatchCountersObject ()
 
void ForEachBytecode (const std::function< void(Bytecode, OperandScale)> &f)
 
void Initialize ()
 
bool IsDispatchTableInitialized () const
 
Address dispatch_table_address ()
 
Address bytecode_dispatch_counters_table ()
 
Address address_of_interpreter_entry_trampoline_instruction_start () const
 

Static Public Member Functions

static std::unique_ptr< UnoptimizedCompilationJobNewCompilationJob (ParseInfo *parse_info, FunctionLiteral *literal, Handle< Script > script, AccountingAllocator *allocator, std::vector< FunctionLiteral * > *eager_inner_literals, LocalIsolate *local_isolate)
 
static std::unique_ptr< UnoptimizedCompilationJobNewSourcePositionCollectionJob (ParseInfo *parse_info, FunctionLiteral *literal, Handle< BytecodeArray > existing_bytecode, AccountingAllocator *allocator, LocalIsolate *local_isolate)
 

Private Member Functions

V8_EXPORT_PRIVATE void InitDispatchCounters ()
 
V8_EXPORT_PRIVATE uintptr_t GetDispatchCounter (Bytecode from, Bytecode to) const
 

Static Private Member Functions

static size_t GetDispatchTableIndex (Bytecode bytecode, OperandScale operand_scale)
 

Private Attributes

Isolateisolate_
 
Address dispatch_table_ [kDispatchTableSize]
 
std::unique_ptr< uintptr_t[]> bytecode_dispatch_counters_table_
 
Address interpreter_entry_trampoline_instruction_start_
 

Static Private Attributes

static const int kNumberOfWideVariants = BytecodeOperands::kOperandScaleCount
 
static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1)
 
static const int kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1
 

Friends

class SetupInterpreter
 
class v8::internal::SetupIsolateDelegate
 
class v8::internal::IgnitionStatisticsTester
 

Detailed Description

Definition at line 38 of file interpreter.h.

Constructor & Destructor Documentation

◆ Interpreter() [1/2]

v8::internal::interpreter::Interpreter::Interpreter ( Isolate * isolate)
explicit

Definition at line 65 of file interpreter.cc.

Here is the call graph for this function:

◆ ~Interpreter()

virtual v8::internal::interpreter::Interpreter::~Interpreter ( )
virtualdefault

◆ Interpreter() [2/2]

v8::internal::interpreter::Interpreter::Interpreter ( const Interpreter & )
delete

Member Function Documentation

◆ address_of_interpreter_entry_trampoline_instruction_start()

Address v8::internal::interpreter::Interpreter::address_of_interpreter_entry_trampoline_instruction_start ( ) const
inline

Definition at line 88 of file interpreter.h.

◆ bytecode_dispatch_counters_table()

Address v8::internal::interpreter::Interpreter::bytecode_dispatch_counters_table ( )
inline

Definition at line 84 of file interpreter.h.

◆ dispatch_table_address()

Address v8::internal::interpreter::Interpreter::dispatch_table_address ( )
inline

Definition at line 80 of file interpreter.h.

◆ ForEachBytecode()

void v8::internal::interpreter::Interpreter::ForEachBytecode ( const std::function< void(Bytecode, OperandScale)> & f)

Definition at line 329 of file interpreter.cc.

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

◆ GetBytecodeHandler()

Tagged< Code > v8::internal::interpreter::Interpreter::GetBytecodeHandler ( Bytecode bytecode,
OperandScale operand_scale )

Definition at line 114 of file interpreter.cc.

Here is the call graph for this function:

◆ GetDispatchCounter()

uintptr_t v8::internal::interpreter::Interpreter::GetDispatchCounter ( Bytecode from,
Bytecode to ) const
private

Definition at line 379 of file interpreter.cc.

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

◆ GetDispatchCountersObject()

DirectHandle< JSObject > v8::internal::interpreter::Interpreter::GetDispatchCountersObject ( )

Definition at line 389 of file interpreter.cc.

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

◆ GetDispatchTableIndex()

size_t v8::internal::interpreter::Interpreter::GetDispatchTableIndex ( Bytecode bytecode,
OperandScale operand_scale )
staticprivate

Definition at line 130 of file interpreter.cc.

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

◆ InitDispatchCounters()

void v8::internal::interpreter::Interpreter::InitDispatchCounters ( )
private

Definition at line 75 of file interpreter.cc.

Here is the caller graph for this function:

◆ Initialize()

void v8::internal::interpreter::Interpreter::Initialize ( )

Definition at line 344 of file interpreter.cc.

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

◆ IsDispatchTableInitialized()

bool v8::internal::interpreter::Interpreter::IsDispatchTableInitialized ( ) const

Definition at line 375 of file interpreter.cc.

Here is the caller graph for this function:

◆ NewCompilationJob()

std::unique_ptr< UnoptimizedCompilationJob > v8::internal::interpreter::Interpreter::NewCompilationJob ( ParseInfo * parse_info,
FunctionLiteral * literal,
Handle< Script > script,
AccountingAllocator * allocator,
std::vector< FunctionLiteral * > * eager_inner_literals,
LocalIsolate * local_isolate )
static

Definition at line 308 of file interpreter.cc.

◆ NewSourcePositionCollectionJob()

std::unique_ptr< UnoptimizedCompilationJob > v8::internal::interpreter::Interpreter::NewSourcePositionCollectionJob ( ParseInfo * parse_info,
FunctionLiteral * literal,
Handle< BytecodeArray > existing_bytecode,
AccountingAllocator * allocator,
LocalIsolate * local_isolate )
static

Definition at line 319 of file interpreter.cc.

Here is the caller graph for this function:

◆ operator=()

Interpreter & v8::internal::interpreter::Interpreter::operator= ( const Interpreter & )
delete

◆ SetBytecodeHandler()

void v8::internal::interpreter::Interpreter::SetBytecodeHandler ( Bytecode bytecode,
OperandScale operand_scale,
Tagged< Code > handler )

Definition at line 120 of file interpreter.cc.

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

Friends And Related Symbol Documentation

◆ SetupInterpreter

friend class SetupInterpreter
friend

Definition at line 94 of file interpreter.h.

◆ v8::internal::IgnitionStatisticsTester

friend class v8::internal::IgnitionStatisticsTester
friend

Definition at line 96 of file interpreter.h.

◆ v8::internal::SetupIsolateDelegate

Definition at line 95 of file interpreter.h.

Member Data Documentation

◆ bytecode_dispatch_counters_table_

std::unique_ptr<uintptr_t[]> v8::internal::interpreter::Interpreter::bytecode_dispatch_counters_table_
private

Definition at line 112 of file interpreter.h.

◆ dispatch_table_

Address v8::internal::interpreter::Interpreter::dispatch_table_[kDispatchTableSize]
private

Definition at line 111 of file interpreter.h.

◆ interpreter_entry_trampoline_instruction_start_

Address v8::internal::interpreter::Interpreter::interpreter_entry_trampoline_instruction_start_
private

Definition at line 113 of file interpreter.h.

◆ isolate_

Isolate* v8::internal::interpreter::Interpreter::isolate_
private

Definition at line 110 of file interpreter.h.

◆ kDispatchTableSize

const int v8::internal::interpreter::Interpreter::kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1)
staticprivate

Definition at line 107 of file interpreter.h.

◆ kNumberOfBytecodes

const int v8::internal::interpreter::Interpreter::kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1
staticprivate

Definition at line 108 of file interpreter.h.

◆ kNumberOfWideVariants

const int v8::internal::interpreter::Interpreter::kNumberOfWideVariants = BytecodeOperands::kOperandScaleCount
staticprivate

Definition at line 106 of file interpreter.h.


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