ROSE  0.9.9.168
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
SgAsmCoffStrtab Class Reference

Description

Definition at line 392459 of file Cxx_Grammar.h.

Inheritance diagram for SgAsmCoffStrtab:
Inheritance graph
[legend]
Collaboration diagram for SgAsmCoffStrtab:
Collaboration graph
[legend]

Public Types

enum  { static_variant = V_SgAsmCoffStrtab }
 static variant value
 
typedef SgAsmGenericStrtab base_node_type
 

Public Member Functions

virtual SgNodecopy (SgCopyHelp &help) const ROSE_OVERRIDE
 
 SgAsmCoffStrtab (class SgAsmPESection *containing_section)
 
virtual void unparse (std::ostream &) const
 
virtual SgAsmStringStoragecreate_storage (rose_addr_t offset, bool shared) ROSE_OVERRIDE
 
virtual rose_addr_t get_storage_size (const SgAsmStringStorage *) ROSE_OVERRIDE
 
virtual std::string class_name () const ROSE_OVERRIDE
 returns a string representing the class name
 
virtual VariantT variantT () const ROSE_OVERRIDE
 returns new style SageIII enum values
 
void * operator new (size_t size)
 returns pointer to newly allocated IR node
 
void operator delete (void *pointer, size_t size)
 deallocated memory for IR node (returns memory to memory pool for reuse)
 
void operator delete (void *pointer)
 ROSETTA generated delete operator: deletes all non-traversed members.
 
virtual std::vector< SgNode * > get_traversalSuccessorContainer () ROSE_OVERRIDE
 container of pointers to AST successor nodes used in the traversal overridden in every class by generated implementation
 
virtual std::vector< std::string > get_traversalSuccessorNamesContainer () ROSE_OVERRIDE
 container of names of variables or container indices used used in the traversal to access AST successor nodes overridden in every class by generated implementation
 
virtual size_t get_numberOfTraversalSuccessors () ROSE_OVERRIDE
 return number of children in the traversal successor list
 
virtual SgNodeget_traversalSuccessorByIndex (size_t idx) ROSE_OVERRIDE
 index-based access to traversal successors by index number
 
virtual size_t get_childIndex (SgNode *child) ROSE_OVERRIDE
 index-based access to traversal successors by child node
 
virtual RTIReturnType roseRTI () ROSE_OVERRIDE
 return C++ Runtime-Time-Information
 
virtual const char * sage_class_name () const ROSE_OVERRIDE ROSE_DEPRECATED_FUNCTION
 
