CACAO
Public Member Functions | Private Types | Private Attributes
cacao::jit::compiler2::MachineReplacementPointInst Class Referenceabstract

Represents a point in the program, where it is possible to recover the source state to perform on-stack replacement. More...

Inheritance diagram for cacao::jit::compiler2::MachineReplacementPointInst:
cacao::jit::compiler2::MachineInstruction cacao::jit::compiler2::memory::ManagerMixin< MachineInstruction > cacao::jit::compiler2::MachineDeoptInst cacao::jit::compiler2::MachineReplacementEntryInst cacao::jit::compiler2::MachineReplacementPointCallSiteInst cacao::jit::compiler2::MachineReplacementPointStaticSpecialInst

Public Member Functions

 MachineReplacementPointInst (const char *name, s4 source_id, std::size_t num_operands)
 
virtual void emit (CodeMemory *CM) const
 emit machine code More...
 
virtual void link (CodeFragment &CF) const
 link machine code More...
 
virtual
MachineReplacementPointInst
to_MachineReplacementPointInst ()
 
virtual
MachineReplacementEntryInst
to_MachineReplacementEntryInst ()
 
virtual
MachineReplacementPointCallSiteInst
to_MachineReplacementPointCallSiteInst ()
 
virtual
MachineReplacementPointStaticSpecialInst
to_MachineReplacementPointStaticSpecialInst ()
 
virtual MachineDeoptInstto_MachineDeoptInst ()
 
s4 get_source_id () const
 
void set_javalocal_index (std::size_t i, s4 javalocal_index)
 Set the javalocal index of the i-th operand of this instruction. More...
 
s4 get_javalocal_index (std::size_t i)
 
virtual bool is_trappable () const =0
 
- Public Member Functions inherited from cacao::jit::compiler2::MachineInstruction
 MachineInstruction (const char *name, MachineOperand *result, std::size_t num_operands, const char *comment=NULL)
 
void set_comment (const char *c)
 
const char * get_comment () const
 
void set_operand (std::size_t i, MachineOperand *op)
 
void finalize_operands ()
 has to be called after all operands with embedded operands have been added More...
 
virtual void set_block (MachineBasicBlock *MBB)
 
MachineBasicBlockget_block () const
 
std::size_t op_size () const
 
MachineOperandDescoperator[] (std::size_t i)
 
const MachineOperandDescget (std::size_t i) const
 
MachineOperandDescget (std::size_t i)
 
operand_iterator begin ()
 
operand_iterator end ()
 
operand_iterator find (MachineOperand *op)
 
MachineOperandDescfront ()
 
MachineOperandDescback ()
 
const_operand_iterator begin () const
 
const_operand_iterator end () const
 
std::size_t dummy_op_size () const
 
const MachineOperandDescget_dummy (std::size_t i) const
 
MachineOperandDescget_dummy (std::size_t i)
 
dummy_operand_iterator dummy_begin ()
 
dummy_operand_iterator dummy_end ()
 
dummy_operand_iterator find_dummy (MachineOperand *op)
 
MachineOperandDescdummy_front ()
 
MachineOperandDescdummy_back ()
 
const_dummy_operand_iterator dummy_begin () const
 
const_dummy_operand_iterator dummy_end () const
 
successor_iterator successor_begin ()
 
successor_iterator successor_end ()
 
const_successor_iterator successor_begin () const
 
MachineBasicBlocksuccessor_front () const
 
MachineBasicBlocksuccessor_back () const
 
const_successor_iterator successor_end () const
 
std::size_t successor_size () const
 
bool successor_empty () const
 
std::size_t get_id () const
 
const char * get_name () const
 
const MachineOperandDescget_result () const
 
MachineOperandDescget_result ()
 
void set_result (MachineOperand *MO)
 
virtual bool accepts_immediate (std::size_t i, Immediate *imm) const
 
virtual bool is_label () const
 
virtual bool is_phi () const
 
virtual bool is_move () const
 
virtual bool is_jump () const
 
virtual bool is_end () const
 
virtual bool is_call () const
 
virtual MachineMoveInst * to_MachineMoveInst ()
 
virtual MachinePhiInstto_MachinePhiInst ()
 
OStreamprint (OStream &OS) const
 print instruction More...
 
virtual OStreamprint_successor_label (OStream &OS, std::size_t index) const
 print successor label More...
 
virtual OStreamprint_operands (OStream &OS) const
 print operands More...
 
virtual OStreamprint_result (OStream &OS) const
 print result More...
 
virtual ~MachineInstruction ()
 destructor More...
 

Private Types

typedef alloc::vector< s4 >::type JavalocalIndexMapTy
 

Private Attributes

s4 source_id
 
JavalocalIndexMapTy javalocal_indices
 

Additional Inherited Members

- Public Types inherited from cacao::jit::compiler2::MachineInstruction
typedef alloc::vector
< MachineOperandDesc >::type 
operand_list
 
typedef operand_list::iterator operand_iterator
 
typedef
operand_list::const_iterator 
const_operand_iterator
 
typedef alloc::vector
< MachineOperandDesc >::type 
dummy_operand_list
 
typedef
dummy_operand_list::iterator 
dummy_operand_iterator
 
typedef
dummy_operand_list::const_iterator 
const_dummy_operand_iterator
 
typedef alloc::unordered_map
< EmbeddedMachineOperand
*, int >::type 
RefMapTy
 
