ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VariableRenaming::UniqueNameTraversal Class Reference

Class to traverse the AST and assign unique names to every varRef. More...

Inheritance diagram for VariableRenaming::UniqueNameTraversal:
Collaboration diagram for VariableRenaming::UniqueNameTraversal:

Public Member Functions

 UniqueNameTraversal (VariableRenaming *varRenaming, const std::vector< SgInitializedName * > &allNames)
 
virtual
VariableRenaming::VarRefSynthAttr 
evaluateSynthesizedAttribute (SgNode *node, SynthesizedAttributesList attrs)
 Called to evaluate the synthesized attribute on every node. More...
 
- Public Member Functions inherited from AstBottomUpProcessing< VariableRenaming::VarRefSynthAttr >
VariableRenaming::VarRefSynthAttr traverse (SgNode *node)
 evaluates attributes on the entire AST More...
 
VariableRenaming::VarRefSynthAttr traverseWithinFile (SgNode *node)
 evaluates attributes only at nodes which represent the same file as where the evaluation was started More...
 
void traverseInputFiles (SgProject *projectNode)
 evaluates attributes only at nodes which represent files which were specified on the command line (=input files). More...
 
- Public Member Functions inherited from SgTreeTraversal< DummyAttribute, VariableRenaming::VarRefSynthAttr >
VariableRenaming::VarRefSynthAttr traverse (SgNode *basenode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder)
 
VariableRenaming::VarRefSynthAttr traverseWithinFile (SgNode *basenode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder)
 
void traverseInputFiles (SgProject *projectNode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder)
 
virtual ~SgTreeTraversal ()
 
 SgTreeTraversal ()
 
 SgTreeTraversal (const SgTreeTraversal &)
 
const SgTreeTraversaloperator= (const SgTreeTraversal &)
 

Private Member Functions

SgInitializedNameresolveTemporaryInitNames (SgInitializedName *name)
 Finds initialized names that are "fake" (refer to p_prev_decl_item in the SgInitializedName docs) and replaces them with the true declaration. More...
 

Private Attributes

VariableRenamingvarRename
 
std::vector< SgInitializedName * > allInitNames
 All the initialized names in the project. More...
 

Additional Inherited Members

- Public Types inherited from AstBottomUpProcessing< VariableRenaming::VarRefSynthAttr >
typedef SgTreeTraversal
< DummyAttribute,
VariableRenaming::VarRefSynthAttr >
::SynthesizedAttributesList 
SynthesizedAttributesList
 
typedef SynthesizedAttributesList SubTreeSynthesizedAttributes
 
- Protected Types inherited from SgTreeTraversal< DummyAttribute, VariableRenaming::VarRefSynthAttr >
typedef
AstSuccessorsSelectors::SuccessorsContainer 
SuccessorsContainer
 
typedef SuccessorsContainerSuccessorsContainerRef
 
- Protected Member Functions inherited from AstBottomUpProcessing< VariableRenaming::VarRefSynthAttr >
virtual
VariableRenaming::VarRefSynthAttr 
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. More...
 
virtual void atTraversalEnd ()
 

Detailed Description

Class to traverse the AST and assign unique names to every varRef.

Definition at line 902 of file VariableRenaming.h.

Constructor & Destructor Documentation

VariableRenaming::UniqueNameTraversal::UniqueNameTraversal ( VariableRenaming varRenaming,
const std::vector< SgInitializedName * > &  allNames 
)
inline

Definition at line 914 of file VariableRenaming.h.

Member Function Documentation

SgInitializedName* VariableRenaming::UniqueNameTraversal::resolveTemporaryInitNames ( SgInitializedName name)
private

Finds initialized names that are "fake" (refer to p_prev_decl_item in the SgInitializedName docs) and replaces them with the true declaration.

virtual VariableRenaming::VarRefSynthAttr VariableRenaming::UniqueNameTraversal::evaluateSynthesizedAttribute ( SgNode node,
SynthesizedAttributesList  attrs 
)
virtual

Called to evaluate the synthesized attribute on every node.

This function will handle passing all variables that are referenced by a given expression.

Parameters
nodeThe node being evaluated.
attrsThe attributes from the child nodes.
Returns
The attribute at this node.

Implements AstBottomUpProcessing< VariableRenaming::VarRefSynthAttr >.

Member Data Documentation

VariableRenaming* VariableRenaming::UniqueNameTraversal::varRename
private

Definition at line 904 of file VariableRenaming.h.

std::vector<SgInitializedName*> VariableRenaming::UniqueNameTraversal::allInitNames
private

All the initialized names in the project.

Definition at line 907 of file VariableRenaming.h.


The documentation for this class was generated from the following file: