AstInterface
AstInterface(AstInterfaceImpl* __impl); [constructor] | Construct from AstInterfaceImpl |
~AstInterface
~AstInterface(); [destructor] | Destructor |
AttachObserver
void AttachObserver(AstObserver* ob); | |
BlockAppendStmt
void BlockAppendStmt( AstNodePtr& b, AstNodePtr const& s, bool flatten_s = false); | |
BlockPrependStmt
void BlockPrependStmt( AstNodePtr& b, AstNodePtr const& s); | |
CopyAstTree
AstNodePtr CopyAstTree( AstNodePtr const& n, CopyBindings* copies = nullptr); | |
CopyNewVarDecls
void CopyNewVarDecls(AstNodePtr const& nblock); | |
CreateAllocateArray
AstNodePtr CreateAllocateArray( AstNodePtr const& arr, AstNodeType const& elemtype, AstList const& indexsize); | |
CreateAssignment
AstNodePtr CreateAssignment( AstNodePtr const& lhs, AstNodePtr const& rhs); | |
CreateBinaryOP
AstNodePtr CreateBinaryOP( OperatorEnum op, AstNodePtr const& a0, AstNodePtr const& a2); | |
CreateBlock
AstNodePtr CreateBlock(AstNodePtr const& orig = AST_NULL); | |
CreateConstant
AstNodePtr CreateConstant( std::string const& valtype, std::string const& val); | |
CreateDeleteArray
AstNodePtr CreateDeleteArray(AstNodePtr const& arr); | |
CreateFieldRef
AstNodePtr CreateFieldRef( std::string name1, std::string name2); | |
CreateFunctionCall
AstNodePtr CreateFunctionCall( AstNodePtr const& func, AstList::const_iterator args_begin, AstList::const_iterator args_end); | |
CreateIf
AstNodePtr CreateIf( AstNodePtr const& __cond, AstNodePtr const& __if_stmt, AstNodePtr const& __else_stmt = AST_NULL) const; | Creates if-else-statement, or if-statement (if __else_stmt is null). |
CreateLoop
AstNodePtr CreateLoop( AstNodePtr const& ivar, AstNodePtr const& lb, AstNodePtr const& ub, AstNodePtr const& step, AstNodePtr const& stmts, bool negativeStep); | |
CreateMethodRef
AstNodePtr CreateMethodRef( std::string classname, std::string fieldname, bool createIfNotFound); | |
CreateUnaryOP
AstNodePtr CreateUnaryOP( OperatorEnum op, AstNodePtr const& arg); | |
CreateVarRef
AstNodePtr CreateVarRef( std::string varname, AstNodePtr const& declLoc = AST_NULL); | |
DetachObserver
void DetachObserver(AstObserver* ob); | |
FreeAstTree
void FreeAstTree(AstNodePtr const& n); | |
GetArrayBound
bool GetArrayBound( AstNodePtr const& arrayname, int dim, int& lb, int& ub); | |
GetArrayType
AstNodeType GetArrayType( AstNodeType const& base, AstList const& indexsize); | |
GetCopySource
AstNodePtr GetCopySource(AstNodePtr const& n) const; | |
GetFunctionCallSideEffect
bool GetFunctionCallSideEffect( AstNodePtr const& fc, CollectObject<AstNodePtr>& collectmod, CollectObject<AstNodePtr>& collectread); | |
GetFunctionDefinition
AstNodePtr GetFunctionDefinition( AstNodePtr const& n, std::string* name = 0); | |
GetNextStmt
AstNodePtr GetNextStmt(AstNodePtr const& s); | |
GetParent
AstNodePtr GetParent(AstNodePtr const& n); | |
GetParentBlock
AstNodePtr GetParentBlock(AstNodePtr const& __n); | Returns the enclosing block. |
GetParentStatement
AstNodePtr GetParentStatement(AstNodePtr const& __n); | Returns the enclosing statement. |
GetPointerType
AstNodeType GetPointerType(AstNodeType const& base); | |
GetPrevStmt
AstNodePtr GetPrevStmt(AstNodePtr const& s); | |
GetRoot
AstNodePtr GetRoot() const; | |
GetType
AstNodeType GetType(std::string const& name); | |
InsertAnnot
void InsertAnnot( AstNodePtr const& n, std::string const& annot, bool before = true); | |
InsertStmt
void InsertStmt( AstNodePtr const& orig, AstNodePtr const& n, bool before = true, bool extractFromBlock = false); | |
IsAliasingDecl
bool IsAliasingDecl( AstNodePtr const& exp, AstList* vars = 0, AstList* aliases = 0); | Check if exp declares a set of variables to be aliased to non-local storages, represented by the returned global_signatures. |
IsBinaryOp
bool IsBinaryOp( AstNodePtr const& exp, OperatorEnum* opr = 0, AstNodePtr* opd1 = 0, AstNodePtr* opd2 = 0); | |
IsCompatibleType
bool IsCompatibleType( AstNodeType const& t1, AstNodeType const& t2); | |
IsConstInt
bool IsConstInt( AstNodePtr const& exp, int* value = 0); | |
IsConstant
bool IsConstant( AstNodePtr const& exp, std::string* valtype = 0, std::string* value = 0); | Check whether (exp) is a constant value of type int, float, string, etc. |
IsDecls
bool IsDecls(AstNodePtr const& s); | |
IsExecutableStmt
bool IsExecutableStmt(AstNodePtr const& s); | |
IsFunctionCall
bool IsFunctionCall( AstNodePtr const& s, AstNodePtr* f = 0, AstList* args = 0, AstList* outargs = 0, AstTypeList* paramtypes = 0, AstNodeType* returntype = 0); | Returns true iff s is a function call, false otherwise. But also attempts to extract a bunch of info about the call. |
IsFunctionType
bool IsFunctionType( AstNodeType const& t, AstTypeList* paramtypes = 0); | |
IsGoto
bool IsGoto( AstNodePtr const& s, AstNodePtr* dest = 0); | Check whether (s) is a jump (goto, return, continue, break, etc) stmt; if yes, grab the jump destination in 'dest' |
IsGotoAfter
bool IsGotoAfter(AstNodePtr const& s); | |
IsGotoBefore
bool IsGotoBefore(AstNodePtr const& s); | |
IsLabelStatement
bool IsLabelStatement(AstNodePtr const& s); | |
IsMax
bool IsMax(AstNodePtr const& exp); | |
IsMin
bool IsMin(AstNodePtr const& exp); | |
IsPointerType
bool IsPointerType(AstNodeType const& t); | |
IsPostTestLoop
bool IsPostTestLoop(AstNodePtr const& s); | |
IsScalarType
bool IsScalarType(AstNodeType const& t); | |
IsUnaryOp
bool IsUnaryOp( AstNodePtr const& exp, OperatorEnum* op = 0, AstNodePtr* opd = 0); | |
NewVar
std::string NewVar( AstNodeType const& t, std::string const& name = "", bool makeunique = false, bool delayInsert = true, AstNodePtr const& declLoc = AST_NULL, AstNodePtr const& init = AST_NULL, AstNodePtr* createdSymbol = nullptr); | |
RemoveStmt
bool RemoveStmt(AstNodePtr const& n); | |
ReplaceAst
bool ReplaceAst( AstNodePtr const& orig, AstNodePtr const& n); | |
SetParent
void SetParent( AstNodePtr const& n, AstNodePtr const& p); | |
SetRoot
void SetRoot(AstNodePtr const& root); | |
getNULL
AstNodePtr getNULL() const; | |
get_fileInfo
bool get_fileInfo( AstNodePtr const& n, std::string* fname = 0, int* lineno = 0); | |
get_impl
AstInterfaceImpl* get_impl(); | |