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

#include <instruction.h>

Collaboration diagram for v8::internal::compiler::Instruction:

Public Types

enum  GapPosition { START , END , FIRST_GAP_POSITION = START , LAST_GAP_POSITION = END }
 
using OutputCountField = base::BitField<size_t, 0, 8>
 
using InputCountField = base::BitField<size_t, 8, 16>
 
using TempCountField = base::BitField<size_t, 24, 6>
 

Public Member Functions

 Instruction (const Instruction &)=delete
 
Instructionoperator= (const Instruction &)=delete
 
size_t OutputCount () const
 
const InstructionOperandOutputAt (size_t i) const
 
InstructionOperandOutputAt (size_t i)
 
bool HasOutput () const
 
const InstructionOperandOutput () const
 
InstructionOperandOutput ()
 
size_t InputCount () const
 
const InstructionOperandInputAt (size_t i) const
 
InstructionOperandInputAt (size_t i)
 
size_t TempCount () const
 
const InstructionOperandTempAt (size_t i) const
 
InstructionOperandTempAt (size_t i)
 
InstructionCode opcode () const
 
ArchOpcode arch_opcode () const
 
AddressingMode addressing_mode () const
 
FlagsMode flags_mode () const
 
FlagsCondition flags_condition () const
 
int misc () const
 
bool HasMemoryAccessMode () const
 
MemoryAccessMode memory_access_mode () const
 
InstructionMarkAsCall ()
 
bool IsCall () const
 
bool NeedsReferenceMap () const
 
bool HasReferenceMap () const
 
bool ClobbersRegisters () const
 
bool ClobbersTemps () const
 
bool ClobbersDoubleRegisters () const
 
ReferenceMapreference_map () const
 
void set_reference_map (ReferenceMap *map)
 
void OverwriteWithNop ()
 
bool IsNop () const
 
bool IsDeoptimizeCall () const
 
bool IsTrap () const
 
bool IsJump () const
 
bool IsRet () const
 
bool IsTailCall () const
 
bool IsThrow () const
 
bool IsCallWithDescriptorFlags () const
 
bool HasCallDescriptorFlag (CallDescriptor::Flag flag) const
 
size_t CodeEnrypointTagInputIndex () const
 
size_t JSCallArgumentCountInputIndex () const
 
ParallelMoveGetOrCreateParallelMove (GapPosition pos, Zone *zone)
 
ParallelMoveGetParallelMove (GapPosition pos)
 
const ParallelMoveGetParallelMove (GapPosition pos) const
 
bool AreMovesRedundant () const
 
ParallelMove *const * parallel_moves () const
 
ParallelMove ** parallel_moves ()
 
InstructionBlockblock () const
 
void set_block (InstructionBlock *block)
 
void Print () const
 

Static Public Member Functions

static InstructionNew (Zone *zone, InstructionCode opcode)
 
static InstructionNew (Zone *zone, InstructionCode opcode, size_t output_count, InstructionOperand *outputs, size_t input_count, InstructionOperand *inputs, size_t temp_count, InstructionOperand *temps)
 
static constexpr bool IsCallWithDescriptorFlags (InstructionCode arch_opcode)
 

Static Public Attributes

static const size_t kMaxOutputCount = OutputCountField::kMax
 
static const size_t kMaxInputCount = InputCountField::kMax
 
static const size_t kMaxTempCount = TempCountField::kMax
 

Private Types

using IsCallField = base::BitField<bool, 30, 1>
 

Private Member Functions

 Instruction (InstructionCode opcode)
 
 Instruction (InstructionCode opcode, size_t output_count, InstructionOperand *outputs, size_t input_count, InstructionOperand *inputs, size_t temp_count, InstructionOperand *temps)
 

Private Attributes

InstructionCode opcode_
 
uint32_t bit_field_
 
ParallelMoveparallel_moves_ [2]
 
ReferenceMapreference_map_
 
InstructionBlockblock_
 
InstructionOperand operands_ [1]
 

Detailed Description

Definition at line 916 of file instruction.h.

Member Typedef Documentation

◆ InputCountField

