Skip to content

AstInterfaceImpl

Synopsis

Declared in <src/midend/astUtil/astInterface/AstInterface_ROSE.h>

class AstInterfaceImpl
    : public ObserveObject<AstObserver>

Base Classes

Name Description
ObserveObject<AstObserver>

Type Aliases

Name
AstNodeList
AstTypeList

Member Functions

Name Description
AstInterfaceImpl
AstInterfaceImpl(SgNode* _top); [constructor]
Construct from SgNode
CopyNewVarDecls
void CopyNewVarDecls(SgBasicBlock* blk);
CreateFieldRef
SgVarRefExp* CreateFieldRef( SgNode* decl, std::string fieldname);
CreateFunction
SgNode* CreateFunction( std::string name, int numOfPars);
CreateFunctionCall
SgNode* CreateFunctionCall( SgNode* func, AstNodeList::const_iterator, AstNodeList::const_iterator e);
CreateVarMemberRef
SgDotExp* CreateVarMemberRef( std::string varname, std::string field, SgNode* loc = 0);
CreateVarRef
SgExpression* CreateVarRef( std::string varname, SgNode* loc = 0);
GetFunc
SgFunctionSymbol* GetFunc(std::string const& name);
GetMemberFunc
SgMemberFunctionSymbol* GetMemberFunc( SgClassDeclaration* c, std::string const& funcname, std::vector<SgExpression*>* args = 0);
LookupFunction
SgFunctionSymbol* LookupFunction( char const* start, SgScopeStatement* loc);
LookupVar
SgVariableSymbol* LookupVar(std::string const& name);
NewFunc
SgFunctionSymbol* NewFunc( std::string const& name, SgType* rtype, std::list<SgInitializedName*> const& args);
NewMemberFunc
SgMemberFunctionSymbol* NewMemberFunc( SgClassDeclaration* decl, std::string const& name, SgType* rtype, std::list<SgInitializedName*> const& args);
NewVar
SgVariableSymbol* NewVar( SgType* type, std::string const& _name, bool makeunique, bool delayDecl, SgExpression* initexp = 0, SgScopeStatement* loc = 0);
ReplaceAst
bool ReplaceAst( SgNode* orig, SgNode* n);
get_scope
SgScopeStatement* get_scope(SgNode* l);
set_top
void set_top(SgNode* _top);

Static Member Functions

Name
GetScope
static SgStatement* GetScope(SgNode* loc);
GetTypeInfo
static void GetTypeInfo( SgType* t, std::string* name = 0, std::string* stripname = 0, bool use_global_unique_name = false);
GetTypeInt
static SgType* GetTypeInt();
IsAssignment
static bool IsAssignment( SgNode const* s, SgNode** lhs = 0, SgNode** rhs = 0, bool* readlhs = 0);
IsFortranLoop
static bool IsFortranLoop( SgNode const* s, SgNode** ivar = 0, SgNode** lb = 0, SgNode** ub = 0, SgNode** step = 0, SgNode** body = 0);
IsFunctionCall
static bool IsFunctionCall( SgNode* s, SgNode** func, AstNodeList* args);
IsVarRef
static bool IsVarRef( SgNode* exp, SgType** vartype = 0, std::string* varname = 0, SgNode** scope = 0, bool* isglobal = 0, bool use_global_unique_name = false, bool* has_ptr_deref = 0);
LookupNestedDeclaration
static SgNode* LookupNestedDeclaration( std::string const& name, SgNode* loc);

Private Types

Name
PendingVariable

Private Data Members

Name
global
newVarIndex
newVarList
scope

Friends

Name Description
AstInterface provides an abstract interface to access/modify AST nodes.

Created with MrDocs