V8 Project
v8::internal::compiler::InstructionOperand Class Reference

#include <instruction.h>

+ Inheritance diagram for v8::internal::compiler::InstructionOperand:
+ Collaboration diagram for v8::internal::compiler::InstructionOperand:

Public Types

enum  Kind {
  INVALID , UNALLOCATED , CONSTANT , IMMEDIATE ,
  STACK_SLOT , DOUBLE_STACK_SLOT , REGISTER , DOUBLE_REGISTER
}
 

Public Member Functions

 InstructionOperand ()
 
 InstructionOperand (Kind kind, int index)
 
Kind kind () const
 
int index () const
 
bool Equals (InstructionOperand *other) const
 
void ConvertTo (Kind kind, int index)
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Static Public Member Functions

static void SetUpCaches ()
 
static void TearDownCaches ()
 

Protected Types

typedef BitField< Kind, 0, 3 > KindField
 

Protected Attributes

unsigned value_
 

Detailed Description

Definition at line 47 of file instruction.h.

Member Typedef Documentation

◆ KindField

Definition at line 87 of file instruction.h.

Member Enumeration Documentation

◆ Kind

Constructor & Destructor Documentation

◆ InstructionOperand() [1/2]

v8::internal::compiler::InstructionOperand::InstructionOperand ( )
inline

◆ InstructionOperand() [2/2]

v8::internal::compiler::InstructionOperand::InstructionOperand ( Kind  kind,
int  index 
)
inline

Definition at line 61 of file instruction.h.

References ConvertTo(), index(), and kind().

+ Here is the call graph for this function:

Member Function Documentation

◆ ConvertTo()

void v8::internal::compiler::InstructionOperand::ConvertTo ( Kind  kind,
int  index 
)
inline

Definition at line 75 of file instruction.h.

75  {
76  if (kind == REGISTER || kind == DOUBLE_REGISTER) DCHECK(index >= 0);
79  DCHECK(this->index() == index);
80  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, DOUBLE_REGISTER, v8::internal::BitFieldBase< T, shift, size, uint32_t >::encode(), index(), kind(), v8::internal::BitFieldBase< T, shift, size, uint32_t >::kSize, REGISTER, and value_.

Referenced by v8::internal::compiler::LiveRange::ConvertOperands(), InstructionOperand(), and v8::internal::compiler::LiveRange::SetSpillOperand().

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

◆ Equals()

bool v8::internal::compiler::InstructionOperand::Equals ( InstructionOperand other) const
inline

Definition at line 71 of file instruction.h.

71  {
72  return value_ == other->value_;
73  }

References value_.

◆ index()

◆ kind()

Kind v8::internal::compiler::InstructionOperand::kind ( ) const
inline

Definition at line 63 of file instruction.h.

63 { return KindField::decode(value_); }

References v8::internal::BitFieldBase< T, shift, size, uint32_t >::decode(), and value_.

Referenced by v8::internal::compiler::FINAL< kOperandKind, kNumCachedOperands >::cast(), v8::internal::compiler::LiveRange::ConvertOperands(), ConvertTo(), InstructionOperand(), v8::internal::compiler::operator<<(), v8::internal::compiler::LiveRange::SetSpillOperand(), v8::internal::compiler::InstructionSelectorTest::FINAL::ToConstant(), and v8::internal::compiler::InstructionSelectorTest::FINAL::ToVreg().

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

◆ SetUpCaches()

void v8::internal::compiler::InstructionOperand::SetUpCaches ( )
static

Definition at line 82 of file instruction.cc.

82  {
83 #define INSTRUCTION_OPERAND_SETUP(name, type, number) \
84  name##Operand::SetUpCache();
86 #undef INSTRUCTION_OPERAND_SETUP
87 }
#define INSTRUCTION_OPERAND_SETUP(name, type, number)
#define INSTRUCTION_OPERAND_LIST(V)
Definition: instruction.h:39

References INSTRUCTION_OPERAND_LIST, and INSTRUCTION_OPERAND_SETUP.

Referenced by v8::internal::compiler::Pipeline::SetUp().

+ Here is the caller graph for this function:

◆ TearDownCaches()

void v8::internal::compiler::InstructionOperand::TearDownCaches ( )
static

Definition at line 90 of file instruction.cc.

90  {
91 #define INSTRUCTION_OPERAND_TEARDOWN(name, type, number) \
92  name##Operand::TearDownCache();
94 #undef INSTRUCTION_OPERAND_TEARDOWN
95 }
#define INSTRUCTION_OPERAND_TEARDOWN(name, type, number)

References INSTRUCTION_OPERAND_LIST, and INSTRUCTION_OPERAND_TEARDOWN.

Referenced by v8::internal::compiler::Pipeline::TearDown().

+ Here is the caller graph for this function:

Member Data Documentation

◆ value_


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