#include <binop.hh>
Public Types |
enum | Oper {
add,
sub,
mul,
div,
logic_and,
logic_or,
lshift,
rshift,
arshift,
logic_xor
} |
| Possible operations. More...
|
|
enum | kind_tree_type {
const_kind,
name_kind,
temp_kind,
binop_kind,
mem_kind,
call_kind,
eseq_kind,
move_kind,
sxp_kind,
jump_kind,
cjump_kind,
seq_kind,
label_kind
} |
| The kinds of Tree instuctions. More...
|
Member Enumeration Documentation
The kinds of Tree instuctions.
These flags are used to facilitate the pattern matching during instruction selection. This method is not very clean nevertheless this way is cleaner and more efficient than the use of dynamic_cast<>().
- Enumerator:
const_kind |
|
name_kind |
|
temp_kind |
|
binop_kind |
|
mem_kind |
|
call_kind |
|
eseq_kind |
|
move_kind |
|
sxp_kind |
|
jump_kind |
|
cjump_kind |
|
seq_kind |
|
label_kind |
|
Possible operations.
- Enumerator:
add |
|
sub |
|
mul |
|
div |
|
logic_and |
|
logic_or |
|
lshift |
|
rshift |
|
arshift |
|
logic_xor |
|
Constructor & Destructor Documentation
tree::Binop::Binop |
( |
const Oper |
oper, |
|
|
const rExp & |
left, |
|
|
const rExp & |
right |
|
) |
| |
|
inline |
Member Function Documentation
void tree::Tree::asm_set |
( |
const temp::Temp & |
temp | ) |
|
|
inlineinherited |
rTree & tree::Tree::child_get |
( |
int |
nth | ) |
|
|
inlineinherited |
References tree::Tree::children_, and postcondition.
Referenced by tree::Move::dst_get(), tree::Sxp::exp_get(), tree::Jump::exp_get(), tree::Mem::exp_get(), tree::Eseq::exp_get(), tree::Cjump::flip(), tree::Cjump::label_false_get(), tree::Jump::label_get(), tree::Cjump::label_true_get(), left_get(), tree::Cjump::left_get(), tree::Tree::left_get(), right_get(), tree::Cjump::right_get(), tree::Tree::right_get(), tree::Move::src_get(), and tree::Eseq::stm_get().
rTree tree::Tree::child_get |
( |
int |
nth | ) |
const |
|
inlineinherited |
void tree::Tree::child_push_back |
( |
const rTree & |
tree | ) |
|
|
inlineinherited |
std::ostream & tree::Tree::dump |
( |
std::ostream & |
o | ) |
const |
|
virtualinherited |
rExp tree::Binop::left_get |
( |
| ) |
const |
|
inline |
rTree & tree::Tree::left_get |
( |
| ) |
|
|
inlineinherited |
Tree * tree::Tree::parent_get |
( |
| ) |
|
|
inlineinherited |
const Tree * tree::Tree::parent_get |
( |
| ) |
const |
|
inlineinherited |
void tree::Tree::parent_get_assert |
( |
| ) |
const |
|
inherited |
void tree::Tree::parent_set |
( |
Tree * |
parent | ) |
|
|
inlineinherited |
bool tree::Tree::reducible_get |
( |
| ) |
const |
|
inlineinherited |
void tree::Tree::reducible_set |
( |
bool |
b | ) |
|
|
inlineinherited |
void tree::Tree::replace_by |
( |
const rTree & |
tree | ) |
|
|
inherited |
rExp tree::Binop::right_get |
( |
| ) |
const |
|
inline |
rTree & tree::Tree::right_get |
( |
| ) |
|
|
inlineinherited |
void * tree::Tree::state_get |
( |
| ) |
const |
|
inlineinherited |
void *& tree::Tree::state_get |
( |
| ) |
|
|
inlineinherited |
std::ostream & tree::Binop::tag_print |
( |
std::ostream & |
o | ) |
const |
|
overridevirtual |
Report on o the kind of this instruction.
Implements tree::Tree.
References add, arshift, div, logic_and, logic_or, logic_xor, lshift, mul, oper_, rshift, and sub.
Member Data Documentation
Tree* tree::Tree::parent_ = nullptr |
|
protectedinherited |
bool tree::Tree::reducible_ = true |
|
protectedinherited |
void* tree::Tree::state_ = nullptr |
|
protectedinherited |
The documentation for this class was generated from the following files: