ROSE 0.11.145.192
SgAsmJvmLocalVariableTypeTable.h
1
2#ifndef ROSE_SgAsmJvmLocalVariableTypeTable_H
3#define ROSE_SgAsmJvmLocalVariableTypeTable_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmJvmAttribute.h>
7
8
9
10/* #line 1 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
11
12// WARNING -- GENERATED CODE -- DO NOT MODIFY THIS CODE -- WARNING!
13// This code is automatically generated for each
14// terminal and non-terminal within the defined
15// grammar. There is a simple way to change the
16// code to fix bugs etc. See the ROSE README file
17// for directions.
18
19// tps: (02/22/2010): Adding DLL export requirements
20#include "rosedll.h"
21
22// predeclarations for SgAsmJvmLocalVariableTypeTable
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmJvmLocalVariableTypeTable.h" */
25/* #line 10638 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <sageContainer.h>
28
29
30/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
31
32/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
33
34#if !defined(DOCUMENTATION)
35// Class Definition for SgAsmJvmLocalVariableTypeTable
36class ROSE_DLL_API SgAsmJvmLocalVariableTypeTable : public SgAsmJvmAttribute
37 {
38 public:
39
40
41/* #line 42 "../../../src/frontend/SageIII//SgAsmJvmLocalVariableTypeTable.h" */
42
43 virtual SgNode* copy ( SgCopyHelp& help) const override;
44// Start of memberFunctionString
45/* #line 10658 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
46
47
48 //----------------------- Boost serialization for SgAsmJvmLocalVariableTypeTable -----------------------
49#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
50private:
51 friend class boost::serialization::access;
52
53 template<class S>
54 void serialize(S &s, const unsigned /*version*/) {
55 debugSerializationBegin("SgAsmJvmLocalVariableTypeTable");
56 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmJvmAttribute);
57 s & BOOST_SERIALIZATION_NVP(p_local_variable_type_table);
58 debugSerializationEnd("SgAsmJvmLocalVariableTypeTable");
59 }
60#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
61public:
62public:
68 SgAsmJvmLocalVariableTypeEntryPtrList const& get_local_variable_type_table() const;
69 SgAsmJvmLocalVariableTypeEntryPtrList& get_local_variable_type_table();
70 void set_local_variable_type_table(SgAsmJvmLocalVariableTypeEntryPtrList const&);
72public:
77
80
82 virtual void unparse(std::ostream&) const override;
83
85 virtual void dump(FILE*, const char *prefix, ssize_t idx) const override;
86public:
89
90public:
93
94protected:
102
103
104// End of memberFunctionString
105// Start of memberFunctionString
106/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
107
108// *** COMMON CODE SECTION BEGINS HERE ***
109
110 public:
111
112 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
113 // and not required which is required to match the other aspects of the copy mechanism code generation.
114 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
115 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
116 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
117 // virtual SgNode* copy ( const SgCopyHelp & help) const;
118
120 virtual std::string class_name() const override;
121
123 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
124
126 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
127 // static const VariantT static_variant = V_SgAsmJvmLocalVariableTypeTable;
128 enum { static_variant = V_SgAsmJvmLocalVariableTypeTable };
129
130 /* the generated cast function */
132 ROSE_DLL_API friend SgAsmJvmLocalVariableTypeTable* isSgAsmJvmLocalVariableTypeTable( SgNode * s );
133
135 ROSE_DLL_API friend const SgAsmJvmLocalVariableTypeTable* isSgAsmJvmLocalVariableTypeTable( const SgNode * s );
136
137 // ******************************************
138 // * Memory Pool / New / Delete
139 // ******************************************
140
141 public:
143 static const unsigned pool_size; //
145 static std::vector<unsigned char *> pools; //
147 static SgAsmJvmLocalVariableTypeTable * next_node; //
148
150 static unsigned long initializeStorageClassArray(SgAsmJvmLocalVariableTypeTableStorageClass *); //
151
153 static void clearMemoryPool(); //
154 static void deleteMemoryPool(); //
155
157 static void extendMemoryPoolForFileIO(); //
158
160 static SgAsmJvmLocalVariableTypeTable * getPointerFromGlobalIndex(unsigned long); //
162 static SgAsmJvmLocalVariableTypeTable * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
163
165 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
167 static void resetValidFreepointers(); //
169 static unsigned long getNumberOfLastValidPointer(); //
170
171
172#if defined(INLINE_FUNCTIONS)
174 inline void *operator new (size_t size);
175#else
177 void *operator new (size_t size);
178#endif
180 void operator delete (void* pointer, size_t size);
181
182 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
183 void operator delete (void* pointer)
184 {
185 // This is the generated delete operator...
186 SgAsmJvmLocalVariableTypeTable::operator delete (pointer,sizeof(SgAsmJvmLocalVariableTypeTable));
187 }
188
190 static size_t numberOfNodes();
191
193 static size_t memoryUsage();
194
195 // End of scope which started in IR nodes specific code
196 /* */
197
198 /* name Internal Functions
199 \brief Internal functions ... incomplete-documentation
200
201 These functions have been made public as part of the design, but they are suggested for internal use
202 or by particularly knowledgeable users for specialized tools or applications.
203
204 \internal We could not make these private because they are required by user for special purposes. And
205 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
206
207 */
208
209 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
210 // overridden in every class by *generated* implementation
212 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
213 // MS: 06/28/02 container of names of variables or container indices
214 // used used in the traversal to access AST successor nodes
215 // overridden in every class by *generated* implementation
218 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
219
220 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
221 // than all the vector copies. The implementation for these functions is generated for each class.
223 virtual size_t get_numberOfTraversalSuccessors() override;
225 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
227 virtual size_t get_childIndex(SgNode *child) override;
228
229#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
230 // MS: 08/16/2002 method for generating RTI information
232 virtual RTIReturnType roseRTI() override;
233#endif
234 /* */
235
236
237
238 /* name Deprecated Functions
239 \brief Deprecated functions ... incomplete-documentation
240
241 These functions have been deprecated from use.
242 */
243 /* */
244
246 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
247
248 // JJW (10/16/2008): Changed to a single function in Node.code, and put
249 // getVariant() in #if 0 block to prevent confusing Doxygen
250#if 0
252 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
254 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
255#endif
256 /* */
257
258
259
260
261 public:
262 /* name Traversal Support Functions
263 \brief Traversal support functions ... incomplete-documentation
264
265 These functions have been made public as part of the design, but they are suggested for internal use
266 or by particularly knowledgable users for specialized tools or applications.
267 */
268 /* */
269
270 // DQ (11/26/2005): Support for visitor pattern mechanims
271 // (inferior to ROSE traversal mechanism, experimental).
275
276 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
278 virtual void accept (ROSE_VisitorPattern & visitor) override;
279
280 // DQ (12/26/2005): Support for traversal based on the memory pool
283 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
284
288
289 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
290 // This traversal helps support internal tools that call static member functions.
291 // note: this function operates on the memory pools.
294 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
295 /* */
296
297 public:
298 /* NodeId support functions */
300 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
303 static SgAsmJvmLocalVariableTypeTable* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
306 static std::string getNodeIdString(SgAsmJvmLocalVariableTypeTable* sgnode);
307 static std::string getNodeIdStringInternal(SgAsmJvmLocalVariableTypeTable* sgnode);
308
309 public:
310 /* name Memory Allocation Functions
311 \brief Memory allocations functions ... incomplete-documentation
312
313 These functions have been made public as part of the design, but they are suggested for internal use
314 or by particularly knowledgable users for specialized tools or applications.
315 */
316 /* */
317
328 virtual bool isInMemoryPool() override;
329
340 virtual void checkDataMemberPointersIfInMemoryPool() override;
341
342 // DQ (4/30/2006): Modified to be a const function.
357 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
358
369
381 virtual long getChildIndex( SgNode* childNode ) const override;
382
383 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
384 // comment here (changed to be a C style comment and not be a doxygen comment).
385 /* \brief Constructor for use by AST File I/O Mechanism
386
387 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
388 which obtained via fast binary file I/O from disk.
389 */
390 // SgAsmJvmLocalVariableTypeTable( SgAsmJvmLocalVariableTypeTableStorageClass& source );
391
392
393
394
395
396 // JH (10/24/2005): methods added to support the ast file IO
397 private:
398
399 /* name AST Memory Allocation Support Functions
400 \brief Memory allocations support....
401
402 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
403 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
404 and support the AST File I/O Mechanism.
405 */
406 /* */
407
408 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
409 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
410 that I use the same type everywhere, if any changes are made. THe second one declares the type
411 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
412 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
413 a correspinding one in the AST_FILE_IO class!
414 */
415 // DQ (9/2/2015): This typedef is no longer used, we can't define the
416 // comment here (changed to be a C style comment and not be a doxygen comment).
417 /* \brief Typedef used for low level memory access.
418 */
419 // typedef unsigned char* TestType;
420
421 // DQ (9/2/2015): This typedef is no longer used, we can't define the
422 // comment here (changed to be a C style comment and not be a doxygen comment).
423 /* \brief Typedef used to hold memory addresses as values.
424 */
425 // typedef unsigned long AddressType;
426
427
428
429 // necessary, to have direct access to the p_freepointer and the private methods !
431 friend class AST_FILE_IO;
432
434 friend class SgAsmJvmLocalVariableTypeTableStorageClass;
435
437 friend class AstSpecificDataManagingClass;
438
440 friend class AstSpecificDataManagingClassStorageClass;
441 public:
443 SgAsmJvmLocalVariableTypeTable( const SgAsmJvmLocalVariableTypeTableStorageClass& source );
444
445 // private: // JJW hack
446 /*
447 name AST Memory Allocation Support Variables
448 Memory allocations support variables
449
450 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
451 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
452 and support the AST File I/O Mechanism.
453 */
454 /* */
455
456 public:
457
458 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
459 // to current node (so that it will work cleanly with build functions to specify patterns).
460 // virtual SgNode* addRegExpAttribute();
467
468#ifndef _MSC_VER
469// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
470// and likely never fully implemented nor tested. Files remain in the src tree but are no
471// longer built.
472#define BUILD_ATERM_SUPPORT 0
473 #if BUILD_ATERM_SUPPORT
474 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
475 // DQ (10/4/2014): Adding ATerm support to ROSE.
485 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
486 virtual ATerm generate_ATerm() override;
487
489 virtual void generate_ATerm_Annotation(ATerm & term) override;
490 #endif
491 #endif // BUILD_ATERM_SUPPORT
492#endif
493 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
494 // virtual generate_AST(ATerm & term);
495 // virtual void read_ATerm_Annotation(ATerm & term);
496
497// *** COMMON CODE SECTION ENDS HERE ***
498
499
500// End of memberFunctionString
501// Start of memberFunctionString
502/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
503
504 // the generated cast function
505 // friend ROSE_DLL_API SgAsmJvmLocalVariableTypeTable* isSgAsmJvmLocalVariableTypeTable ( SgNode* s );
506
507 typedef SgAsmJvmAttribute base_node_type;
508
509
510// End of memberFunctionString
511
512
513 protected:
514// Start of memberFunctionString
515SgAsmJvmLocalVariableTypeEntryPtrList p_local_variable_type_table;
516
517// End of memberFunctionString
518
520 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmLocalVariableTypeTable, SgAsmJvmLocalVariableTypeEntryPtrList,&SgAsmJvmLocalVariableTypeTable::p_local_variable_type_table>;
521
522/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
523
524
525 };
526#endif
527
528// postdeclarations for SgAsmJvmLocalVariableTypeTable
529
530/* #line 531 "../../../src/frontend/SageIII//SgAsmJvmLocalVariableTypeTable.h" */
531
532/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
533
534/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
535
536
537/* #line 538 "../../../src/frontend/SageIII//SgAsmJvmLocalVariableTypeTable.h" */
538
539#endif // ROSE_SgAsmJvmLocalVariableTypeTable_H
540
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Represents a JVM attribute_info table/array.
Base class for a JVM attribute.
virtual void dump(FILE *, const char *prefix, ssize_t idx) const override
Print some debugging information.
void initializeProperties()
Initialize all properties that have explicit initial values.
virtual void unparse(std::ostream &) const override
Write attribute to a binary file.
Represents an JVM constant pool.
JVM LocalVariableTypeTable attribute.
Supporting class from copy mechanism within ROSE.
Definition sageCopy.h:26
This class represents the base class for all IR nodes within Sage III.
virtual size_t get_numberOfTraversalSuccessors()
return number of children in the traversal successor list
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual std::vector< std::string > get_traversalSuccessorNamesContainer()
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 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 size_t get_childIndex(SgNode *child)
index-based access to traversal successors by child node
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual std::vector< SgNode * > get_traversalSuccessorContainer()
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
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
virtual SgNode * get_traversalSuccessorByIndex(size_t idx)
index-based access to traversal successors by index number
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.