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

#include <baseline-compiler.h>

Collaboration diagram for v8::internal::baseline::BaselineCompiler:

Public Member Functions

 BaselineCompiler (LocalIsolate *local_isolate, Handle< SharedFunctionInfo > shared_function_info, Handle< BytecodeArray > bytecode)
 
void GenerateCode ()
 
MaybeHandle< CodeBuild ()
 

Static Public Member Functions

static int EstimateInstructionSize (Tagged< BytecodeArray > bytecode)
 

Private Types

enum  StackCheckBehavior { kEnableStackCheck , kDisableStackCheck }
 
enum class  MarkAsIndirectJumpTarget { kNo , kYes }
 

Private Member Functions

void Prologue ()
 
void PrologueFillFrame ()
 
void PrologueHandleOptimizationState (Register feedback_vector)
 
void PreVisitSingleBytecode ()
 
void VisitSingleBytecode ()
 
void VerifyFrame ()
 
void VerifyFrameSize ()
 
interpreter::Register RegisterOperand (int operand_index)
 
void LoadRegister (Register output, int operand_index)
 
void StoreRegister (int operand_index, Register value)
 
void StoreRegisterPair (int operand_index, Register val0, Register val1)
 
template<typename Type >
Handle< TypeConstant (int operand_index)
 
Tagged< SmiConstantSmi (int operand_index)
 
template<typename Type >
void LoadConstant (Register output, int operand_index)
 
uint32_t Uint (int operand_index)
 
int32_t Int (int operand_index)
 
uint32_t Index (int operand_index)
 
uint32_t Flag8 (int operand_index)
 
uint32_t Flag16 (int operand_index)
 
uint32_t RegisterCount (int operand_index)
 
Tagged< TaggedIndexIndexAsTagged (int operand_index)
 
Tagged< TaggedIndexUintAsTagged (int operand_index)
 
Tagged< SmiIndexAsSmi (int operand_index)
 
Tagged< SmiIntAsSmi (int operand_index)
 
Tagged< SmiUintAsSmi (int operand_index)
 
Tagged< SmiFlag8AsSmi (int operand_index)
 
Tagged< SmiFlag16AsSmi (int operand_index)
 
LabelNewLabel ()
 
LabelBuildForwardJumpLabel ()
 
void UpdateInterruptBudgetAndJumpToLabel (int weight, Label *label, Label *skip_interrupt_label, StackCheckBehavior stack_check_behavior)
 
void JumpIfRoot (RootIndex root)
 
void JumpIfNotRoot (RootIndex root)
 
MemOperand FeedbackVector ()
 
void LoadFeedbackVector (Register output)
 
void LoadClosureFeedbackArray (Register output)
 
void AddPosition ()
 
void SelectBooleanConstant (Register output, std::function< void(Label *, Label::Distance)> jump_func)
 
void JumpIfToBoolean (bool do_jump_if_true, Label *label, Label::Distance distance=Label::kFar)
 
template<Builtin kBuiltin, typename... Args>
void CallBuiltin (Args... args)
 
template<typename... Args>
void CallRuntime (Runtime::FunctionId function, Args... args)
 
template<Builtin kBuiltin, typename... Args>
void TailCallBuiltin (Args... args)
 
template<ConvertReceiverMode kMode, typename... Args>
void BuildCall (uint32_t slot, uint32_t arg_count, Args... args)
 
const interpreter::BytecodeArrayIteratoriterator ()
 
LabelEnsureLabel (int offset, MarkAsIndirectJumpTarget mark=MarkAsIndirectJumpTarget::kNo)
 
bool IsJumpTarget (int offset) const
 
bool IsIndirectJumpTarget (int offset) const
 
void MarkIndirectJumpTarget (int offset)
 

Private Attributes

LocalIsolatelocal_isolate_
 
RuntimeCallStatsstats_
 
Handle< SharedFunctionInfoshared_function_info_
 
Handle< HeapObjectinterpreter_data_
 
Handle< BytecodeArraybytecode_
 
Zone zone_
 
MacroAssembler masm_
 
BaselineAssembler basm_
 
interpreter::BytecodeArrayIterator iterator_
 
BytecodeOffsetTableBuilder bytecode_offset_table_builder_
 
