#include <IfNode.h>
Inheritance diagram for IfNode:
Public Types | |
I_IF = 0 | |
I_IF_ELSE | |
I_IF_ELSE_IF | |
I_ELSE_IF | |
I_ELSE_IF_ELSE | |
I_ELSE | |
enum | iftype { I_IF = 0, I_IF_ELSE, I_IF_ELSE_IF, I_ELSE_IF, I_ELSE_IF_ELSE, I_ELSE } |
Public Member Functions | |
IfNode (const iftype newItype, const uint32 newTargetOffset) | |
IfNode (const uint32 opcode, const uint32 offset, const uint32 newTargetOffset) | |
~IfNode () | |
void | print_unk (Console &o, const uint32 isize) const |
void | print_asm (Console &o) const |
void | print_bin (ODequeDataSource &o) const |
bool | fold (DCUnit *unit, std::deque< Node * > &nodes) |
bool | fold_else (DCUnit *unit, std::deque< Node * > &nodes) |
uint32 | TargetOffset () const |
void | AddJmp (EndNode *jmp) |
std::deque< Node * > & | nodes () |
IfNode * | elsen () |
void | setAddSP (DCCallPostfixNode *newAddSP) |
Public Attributes | |
iftype | itype |
IfNode * | elsenode |
Protected Attributes | |
std::deque< Node * > | ifnodes |
Private Attributes | |
uint32 | targetOffset |
EndNode * | jmpnode |
DCCallPostfixNode * | addSP |
Definition at line 59 of file IfNode.h.
enum IfNode::iftype |
void IfNode::AddJmp | ( | EndNode * | jmp | ) | [inline] |
Implements Node.
Definition at line 200 of file IfNode.cpp.
References Node::fold_linenum(), UniNode::grab_n(), I_ELSE_IF, I_ELSE_IF_ELSE, I_IF, I_IF_ELSE, I_IF_ELSE_IF, ifnodes, itype, jmpnode, n, UniNode::node, and print_assert().
Definition at line 275 of file IfNode.cpp.
References I_ELSE, ifnodes, itype, print_assert(), and TargetOffset().
std::deque<Node *>& IfNode::nodes | ( | ) | [inline] |
void IfNode::print_asm | ( | Console & | o | ) | const [virtual] |
Reimplemented from Node.
Definition at line 130 of file IfNode.cpp.
References Node::_offset, I_ELSE, I_ELSE_IF, I_ELSE_IF_ELSE, I_IF, I_IF_ELSE, I_IF_ELSE_IF, ifnodes, itype, jmpnode, UniNode::node, EndNode::print_asm(), Node::print_asm(), Node::print_linenum_asm(), Console::Putchar(), Node::rtype(), Type::T_INVALID, and targetOffset.
void IfNode::print_bin | ( | ODequeDataSource & | o | ) | const [virtual] |
Implements Node.
Definition at line 172 of file IfNode.cpp.
References Node::_offset, I_ELSE_IF, I_ELSE_IF_ELSE, I_IF, I_IF_ELSE, I_IF_ELSE_IF, ifnodes, itype, jmpnode, UniNode::node, EndNode::print_bin(), Node::print_bin(), Node::print_linenum_bin(), Node::rtype(), Type::T_INVALID, targetOffset, ODequeDataSource::write1(), and ODequeDataSource::write2().
Implements Node.
Definition at line 36 of file IfNode.cpp.
References elsenode, I_ELSE, I_ELSE_IF, I_ELSE_IF_ELSE, I_IF, I_IF_ELSE, I_IF_ELSE_IF, ifnodes, indent(), itype, jmpnode, UniNode::node, Console::Print(), Node::print_linenum_unk(), EndNode::print_unk(), Node::print_unk(), Console::Printf(), Console::Putchar(), Node::rtype(), Type::T_INVALID, and targetOffset.
void IfNode::setAddSP | ( | DCCallPostfixNode * | newAddSP | ) | [inline] |
uint32 IfNode::TargetOffset | ( | ) | const [inline] |
Definition at line 87 of file IfNode.h.
References jmpnode, targetOffset, and EndNode::TargetOffset().
Referenced by fold_else().
DCCallPostfixNode* IfNode::addSP [private] |
std::deque<Node *> IfNode::ifnodes [protected] |
Definition at line 114 of file IfNode.h.
Referenced by fold(), fold_else(), nodes(), print_asm(), print_bin(), and print_unk().
Definition at line 97 of file IfNode.h.
Referenced by fold(), fold_else(), IfNode(), print_asm(), print_bin(), and print_unk().
EndNode* IfNode::jmpnode [private] |
Definition at line 121 of file IfNode.h.
Referenced by AddJmp(), fold(), print_asm(), print_bin(), print_unk(), and TargetOffset().
uint32 IfNode::targetOffset [private] |
Definition at line 120 of file IfNode.h.
Referenced by print_asm(), print_bin(), print_unk(), and TargetOffset().