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. | |
Public Member Functions inherited from AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool > | |
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 | |
Public Member Functions inherited from SgTreeTraversal< FunctionCallInheritedAttribute, bool > | |
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 | |
Public Types inherited from AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool > | |
typedef SgTreeTraversal< FunctionCallInheritedAttribute, bool >::SynthesizedAttributesList | SynthesizedAttributesList |
typedef SynthesizedAttributesList | SubTreeSynthesizedAttributes |
Public Types inherited from SgTreeTraversal< FunctionCallInheritedAttribute, bool > | |
typedef StackFrameVector< bool > | SynthesizedAttributesList |
Protected Types inherited from SgTreeTraversal< FunctionCallInheritedAttribute, bool > | |
typedef AstSuccessorsSelectors::SuccessorsContainer | SuccessorsContainer |
typedef SuccessorsContainer & | SuccessorsContainerRef |
Protected Member Functions inherited from AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool > | |
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 () |
Protected Member Functions inherited from SgTreeTraversal< FunctionCallInheritedAttribute, bool > | |
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 >.