typedef alloc::list
< MachineBasicBlock * >::type 
successor_list
 
typedef successor_list::iterator successor_iterator
 
typedef
successor_list::const_iterator 
const_successor_iterator
 
- Static Public Member Functions inherited from cacao::jit::compiler2::memory::ManagerMixin< MachineInstruction >
static voidoperator new (std::size_t size) throw (std::bad_alloc)
 normal new More...
 
static voidoperator new (std::size_t size, void *ptr) throw ()
 placement new More...
 
static voidoperator new (std::size_t size, const std::nothrow_t &nt) throw ()
 nothrow new More...
 
static void operator delete (void *pMemory) throw ()
 normal delete More...
 
static void operator delete (void *pMemory, void *ptr) throw ()
 placement delete More...
 
static void operator delete (void *pMemory, const std::nothrow_t &) throw ()
 nothrow delete More...
 
static voidoperator new[] (std::size_t size) throw (std::bad_alloc)
 normal new[] More...
 
static voidoperator new[] (std::size_t size, void *ptr) throw ()
 placement new[] More...
 
static voidoperator new[] (std::size_t size, const std::nothrow_t &nt) throw ()
 nothrow new[] More...
 
static void operator delete[] (void *pMemory) throw ()
 normal delete[] More...
 
static void operator delete[] (void *pMemory, void *ptr) throw ()
 placement delete[] More...
 
static void operator delete[] (void *pMemory, const std::nothrow_t &) throw ()
 nothrow delete[] More...
 
- Protected Attributes inherited from cacao::jit::compiler2::MachineInstruction
const std::size_t id
 
operand_list operands
 
dummy_operand_list dummy_operands
 dummy_operands is a list of operands embedded in the real operands of this instruction that need register allocation (for example indirect addressing on x86) More...
 
RefMapTy ref_map
 
successor_list successors
 
MachineOperandDesc result
 
const char * name
 
const char * comment
 
MachineBasicBlockblock
 

Detailed Description

Represents a point in the program, where it is possible to recover the source state to perform on-stack replacement.

Definition at line 158 of file MachineInstructions.hpp.

Member Typedef Documentation

Definition at line 160 of file MachineInstructions.hpp.

Constructor & Destructor Documentation

cacao::jit::compiler2::MachineReplacementPointInst::MachineReplacementPointInst ( const char *  name,
s4  source_id,
std::size_t  num_operands 
)
inline
Parameters
source_idthe id of the baseline IR instruction this replacement point represents in the source state
num_operandsthe number of operands, i.e., the number of values that are live at this OSR point

Definition at line 172 of file MachineInstructions.hpp.

Member Function Documentation

virtual void cacao::jit::compiler2::MachineReplacementPointInst::emit ( CodeMemory CM) const
inlinevirtual
s4 cacao::jit::compiler2::MachineReplacementPointInst::get_javalocal_index ( std::size_t  i)
inline
Returns
the javalocal index of the i-th operand of this instruction. For possible return values refer to set_javalocal_index().

Definition at line 215 of file MachineInstructions.hpp.

s4 cacao::jit::compiler2::MachineReplacementPointInst::get_source_id ( ) const
inline

Definition at line 198 of file MachineInstructions.hpp.

virtual bool cacao::jit::compiler2::MachineReplacementPointInst::is_trappable ( ) const
pure virtual
virtual void cacao::jit::compiler2::MachineReplacementPointInst::link ( CodeFragment CF) const
inlinevirtual
void cacao::jit::compiler2::MachineReplacementPointInst::set_javalocal_index ( std::size_t  i,
s4  javalocal_index 
)
inline

Set the javalocal index of the i-th operand of this instruction.

Pass a value >= 0 to indicate a valid javalocal index. Pass RPLALLOC_STACK to indicate that the i-th operand is a stack variable. Pass RPLALLOC_PARAM to indicate that it is a parameter at a call site.

Definition at line 206 of file MachineInstructions.hpp.

virtual MachineDeoptInst* cacao::jit::compiler2::MachineReplacementPointInst::to_MachineDeoptInst ( )
inlinevirtual

Reimplemented in cacao::jit::compiler2::MachineDeoptInst.

Definition at line 194 of file MachineInstructions.hpp.

virtual MachineReplacementEntryInst* cacao::jit::compiler2::MachineReplacementPointInst::to_MachineReplacementEntryInst ( )
inlinevirtual
virtual MachineReplacementPointCallSiteInst* cacao::jit::compiler2::MachineReplacementPointInst::to_MachineReplacementPointCallSiteInst ( )
inlinevirtual
virtual MachineReplacementPointInst* cacao::jit::compiler2::MachineReplacementPointInst::to_MachineReplacementPointInst ( )
inlinevirtual

Reimplemented from cacao::jit::compiler2::MachineInstruction.

Definition at line 178 of file MachineInstructions.hpp.

virtual MachineReplacementPointStaticSpecialInst* cacao::jit::compiler2::MachineReplacementPointInst::to_MachineReplacementPointStaticSpecialInst ( )
inlinevirtual

Field Documentation

JavalocalIndexMapTy cacao::jit::compiler2::MachineReplacementPointInst::javalocal_indices
private

Definition at line 163 of file MachineInstructions.hpp.

s4 cacao::jit::compiler2::MachineReplacementPointInst::source_id
private

Definition at line 162 of file MachineInstructions.hpp.


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