ROSE 0.11.145.247
SgAsmBlock.h
1
2#ifndef ROSE_SgAsmBlock_H
3#define ROSE_SgAsmBlock_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmStatement.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 SgAsmBlock
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmBlock.h" */
25/* #line 41122 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/Address.h>
28
29#include <sageContainer.h>
30
31#ifdef ROSE_SgAsmBlock_IMPL
32#include <SgAsmInstruction.h> // for SgAsmInstruction::INVALID_STACK_DELTA
33#endif
34
35
36/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
37
38/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
39
40#if !defined(DOCUMENTATION)
41// Class Definition for SgAsmBlock
42class ROSE_DLL_API SgAsmBlock : public SgAsmStatement
43 {
44 public:
45
46
47/* #line 48 "../../../src/frontend/SageIII//SgAsmBlock.h" */
48
49 virtual SgNode* copy ( SgCopyHelp& help) const override;
50// Start of memberFunctionString
51/* #line 41211 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
52
53
54 //----------------------- Boost serialization for SgAsmBlock -----------------------
55#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
56private:
57 friend class boost::serialization::access;
58
59 template<class S>
60 void serialize(S &s, const unsigned /*version*/) {
61 debugSerializationBegin("SgAsmBlock");
62 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmStatement);
63 s & BOOST_SERIALIZATION_NVP(p_reason);
64 s & BOOST_SERIALIZATION_NVP(p_statementList);
65 s & BOOST_SERIALIZATION_NVP(p_successors);
66 s & BOOST_SERIALIZATION_NVP(p_successorsComplete);
67 s & BOOST_SERIALIZATION_NVP(p_immediateDominator);
68 s & BOOST_SERIALIZATION_NVP(p_cachedVertex);
69 s & BOOST_SERIALIZATION_NVP(p_codeLikelihood);
70 s & BOOST_SERIALIZATION_NVP(p_stackDeltaOut);
71 debugSerializationEnd("SgAsmBlock");
72 }
73#endif // ROSE_ENABLE_BOOST_SERIALIZATION
75 // Local types
77public:
79 enum Reason {
80 // Please update SgAsmBlock::reasonString() if you change this enum!
81 BLK_NONE = 0x00000000,
82 BLK_ENTRY_POINT = 0x00010000,
83 BLK_PADDING = 0x00020000,
84 BLK_FRAGMENT = 0x00080000,
86 BLK_CFGHEAD = 0x00100000,
87 BLK_USERDEF = 0x00200000,
88 BLK_LEFTOVERS = 0x00400000,
90 BLK_JUMPTABLE = 0x00800000,
91 BLK_GRAPH1 = 0x01000000,
92 BLK_GRAPH2 = 0x02000000,
93 BLK_GRAPH3 = 0x04000000,
95 BLK_DEFAULT = BLK_NONE, //NO_STRINGIFY
96
97 // ========= Miscellaneous Reasons ===========================================================================
98 // The first half of the range (1-127, inclusive) is used for algorithms defined by ROSE. The second half is
99 // availalble for users to use as they see fit.
100 BLK_MISCMASK = 0x000000ff,
102 BLK_FINDDATA = 0x00000001,
104 BLK_POSTFUNC = 0x00000002
106 };
107
109 // Properties
111public:
112
113 // FIXME[Robb Matzke 2023-03-18]: is the lack of serialization a bug?
114public:
120 Rose::BinaryAnalysis::Address const& get_id() const;
121 void set_id(Rose::BinaryAnalysis::Address const&);
124public:
130 unsigned const& get_reason() const;
131 void set_reason(unsigned const&);
133 // statementList and successors should have been pointers to nodes that contain the list rather than being the lists
134 // themselves because ROSETTA doesn't allow traversals on multiple list data members--we can traverse either one list or
135 // the other, but not both. It's too late to change how this part of the AST is structured because so much user code
136 // already depends on it, therefore we can only traverse statementList and not successors. [Robb Matzke 2016-02-25]
137public:
144 SgAsmStatementPtrList const& get_statementList() const;
145 SgAsmStatementPtrList& get_statementList();
146 void set_statementList(SgAsmStatementPtrList const&);
148 // statementList and successors should have been pointers to nodes that contain the list rather than being the lists
149 // themselves because ROSETTA doesn't allow traversals on multiple list data members--we can traverse either one list or
150 // the other, but not both. It's too late to change how this part of the AST is structured because so much user code
151 // already depends on it, therefore we can only traverse statementList and not successors. [Robb Matzke 2016-02-25]
152public:
160 SgAsmIntegerValuePtrList const& get_successors() const;
161 SgAsmIntegerValuePtrList& get_successors();
162 void set_successors(SgAsmIntegerValuePtrList const&);
165public:
176 bool const& get_successorsComplete() const;
177 void set_successorsComplete(bool const&);
180public:
190 SgAsmBlock* const& get_immediateDominator() const;
191 void set_immediateDominator(SgAsmBlock* const&);
194public:
203 size_t const& get_cachedVertex() const;
204 void set_cachedVertex(size_t const&);
206 // see BinaryAnalysis::ControlFlow
207public:
214 double const& get_codeLikelihood() const;
215 void set_codeLikelihood(double const&);
218public:
227 int64_t const& get_stackDeltaOut() const;
228 void set_stackDeltaOut(int64_t const&);
231 // Functions
233public:
238
243
244 // FIXME[Robb P Matzke 2017-02-13]: wrong name -- erases only statements, not all children
249 void removeChildren();
250
255 Rose::BinaryAnalysis::Address get_fallthroughVa();
256
260 SgAsmFunction *get_enclosingFunction() const;
261
267 bool hasInstructions() const;
268
274 bool isBasicBlock() const;
275
285 bool isFunctionCall(Rose::BinaryAnalysis::Address &target_va/*out*/, Rose::BinaryAnalysis::Address &return_va/*out*/);
286
290 static std::string reasonKey(const std::string &prefix = "");
291
295 std::string reasonString(bool pad) const;
296
302 static std::string reasonString(bool pad, unsigned reason);
303
305 // Deprecated
307
308 // [Robb Matzke 2023-11-06]: deprecated 2023-11
309 bool get_successors_complete() const ROSE_DEPRECATED("use get_successorsComplete");
310 void set_successors_complete(bool) ROSE_DEPRECATED("use get_successorsComplete");
311 SgAsmBlock* get_immediate_dominator() const ROSE_DEPRECATED("use get_immediateDominator");
312 void set_immediate_dominator(SgAsmBlock*) ROSE_DEPRECATED("use set_immediateDominator");
313 size_t get_cached_vertex() const ROSE_DEPRECATED("use get_cachedVertex");
314 void set_cached_vertex(size_t) ROSE_DEPRECATED("use set_cachedVertex");
315 double get_code_likelihood() const ROSE_DEPRECATED("use get_codeLikelihood");
316 void set_code_likelihood(double) ROSE_DEPRECATED("use set_codeLikelihood");
317 void append_statement(SgAsmStatement*) ROSE_DEPRECATED("use appendStatement");
318 void remove_statement(SgAsmStatement*) ROSE_DEPRECATED("use removeStatement");
319 void remove_children() ROSE_DEPRECATED("use removeChildren");
320 Rose::BinaryAnalysis::Address get_fallthrough_va() ROSE_DEPRECATED("use getFallthroughVa");
321 SgAsmFunction* get_enclosing_function() const ROSE_DEPRECATED("use get_enclosingFunction");
322 bool has_instructions() const ROSE_DEPRECATED("use hasInstructions");
323 bool is_basic_block() const ROSE_DEPRECATED("use isBasicBlock");
324 bool is_function_call(Rose::BinaryAnalysis::Address&, Rose::BinaryAnalysis::Address&) ROSE_DEPRECATED("use isFunctionCall");
325 static std::string reason_key(const std::string& = "") ROSE_DEPRECATED("use reasonKey");
326 std::string reason_str(bool) const ROSE_DEPRECATED("use reasonString");
327 static std::string reason_str(bool, unsigned) ROSE_DEPRECATED("use reasonString");
328public:
330 virtual ~SgAsmBlock();
331
332public:
334 SgAsmBlock();
335
336public:
338 explicit SgAsmBlock(Rose::BinaryAnalysis::Address const& address);
339
340protected:
347 void initializeProperties();
348
349
350// End of memberFunctionString
351// Start of memberFunctionString
352/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
353
354// *** COMMON CODE SECTION BEGINS HERE ***
355
356 public:
357
358 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
359 // and not required which is required to match the other aspects of the copy mechanism code generation.
360 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
361 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
362 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
363 // virtual SgNode* copy ( const SgCopyHelp & help) const;
364
366 virtual std::string class_name() const override;
367
369 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
370
372 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
373 // static const VariantT static_variant = V_SgAsmBlock;
374 enum { static_variant = V_SgAsmBlock };
375
376 /* the generated cast function */
378 ROSE_DLL_API friend SgAsmBlock* isSgAsmBlock( SgNode * s );
379
381 ROSE_DLL_API friend const SgAsmBlock* isSgAsmBlock( const SgNode * s );
382
383 // ******************************************
384 // * Memory Pool / New / Delete
385 // ******************************************
386
387 public:
389 static const unsigned pool_size; //
391 static std::vector<unsigned char *> pools; //
393 static SgAsmBlock * next_node; //
394
396 static unsigned long initializeStorageClassArray(SgAsmBlockStorageClass *); //
397
399 static void clearMemoryPool(); //
400 static void deleteMemoryPool(); //
401
403 static void extendMemoryPoolForFileIO(); //
404
406 static SgAsmBlock * getPointerFromGlobalIndex(unsigned long); //
408 static SgAsmBlock * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
409
411 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
413 static void resetValidFreepointers(); //
415 static unsigned long getNumberOfLastValidPointer(); //
416
417
418#if defined(INLINE_FUNCTIONS)
420 inline void *operator new (size_t size);
421#else
423 void *operator new (size_t size);
424#endif
426 void operator delete (void* pointer, size_t size);
427
428 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
429 void operator delete (void* pointer)
430 {
431 // This is the generated delete operator...
432 SgAsmBlock::operator delete (pointer,sizeof(SgAsmBlock));
433 }
434
436 static size_t numberOfNodes();
437
439 static size_t memoryUsage();
440
441 // End of scope which started in IR nodes specific code
442 /* */
443
444 /* name Internal Functions
445 \brief Internal functions ... incomplete-documentation
446
447 These functions have been made public as part of the design, but they are suggested for internal use
448 or by particularly knowledgeable users for specialized tools or applications.
449
450 \internal We could not make these private because they are required by user for special purposes. And
451 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
452
453 */
454
455 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
456 // overridden in every class by *generated* implementation
458 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
459 // MS: 06/28/02 container of names of variables or container indices
460 // used used in the traversal to access AST successor nodes
461 // overridden in every class by *generated* implementation
464 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
465
466 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
467 // than all the vector copies. The implementation for these functions is generated for each class.
469 virtual size_t get_numberOfTraversalSuccessors() const override;
471 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
473 virtual size_t get_childIndex(SgNode *child) const override;
474
475#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
476 // MS: 08/16/2002 method for generating RTI information
478 virtual RTIReturnType roseRTI() override;
479#endif
480 /* */
481
482
483
484 /* name Deprecated Functions
485 \brief Deprecated functions ... incomplete-documentation
486
487 These functions have been deprecated from use.
488 */
489 /* */
490
492 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
493
494 // JJW (10/16/2008): Changed to a single function in Node.code, and put
495 // getVariant() in #if 0 block to prevent confusing Doxygen
496#if 0
498 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
500 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
501#endif
502 /* */
503
504
505
506
507 public:
508 /* name Traversal Support Functions
509 \brief Traversal support functions ... incomplete-documentation
510
511 These functions have been made public as part of the design, but they are suggested for internal use
512 or by particularly knowledgable users for specialized tools or applications.
513 */
514 /* */
515
516 // DQ (11/26/2005): Support for visitor pattern mechanims
517 // (inferior to ROSE traversal mechanism, experimental).
521
522 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
524 virtual void accept (ROSE_VisitorPattern & visitor) override;
525
526 // DQ (12/26/2005): Support for traversal based on the memory pool
529 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
530
534
535 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
536 // This traversal helps support internal tools that call static member functions.
537 // note: this function operates on the memory pools.
540 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
541 /* */
542
543 public:
544 /* NodeId support functions */
546 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
549 static SgAsmBlock* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
552 static std::string getNodeIdString(SgAsmBlock* sgnode);
553 static std::string getNodeIdStringInternal(SgAsmBlock* sgnode);
554
555 public:
556 /* name Memory Allocation Functions
557 \brief Memory allocations functions ... incomplete-documentation
558
559 These functions have been made public as part of the design, but they are suggested for internal use
560 or by particularly knowledgable users for specialized tools or applications.
561 */
562 /* */
563
574 virtual bool isInMemoryPool() override;
575
586 virtual void checkDataMemberPointersIfInMemoryPool() override;
587
588 // DQ (4/30/2006): Modified to be a const function.
603 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
604
615
627 virtual long getChildIndex( SgNode* childNode ) const override;
628
629 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
630 // comment here (changed to be a C style comment and not be a doxygen comment).
631 /* \brief Constructor for use by AST File I/O Mechanism
632
633 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
634 which obtained via fast binary file I/O from disk.
635 */
636 // SgAsmBlock( SgAsmBlockStorageClass& source );
637
638
639
640
641
642 // JH (10/24/2005): methods added to support the ast file IO
643 private:
644
645 /* name AST Memory Allocation Support Functions
646 \brief Memory allocations support....
647
648 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
649 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
650 and support the AST File I/O Mechanism.
651 */
652 /* */
653
654 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
655 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
656 that I use the same type everywhere, if any changes are made. THe second one declares the type
657 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
658 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
659 a correspinding one in the AST_FILE_IO class!
660 */
661 // DQ (9/2/2015): This typedef is no longer used, we can't define the
662 // comment here (changed to be a C style comment and not be a doxygen comment).
663 /* \brief Typedef used for low level memory access.
664 */
665 // typedef unsigned char* TestType;
666
667 // DQ (9/2/2015): This typedef is no longer used, we can't define the
668 // comment here (changed to be a C style comment and not be a doxygen comment).
669 /* \brief Typedef used to hold memory addresses as values.
670 */
671 // typedef unsigned long AddressType;
672
673
674
675 // necessary, to have direct access to the p_freepointer and the private methods !
677 friend class AST_FILE_IO;
678
680 friend class SgAsmBlockStorageClass;
681
683 friend class AstSpecificDataManagingClass;
684
686 friend class AstSpecificDataManagingClassStorageClass;
687 public:
689 SgAsmBlock( const SgAsmBlockStorageClass& source );
690
691 // private: // JJW hack
692 /*
693 name AST Memory Allocation Support Variables
694 Memory allocations support variables
695
696 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
697 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
698 and support the AST File I/O Mechanism.
699 */
700 /* */
701
702 public:
703
704 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
705 // to current node (so that it will work cleanly with build functions to specify patterns).
706 // virtual SgNode* addRegExpAttribute();
713
714#ifndef _MSC_VER
715// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
716// and likely never fully implemented nor tested. Files remain in the src tree but are no
717// longer built.
718#define BUILD_ATERM_SUPPORT 0
719 #if BUILD_ATERM_SUPPORT
720 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
721 // DQ (10/4/2014): Adding ATerm support to ROSE.
731 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
732 virtual ATerm generate_ATerm() override;
733
735 virtual void generate_ATerm_Annotation(ATerm & term) override;
736 #endif
737 #endif // BUILD_ATERM_SUPPORT
738#endif
739 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
740 // virtual generate_AST(ATerm & term);
741 // virtual void read_ATerm_Annotation(ATerm & term);
742
743// *** COMMON CODE SECTION ENDS HERE ***
744
745
746// End of memberFunctionString
747// Start of memberFunctionString
748/* #line 710 "/workspace/src/ROSETTA/Grammar/Node.code" */
749
750 // the generated cast function
751 // friend ROSE_DLL_API SgAsmBlock* isSgAsmBlock ( SgNode* s );
752
753 typedef SgAsmStatement base_node_type;
754
755
756// End of memberFunctionString
757
758
759
760
761
762
763
764
765
766
767 protected:
768// Start of memberFunctionString
770
771// End of memberFunctionString
772// Start of memberFunctionString
773unsigned p_reason;
774
775// End of memberFunctionString
776// Start of memberFunctionString
777SgAsmStatementPtrList p_statementList;
778
779// End of memberFunctionString
780// Start of memberFunctionString
781SgAsmIntegerValuePtrList p_successors;
782
783// End of memberFunctionString
784// Start of memberFunctionString
785bool p_successorsComplete;
786
787// End of memberFunctionString
788// Start of memberFunctionString
789SgAsmBlock* p_immediateDominator;
790
791// End of memberFunctionString
792// Start of memberFunctionString
793size_t p_cachedVertex;
794
795// End of memberFunctionString
796// Start of memberFunctionString
797double p_codeLikelihood;
798
799// End of memberFunctionString
800// Start of memberFunctionString
801int64_t p_stackDeltaOut;
802
803// End of memberFunctionString
804
806 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, Rose::BinaryAnalysis::Address,&SgAsmBlock::p_id>;
807 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, unsigned,&SgAsmBlock::p_reason>;
808 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, SgAsmStatementPtrList,&SgAsmBlock::p_statementList>;
809 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, SgAsmIntegerValuePtrList,&SgAsmBlock::p_successors>;
810 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, bool,&SgAsmBlock::p_successorsComplete>;
811 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, SgAsmBlock*,&SgAsmBlock::p_immediateDominator>;
812 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, size_t,&SgAsmBlock::p_cachedVertex>;
813 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, double,&SgAsmBlock::p_codeLikelihood>;
814 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, int64_t,&SgAsmBlock::p_stackDeltaOut>;
815
816/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
817
818
819 };
820#endif
821
822// postdeclarations for SgAsmBlock
823
824/* #line 825 "../../../src/frontend/SageIII//SgAsmBlock.h" */
825
826/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
827
828/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
829
830
831/* #line 832 "../../../src/frontend/SageIII//SgAsmBlock.h" */
832
833#endif // ROSE_SgAsmBlock_H
834
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
Instruction basic block.
Represents a synthesized function.
Base class for statement-like subclasses.
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 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
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.
std::uint64_t Address
Address.
Definition Address.h:11
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
The ROSE library.
ROSE_DLL_API void appendStatement(SgStatement *stmt, SgScopeStatement *scope=NULL)
Append a statement to the end of the current scope, handle side effect of appending statements,...
ROSE_DLL_API void removeStatement(SgStatement *stmt, bool autoRelocatePreprocessingInfo=true)
Remove a statement from its attach point of the AST. Automatically keep its associated preprocessing ...
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
const char * Reason(int64_t)
Convert Rose::AST::Defects::Reason enum constant to a string.