ROSE
0.9.6a
|
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. More...
#include <functionEvaluationOrderTraversal.h>
Public Member Functions | |
FunctionCallInheritedAttribute | evaluateInheritedAttribute (SgNode *astNode, FunctionCallInheritedAttribute parentAttribute) |
Visits AST nodes in pre-order. More... | |
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. More... | |
Public Member Functions inherited from AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool > | |
bool | traverse (SgNode *node, FunctionCallInheritedAttributeinheritedValue) |
evaluates attributes on the entire AST More... | |
bool | traverseWithinFile (SgNode *node, FunctionCallInheritedAttributeinheritedValue) |
evaluates attributes only at nodes which represent the same file as where the evaluation was started More... | |
Public Member Functions inherited from SgTreeTraversal< FunctionCallInheritedAttribute, bool > | |
bool | traverse (SgNode *basenode, FunctionCallInheritedAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder) |
bool | traverseWithinFile (SgNode *basenode, FunctionCallInheritedAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder) |
void | traverseInputFiles (SgProject *projectNode, FunctionCallInheritedAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder) |
virtual | ~SgTreeTraversal () |
SgTreeTraversal () | |
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. More... | |
Private Member Functions | |
FunctionEvaluationOrderTraversal () | |
Private constructor. Use the static method to access the functionality of this class. More... | |
Private Attributes | |
std::vector< FunctionCallInfo > | normalizableFunctionCalls |
All the function calls seen so far that can be normalized. More... | |
std::vector< FunctionCallInfo > | nonNormalizableFunctionCalls |
All the function calls seen so far that can't be normalized. More... | |
Additional Inherited Members | |
Public Types inherited from AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool > | |
typedef SgTreeTraversal < FunctionCallInheritedAttribute, bool > ::SynthesizedAttributesList | SynthesizedAttributesList |
typedef SynthesizedAttributesList | SubTreeSynthesizedAttributes |
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. More... | |
virtual void | atTraversalEnd () |
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 59 of file functionEvaluationOrderTraversal.h.
|
inlineprivate |
Private constructor. Use the static method to access the functionality of this class.
Definition at line 79 of file functionEvaluationOrderTraversal.h.
|
static |
Traverses the subtree of the given AST node and finds all function calls in function-evaluation order.
|
virtual |
Visits AST nodes in pre-order.
Implements AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool >.
|
virtual |
Visits AST nodes in post-order.
This is function-evaluation order.
Implements AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool >.
|
virtual |
Returns true if the function call has no side effects.
|
private |
All the function calls seen so far that can be normalized.
Definition at line 82 of file functionEvaluationOrderTraversal.h.
|
private |
All the function calls seen so far that can't be normalized.
Definition at line 84 of file functionEvaluationOrderTraversal.h.