◆ IsCallField

Definition at line 1160 of file instruction.h.

◆ OutputCountField

◆ TempCountField

Member Enumeration Documentation

◆ GapPosition

Enumerator
START 
END 
FIRST_GAP_POSITION 
LAST_GAP_POSITION 

Definition at line 1105 of file instruction.h.

Constructor & Destructor Documentation

◆ Instruction() [1/3]

v8::internal::compiler::Instruction::Instruction ( const Instruction & )
delete

◆ Instruction() [2/3]

v8::internal::compiler::Instruction::Instruction ( InstructionCode opcode)
explicitprivate

Definition at line 374 of file instruction.cc.

◆ Instruction() [3/3]

v8::internal::compiler::Instruction::Instruction ( InstructionCode opcode,
size_t output_count,
InstructionOperand * outputs,
size_t input_count,
InstructionOperand * inputs,
size_t temp_count,
InstructionOperand * temps )
private

Definition at line 387 of file instruction.cc.

Member Function Documentation

◆ addressing_mode()

AddressingMode v8::internal::compiler::Instruction::addressing_mode ( ) const
inline

Definition at line 957 of file instruction.h.

◆ arch_opcode()

ArchOpcode v8::internal::compiler::Instruction::arch_opcode ( ) const
inline

Definition at line 956 of file instruction.h.

Here is the caller graph for this function:

◆ AreMovesRedundant()

bool v8::internal::compiler::Instruction::AreMovesRedundant ( ) const

Definition at line 415 of file instruction.cc.

◆ block()

InstructionBlock * v8::internal::compiler::Instruction::block ( ) const
inline

Definition at line 1135 of file instruction.h.

◆ ClobbersDoubleRegisters()

bool v8::internal::compiler::Instruction::ClobbersDoubleRegisters ( ) const
inline

Definition at line 1006 of file instruction.h.

◆ ClobbersRegisters()

bool v8::internal::compiler::Instruction::ClobbersRegisters ( ) const
inline

Definition at line 1004 of file instruction.h.

◆ ClobbersTemps()

bool v8::internal::compiler::Instruction::ClobbersTemps ( ) const
inline

Definition at line 1005 of file instruction.h.

◆ CodeEnrypointTagInputIndex()

size_t v8::internal::compiler::Instruction::CodeEnrypointTagInputIndex ( ) const
inline

Definition at line 1080 of file instruction.h.

◆ flags_condition()

FlagsCondition v8::internal::compiler::Instruction::flags_condition ( ) const
inline

Definition at line 961 of file instruction.h.

Here is the caller graph for this function:

◆ flags_mode()

FlagsMode v8::internal::compiler::Instruction::flags_mode ( ) const
inline

Definition at line 960 of file instruction.h.

Here is the caller graph for this function:

◆ GetOrCreateParallelMove()

ParallelMove * v8::internal::compiler::Instruction::GetOrCreateParallelMove ( GapPosition pos,
Zone * zone )
inline

Definition at line 1112 of file instruction.h.

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

◆ GetParallelMove() [1/2]

ParallelMove * v8::internal::compiler::Instruction::GetParallelMove ( GapPosition pos)
inline

Definition at line 1119 of file instruction.h.

Here is the caller graph for this function:

◆ GetParallelMove() [2/2]

const ParallelMove * v8::internal::compiler::Instruction::GetParallelMove ( GapPosition pos) const
inline

Definition at line 1123 of file instruction.h.

◆ HasCallDescriptorFlag()

bool v8::internal::compiler::Instruction::HasCallDescriptorFlag ( CallDescriptor::Flag flag) const
inline

Definition at line 1051 of file instruction.h.

◆ HasMemoryAccessMode()

bool v8::internal::compiler::Instruction::HasMemoryAccessMode ( ) const
inline

Definition at line 965 of file instruction.h.

◆ HasOutput()

bool v8::internal::compiler::Instruction::HasOutput ( ) const
inline

Definition at line 931 of file instruction.h.

◆ HasReferenceMap()

bool v8::internal::compiler::Instruction::HasReferenceMap ( ) const
inline

