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

#include <bytecode-array-writer.h>

Collaboration diagram for v8::internal::interpreter::BytecodeArrayWriter:

Public Member Functions

 BytecodeArrayWriter (Zone *zone, ConstantArrayBuilder *constant_array_builder, SourcePositionTableBuilder::RecordingMode source_position_mode)
 
 BytecodeArrayWriter (const BytecodeArrayWriter &)=delete
 
BytecodeArrayWriteroperator= (const BytecodeArrayWriter &)=delete
 
void Write (BytecodeNode *node)
 
void WriteJump (BytecodeNode *node, BytecodeLabel *label)
 
void WriteJumpLoop (BytecodeNode *node, BytecodeLoopHeader *loop_header)
 
void WriteSwitch (BytecodeNode *node, BytecodeJumpTable *jump_table)
 
void BindLabel (BytecodeLabel *label)
 
void BindLoopHeader (BytecodeLoopHeader *loop_header)
 
void BindJumpTableEntry (BytecodeJumpTable *jump_table, int case_value)
 
void BindHandlerTarget (HandlerTableBuilder *handler_table_builder, int handler_id)
 
void BindTryRegionStart (HandlerTableBuilder *handler_table_builder, int handler_id)
 
void BindTryRegionEnd (HandlerTableBuilder *handler_table_builder, int handler_id)
 
void SetFunctionEntrySourcePosition (int position)
 
template<typename IsolateT >
Handle< BytecodeArrayToBytecodeArray (IsolateT *isolate, int register_count, uint16_t parameter_count, uint16_t max_arguments, DirectHandle< TrustedByteArray > handler_table)
 
template<typename IsolateT >
DirectHandle< TrustedByteArrayToSourcePositionTable (IsolateT *isolate)
 
bool RemainderOfBlockIsDead () const
 

Private Member Functions

void PatchJump (size_t jump_target, size_t jump_location)
 
void PatchJumpWith8BitOperand (size_t jump_location, int delta)
 
void PatchJumpWith16BitOperand (size_t jump_location, int delta)
 
void PatchJumpWith32BitOperand (size_t jump_location, int delta)
 
void EmitBytecode (const BytecodeNode *const node)
 
void EmitJump (BytecodeNode *node, BytecodeLabel *label)
 
void EmitJumpLoop (BytecodeNode *node, BytecodeLoopHeader *loop_header)
 
void EmitSwitch (BytecodeNode *node, BytecodeJumpTable *jump_table)
 
void UpdateSourcePositionTable (const BytecodeNode *const node)
 
void UpdateExitSeenInBlock (Bytecode bytecode)
 
void MaybeElideLastBytecode (Bytecode next_bytecode, bool has_source_info)
 
void InvalidateLastBytecode ()
 
void StartBasicBlock ()
 
ZoneVector< uint8_t > * bytecodes ()
 
SourcePositionTableBuildersource_position_table_builder ()
 
ConstantArrayBuilderconstant_array_builder ()
 

Private Attributes

const uint32_t k8BitJumpPlaceholder = 0x7f
 
const uint32_t k16BitJumpPlaceholder
 
const uint32_t k32BitJumpPlaceholder
 
ZoneVector< uint8_t > bytecodes_
 
int unbound_jumps_
 
SourcePositionTableBuilder source_position_table_builder_
 
ConstantArrayBuilderconstant_array_builder_
 
Bytecode last_bytecode_
 
size_t last_bytecode_offset_
 
bool last_bytecode_had_source_info_
 
bool elide_noneffectful_bytecodes_
 
bool exit_seen_in_block_
 

Static Private Attributes

static const size_t kMaxSizeOfPackedBytecode
 

Friends

class bytecode_array_writer_unittest::BytecodeArrayWriterUnittest
 

Detailed Description

Definition at line 34 of file bytecode-array-writer.h.

Constructor & Destructor Documentation

◆ BytecodeArrayWriter() [1/2]

v8::internal::interpreter::BytecodeArrayWriter::BytecodeArrayWriter ( Zone * zone,
ConstantArrayBuilder * constant_array_builder,
SourcePositionTableBuilder::RecordingMode source_position_mode )

Definition at line 24 of file bytecode-array-writer.cc.

Here is the call graph for this function:

◆ BytecodeArrayWriter() [2/2]

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

Member Function Documentation

◆ BindHandlerTarget()

void v8::internal::interpreter::BytecodeArrayWriter::BindHandlerTarget ( HandlerTableBuilder * handler_table_builder,
int handler_id )

Definition at line 186 of file bytecode-array-writer.cc.

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

◆ BindJumpTableEntry()

void v8::internal::interpreter::BytecodeArrayWriter::BindJumpTableEntry ( BytecodeJumpTable * jump_table,
int case_value )

Definition at line 171 of file bytecode-array-writer.cc.

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

◆ BindLabel()