Labellabels_
 
BitVector label_tags_
 

Detailed Description

Definition at line 50 of file baseline-compiler.h.

Member Enumeration Documentation

◆ MarkAsIndirectJumpTarget

Enumerator
kNo 
kYes 

Definition at line 174 of file baseline-compiler.h.

◆ StackCheckBehavior

Enumerator
kEnableStackCheck 
kDisableStackCheck 

Definition at line 102 of file baseline-compiler.h.

Constructor & Destructor Documentation

◆ BaselineCompiler()

v8::internal::baseline::BaselineCompiler::BaselineCompiler ( LocalIsolate * local_isolate,
Handle< SharedFunctionInfo > shared_function_info,
Handle< BytecodeArray > bytecode )
explicit

Definition at line 280 of file baseline-compiler.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AddPosition()

void v8::internal::baseline::BaselineCompiler::AddPosition ( )
private

Definition at line 464 of file baseline-compiler.cc.

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

◆ Build()

MaybeHandle< Code > v8::internal::baseline::BaselineCompiler::Build ( )

Definition at line 335 of file baseline-compiler.cc.

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

◆ BuildCall()

template<ConvertReceiverMode kMode, typename... Args>
void v8::internal::baseline::BaselineCompiler::BuildCall ( uint32_t slot,
uint32_t arg_count,
Args... args )
private

Definition at line 1286 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ BuildForwardJumpLabel()

Label * v8::internal::baseline::BaselineCompiler::BuildForwardJumpLabel ( )
private

Definition at line 613 of file baseline-compiler.cc.

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

◆ CallBuiltin()

template<Builtin kBuiltin, typename... Args>
void v8::internal::baseline::BaselineCompiler::CallBuiltin ( Args... args)
private

Definition at line 641 of file baseline-compiler.cc.

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

◆ CallRuntime()

template<typename... Args>
void v8::internal::baseline::BaselineCompiler::CallRuntime ( Runtime::FunctionId function,
Args... args )
private

Definition at line 668 of file baseline-compiler.cc.

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

◆ Constant()

template<typename Type >
Handle< Type > v8::internal::baseline::BaselineCompiler::Constant ( int operand_index)
private

Definition at line 387 of file baseline-compiler.cc.

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

◆ ConstantSmi()

Tagged< Smi > v8::internal::baseline::BaselineCompiler::ConstantSmi ( int operand_index)
private

Definition at line 391 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ EnsureLabel()

Label * v8::internal::baseline::BaselineCompiler::EnsureLabel ( int offset,
MarkAsIndirectJumpTarget mark = MarkAsIndirectJumpTarget::kNo )
inlineprivate

Definition at line 176 of file baseline-compiler.h.

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

◆ EstimateInstructionSize()

int v8::internal::baseline::BaselineCompiler::EstimateInstructionSize ( Tagged< BytecodeArray > bytecode)
static

Definition at line 357 of file baseline-compiler.cc.

Here is the caller graph for this function:

◆ FeedbackVector()

MemOperand v8::internal::baseline::BaselineCompiler::FeedbackVector ( )
private

Definition at line 438 of file baseline-compiler.cc.

◆ Flag16()

uint32_t v8::internal::baseline::BaselineCompiler::Flag16 ( int operand_index)
private

Definition at line 410 of file baseline-compiler.cc.

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

◆ Flag16AsSmi()

Tagged< Smi > v8::internal::baseline::BaselineCompiler::Flag16AsSmi ( int operand_index)
private

Definition at line 434 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ Flag8()

uint32_t v8::internal::baseline::BaselineCompiler::Flag8 ( int operand_index)
private

Definition at line 407 of file baseline-compiler.cc.

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

◆ Flag8AsSmi()

Tagged< Smi > v8::internal::baseline::BaselineCompiler::Flag8AsSmi ( int operand_index)
private

Definition at line 431 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ GenerateCode()

void v8::internal::baseline::BaselineCompiler::GenerateCode ( )

Definition at line 305 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ Index()

uint32_t v8::internal::baseline::BaselineCompiler::Index ( int operand_index)
private

Definition at line 404 of file baseline-compiler.cc.

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

◆ IndexAsSmi()

