2#ifndef ROSE_SgAsmCilTypeDef_H
3#define ROSE_SgAsmCilTypeDef_H
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmCilMetadata.h>
30#if !defined(DOCUMENTATION)
45#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
47 friend class boost::serialization::access;
53 s & BOOST_SERIALIZATION_NVP(p_Flags);
54 s & BOOST_SERIALIZATION_NVP(p_TypeName);
55 s & BOOST_SERIALIZATION_NVP(p_TypeNamespace);
56 s & BOOST_SERIALIZATION_NVP(p_Extends);
57 s & BOOST_SERIALIZATION_NVP(p_FieldList);
58 s & BOOST_SERIALIZATION_NVP(p_MethodList);
64 using TypeFlags = std::uint32_t;
69 FLG_VISIBILITY_MASK = 0x00000007,
71 FLG_NOT_PUBLIC = 0x00000000,
72 FLG_PUBLIC = 0x00000001,
73 FLG_NESTED_PUBLIC = 0x00000002,
74 FLG_NESTED_PRIVATE = 0x00000003,
75 FLG_NESTED_FAMILY = 0x00000004,
76 FLG_NESTED_ASSEMBLY = 0x00000005,
77 FLG_NESTED_FAM_AND_ASSEM = 0x00000006,
78 FLG_NESTED_FAM_OR_ASSEM = 0x00000007,
80 FLG_LAYOUT_MASK = 0x00000018,
82 FLG_AUTO_LAYOUT = 0x00000000,
83 FLG_SEQUENTIAL_LAYOUT = 0x00000008,
84 FLG_EXPLICIT_LAYOUT = 0x00000010,
86 FLG_CLASS_SEMANTICS_MASK = 0x00000020,
88 FLG_CLASS = 0x00000000,
89 FLG_INTERFACE = 0x00000020,
91 FLG_ABSTRACT = 0x00000080,
92 FLG_SEALED = 0x00000100,
93 FLG_SPECIAL_NAME = 0x00000400,
95 FLG_IMPORT = 0x00001000,
96 FLG_SERIALIZABLE = 0x00002000,
98 FLG_STRING_FORMAT_MASK = 0x00030000,
100 FLG_ANSI_CLASS = 0x00000000,
101 FLG_UNICODE_CLASS = 0x00010000,
102 FLG_AUTO_CLASS = 0x00020000,
103 FLG_CUSTOM_FORMAT_CLASS = 0x00030000,
104 FLG_CUSTOM_STRING_FORMAT_MASK = 0x00C00000,
107 FLG_BEFORE_FIELD_INIT = 0x00100000,
109 FLG_RT_SPECIAL_NAME = 0x00000800,
110 FLG_HAS_SECURITY = 0x00040000,
111 FLG_IS_TYPE_FORWARDER = 0x00200000,
121 uint32_t
const& get_Flags()
const;
122 void set_Flags(uint32_t
const&);
131 uint32_t
const& get_TypeName()
const;
132 void set_TypeName(uint32_t
const&);
141 uint32_t
const& get_TypeNamespace()
const;
142 void set_TypeNamespace(uint32_t
const&);
151 uint32_t
const& get_Extends()
const;
152 void set_Extends(uint32_t
const&);
161 uint32_t
const& get_FieldList()
const;
162 void set_FieldList(uint32_t
const&);
171 uint32_t
const& get_MethodList()
const;
172 void set_MethodList(uint32_t
const&);
175 void parse(
const std::vector<uint8_t>& buf,
size_t& index, uint64_t uses4byteIndexing);
176 void unparse(std::vector<uint8_t>& buf,
size_t& index, uint64_t uses4byteIndexing)
const;
177 void dump(std::ostream&)
const;
179 const std::uint8_t* get_TypeName_string()
const;
180 const std::uint8_t* get_TypeNamespace_string()
const;
219 virtual std::string
class_name()
const override;
222 virtual VariantT
variantT()
const override;
227 enum { static_variant = V_SgAsmCilTypeDef };
242 static const unsigned pool_size;
244 static std::vector<unsigned char *> pools;
249 static unsigned long initializeStorageClassArray(SgAsmCilTypeDefStorageClass *);
252 static void clearMemoryPool();
253 static void deleteMemoryPool();
256 static void extendMemoryPoolForFileIO();
261 static SgAsmCilTypeDef * getPointerFromGlobalIndex(AstSpecificDataManagingClass *,
unsigned long);
264 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(
unsigned long);
266 static void resetValidFreepointers();
268 static unsigned long getNumberOfLastValidPointer();
271#if defined(INLINE_FUNCTIONS)
273 inline void *
operator new (
size_t size);
276 void *
operator new (
size_t size);
279 void operator delete (
void* pointer,
size_t size);
282 void operator delete (
void* pointer)
328#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
331 virtual RTIReturnType
roseRTI()
override;
345 virtual const char*
sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
351 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
533 friend class SgAsmCilTypeDefStorageClass;
536 friend class AstSpecificDataManagingClass;
539 friend class AstSpecificDataManagingClassStorageClass;
571#define BUILD_ATERM_SUPPORT 0
572 #if BUILD_ATERM_SUPPORT
573 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
585 virtual ATerm generate_ATerm()
override;
588 virtual void generate_ATerm_Annotation(ATerm & term)
override;
627uint32_t p_TypeNamespace;
639uint32_t p_MethodList;
Class holding static data and functions supporting File I/O.
Attribute containing a regex expression as a string.
CIL MethodDef node (II.22.26).
CIL TypeDef node (II.22.37).
Supporting class from copy mechanism within ROSE.
This class represents the base class for all IR nodes within Sage III.
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual size_t get_numberOfTraversalSuccessors() const
return number of children in the traversal successor list
virtual std::vector< std::string > get_traversalSuccessorNamesContainer() const
container of names of variables or container indices used used in the traversal to access AST success...
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
int variant() const
Older version function returns enum value "NODE".
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
virtual size_t get_childIndex(SgNode *child) const
index-based access to traversal successors by child node
virtual std::vector< SgNode * > get_traversalSuccessorContainer() const
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
virtual VariantT variantT() const
returns new style SageIII enum values
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual SgNode * get_traversalSuccessorByIndex(size_t idx) const
index-based access to traversal successors by index number
virtual std::string class_name() const
returns a string representing the class name
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
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.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
void parse(SgAsmGenericFile *)
Main function to parse DWARF information.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.