Class FunctionEvaluationOrderTraversal#
Defined in File functionEvaluationOrderTraversal.h
Inheritance Relationships#
Base Type#
public AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool >(Template Class AstTopDownBottomUpProcessing)
Class Documentation#
-
class FunctionEvaluationOrderTraversal : public AstTopDownBottomUpProcessing<FunctionCallInheritedAttribute, bool>#
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.
Public Functions
-
virtual FunctionCallInheritedAttribute evaluateInheritedAttribute(SgNode *astNode, FunctionCallInheritedAttribute parentAttribute)#
Visits AST nodes in pre-order.
-
virtual bool evaluateSynthesizedAttribute(SgNode *astNode, FunctionCallInheritedAttribute parentAttribute, SynthesizedAttributesList)#
Visits AST nodes in post-order.
This is function-evaluation order.
-
virtual bool IsFunctionCallSideEffectFree(SgFunctionCallExp *functionCall)#
Returns true if the function call has no side effects.
Public Static 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.
-
virtual FunctionCallInheritedAttribute evaluateInheritedAttribute(SgNode *astNode, FunctionCallInheritedAttribute parentAttribute)#