AstInterface
provides an abstract interface to access/modify AST nodes.
Synopsis
Declared in <src/midend/astUtil/astInterface/AstInterface.h>
class AstInterface;
Types
Enums
Member Functions
Name |
Description |
|
Construct from |
|
Destructor |
Create AST for constant values of types int, bool, string, float, etc. as well as names of variable and function references. e.g: CreateConstant("memberfunction","floatArray::length") |
|
Creates if‐else‐statement, or if‐statement (if __else_stmt is null). |
|
Creates an empty statement. |
|
Creates a statement that prints __refs to stdout. |
|
Creates a statement that reads __refs from stdin. |
|
Creates a statement that writes __refs to stdout. |
|
Returns the enclosing block. |
|
Returns the enclosing statement. |
|
Check if exp declares a set of variables to be aliased to non‐local storages, represented by the returned global_signatures. |
|
Check whether exp is a constant value of type int, float, string, etc. |
|
Returns true iff s is a function call, false otherwise. But also attempts to extract a bunch of info about the call. |
|
Check whether s is a jump (goto, return, continue, break, etc) stmt; if yes, grab the jump destination in 'dest' |
|
Static Member Functions
Name |
Description |
Output the type of the AstNodePtr. |
|
Returns a string that uniquely identifies the given variable. |
|
Check whether s is a Fortran‐style loop in the form: for (ivar=lb;ivar<=ub;ivar+=step) |
|
Returns whether the given ref reaches only local data within scope. if has_ptr_deref != 0, it is set to true if ref has pointer deref. |
|
Check whether exp is a variable reference; If yes, return type, name, scope, and global/local etc. |
|
If there is a case, extract the operand and return it, otherwise return exp |
|
Protected Data Members
Name |
Non-Member Functions
Name |
Description |
Traverse an entire AST, where op is invoked on each AST node to gather information. |
|
Traverse and transform an entire AST, where op is invoked to transform each sub‐Tree. |
Derived Classes
Name |
Description |
Created with MrDocs