Tagged< Smi > v8::internal::baseline::BaselineCompiler::IndexAsSmi ( int operand_index)
private

Definition at line 422 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ IndexAsTagged()

Tagged< TaggedIndex > v8::internal::baseline::BaselineCompiler::IndexAsTagged ( int operand_index)
private

Definition at line 416 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ Int()

int32_t v8::internal::baseline::BaselineCompiler::Int ( int operand_index)
private

Definition at line 401 of file baseline-compiler.cc.

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

◆ IntAsSmi()

Tagged< Smi > v8::internal::baseline::BaselineCompiler::IntAsSmi ( int operand_index)
private

Definition at line 425 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ IsIndirectJumpTarget()

bool v8::internal::baseline::BaselineCompiler::IsIndirectJumpTarget ( int offset) const
inlineprivate

Definition at line 191 of file baseline-compiler.h.

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

◆ IsJumpTarget()

bool v8::internal::baseline::BaselineCompiler::IsJumpTarget ( int offset) const
inlineprivate

Definition at line 188 of file baseline-compiler.h.

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

◆ iterator()

const interpreter::BytecodeArrayIterator & v8::internal::baseline::BaselineCompiler::iterator ( )
inlineprivate

Definition at line 159 of file baseline-compiler.h.

Here is the caller graph for this function:

◆ JumpIfNotRoot()

void v8::internal::baseline::BaselineCompiler::JumpIfNotRoot ( RootIndex root)
private

Definition at line 605 of file baseline-compiler.cc.

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

◆ JumpIfRoot()

void v8::internal::baseline::BaselineCompiler::JumpIfRoot ( RootIndex root)
private

Definition at line 597 of file baseline-compiler.cc.

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

◆ JumpIfToBoolean()

void v8::internal::baseline::BaselineCompiler::JumpIfToBoolean ( bool do_jump_if_true,
Label * label,
Label::Distance distance = Label::kFar )
private

Definition at line 682 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ LoadClosureFeedbackArray()

void v8::internal::baseline::BaselineCompiler::LoadClosureFeedbackArray ( Register output)
private

Definition at line 447 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ LoadConstant()

template<typename Type >
void v8::internal::baseline::BaselineCompiler::LoadConstant ( Register output,
int operand_index )
private

Definition at line 395 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ LoadFeedbackVector()

void v8::internal::baseline::BaselineCompiler::LoadFeedbackVector ( Register output)
private

Definition at line 442 of file baseline-compiler.cc.

Here is the caller graph for this function:

◆ LoadRegister()

void v8::internal::baseline::BaselineCompiler::LoadRegister ( Register output,
int operand_index )
private

Definition at line 365 of file baseline-compiler.cc.

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

◆ MarkIndirectJumpTarget()

void v8::internal::baseline::BaselineCompiler::MarkIndirectJumpTarget ( int offset)
inlineprivate

Definition at line 194 of file baseline-compiler.h.

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

◆ NewLabel()

Label * v8::internal::baseline::BaselineCompiler::NewLabel ( )
private

◆ PreVisitSingleBytecode()

void v8::internal::baseline::BaselineCompiler::PreVisitSingleBytecode ( )
private

Definition at line 468 of file baseline-compiler.cc.

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

◆ Prologue()

void v8::internal::baseline::BaselineCompiler::Prologue ( )
private

Definition at line 22 of file baseline-compiler-arm-inl.h.

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

◆ PrologueFillFrame()

void v8::internal::baseline::BaselineCompiler::PrologueFillFrame ( )
private

Definition at line 34 of file baseline-compiler-arm-inl.h.

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

◆ PrologueHandleOptimizationState()

void v8::internal::baseline::BaselineCompiler::PrologueHandleOptimizationState ( Register feedback_vector)
private

◆ RegisterCount()

uint32_t v8::internal::baseline::BaselineCompiler::RegisterCount ( int operand_index)
private

Definition at line 413 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ RegisterOperand()

interpreter::Register v8::internal::baseline::BaselineCompiler::RegisterOperand ( int operand_index)
private

Definition at line 361 of file baseline-compiler.cc.

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

◆ SelectBooleanConstant()