Definition at line 1002 of file instruction.h.

◆ InputAt() [1/2]

InstructionOperand * v8::internal::compiler::Instruction::InputAt ( size_t i)
inline

Definition at line 940 of file instruction.h.

◆ InputAt() [2/2]

const InstructionOperand * v8::internal::compiler::Instruction::InputAt ( size_t i) const
inline

Definition at line 936 of file instruction.h.

◆ InputCount()

size_t v8::internal::compiler::Instruction::InputCount ( ) const
inline

Definition at line 935 of file instruction.h.

Here is the caller graph for this function:

◆ IsCall()

bool v8::internal::compiler::Instruction::IsCall ( ) const
inline

Definition at line 1000 of file instruction.h.

Here is the caller graph for this function:

◆ IsCallWithDescriptorFlags() [1/2]

bool v8::internal::compiler::Instruction::IsCallWithDescriptorFlags ( ) const
inline

Definition at line 1048 of file instruction.h.

◆ IsCallWithDescriptorFlags() [2/2]

static constexpr bool v8::internal::compiler::Instruction::IsCallWithDescriptorFlags ( InstructionCode arch_opcode)
inlinestaticconstexpr

Definition at line 1045 of file instruction.h.

◆ IsDeoptimizeCall()

bool v8::internal::compiler::Instruction::IsDeoptimizeCall ( ) const
inline

Definition at line 1023 of file instruction.h.

◆ IsJump()

bool v8::internal::compiler::Instruction::IsJump ( ) const
inline

Definition at line 1032 of file instruction.h.

◆ IsNop()

bool v8::internal::compiler::Instruction::IsNop ( ) const
inline

Definition at line 1021 of file instruction.h.

◆ IsRet()

bool v8::internal::compiler::Instruction::IsRet ( ) const
inline

Definition at line 1033 of file instruction.h.

◆ IsTailCall()

bool v8::internal::compiler::Instruction::IsTailCall ( ) const
inline

Definition at line 1034 of file instruction.h.

◆ IsThrow()

bool v8::internal::compiler::Instruction::IsThrow ( ) const
inline

Definition at line 1041 of file instruction.h.

◆ IsTrap()

bool v8::internal::compiler::Instruction::IsTrap ( ) const
inline

Definition at line 1028 of file instruction.h.

◆ JSCallArgumentCountInputIndex()

size_t v8::internal::compiler::Instruction::JSCallArgumentCountInputIndex ( ) const
inline

Definition at line 1096 of file instruction.h.

◆ MarkAsCall()

Instruction * v8::internal::compiler::Instruction::MarkAsCall ( )
inline

Definition at line 996 of file instruction.h.

Here is the caller graph for this function:

◆ memory_access_mode()

MemoryAccessMode v8::internal::compiler::Instruction::memory_access_mode ( ) const
inline

Definition at line 968 of file instruction.h.

Here is the call graph for this function:

◆ misc()

int v8::internal::compiler::Instruction::misc ( ) const
inline

Definition at line 964 of file instruction.h.

◆ NeedsReferenceMap()

bool v8::internal::compiler::Instruction::NeedsReferenceMap ( ) const
inline

Definition at line 1001 of file instruction.h.

◆ New() [1/2]

static Instruction * v8::internal::compiler::Instruction::New ( Zone * zone,
InstructionCode opcode )
inlinestatic

Definition at line 973 of file instruction.h.

Here is the caller graph for this function:

◆ New() [2/2]

static Instruction * v8::internal::compiler::Instruction::New ( Zone * zone,
InstructionCode opcode,
size_t output_count,
InstructionOperand * outputs,
size_t input_count,
InstructionOperand * inputs,
size_t temp_count,
InstructionOperand * temps )
inlinestatic

Definition at line 977 of file instruction.h.

Here is the call graph for this function:

◆ opcode()

InstructionCode v8::internal::compiler::Instruction::opcode ( ) const
inline

Definition at line 955 of file instruction.h.

Here is the caller graph for this function:

◆ operator=()

Instruction & v8::internal::compiler::Instruction::operator= ( const Instruction & )
delete

