ROSE
0.11.96.11
|
Class to traverse the AST and assign unique names to every varRef.
Definition at line 154 of file uniqueNameTraversal.h.
#include <uniqueNameTraversal.h>
Public Types | |
typedef std::vector< SgInitializedName * > | VarName |
A compound variable name as used by the variable renaming. More... | |
Public Types inherited from AstBottomUpProcessing< VariableReferenceSet > | |
typedef SgTreeTraversal< DummyAttribute, VariableReferenceSet >::SynthesizedAttributesList | SynthesizedAttributesList |
typedef SynthesizedAttributesList | SubTreeSynthesizedAttributes |
Public Types inherited from SgTreeTraversal< DummyAttribute, VariableReferenceSet > | |
typedef StackFrameVector< VariableReferenceSet > | SynthesizedAttributesList |
Public Member Functions | |
UniqueNameTraversal (const std::vector< SgInitializedName * > &allNames, bool treatPointersAsStructs=true, bool propagateNamesThroughComma=true) | |
virtual VariableReferenceSet | evaluateSynthesizedAttribute (SgNode *node, SynthesizedAttributesList attrs) |
Called to evaluate the synthesized attribute on every node. More... | |
Public Member Functions inherited from AstBottomUpProcessing< VariableReferenceSet > | |
VariableReferenceSet | traverse (SgNode *node) |
evaluates attributes on the entire AST | |
VariableReferenceSet | traverseWithinFile (SgNode *node) |
evaluates attributes only at nodes which represent the same file as where the evaluation was started | |
void | traverseInputFiles (SgProject *projectNode) |
evaluates attributes only at nodes which represent files which were specified on the command line (=input files). | |
Public Member Functions inherited from SgTreeTraversal< DummyAttribute, VariableReferenceSet > | |
VariableReferenceSet | traverse (SgNode *basenode, DummyAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder) |
VariableReferenceSet | traverseWithinFile (SgNode *basenode, DummyAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder) |
void | traverseInputFiles (SgProject *projectNode, DummyAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder) |
SgTreeTraversal (const SgTreeTraversal &) | |
const SgTreeTraversal & | operator= (const SgTreeTraversal &) |
Static Public Attributes | |
static std::string | varKeyTag |
Tag to use to retrieve unique naming key from node. More... | |
Additional Inherited Members | |
Protected Types inherited from SgTreeTraversal< DummyAttribute, VariableReferenceSet > | |
typedef AstSuccessorsSelectors::SuccessorsContainer | SuccessorsContainer |
typedef SuccessorsContainer & | SuccessorsContainerRef |
Protected Member Functions inherited from AstBottomUpProcessing< VariableReferenceSet > | |
virtual VariableReferenceSet | defaultSynthesizedAttribute () |
Allows to provide a default value for a synthesized attribute of primitive type (e.g. More... | |
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< DummyAttribute, VariableReferenceSet > | |
virtual void | setNodeSuccessors (SgNode *node, SuccessorsContainer &succContainer) |
void | set_useDefaultIndexBasedTraversal (bool) |
typedef std::vector<SgInitializedName*> ssa_private::UniqueNameTraversal::VarName |
A compound variable name as used by the variable renaming.
Definition at line 177 of file uniqueNameTraversal.h.
|
inline |
treatPointersAsStructs | If true, expressions such as p->x will be chained together in a variable name p.x |
propagateNamesThroughComma | If true, expressions such as (a, b).x will be named as b.x. |
Definition at line 182 of file uniqueNameTraversal.h.
|
virtual |
Called to evaluate the synthesized attribute on every node.
This function will handle passing all variables that are referenced by a given expression.
node | The node being evaluated. |
attrs | The attributes from the child nodes. |
Implements AstBottomUpProcessing< VariableReferenceSet >.
|
static |
Tag to use to retrieve unique naming key from node.
Definition at line 174 of file uniqueNameTraversal.h.