void v8::internal::interpreter::BytecodeArrayWriter::BindLabel ( BytecodeLabel * label)

Definition at line 154 of file bytecode-array-writer.cc.

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

◆ BindLoopHeader()

void v8::internal::interpreter::BytecodeArrayWriter::BindLoopHeader ( BytecodeLoopHeader * loop_header)

Definition at line 163 of file bytecode-array-writer.cc.

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

◆ BindTryRegionEnd()

void v8::internal::interpreter::BytecodeArrayWriter::BindTryRegionEnd ( HandlerTableBuilder * handler_table_builder,
int handler_id )

Definition at line 202 of file bytecode-array-writer.cc.

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

◆ BindTryRegionStart()

void v8::internal::interpreter::BytecodeArrayWriter::BindTryRegionStart ( HandlerTableBuilder * handler_table_builder,
int handler_id )

Definition at line 193 of file bytecode-array-writer.cc.

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

◆ bytecodes()

ZoneVector< uint8_t > * v8::internal::interpreter::BytecodeArrayWriter::bytecodes ( )
inlineprivate

Definition at line 110 of file bytecode-array-writer.h.

Here is the caller graph for this function:

◆ constant_array_builder()

ConstantArrayBuilder * v8::internal::interpreter::BytecodeArrayWriter::constant_array_builder ( )
inlineprivate

Definition at line 114 of file bytecode-array-writer.h.

Here is the caller graph for this function:

◆ EmitBytecode()

void v8::internal::interpreter::BytecodeArrayWriter::EmitBytecode ( const BytecodeNode *const node)
private

Definition at line 276 of file bytecode-array-writer.cc.

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

◆ EmitJump()

void v8::internal::interpreter::BytecodeArrayWriter::EmitJump ( BytecodeNode * node,
BytecodeLabel * label )
private

Definition at line 500 of file bytecode-array-writer.cc.

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

◆ EmitJumpLoop()

void v8::internal::interpreter::BytecodeArrayWriter::EmitJumpLoop ( BytecodeNode * node,
BytecodeLoopHeader * loop_header )
private

Definition at line 462 of file bytecode-array-writer.cc.

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

◆ EmitSwitch()

void v8::internal::interpreter::BytecodeArrayWriter::EmitSwitch ( BytecodeNode * node,
BytecodeJumpTable * jump_table )
private

Definition at line 534 of file bytecode-array-writer.cc.

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

◆ InvalidateLastBytecode()

void v8::internal::interpreter::BytecodeArrayWriter::InvalidateLastBytecode ( )
private

Definition at line 272 of file bytecode-array-writer.cc.

Here is the caller graph for this function:

◆ MaybeElideLastBytecode()

void v8::internal::interpreter::BytecodeArrayWriter::MaybeElideLastBytecode ( Bytecode next_bytecode,
bool has_source_info )
private

Definition at line 250 of file bytecode-array-writer.cc.

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

◆ operator=()

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

◆ PatchJump()

void v8::internal::interpreter::BytecodeArrayWriter::PatchJump ( size_t jump_target,
size_t jump_location )
private

Definition at line 430 of file bytecode-array-writer.cc.

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

◆ PatchJumpWith16BitOperand()

void v8::internal::interpreter::BytecodeArrayWriter::PatchJumpWith16BitOperand ( size_t jump_location,
int delta )
private

Definition at line 379 of file bytecode-array-writer.cc.

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

◆ PatchJumpWith32BitOperand()

void v8::internal::interpreter::BytecodeArrayWriter::PatchJumpWith32BitOperand ( size_t jump_location,
int delta )
private

Definition at line 411 of file bytecode-array-writer.cc.

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

◆ PatchJumpWith8BitOperand()

void v8::internal::interpreter::BytecodeArrayWriter::PatchJumpWith8BitOperand ( size_t jump_location,
int delta )
private

Definition at line 351 of file bytecode-array-writer.cc.

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

◆ RemainderOfBlockIsDead()

bool v8::internal::interpreter::BytecodeArrayWriter::RemainderOfBlockIsDead ( ) const
inline

Definition at line 73 of file bytecode-array-writer.h.

◆ SetFunctionEntrySourcePosition()

void v8::internal::interpreter::BytecodeArrayWriter::SetFunctionEntrySourcePosition ( int position)

Definition at line 211 of file bytecode-array-writer.cc.

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

◆ source_position_table_builder()

SourcePositionTableBuilder * v8::internal::interpreter::BytecodeArrayWriter::source_position_table_builder ( )
inlineprivate

Definition at line 111 of file bytecode-array-writer.h.

Here is the caller graph for this function:

◆ StartBasicBlock()

void v8::internal::interpreter::BytecodeArrayWriter::StartBasicBlock ( )
private

Definition at line 217 of file bytecode-array-writer.cc.

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

◆ ToBytecodeArray()

