mjplusplus
v0.4.1
|
#include <VariableDeclVisitor.hpp>
Public Member Functions | |
VariableDeclVisitor (ir_node *current_this) | |
virtual void | visit (shptr< ast::FieldDeclaration const > fieldDeclaration) |
virtual void | visit (shptr< ast::stmt::LVDStatement const > lvdStatement) |
virtual void | visit (shptr< ast::TypeIdent const > typeIdent) |
![]() | |
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< 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< ue::UnaryExpression const > node) |
virtual void | visit (shptr< ue::Neg const > node) |
virtual void | visit (shptr< ue::Not const > node) |
Protected Member Functions | |
void | visitLVDStatementOrTypeIdent (shptr< ast::VariableDeclaration const > variableDeclaration, std::string varName) |
Protected Attributes | |
ir_node * | current_this |
ir_node * | store_value |
![]() | |
ir_node * | resultNode |
ir_type * | resultType |
bool | doStore |
int | varNum |
![]() | |
ir_type * | owner |
firm::visitor::VariableDeclVisitor::VariableDeclVisitor | ( | ir_node * | current_this | ) |
Constructs a VariableDeclVisitor with a current this node.
the | current this node |
|
virtual |
Accesses the field that belongs to the visited FieldDeclaration. Sets the resultNode and -Type to the node and type of the field entity.
fieldDeclaration | the visited FieldDeclaration |
Reimplemented from ast::ASTVisitor.
|
virtual |
Evaluates the visited LVDStatement by retrieving the variables position and type in the current context from the FirmInterface based on the variable's name/type. If doStore, then varNum is set to position. Else the returnNode is set to the value at the position.
lvdStatement | the visited LVDStatement |
|
virtual |
Evaluates the visited TypeIdent by retrieving the variables position and type in the current context from the FirmInterface based on the variable's name/type. If doStore, then varNum is set to position. Else the returnNode is set to the value at the position.
typeIdent | the visited TypeIdent |
Reimplemented from ast::ASTVisitor.
|
protected |
Evaluates the given VariableDeclaration by retrieving the variables position and type in the current context from the FirmInterface based on the variable's name/type. If doStore, then varNum is set to position. Else the returnNode is set to the value at the position.
variableDeclaration | the given VariableDeclaration |
varName | the variable's name |
|
protected |
the current this node
|
protected |
the store value