◆ Output() [1/2]

InstructionOperand * v8::internal::compiler::Instruction::Output ( )
inline

Definition at line 933 of file instruction.h.

◆ Output() [2/2]

const InstructionOperand * v8::internal::compiler::Instruction::Output ( ) const
inline

Definition at line 932 of file instruction.h.

Here is the caller graph for this function:

◆ OutputAt() [1/2]

InstructionOperand * v8::internal::compiler::Instruction::OutputAt ( size_t i)
inline

Definition at line 926 of file instruction.h.

◆ OutputAt() [2/2]

const InstructionOperand * v8::internal::compiler::Instruction::OutputAt ( size_t i) const
inline

Definition at line 922 of file instruction.h.

Here is the caller graph for this function:

◆ OutputCount()

size_t v8::internal::compiler::Instruction::OutputCount ( ) const
inline

Definition at line 921 of file instruction.h.

Here is the caller graph for this function:

◆ OverwriteWithNop()

void v8::internal::compiler::Instruction::OverwriteWithNop ( )
inline

Definition at line 1015 of file instruction.h.

◆ parallel_moves() [1/2]

ParallelMove ** v8::internal::compiler::Instruction::parallel_moves ( )
inline

Definition at line 1130 of file instruction.h.

◆ parallel_moves() [2/2]

ParallelMove *const * v8::internal::compiler::Instruction::parallel_moves ( ) const
inline

Definition at line 1129 of file instruction.h.

Here is the caller graph for this function:

◆ Print()

void v8::internal::compiler::Instruction::Print ( ) const

Definition at line 425 of file instruction.cc.

◆ reference_map()

ReferenceMap * v8::internal::compiler::Instruction::reference_map ( ) const
inline

Definition at line 1007 of file instruction.h.

◆ set_block()

void v8::internal::compiler::Instruction::set_block ( InstructionBlock * block)
inline

Definition at line 1136 of file instruction.h.

◆ set_reference_map()

void v8::internal::compiler::Instruction::set_reference_map ( ReferenceMap * map)
inline

Definition at line 1009 of file instruction.h.

◆ TempAt() [1/2]

InstructionOperand * v8::internal::compiler::Instruction::TempAt ( size_t i)
inline

Definition at line 950 of file instruction.h.

◆ TempAt() [2/2]

const InstructionOperand * v8::internal::compiler::Instruction::TempAt ( size_t i) const
inline

Definition at line 946 of file instruction.h.

Here is the caller graph for this function:

◆ TempCount()

size_t v8::internal::compiler::Instruction::TempCount ( ) const
inline

Definition at line 945 of file instruction.h.

Here is the caller graph for this function:

Member Data Documentation

◆ bit_field_

uint32_t v8::internal::compiler::Instruction::bit_field_
private

Definition at line 1163 of file instruction.h.

◆ block_

InstructionBlock* v8::internal::compiler::Instruction::block_
private

Definition at line 1166 of file instruction.h.

◆ kMaxInputCount

const size_t v8::internal::compiler::Instruction::kMaxInputCount = InputCountField::kMax
static

Definition at line 1149 of file instruction.h.

◆ kMaxOutputCount

const size_t v8::internal::compiler::Instruction::kMaxOutputCount = OutputCountField::kMax
static

Definition at line 1148 of file instruction.h.

◆ kMaxTempCount

const size_t v8::internal::compiler::Instruction::kMaxTempCount = TempCountField::kMax
static

Definition at line 1150 of file instruction.h.

◆ opcode_

InstructionCode v8::internal::compiler::Instruction::opcode_
private

Definition at line 1162 of file instruction.h.

◆ operands_

InstructionOperand v8::internal::compiler::Instruction::operands_[1]
private

Definition at line 1167 of file instruction.h.

◆ parallel_moves_

ParallelMove* v8::internal::compiler::Instruction::parallel_moves_[2]
private

Definition at line 1164 of file instruction.h.

◆ reference_map_

ReferenceMap* v8::internal::compiler::Instruction::reference_map_
private

Definition at line 1165 of file instruction.h.


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