void v8::internal::baseline::BaselineCompiler::SelectBooleanConstant ( Register output,
std::function< void(Label *, Label::Distance)> jump_func )
private

Definition at line 453 of file baseline-compiler.cc.

◆ StoreRegister()

void v8::internal::baseline::BaselineCompiler::StoreRegister ( int operand_index,
Register value )
private

Definition at line 369 of file baseline-compiler.cc.

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

◆ StoreRegisterPair()

void v8::internal::baseline::BaselineCompiler::StoreRegisterPair ( int operand_index,
Register val0,
Register val1 )
private

Definition at line 376 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ TailCallBuiltin()

template<Builtin kBuiltin, typename... Args>
void v8::internal::baseline::BaselineCompiler::TailCallBuiltin ( Args... args)
private

Definition at line 659 of file baseline-compiler.cc.

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

◆ Uint()

uint32_t v8::internal::baseline::BaselineCompiler::Uint ( int operand_index)
private

Definition at line 398 of file baseline-compiler.cc.

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

◆ UintAsSmi()

Tagged< Smi > v8::internal::baseline::BaselineCompiler::UintAsSmi ( int operand_index)
private

Definition at line 428 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ UintAsTagged()

Tagged< TaggedIndex > v8::internal::baseline::BaselineCompiler::UintAsTagged ( int operand_index)
private

Definition at line 419 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ UpdateInterruptBudgetAndJumpToLabel()

void v8::internal::baseline::BaselineCompiler::UpdateInterruptBudgetAndJumpToLabel ( int weight,
Label * label,
Label * skip_interrupt_label,
StackCheckBehavior stack_check_behavior )
private

Definition at line 581 of file baseline-compiler.cc.

Here is the call graph for this function:

◆ VerifyFrame()

void v8::internal::baseline::BaselineCompiler::VerifyFrame ( )
private

Definition at line 534 of file baseline-compiler.cc.

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

◆ VerifyFrameSize()

void v8::internal::baseline::BaselineCompiler::VerifyFrameSize ( )
private

Definition at line 87 of file baseline-compiler-arm-inl.h.

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

◆ VisitSingleBytecode()

void v8::internal::baseline::BaselineCompiler::VisitSingleBytecode ( )
private

Definition at line 479 of file baseline-compiler.cc.

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

Member Data Documentation

◆ basm_

BaselineAssembler v8::internal::baseline::BaselineCompiler::basm_
private

Definition at line 168 of file baseline-compiler.h.

◆ bytecode_

Handle<BytecodeArray> v8::internal::baseline::BaselineCompiler::bytecode_
private

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

◆ bytecode_offset_table_builder_

BytecodeOffsetTableBuilder v8::internal::baseline::BaselineCompiler::bytecode_offset_table_builder_
private

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

◆ interpreter_data_

Handle<HeapObject> v8::internal::baseline::BaselineCompiler::interpreter_data_
private

Definition at line 164 of file baseline-compiler.h.

◆ iterator_

interpreter::BytecodeArrayIterator v8::internal::baseline::BaselineCompiler::iterator_
private

Definition at line 169 of file baseline-compiler.h.

◆ label_tags_

BitVector v8::internal::baseline::BaselineCompiler::label_tags_
private

Definition at line 197 of file baseline-compiler.h.

◆ labels_

Label* v8::internal::baseline::BaselineCompiler::labels_
private

Definition at line 196 of file baseline-compiler.h.

◆ local_isolate_

LocalIsolate* v8::internal::baseline::BaselineCompiler::local_isolate_
private

Definition at line 161 of file baseline-compiler.h.

◆ masm_

MacroAssembler v8::internal::baseline::BaselineCompiler::masm_
private

Definition at line 167 of file baseline-compiler.h.

◆ shared_function_info_

Handle<SharedFunctionInfo> v8::internal::baseline::BaselineCompiler::shared_function_info_
private

Definition at line 163 of file baseline-compiler.h.

◆ stats_

RuntimeCallStats* v8::internal::baseline::BaselineCompiler::stats_
private

Definition at line 162 of file baseline-compiler.h.

◆ zone_

Zone v8::internal::baseline::BaselineCompiler::zone_
private

Definition at line 166 of file baseline-compiler.h.


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