void executeVisitorMemberFunction (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern.
 
virtual void accept (ROSE_VisitorPattern &visitor) ROSE_OVERRIDE
 support for the classic visitor pattern done in GoF
 
virtual bool isInMemoryPool () ROSE_OVERRIDE
 FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap. More...
 
virtual void checkDataMemberPointersIfInMemoryPool () ROSE_OVERRIDE
 FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap. More...
 
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers () const ROSE_OVERRIDE
 FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools More...
 
virtual void processDataMemberReferenceToPointers (ReferenceToPointerHandler *) ROSE_OVERRIDE
 FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools More...
 
virtual long getChildIndex (SgNode *childNode) const ROSE_OVERRIDE
 FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR node. More...
 
 SgAsmCoffStrtab (const SgAsmCoffStrtabStorageClass &source)
 IR node constructor to support AST File I/O.
 
SgAsmCoffStrtabaddRegExpAttribute (std::string s, AstRegExAttribute *a)
 Support for AST matching using regular expression. More...
 

Static Public Member Functions

static size_t numberOfNodes ()
 Returns the total number of IR nodes of this type.
 
static size_t memoryUsage ()
 Returns the size in bytes of the total memory allocated for all IR nodes of this type.
 
static void traverseMemoryPoolNodes (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
 
static void traverseMemoryPoolVisitorPattern (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern.
 
static void visitRepresentativeNode (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for type-based traversal.
 
static SgAsmCoffStrtabbuild_node_from_nonlist_children ()
 

Friends

ROSE_DLL_API friend SgAsmCoffStrtabisSgAsmCoffStrtab (SgNode *s)
 Casts pointer from base class to derived class.
 
ROSE_DLL_API friend const SgAsmCoffStrtabisSgAsmCoffStrtab (const SgNode *s)
 Casts pointer from base class to derived class (for const pointers)
 
SgAsmCoffStrtabSgAsmCoffStrtab_getPointerFromGlobalIndex (unsigned long globalIndex)
 Methods to find the pointer to a global and local index.
 
unsigned long SgAsmCoffStrtab_getNumberOfValidNodesAndSetGlobalIndexInFreepointer (unsigned long)
 Get the size of the memory pool. More...
 
void SgAsmCoffStrtab_clearMemoryPool ()
 clear the memory pool
 
void SgAsmCoffStrtab_extendMemoryPoolForFileIO (unsigned long)
 internal support for AST file I/O (operating on the memory pools)
 
void SgAsmCoffStrtab_getNextValidPointer (std::pair< SgAsmCoffStrtab *, std::vector< unsigned char * >::const_iterator > &)
 internal support for AST file I/O (operating on the memory pools)
 
void SgAsmCoffStrtab_resetValidFreepointers ()
 internal support for AST file I/O (operating on the memory pools)
 

Member Function Documentation

virtual const char* SgAsmCoffStrtab::sage_class_name ( ) const
virtual

returns a C style string (char*) representing the class name

virtual bool SgAsmCoffStrtab::isInMemoryPool ( )
virtual

FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.

The AST File I/O depends upon the allocation of IR nodes being from the heap, stack based or global IR nodes should not appear in the AST if it will be written out to a file and read back in. To enforce this concept, this function implements a test to verify that the IR node can be found on the heap and is part of a larger test of the whole AST. This test must pass before the AST can be written out to a file. This is part of a compromise in the design of the AST File I/O to support binary streaming of data to files; for performance. It is also rather difficult, but possible, to build a useful AST with IR nodes allocated on the stack or frm global scope, this test filters out such cased from being used with the AST File I/O mechanism.

virtual void SgAsmCoffStrtab::checkDataMemberPointersIfInMemoryPool ( )
virtual

FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.

The AST File I/O depends upon the allocation of IR nodes being from the heap, stack based or global IR nodes should not appear in the AST if it will be written out to a file and read back in. To enforce this concept, this function implements a test to verify that the IR node can be found on the heap and is part of a larger test of the whole AST. This test must pass before the AST can be written out to a file. This is part of a compromise in the design of the AST File I/O to support binary streaming of data to files; for performance. It is also rather difficult, but possible, to build a useful AST with IR nodes allocated on the stack or frm global scope, this test filters out such cased from being used with the AST File I/O mechanism.

virtual std::vector<std::pair<SgNode*,std::string> > SgAsmCoffStrtab::returnDataMemberPointers ( ) const
virtual

FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools

This functions is part of general support for many possible tools to operate on the AST. The forms a list of ALL IR node pointers used by each IR node, and is a supperset of the get_traversalSuccessorContainer(). It is (I think) less than the set of pointers used by the AST file I/O. This is part of work implemented by Andreas, and support tools such as the AST graph generation.

Warning
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
Returns
STL vector of pairs of SgNode* and strings
virtual void SgAsmCoffStrtab::processDataMemberReferenceToPointers ( ReferenceToPointerHandler *  )
virtual

FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools

This functions similar to returnDataMemberPointers() except that it passes references to a handler object. As a result there is FAR more damage that can be done by using this function, but it is type-safe. This is provided for support of internal tools that operate on the AST, e.g the AST Merge mechanism.

Warning
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
virtual long SgAsmCoffStrtab::getChildIndex ( SgNode childNode) const
virtual

FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR node.

This function returns a unique value for the input childNode in set of children at this IR node. Note that a negative value indicates that the input node is not a child. This is the basis for the implementation of the isChild(SgNode*) member function. Data members that are NULL in the IR node are counted internally (so that this function returns value that could be statically defined, and so are not dynamically determined).

Warning
The mapping on children to integer values could change from release to release of ROSE.
Returns
long
SgAsmCoffStrtab* SgAsmCoffStrtab::addRegExpAttribute ( std::string  s,
AstRegExAttribute *  a 
)

Support for AST matching using regular expression.

This support is incomplete and the subject of current research to define RegEx trees to support inexact matching.

Friends And Related Function Documentation

unsigned long SgAsmCoffStrtab_getNumberOfValidNodesAndSetGlobalIndexInFreepointer ( unsigned  long)
friend

Get the size of the memory pool.

It actually returns the size of the whole blocks allocated, no matter they contain valid pointers or not.


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