ROSE 0.11.145.339
SgAsmJvmRuntimeAnnotationValue.h
1
2#ifndef ROSE_SgAsmJvmRuntimeAnnotationValue_H
3#define ROSE_SgAsmJvmRuntimeAnnotationValue_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmJvmNode.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 SgAsmJvmRuntimeAnnotationValue
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmJvmRuntimeAnnotationValue.h" */
25/* #line 10437 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
33/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
34
35/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
36
37#if !defined(DOCUMENTATION)
38// Class Definition for SgAsmJvmRuntimeAnnotationValue
39class ROSE_DLL_API SgAsmJvmRuntimeAnnotationValue : public SgAsmJvmNode
40 {
41 public:
42
43
44/* #line 45 "../../../src/frontend/SageIII//SgAsmJvmRuntimeAnnotationValue.h" */
45
46 virtual SgNode* copy ( SgCopyHelp& help) const override;
47// Start of memberFunctionString
48/* #line 10519 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
49
50
51 //----------------------- Boost serialization for SgAsmJvmRuntimeAnnotationValue -----------------------
52#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
53private:
54 friend class boost::serialization::access;
55
56 template<class S>
57 void serialize(S &s, const unsigned /*version*/) {
58 debugSerializationBegin("SgAsmJvmRuntimeAnnotationValue");
59 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmJvmNode);
60 s & BOOST_SERIALIZATION_NVP(p_tag);
61 s & BOOST_SERIALIZATION_NVP(p_const_value_index);
62 s & BOOST_SERIALIZATION_NVP(p_type_name_index);
63 s & BOOST_SERIALIZATION_NVP(p_const_name_index);
64 s & BOOST_SERIALIZATION_NVP(p_class_info_index);
65 s & BOOST_SERIALIZATION_NVP(p_is_annotation_value);
66 s & BOOST_SERIALIZATION_NVP(p_annotation_value);
67 s & BOOST_SERIALIZATION_NVP(p_values);
68 debugSerializationEnd("SgAsmJvmRuntimeAnnotationValue");
69 }
70#endif // ROSE_ENABLE_BOOST_SERIALIZATION
71public:
72public:
79 uint8_t const& get_tag() const;
80 void set_tag(uint8_t const&);
83public:
92 uint16_t const& get_const_value_index() const;
93 void set_const_value_index(uint16_t const&);
96public:
105 uint16_t const& get_type_name_index() const;
106 void set_type_name_index(uint16_t const&);
109public:
117 uint16_t const& get_const_name_index() const;
118 void set_const_name_index(uint16_t const&);
121public:
130 uint16_t const& get_class_info_index() const;
131 void set_class_info_index(uint16_t const&);
134public:
142 bool const& get_is_annotation_value() const;
143 void set_is_annotation_value(bool const&);
146public:
156 SgAsmJvmRuntimeAnnotation* const& get_annotation_value() const;
157 void set_annotation_value(SgAsmJvmRuntimeAnnotation* const&);
160public:
167 std::vector<SgAsmJvmRuntimeAnnotationValue*> const& get_values() const;
168 std::vector<SgAsmJvmRuntimeAnnotationValue*>& get_values();
170 public:
175
180
185
188
190 virtual void unparse(std::ostream&) const override;
191
193 void dump(FILE*, const char *prefix, ssize_t idx) const override;
194public:
197
198public:
201
202protected:
210
211
212// End of memberFunctionString
213// Start of memberFunctionString
214/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
215
216// *** COMMON CODE SECTION BEGINS HERE ***
217
218 public:
219
220 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
221 // and not required which is required to match the other aspects of the copy mechanism code generation.
222 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
223 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
224 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
225 // virtual SgNode* copy ( const SgCopyHelp & help) const;
226
228 virtual std::string class_name() const override;
229
231 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
232
234 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
235 // static const VariantT static_variant = V_SgAsmJvmRuntimeAnnotationValue;
236 enum { static_variant = V_SgAsmJvmRuntimeAnnotationValue };
237
238 /* the generated cast function */
240 ROSE_DLL_API friend SgAsmJvmRuntimeAnnotationValue* isSgAsmJvmRuntimeAnnotationValue( SgNode * s );
241
243 ROSE_DLL_API friend const SgAsmJvmRuntimeAnnotationValue* isSgAsmJvmRuntimeAnnotationValue( const SgNode * s );
244
245 // ******************************************
246 // * Memory Pool / New / Delete
247 // ******************************************
248
249 public:
251 static const unsigned pool_size; //
253 static std::vector<unsigned char *> pools; //
255 static SgAsmJvmRuntimeAnnotationValue * next_node; //
256
258 static unsigned long initializeStorageClassArray(SgAsmJvmRuntimeAnnotationValueStorageClass *); //
259
261 static void clearMemoryPool(); //
262 static void deleteMemoryPool(); //
263
265 static void extendMemoryPoolForFileIO(); //
266
268 static SgAsmJvmRuntimeAnnotationValue * getPointerFromGlobalIndex(unsigned long); //
270 static SgAsmJvmRuntimeAnnotationValue * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
271
273 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
275 static void resetValidFreepointers(); //
277 static unsigned long getNumberOfLastValidPointer(); //
278
279
280#if defined(INLINE_FUNCTIONS)
282 inline void *operator new (size_t size);
283#else
285 void *operator new (size_t size);
286#endif
288 void operator delete (void* pointer, size_t size);
289
290 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
291 void operator delete (void* pointer)
292 {
293 // This is the generated delete operator...
294 SgAsmJvmRuntimeAnnotationValue::operator delete (pointer,sizeof(SgAsmJvmRuntimeAnnotationValue));
295 }
296
298 static size_t numberOfNodes();
299
301 static size_t memoryUsage();
302
303 // End of scope which started in IR nodes specific code
304 /* */
305
306 /* name Internal Functions
307 \brief Internal functions ... incomplete-documentation
308
309 These functions have been made public as part of the design, but they are suggested for internal use
310 or by particularly knowledgeable users for specialized tools or applications.
311
312 \internal We could not make these private because they are required by user for special purposes. And
313 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
314
315 */
316
317 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
318 // overridden in every class by *generated* implementation
320 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
321 // MS: 06/28/02 container of names of variables or container indices
322 // used used in the traversal to access AST successor nodes
323 // overridden in every class by *generated* implementation
326 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
327
328 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
329 // than all the vector copies. The implementation for these functions is generated for each class.
331 virtual size_t get_numberOfTraversalSuccessors() const override;
333 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
335 virtual size_t get_childIndex(SgNode *child) const override;
336
337#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
338 // MS: 08/16/2002 method for generating RTI information
340 virtual RTIReturnType roseRTI() override;
341#endif
342 /* */
343
344
345
346 /* name Deprecated Functions
347 \brief Deprecated functions ... incomplete-documentation
348
349 These functions have been deprecated from use.
350 */
351 /* */
352
354 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
355
356 // JJW (10/16/2008): Changed to a single function in Node.code, and put
357 // getVariant() in #if 0 block to prevent confusing Doxygen
358#if 0
360 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
362 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
363#endif
364 /* */
365
366
367
368
369 public:
370 /* name Traversal Support Functions
371 \brief Traversal support functions ... incomplete-documentation
372
373 These functions have been made public as part of the design, but they are suggested for internal use
374 or by particularly knowledgable users for specialized tools or applications.
375 */
376 /* */
377
378 // DQ (11/26/2005): Support for visitor pattern mechanims
379 // (inferior to ROSE traversal mechanism, experimental).
383
384 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
386 virtual void accept (ROSE_VisitorPattern & visitor) override;
387
388 // DQ (12/26/2005): Support for traversal based on the memory pool
391 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
392
396
397 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
398 // This traversal helps support internal tools that call static member functions.
399 // note: this function operates on the memory pools.
402 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
403 /* */
404
405 public:
406 /* NodeId support functions */
408 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
411 static SgAsmJvmRuntimeAnnotationValue* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
414 static std::string getNodeIdString(SgAsmJvmRuntimeAnnotationValue* sgnode);
415 static std::string getNodeIdStringInternal(SgAsmJvmRuntimeAnnotationValue* sgnode);
416
417 public:
418 /* name Memory Allocation Functions
419 \brief Memory allocations functions ... incomplete-documentation
420
421 These functions have been made public as part of the design, but they are suggested for internal use
422 or by particularly knowledgable users for specialized tools or applications.
423 */
424 /* */
425
436 virtual bool isInMemoryPool() override;
437
448 virtual void checkDataMemberPointersIfInMemoryPool() override;
449
450 // DQ (4/30/2006): Modified to be a const function.
465 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
466
477
489 virtual long getChildIndex( SgNode* childNode ) const override;
490
491 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
492 // comment here (changed to be a C style comment and not be a doxygen comment).
493 /* \brief Constructor for use by AST File I/O Mechanism
494
495 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
496 which obtained via fast binary file I/O from disk.
497 */
498 // SgAsmJvmRuntimeAnnotationValue( SgAsmJvmRuntimeAnnotationValueStorageClass& source );
499
500
501
502
503
504 // JH (10/24/2005): methods added to support the ast file IO
505 private:
506
507 /* name AST Memory Allocation Support Functions
508 \brief Memory allocations support....
509
510 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
511 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
512 and support the AST File I/O Mechanism.
513 */
514 /* */
515
516 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
517 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
518 that I use the same type everywhere, if any changes are made. THe second one declares the type
519 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
520 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
521 a correspinding one in the AST_FILE_IO class!
522 */
523 // DQ (9/2/2015): This typedef is no longer used, we can't define the
524 // comment here (changed to be a C style comment and not be a doxygen comment).
525 /* \brief Typedef used for low level memory access.
526 */
527 // typedef unsigned char* TestType;
528
529 // DQ (9/2/2015): This typedef is no longer used, we can't define the
530 // comment here (changed to be a C style comment and not be a doxygen comment).
531 /* \brief Typedef used to hold memory addresses as values.
532 */
533 // typedef unsigned long AddressType;
534
535
536
537 // necessary, to have direct access to the p_freepointer and the private methods !
539 friend class AST_FILE_IO;
540
542 friend class SgAsmJvmRuntimeAnnotationValueStorageClass;
543
545 friend class AstSpecificDataManagingClass;
546
548 friend class AstSpecificDataManagingClassStorageClass;
549 public:
551 SgAsmJvmRuntimeAnnotationValue( const SgAsmJvmRuntimeAnnotationValueStorageClass& source );
552
553 // private: // JJW hack
554 /*
555 name AST Memory Allocation Support Variables
556 Memory allocations support variables
557
558 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
559 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
560 and support the AST File I/O Mechanism.
561 */
562 /* */
563
564 public:
565
566 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
567 // to current node (so that it will work cleanly with build functions to specify patterns).
568 // virtual SgNode* addRegExpAttribute();
575
576#ifndef _MSC_VER
577// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
578// and likely never fully implemented nor tested. Files remain in the src tree but are no
579// longer built.
580#define BUILD_ATERM_SUPPORT 0
581 #if BUILD_ATERM_SUPPORT
582 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
583 // DQ (10/4/2014): Adding ATerm support to ROSE.
593 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
594 virtual ATerm generate_ATerm() override;
595
597 virtual void generate_ATerm_Annotation(ATerm & term) override;
598 #endif
599 #endif // BUILD_ATERM_SUPPORT
600#endif
601 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
602 // virtual generate_AST(ATerm & term);
603 // virtual void read_ATerm_Annotation(ATerm & term);
604
605// *** COMMON CODE SECTION ENDS HERE ***
606
607
608// End of memberFunctionString
609// Start of memberFunctionString
610/* #line 670 "/workspace/src/ROSETTA/Grammar/Node.code" */
611
612 // the generated cast function
613 // friend ROSE_DLL_API SgAsmJvmRuntimeAnnotationValue* isSgAsmJvmRuntimeAnnotationValue ( SgNode* s );
614
615 typedef SgAsmJvmNode base_node_type;
616
617
618// End of memberFunctionString
619
620
621
622
623
624
625
626
627
628 protected:
629// Start of memberFunctionString
630uint8_t p_tag;
631
632// End of memberFunctionString
633// Start of memberFunctionString
634uint16_t p_const_value_index;
635
636// End of memberFunctionString
637// Start of memberFunctionString
638uint16_t p_type_name_index;
639
640// End of memberFunctionString
641// Start of memberFunctionString
642uint16_t p_const_name_index;
643
644// End of memberFunctionString
645// Start of memberFunctionString
646uint16_t p_class_info_index;
647
648// End of memberFunctionString
649// Start of memberFunctionString
650bool p_is_annotation_value;
651
652// End of memberFunctionString
653// Start of memberFunctionString
654SgAsmJvmRuntimeAnnotation* p_annotation_value;
655
656// End of memberFunctionString
657// Start of memberFunctionString
658std::vector<SgAsmJvmRuntimeAnnotationValue*> p_values;
659
660// End of memberFunctionString
661
663 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmRuntimeAnnotationValue, uint8_t,&SgAsmJvmRuntimeAnnotationValue::p_tag>;
664 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmRuntimeAnnotationValue, uint16_t,&SgAsmJvmRuntimeAnnotationValue::p_const_value_index>;
665 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmRuntimeAnnotationValue, uint16_t,&SgAsmJvmRuntimeAnnotationValue::p_type_name_index>;
666 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmRuntimeAnnotationValue, uint16_t,&SgAsmJvmRuntimeAnnotationValue::p_const_name_index>;
667 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmRuntimeAnnotationValue, uint16_t,&SgAsmJvmRuntimeAnnotationValue::p_class_info_index>;
668 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmRuntimeAnnotationValue, bool,&SgAsmJvmRuntimeAnnotationValue::p_is_annotation_value>;
669 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmRuntimeAnnotationValue, SgAsmJvmRuntimeAnnotation*,&SgAsmJvmRuntimeAnnotationValue::p_annotation_value>;
670 friend struct Rose::Traits::generated::describe_field_t<SgAsmJvmRuntimeAnnotationValue, std::vector<SgAsmJvmRuntimeAnnotationValue*>,&SgAsmJvmRuntimeAnnotationValue::p_values>;
671
672/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
673
674
675 };
676#endif
677
678// postdeclarations for SgAsmJvmRuntimeAnnotationValue
679
680/* #line 681 "../../../src/frontend/SageIII//SgAsmJvmRuntimeAnnotationValue.h" */
681
682/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
683
684/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
685
686
687/* #line 688 "../../../src/frontend/SageIII//SgAsmJvmRuntimeAnnotationValue.h" */
688
689#endif // ROSE_SgAsmJvmRuntimeAnnotationValue_H
690
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 an JVM constant pool.
Base class for JVM branch of binary analysis IR nodes.
virtual void unparse(std::ostream &) const
Write node to a binary file.
void initializeProperties()
Initialize all properties that have explicit initial values.
virtual void dump(FILE *, const char *prefix, ssize_t idx) const
Print some debugging information.
JVM RuntimeAnnotationPair.
JVM RuntimeAnnotationValue.
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 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.