mjplusplus
v0.4.1
|
#include <ExpressionVisitor.hpp>
Public Member Functions | |
ExpressionVisitor () | |
virtual void | visit (shptr< ast::pe::Bool const > boolExpr) |
virtual void | visit (shptr< ast::pe::Ident const > identExpr) |
virtual void | visit (shptr< ast::pe::Integer const > integerExpr) |
virtual void | visit (shptr< ast::pe::MethodInvocation const > methodInvocationExpr) |
virtual void | visit (shptr< ast::pe::NewArrayExpression const > newArrayExpr) |
virtual void | visit (shptr< ast::pe::NewObjectExpression const > newObjectExpr) |
virtual void | visit (shptr< ast::pe::Object const > objectExpr) |
virtual void | visit (shptr< ast::ue::Neg const > negExpr) |
virtual void | visit (shptr< ast::ue::Not const > notExpr) |
virtual void | visit (shptr< ast::be::Eq const > eqExpr) |
virtual void | visit (shptr< ast::be::AndAnd const > andAndExpr) |
virtual void | visit (shptr< ast::be::OrOr const > orOrExpr) |
virtual void | visit (shptr< ast::be::EqEq const > eqEqExpr) |
virtual void | visit (shptr< ast::be::NotEq const > notEqExpr) |
virtual void | visit (shptr< ast::be::GreaterThan const > greaterThanExpr) |
virtual void | visit (shptr< ast::be::GreaterThanEq const > greaterThanEqExpr) |
virtual void | visit (shptr< ast::be::LessThan const > lessThanExpr) |
virtual void | visit (shptr< ast::be::LessThanEq const > lessThanEqExpr) |
virtual void | visit (shptr< ast::be::Plus const > plusExpr) |
virtual void | visit (shptr< ast::be::Minus const > minusExpr) |
virtual void | visit (shptr< ast::be::Mod const > modExpr) |
virtual void | visit (shptr< ast::be::Mult const > multExpr) |
virtual void | visit (shptr< ast::be::Slash const > slashExpr) |
virtual void | visit (shptr< ast::be::Invalid const > invalidExpr) |
virtual void | visit (shptr< ast::po::PostfixExpression const > postfixExpr) |
![]() | |
VisitorWithResultNode () | |
ir_node * | getResultNode () const |
ir_type * | getResultType () const |
void | setDoStore (bool s) |
int | getVarNum () const |
![]() | |
FirmVisitor () | |
virtual void | setOwner (ir_type *owner) |
virtual ir_type * | getOwner () const |
![]() | |
virtual void | visit (shptr< Node const > node) |
virtual void | visit (shptr< Arguments const > node) |
virtual void | visit (shptr< be::BinaryExpression const > node) |
virtual void | visit (shptr< be::AndAnd const > node) |
virtual void | visit (shptr< be::Eq const > node) |
virtual void | visit (shptr< be::EqEq const > node) |
virtual void | visit (shptr< be::GreaterThan const > node) |
virtual void | visit (shptr< be::GreaterThanEq const > node) |
virtual void | visit (shptr< be::Invalid const > node) |
virtual void | visit (shptr< be::LessThan const > node) |
virtual void | visit (shptr< be::LessThanEq const > node) |
virtual void | visit (shptr< be::Minus const > node) |
virtual void | visit (shptr< be::Mod const > node) |
virtual void | visit (shptr< be::Mult const > node) |
virtual void | visit (shptr< be::NotEq const > node) |
virtual void | visit (shptr< be::OrOr const > node) |
virtual void | visit (shptr< be::Plus const > node) |
virtual void | visit (shptr< be::Slash const > node) |
virtual void | visit (shptr< ClassDeclaration const > node) |
virtual void | visit (shptr< ClassMember const > node) |
virtual void | visit (shptr< Expression const > node) |
virtual void | visit (shptr< FieldDeclaration const > node) |
virtual void | visit (shptr< Ident const > node) |
virtual void | visit (shptr< MainMethodDeclaration const > node) |
virtual void | visit (shptr< MethodDeclaration const > node) |
virtual void | visit (shptr< pe::PrimaryExpression const > node) |
virtual void | visit (shptr< pe::Bool const > node) |
virtual void | visit (shptr< pe::Ident const > node) |
virtual void | visit (shptr< pe::Integer const > node) |
virtual void | visit (shptr< pe::MethodInvocation const > node) |
virtual void | visit (shptr< pe::NewArrayExpression const > node) |
virtual void | visit (shptr< pe::NewObjectExpression const > node) |
virtual void | visit (shptr< pe::Object const > node) |
virtual void | visit (shptr< po::PostfixExpression const > node) |
virtual void | visit (shptr< po::PostfixOp const > node) |
virtual void | visit (shptr< po::ArrayAccess const > node) |
virtual void | visit (shptr< po::FieldAccess const > node) |
virtual void | visit (shptr< po::MethodInvocation const > node) |
virtual void | visit (shptr< Program const > node) |
virtual void | visit (shptr< stmt::Statement const > node) |
virtual void | visit (shptr< stmt::Block const > node) |
virtual void | visit (shptr< stmt::ExpressionStatement const > node) |
virtual void | visit (shptr< stmt::IfStatement const > node) |
virtual void | visit (shptr< stmt::LVDStatement const > node) |
virtual void | visit (shptr< stmt::ReturnStatement const > node) |
virtual void | visit (shptr< stmt::WhileStatement const > node) |
virtual void | visit (shptr< Type const > node) |
virtual void | visit (shptr< TypeIdent const > node) |
virtual void | visit (shptr< ue::UnaryExpression const > node) |
virtual void | visit (shptr< ue::Neg const > node) |
virtual void | visit (shptr< ue::Not const > node) |
Additional Inherited Members | |
![]() | |
ir_node * | resultNode |
ir_type * | resultType |
bool | doStore |
int | varNum |
![]() | |
ir_type * | owner |
firm::visitor::ExpressionVisitor::ExpressionVisitor | ( | ) |
|
virtual |
Reads the bool-value of the visited Bool-expression, creates a boolean constant node and sets that to this visitor's resultNode.
boolExpr | the visited Bool-expression |
|
virtual |
Checks the declaration of the visited Ident-expression. If it has a declaration, it is evaluated with a VariableDeclVisitor. The resultNode and -Type are set the evaluated values. If it has no declaration we got a System (from System.out.println(x)) and the appropriate nodes are created.
identExpr | the visited Ident-expression |
|
virtual |
Reads the integer-value of the visited Integer-expression, creates an integer constant node and sets that to this visitor's resultNode.
integerExpr | the visited Integer-expression |
|
virtual |
Creates a node for the method call with the help of FirmInterface. Sets the resultNode and -Type to node and type of the call.
methodInvocationExpr | the visited primary MethodInvocation |
|
virtual |
Evaluates the size expression of the visited NewArrayExpression. Then creates an appropriate node with the correct size and uses that to set this visitor's resultNode and -Type. Uses FirmInterfaces calloc-call method.
newArrayExpr | the visited NewArrayExpression |
|
virtual |
Creates a node with the appropriate type (based on the visited NewObjectExpression's type) and uses that to set this visitor's resultNode and -Type. Uses FirmInterfaces calloc-call method.
newObjectExpr | the visited NewObjectExpression |
|
virtual |
If the visited Object expression is a 'this', then this visitor's resultNode is set to the node currently stored at pos 0. If it is a 'null', then the resultNode is set to a created NullPointerNode.
objectExpr | the visited Object expression |
|
virtual |
Evaluates the child of the visited Neg expression and then creates a Minus node with the node of the child, if the size of the Neg is uneven.
negExpr | the visited Neg expression |
|
virtual |
Evaluates the visited Not expression with the help of a BoolExpressionVisitor.
notExpr | the visited Not expression |
|
virtual |
[visit description]
eqExpr | [description] |
|
virtual |
Evaluates the visited AndAnd expression with the help of a BoolExpressionVisitor.
andAndExpr | the visited AndAnd expression |
|
virtual |
Evaluates the visited OrOr expression with the help of a BoolExpressionVisitor.
orOrExpr | the visited OrOr expression |
|
virtual |
Evaluates the visited EqEq expression with the help of a BoolExpressionVisitor.
eqEqExpr | the visited EqEq expression |
|
virtual |
Evaluates the visited NotEq expression with the help of a BoolExpressionVisitor.
notEqExpr | the visited NotEq expression |
|
virtual |
Evaluates the visited GreaterThan expression with the help of a BoolExpressionVisitor.
greaterThanExpr | the visited GreaterThan expression |
|
virtual |
Evaluates the visited GreaterThanEq expression with the help of a BoolExpressionVisitor.
greaterThanEqExpr | the visited GreaterThanEq expression |
|
virtual |
Evaluates the visited LessThan expression with the help of a BoolExpressionVisitor.
lessThanExpr | the visited LessThan expression |
|
virtual |
Evaluates the visited AndAnd expression with the help of a BoolExpressionVisitor.
andAndExpr | the visited AndAnd expression |
|
virtual |
Evaluates the children of the visited Plus expression and creates a new Add-node with the evaluated nodes and sets this visitor's resultNode to that.
plusExpr | the visited Plus expression |
|
virtual |
Evaluates the children of the visited Minus expression and creates a new Sub-node with the evaluated nodes and sets this visitor's resultNode to that.
minusExpr | the visited Minus expression |
|
virtual |
Evaluates the children of the visited Mod expression and creates a new Mod-node with the evaluated nodes and sets this visitor's resultNode to that.
modExpr | the visited Mod expression |
|
virtual |
Evaluates the children of the visited Mult expression and creates a new Mul-node with the evaluated nodes and sets this visitor's resultNode to that.
multExpr | the visited Mult expression |
|
virtual |
Evaluates the children of the visited Slash expression and creates a new DivRL-node with the evaluated nodes and sets this visitor's resultNode to that.
slashExpr | the visited Slash expression |
|
virtual |
Prints out an error message, since it shouldn't happen that this visits an Invalid expression.
invalidExpr |
|
virtual |
Evaluates the child of the visited PostfixExpression and then uses a PostfixOpsVisitor to also evalute its PostfixOps.
postfixExpr | the visited PostfixExpression |