ROSE
0.11.96.11
|
Traverses a given AST and finds all function calls in the order in which they're evaluated Also, for each function we find where to put declarations of temporary variables so that they're accessible at the function call.
Definition at line 62 of file functionEvaluationOrderTraversal.h.
#include <functionEvaluationOrderTraversal.h>
Public Member Functions | |
FunctionCallInheritedAttribute | evaluateInheritedAttribute (SgNode *astNode, FunctionCallInheritedAttribute parentAttribute) |
Visits AST nodes in pre-order. | |
bool | evaluateSynthesizedAttribute (SgNode *astNode, FunctionCallInheritedAttribute parentAttribute, SynthesizedAttributesList) |
Visits AST nodes in post-order. More... | |
virtual bool | IsFunctionCallSideEffectFree (SgFunctionCallExp *functionCall) |
Returns true if the function call has no side effects. | |
![]() | |
bool | traverse (SgNode *node, FunctionCallInheritedAttribute inheritedValue) |
evaluates attributes on the entire AST | |
bool | traverseWithinFile (SgNode *node, FunctionCallInheritedAttribute inheritedValue) |
evaluates attributes only at nodes which represent the same file as where the evaluation was started | |
![]() | |
bool | traverse (SgNode *basenode, FunctionCallInheritedAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder) |
bool | traverseWithinFile (SgNode *basenode, FunctionCallInheritedAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder) |
void | traverseInputFiles (SgProject *projectNode, FunctionCallInheritedAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder) |
SgTreeTraversal (const SgTreeTraversal &) | |
const SgTreeTraversal & | operator= (const SgTreeTraversal &) |
Static Public Member Functions | |
static std::pair< std::vector< FunctionCallInfo >, std::vector< FunctionCallInfo > > | GetFunctionCalls (SgNode *root) |
Traverses the subtree of the given AST node and finds all function calls in function-evaluation order. | |
Additional Inherited Members | |
![]() | |
typedef SgTreeTraversal< FunctionCallInheritedAttribute, bool >::SynthesizedAttributesList | SynthesizedAttributesList |
typedef SynthesizedAttributesList | SubTreeSynthesizedAttributes |
![]() | |
typedef StackFrameVector< bool > | SynthesizedAttributesList |
![]() | |
typedef AstSuccessorsSelectors::SuccessorsContainer | SuccessorsContainer |
typedef SuccessorsContainer & | SuccessorsContainerRef |
![]() | |
virtual void | atTraversalStart () |
Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no-op. | |
virtual void | atTraversalEnd () |
![]() | |
virtual void | setNodeSuccessors (SgNode *node, SuccessorsContainer &succContainer) |
virtual bool | defaultSynthesizedAttribute (FunctionCallInheritedAttribute inh) |
void | set_useDefaultIndexBasedTraversal (bool) |
|
virtual |
Visits AST nodes in post-order.
This is function-evaluation order.
Implements AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool >.