Mlaskal compiler support classes
Public Types | Public Member Functions | Friends | List of all members
mlaskal::labeled_icblock Class Reference

code block More...

#include <labeled_icblock.hpp>

Public Types

typedef plain_icblock< abstract_instr >::const_iterator const_iterator
 container requirement: const_iterator More...
 
typedef const plain_icblock< abstract_instr >::value_typeconst_reference
 container requirement: const_reference More...
 
typedef plain_icblock< abstract_instr >::iterator iterator
 container requirement: iterator More...
 
typedef uid_all_type::UID_type label_type
 type of labels More...
 
typedef plain_icblock< abstract_instr >::value_typereference
 container requirement: reference More...
 
typedef plain_icblock< abstract_instr >::size_type size_type
 container requirement: size_type More...
 
typedef plain_icblock< abstract_instr >::value_type value_type
 container requirement: value_type More...
 

Public Member Functions

void add_label (label_type lbl)
 appends a label to the end of the block More...
 
template<typename I , typename ... AL>
const_iterator append (AL &&... al)
 appends one instruction without a target More...
 
template<typename ... L>
void append_and_kill (const labeled_icblock_pointer &sicb, const L &... sicbl)
 
void append_and_kill ()
 
const_iterator append_instruction (const_reference ai)
 appends one instruction without a target More...
 
const_iterator append_instruction_with_target (const_reference ai, label_type tgt_lbl)
 appends one instruction with a target More...
 
template<typename I , typename ... AL>
const_iterator append_with_target (label_type tgt_lbl, AL &&... al)
 appends one instruction with a target More...
 
iterator begin ()
 container requirement: begin More...
 
const_iterator begin () const
 container requirement: begin More...
 
bool empty () const
 container requirement: empty More...
 
iterator end ()
 container requirement: end More...
 
const_iterator end () const
 container requirement: end More...
 
std::set< label_typefind_labels (const_iterator ci) const
 find labels for a position More...
 
 labeled_icblock ()
 constructs an empty labeled_icblock More...
 
 labeled_icblock (plain_icblock< ic_instr >::const_iterator first, plain_icblock< ic_instr >::const_iterator last, const abstract_ic &aic, const flat_icblock &ficb)
 
const_iterator locate_label (label_type lbl)
 locates a label in the block More...
 
size_type size () const
 container requirement: size More...
 

Friends

class ftor_fnc_trans_body
 
struct ftor_labels_bkmap_label
 
struct less_labels_bkmap
 

Detailed Description

code block

contains a sequence of instructions and labels

Member Typedef Documentation

§ const_iterator

typedef plain_icblock<abstract_instr>::const_iterator mlaskal::labeled_icblock::const_iterator

container requirement: const_iterator

§ const_reference

typedef const plain_icblock<abstract_instr>::value_type& mlaskal::labeled_icblock::const_reference

container requirement: const_reference

§ iterator

typedef plain_icblock<abstract_instr>::iterator mlaskal::labeled_icblock::iterator

container requirement: iterator

§ label_type

typedef uid_all_type::UID_type mlaskal::labeled_icblock::label_type

type of labels

UIDs are used as labels

§ reference

typedef plain_icblock<abstract_instr>::value_type& mlaskal::labeled_icblock::reference

container requirement: reference

§ size_type

typedef plain_icblock<abstract_instr>::size_type mlaskal::labeled_icblock::size_type

container requirement: size_type

§ value_type

typedef plain_icblock<abstract_instr>::value_type mlaskal::labeled_icblock::value_type

container requirement: value_type

Constructor & Destructor Documentation

§ labeled_icblock() [1/2]

mlaskal::labeled_icblock::labeled_icblock ( )
inline

constructs an empty labeled_icblock

§ labeled_icblock() [2/2]

mlaskal::labeled_icblock::labeled_icblock ( plain_icblock< ic_instr >::const_iterator  first,
plain_icblock< ic_instr >::const_iterator  last,
const abstract_ic &  aic,
const flat_icblock &  ficb 
)

Member Function Documentation

§ add_label()

void mlaskal::labeled_icblock::add_label ( label_type  lbl)
inline

appends a label to the end of the block

resolves instruction targets pointing to this label

§ append()

template<typename I , typename ... AL>
const_iterator mlaskal::labeled_icblock::append ( AL &&...  al)
inline

appends one instruction without a target

§ append_and_kill() [1/2]

template<typename ... L>
void mlaskal::labeled_icblock::append_and_kill ( const labeled_icblock_pointer sicb,
const L &...  sicbl 
)
inline

§ append_and_kill() [2/2]

void mlaskal::labeled_icblock::append_and_kill ( )
inline

§ append_instruction()

const_iterator mlaskal::labeled_icblock::append_instruction ( const_reference  ai)
inline

appends one instruction without a target

labels appended to the end of the block using add_label now point to this instruction

§ append_instruction_with_target()

const_iterator mlaskal::labeled_icblock::append_instruction_with_target ( const_reference  ai,
label_type  tgt_lbl 
)

appends one instruction with a target

labels appended to the end of the block using add_label now point to this instruction

target label is either directly resolved, if it already existed in the block, or it is marked as unresolved and waiting for a label

§ append_with_target()

template<typename I , typename ... AL>
const_iterator mlaskal::labeled_icblock::append_with_target ( label_type  tgt_lbl,
AL &&...  al 
)
inline

appends one instruction with a target

§ begin() [1/2]

iterator mlaskal::labeled_icblock::begin ( )
inline

container requirement: begin

§ begin() [2/2]

const_iterator mlaskal::labeled_icblock::begin ( ) const
inline

container requirement: begin

§ empty()

bool mlaskal::labeled_icblock::empty ( ) const
inline

container requirement: empty

§ end() [1/2]

iterator mlaskal::labeled_icblock::end ( )
inline

container requirement: end

§ end() [2/2]

const_iterator mlaskal::labeled_icblock::end ( ) const
inline

container requirement: end

§ find_labels()

std::set<label_type> mlaskal::labeled_icblock::find_labels ( const_iterator  ci) const

find labels for a position

finds labels for the position ci

§ locate_label()

const_iterator mlaskal::labeled_icblock::locate_label ( label_type  lbl)
inline

locates a label in the block

finds the instruction labeled with this label

§ size()

size_type mlaskal::labeled_icblock::size ( ) const
inline

container requirement: size

Friends And Related Function Documentation

§ ftor_fnc_trans_body

friend class ftor_fnc_trans_body
friend

§ ftor_labels_bkmap_label

friend struct ftor_labels_bkmap_label
friend

§ less_labels_bkmap

friend struct less_labels_bkmap
friend

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