#include <ast.h>
Inheritance diagram for loopNode::
Public Methods | |
loopNode (NodeType typ, exprNode *cond, stmtNode *body, const Coord coord) | |
Create a new loop. More... | |
loopNode (NodeType typ, const Coord coord) | |
Create an empty loop. More... | |
virtual | ~loopNode () |
Destroy a loopNode. More... | |
Accessors | |
Methods to get and set fields in the class. | |
exprNode * | cond () const |
exprNode * | get_cond () |
void | cond (exprNode *cond) |
blockNode * | body () const |
blockNode * | get_body () |
void | body (blockNode *body) |
FlowVal * | at_loop_head () const |
void | at_loop_head (FlowVal *ae) |
FlowVal * | at_loop_tail () const |
void | at_loop_tail (FlowVal *ae) |
Private Attributes | |
TREE exprNode * | _cond |
the loop condition expression. More... | |
TREE blockNode * | _body |
the loop body. More... | |
FlowVal * | _at_loop_head |
loop head dataflow analysis value. More... | |
FlowVal * | _at_loop_tail |
loop tail dataflow analysis value. More... |
This class provides a base class for all the kinds of loop statements.
The NodeType is determined by the subclass (While, Do, or For)
|
Create a new loop. The new loop has the given type, condition expression and body. This constructor is only called by the subclasses (whileNode, doNode, and forNode).
|
|
Create an empty loop. The new loop has no condition expression or body
|
|
Destroy a loopNode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loop head dataflow analysis value. This field is used by the dataflow analysis framework to hold the flow value at the head of the loop. |
|
loop tail dataflow analysis value. This field is used by the dataflow analysis framework to hold the flow value at the end (tail) of the loop. |
|
the loop body.
|
|
the loop condition expression.
|