template<typename IsolateT >
Handle< BytecodeArray > v8::internal::interpreter::BytecodeArrayWriter::ToBytecodeArray ( IsolateT * isolate,
int register_count,
uint16_t parameter_count,
uint16_t max_arguments,
DirectHandle< TrustedByteArray > handler_table )

Definition at line 41 of file bytecode-array-writer.cc.

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

◆ ToSourcePositionTable()

template<typename IsolateT >
DirectHandle< TrustedByteArray > v8::internal::interpreter::BytecodeArrayWriter::ToSourcePositionTable ( IsolateT * isolate)

◆ UpdateExitSeenInBlock()

void v8::internal::interpreter::BytecodeArrayWriter::UpdateExitSeenInBlock ( Bytecode bytecode)
private

Definition at line 233 of file bytecode-array-writer.cc.

Here is the caller graph for this function:

◆ UpdateSourcePositionTable()

void v8::internal::interpreter::BytecodeArrayWriter::UpdateSourcePositionTable ( const BytecodeNode *const node)
private

Definition at line 222 of file bytecode-array-writer.cc.

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

◆ Write()

void v8::internal::interpreter::BytecodeArrayWriter::Write ( BytecodeNode * node)
Here is the caller graph for this function:

◆ WriteJump()

void v8::internal::interpreter::BytecodeArrayWriter::WriteJump ( BytecodeNode * node,
BytecodeLabel * label )

Definition at line 119 of file bytecode-array-writer.cc.

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

◆ WriteJumpLoop()

void v8::internal::interpreter::BytecodeArrayWriter::WriteJumpLoop ( BytecodeNode * node,
BytecodeLoopHeader * loop_header )

Definition at line 130 of file bytecode-array-writer.cc.

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

◆ WriteSwitch()

void v8::internal::interpreter::BytecodeArrayWriter::WriteSwitch ( BytecodeNode * node,
BytecodeJumpTable * jump_table )

Definition at line 142 of file bytecode-array-writer.cc.

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

Friends And Related Symbol Documentation

◆ bytecode_array_writer_unittest::BytecodeArrayWriterUnittest

friend class bytecode_array_writer_unittest::BytecodeArrayWriterUnittest
friend

Definition at line 130 of file bytecode-array-writer.h.

Member Data Documentation

◆ bytecodes_

ZoneVector<uint8_t> v8::internal::interpreter::BytecodeArrayWriter::bytecodes_
private

Definition at line 118 of file bytecode-array-writer.h.

◆ constant_array_builder_

ConstantArrayBuilder* v8::internal::interpreter::BytecodeArrayWriter::constant_array_builder_
private

Definition at line 121 of file bytecode-array-writer.h.

◆ elide_noneffectful_bytecodes_

bool v8::internal::interpreter::BytecodeArrayWriter::elide_noneffectful_bytecodes_
private

Definition at line 126 of file bytecode-array-writer.h.

◆ exit_seen_in_block_

bool v8::internal::interpreter::BytecodeArrayWriter::exit_seen_in_block_
private

Definition at line 128 of file bytecode-array-writer.h.

◆ k16BitJumpPlaceholder

const uint32_t v8::internal::interpreter::BytecodeArrayWriter::k16BitJumpPlaceholder
private

◆ k32BitJumpPlaceholder

const uint32_t v8::internal::interpreter::BytecodeArrayWriter::k32BitJumpPlaceholder
private

◆ k8BitJumpPlaceholder

const uint32_t v8::internal::interpreter::BytecodeArrayWriter::k8BitJumpPlaceholder = 0x7f
private

Definition at line 86 of file bytecode-array-writer.h.

◆ kMaxSizeOfPackedBytecode

STATIC_CONST_MEMBER_DEFINITION const size_t v8::internal::interpreter::BytecodeArrayWriter::kMaxSizeOfPackedBytecode
staticprivate
Initial value:

Definition at line 79 of file bytecode-array-writer.h.

◆ last_bytecode_

Bytecode v8::internal::interpreter::BytecodeArrayWriter::last_bytecode_
private

Definition at line 123 of file bytecode-array-writer.h.

◆ last_bytecode_had_source_info_

bool v8::internal::interpreter::BytecodeArrayWriter::last_bytecode_had_source_info_
private

Definition at line 125 of file bytecode-array-writer.h.

◆ last_bytecode_offset_

size_t v8::internal::interpreter::BytecodeArrayWriter::last_bytecode_offset_
private

Definition at line 124 of file bytecode-array-writer.h.

◆ source_position_table_builder_

SourcePositionTableBuilder v8::internal::interpreter::BytecodeArrayWriter::source_position_table_builder_
private

Definition at line 120 of file bytecode-array-writer.h.

◆ unbound_jumps_

int v8::internal::interpreter::BytecodeArrayWriter::unbound_jumps_
private

Definition at line 119 of file bytecode-array-writer.h.


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