ROSE 0.11.145.147
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 40788 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <sageContainer.h>
28
29#ifdef ROSE_SgAsmBlock_IMPL
30#include <SgAsmInstruction.h> // for SgAsmInstruction::INVALID_STACK_DELTA
31#endif
32
33
34/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
35
36/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
37
38#if !defined(DOCUMENTATION)
39// Class Definition for SgAsmBlock
40class ROSE_DLL_API SgAsmBlock : public SgAsmStatement
41 {
42 public:
43
44
45/* #line 46 "../../../src/frontend/SageIII//SgAsmBlock.h" */
46
47 virtual SgNode* copy ( SgCopyHelp& help) const override;
48// Start of memberFunctionString
49/* #line 40875 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
50
51
52 //----------------------- Boost serialization for SgAsmBlock -----------------------
53#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
54private:
55 friend class boost::serialization::access;
56
57 template<class S>
58 void serialize(S &s, const unsigned /*version*/) {
59 debugSerializationBegin("SgAsmBlock");
60 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmStatement);
61 s & BOOST_SERIALIZATION_NVP(p_reason);
62 s & BOOST_SERIALIZATION_NVP(p_statementList);
63 s & BOOST_SERIALIZATION_NVP(p_successors);
64 s & BOOST_SERIALIZATION_NVP(p_successorsComplete);
65 s & BOOST_SERIALIZATION_NVP(p_immediateDominator);
66 s & BOOST_SERIALIZATION_NVP(p_cachedVertex);
67 s & BOOST_SERIALIZATION_NVP(p_codeLikelihood);
68 s & BOOST_SERIALIZATION_NVP(p_stackDeltaOut);
69 debugSerializationEnd("SgAsmBlock");
70 }
71#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
73 // Local types
75public:
77 enum Reason {
78 // Please update SgAsmBlock::reasonString() if you change this enum!
79 BLK_NONE = 0x00000000,
80 BLK_ENTRY_POINT = 0x00010000,
81 BLK_PADDING = 0x00020000,
82 BLK_FRAGMENT = 0x00080000,
84 BLK_CFGHEAD = 0x00100000,
85 BLK_USERDEF = 0x00200000,
86 BLK_LEFTOVERS = 0x00400000,
88 BLK_JUMPTABLE = 0x00800000,
89 BLK_GRAPH1 = 0x01000000,
90 BLK_GRAPH2 = 0x02000000,
91 BLK_GRAPH3 = 0x04000000,
93 BLK_DEFAULT = BLK_NONE, //NO_STRINGIFY
94
95 // ========= Miscellaneous Reasons ===========================================================================
96 // The first half of the range (1-127, inclusive) is used for algorithms defined by ROSE. The second half is
97 // availalble for users to use as they see fit.
98 BLK_MISCMASK = 0x000000ff,
100 BLK_FINDDATA = 0x00000001,
102 BLK_POSTFUNC = 0x00000002
104 };
105
107 // Properties
109public:
110
111 // FIXME[Robb Matzke 2023-03-18]: is the lack of serialization a bug?
112public:
118 rose_addr_t const& get_id() const;
119 void set_id(rose_addr_t const&);
122public:
128 unsigned const& get_reason() const;
129 void set_reason(unsigned const&);
131 // statementList and successors should have been pointers to nodes that contain the list rather than being the lists
132 // themselves because ROSETTA doesn't allow traversals on multiple list data members--we can traverse either one list or
133 // the other, but not both. It's too late to change how this part of the AST is structured because so much user code
134 // already depends on it, therefore we can only traverse statementList and not successors. [Robb Matzke 2016-02-25]
135public:
142 SgAsmStatementPtrList const& get_statementList() const;
143 SgAsmStatementPtrList& get_statementList();
144 void set_statementList(SgAsmStatementPtrList const&);
146 // statementList and successors should have been pointers to nodes that contain the list rather than being the lists
147 // themselves because ROSETTA doesn't allow traversals on multiple list data members--we can traverse either one list or
148 // the other, but not both. It's too late to change how this part of the AST is structured because so much user code
149 // already depends on it, therefore we can only traverse statementList and not successors. [Robb Matzke 2016-02-25]
150public:
158 SgAsmIntegerValuePtrList const& get_successors() const;
159 SgAsmIntegerValuePtrList& get_successors();
160 void set_successors(SgAsmIntegerValuePtrList const&);
163public:
174 bool const& get_successorsComplete() const;
175 void set_successorsComplete(bool const&);
178public:
188 SgAsmBlock* const& get_immediateDominator() const;
189 void set_immediateDominator(SgAsmBlock* const&);
192public:
201 size_t const& get_cachedVertex() const;
202 void set_cachedVertex(size_t const&);
204 // see BinaryAnalysis::ControlFlow
205public:
212 double const& get_codeLikelihood() const;
213 void set_codeLikelihood(double const&);
216public:
225 int64_t const& get_stackDeltaOut() const;
226 void set_stackDeltaOut(int64_t const&);
229 // Functions
231public:
236
241
242 // FIXME[Robb P Matzke 2017-02-13]: wrong name -- erases only statements, not all children
247 void removeChildren();
248
253 rose_addr_t get_fallthroughVa();
254
258 SgAsmFunction *get_enclosingFunction() const;
259
265 bool hasInstructions() const;
266
272 bool isBasicBlock() const;
273
283 bool isFunctionCall(rose_addr_t &target_va/*out*/, rose_addr_t &return_va/*out*/);
284
288 static std::string reasonKey(const std::string &prefix = "");
289
293 std::string reasonString(bool pad) const;
294
300 static std::string reasonString(bool pad, unsigned reason);
301
303 // Deprecated
305
306 // [Robb Matzke 2023-11-06]: deprecated 2023-11
307 bool get_successors_complete() const ROSE_DEPRECATED("use get_successorsComplete");
308 void set_successors_complete(bool) ROSE_DEPRECATED("use get_successorsComplete");
309 SgAsmBlock* get_immediate_dominator() const ROSE_DEPRECATED("use get_immediateDominator");
310 void set_immediate_dominator(SgAsmBlock*) ROSE_DEPRECATED("use set_immediateDominator");
311 size_t get_cached_vertex() const ROSE_DEPRECATED("use get_cachedVertex");
312 void set_cached_vertex(size_t) ROSE_DEPRECATED("use set_cachedVertex");
313 double get_code_likelihood() const ROSE_DEPRECATED("use get_codeLikelihood");
314 void set_code_likelihood(double) ROSE_DEPRECATED("use set_codeLikelihood");
315 void append_statement(SgAsmStatement*) ROSE_DEPRECATED("use appendStatement");
316 void remove_statement(SgAsmStatement*) ROSE_DEPRECATED("use removeStatement");
317 void remove_children() ROSE_DEPRECATED("use removeChildren");
318 rose_addr_t get_fallthrough_va() ROSE_DEPRECATED("use getFallthroughVa");
319 SgAsmFunction* get_enclosing_function() const ROSE_DEPRECATED("use get_enclosingFunction");
320 bool has_instructions() const ROSE_DEPRECATED("use hasInstructions");
321 bool is_basic_block() const ROSE_DEPRECATED("use isBasicBlock");
322 bool is_function_call(rose_addr_t&, rose_addr_t&) ROSE_DEPRECATED("use isFunctionCall");
323 static std::string reason_key(const std::string& = "") ROSE_DEPRECATED("use reasonKey");
324 std::string reason_str(bool) const ROSE_DEPRECATED("use reasonString");
325 static std::string reason_str(bool, unsigned) ROSE_DEPRECATED("use reasonString");
326public:
328 virtual ~SgAsmBlock();
329
330public:
332 SgAsmBlock();
333
334public:
336 explicit SgAsmBlock(rose_addr_t const& address);
337
338protected:
345 void initializeProperties();
346
347
348// End of memberFunctionString
349// Start of memberFunctionString
350/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
351
352// *** COMMON CODE SECTION BEGINS HERE ***
353
354 public:
355
356 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
357 // and not required which is required to match the other aspects of the copy mechanism code generation.
358 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
359 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
360 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
361 // virtual SgNode* copy ( const SgCopyHelp & help) const;
362
364 virtual std::string class_name() const override;
365
367 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
368
370 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
371 // static const VariantT static_variant = V_SgAsmBlock;
372 enum { static_variant = V_SgAsmBlock };
373
374 /* the generated cast function */
376 ROSE_DLL_API friend SgAsmBlock* isSgAsmBlock( SgNode * s );
377
379 ROSE_DLL_API friend const SgAsmBlock* isSgAsmBlock( const SgNode * s );
380
381 // ******************************************
382 // * Memory Pool / New / Delete
383 // ******************************************
384
385 public:
387 static const unsigned pool_size; //
389 static std::vector<unsigned char *> pools; //
391 static SgAsmBlock * next_node; //
392
394 static unsigned long initializeStorageClassArray(SgAsmBlockStorageClass *); //
395
397 static void clearMemoryPool(); //
398 static void deleteMemoryPool(); //
399
401 static void extendMemoryPoolForFileIO(); //
402
404 static SgAsmBlock * getPointerFromGlobalIndex(unsigned long); //
406 static SgAsmBlock * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
407
409 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
411 static void resetValidFreepointers(); //
413 static unsigned long getNumberOfLastValidPointer(); //
414
415
416#if defined(INLINE_FUNCTIONS)
418 inline void *operator new (size_t size);
419#else
421 void *operator new (size_t size);
422#endif
424 void operator delete (void* pointer, size_t size);
425
426 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
427 void operator delete (void* pointer)
428 {
429 // This is the generated delete operator...
430 SgAsmBlock::operator delete (pointer,sizeof(SgAsmBlock));
431 }
432
434 static size_t numberOfNodes();
435
437 static size_t memoryUsage();
438
439 // End of scope which started in IR nodes specific code
440 /* */
441
442 /* name Internal Functions
443 \brief Internal functions ... incomplete-documentation
444
445 These functions have been made public as part of the design, but they are suggested for internal use
446 or by particularly knowledgeable users for specialized tools or applications.
447
448 \internal We could not make these private because they are required by user for special purposes. And
449 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
450
451 */
452
453 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
454 // overridden in every class by *generated* implementation
456 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
457 // MS: 06/28/02 container of names of variables or container indices
458 // used used in the traversal to access AST successor nodes
459 // overridden in every class by *generated* implementation
462 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
463
464 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
465 // than all the vector copies. The implementation for these functions is generated for each class.
467 virtual size_t get_numberOfTraversalSuccessors() override;
469 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
471 virtual size_t get_childIndex(SgNode *child) override;
472
473#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
474 // MS: 08/16/2002 method for generating RTI information
476 virtual RTIReturnType roseRTI() override;
477#endif
478 /* */
479
480
481
482 /* name Deprecated Functions
483 \brief Deprecated functions ... incomplete-documentation
484
485 These functions have been deprecated from use.
486 */
487 /* */
488
490 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
491
492 // JJW (10/16/2008): Changed to a single function in Node.code, and put
493 // getVariant() in #if 0 block to prevent confusing Doxygen
494#if 0
496 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
498 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
499#endif
500 /* */
501
502
503
504
505 public:
506 /* name Traversal Support Functions
507 \brief Traversal support functions ... incomplete-documentation
508
509 These functions have been made public as part of the design, but they are suggested for internal use
510 or by particularly knowledgable users for specialized tools or applications.
511 */
512 /* */
513
514 // DQ (11/26/2005): Support for visitor pattern mechanims
515 // (inferior to ROSE traversal mechanism, experimental).
519
520 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
522 virtual void accept (ROSE_VisitorPattern & visitor) override;
523
524 // DQ (12/26/2005): Support for traversal based on the memory pool
527 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
528
532
533 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
534 // This traversal helps support internal tools that call static member functions.
535 // note: this function operates on the memory pools.
538 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
539 /* */
540
541 public:
542 /* NodeId support functions */
544 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
547 static SgAsmBlock* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
550 static std::string getNodeIdString(SgAsmBlock* sgnode);
551 static std::string getNodeIdStringInternal(SgAsmBlock* sgnode);
552
553 public:
554 /* name Memory Allocation Functions
555 \brief Memory allocations functions ... incomplete-documentation
556
557 These functions have been made public as part of the design, but they are suggested for internal use
558 or by particularly knowledgable users for specialized tools or applications.
559 */
560 /* */
561
572 virtual bool isInMemoryPool() override;
573
584 virtual void checkDataMemberPointersIfInMemoryPool() override;
585
586 // DQ (4/30/2006): Modified to be a const function.
601 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
602
613
625 virtual long getChildIndex( SgNode* childNode ) const override;
626
627 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
628 // comment here (changed to be a C style comment and not be a doxygen comment).
629 /* \brief Constructor for use by AST File I/O Mechanism
630
631 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
632 which obtained via fast binary file I/O from disk.
633 */
634 // SgAsmBlock( SgAsmBlockStorageClass& source );
635
636
637
638
639
640 // JH (10/24/2005): methods added to support the ast file IO
641 private:
642
643 /* name AST Memory Allocation Support Functions
644 \brief Memory allocations support....
645
646 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
647 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
648 and support the AST File I/O Mechanism.
649 */
650 /* */
651
652 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
653 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
654 that I use the same type everywhere, if any changes are made. THe second one declares the type
655 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
656 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
657 a correspinding one in the AST_FILE_IO class!
658 */
659 // DQ (9/2/2015): This typedef is no longer used, we can't define the
660 // comment here (changed to be a C style comment and not be a doxygen comment).
661 /* \brief Typedef used for low level memory access.
662 */
663 // typedef unsigned char* TestType;
664
665 // DQ (9/2/2015): This typedef is no longer used, we can't define the
666 // comment here (changed to be a C style comment and not be a doxygen comment).
667 /* \brief Typedef used to hold memory addresses as values.
668 */
669 // typedef unsigned long AddressType;
670
671
672
673 // necessary, to have direct access to the p_freepointer and the private methods !
675 friend class AST_FILE_IO;
676
678 friend class SgAsmBlockStorageClass;
679
681 friend class AstSpecificDataManagingClass;
682
684 friend class AstSpecificDataManagingClassStorageClass;
685 public:
687 SgAsmBlock( const SgAsmBlockStorageClass& source );
688
689 // private: // JJW hack
690 /*
691 name AST Memory Allocation Support Variables
692 Memory allocations support variables
693
694 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
695 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
696 and support the AST File I/O Mechanism.
697 */
698 /* */
699
700 public:
701
702 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
703 // to current node (so that it will work cleanly with build functions to specify patterns).
704 // virtual SgNode* addRegExpAttribute();
711
712#ifndef _MSC_VER
713// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
714// and likely never fully implemented nor tested. Files remain in the src tree but are no
715// longer built.
716#define BUILD_ATERM_SUPPORT 0
717 #if BUILD_ATERM_SUPPORT
718 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
719 // DQ (10/4/2014): Adding ATerm support to ROSE.
729 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
730 virtual ATerm generate_ATerm() override;
731
733 virtual void generate_ATerm_Annotation(ATerm & term) override;
734 #endif
735 #endif // BUILD_ATERM_SUPPORT
736#endif
737 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
738 // virtual generate_AST(ATerm & term);
739 // virtual void read_ATerm_Annotation(ATerm & term);
740
741// *** COMMON CODE SECTION ENDS HERE ***
742
743
744// End of memberFunctionString
745// Start of memberFunctionString
746/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
747
748 // the generated cast function
749 // friend ROSE_DLL_API SgAsmBlock* isSgAsmBlock ( SgNode* s );
750
751 typedef SgAsmStatement base_node_type;
752
753
754// End of memberFunctionString
755
756
757
758
759
760
761
762
763
764
765 protected:
766// Start of memberFunctionString
767rose_addr_t p_id;
768
769// End of memberFunctionString
770// Start of memberFunctionString
771unsigned p_reason;
772
773// End of memberFunctionString
774// Start of memberFunctionString
775SgAsmStatementPtrList p_statementList;
776
777// End of memberFunctionString
778// Start of memberFunctionString
779SgAsmIntegerValuePtrList p_successors;
780
781// End of memberFunctionString
782// Start of memberFunctionString
783bool p_successorsComplete;
784
785// End of memberFunctionString
786// Start of memberFunctionString
787SgAsmBlock* p_immediateDominator;
788
789// End of memberFunctionString
790// Start of memberFunctionString
791size_t p_cachedVertex;
792
793// End of memberFunctionString
794// Start of memberFunctionString
795double p_codeLikelihood;
796
797// End of memberFunctionString
798// Start of memberFunctionString
799int64_t p_stackDeltaOut;
800
801// End of memberFunctionString
802
804 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, rose_addr_t,&SgAsmBlock::p_id>;
805 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, unsigned,&SgAsmBlock::p_reason>;
806 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, SgAsmStatementPtrList,&SgAsmBlock::p_statementList>;
807 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, SgAsmIntegerValuePtrList,&SgAsmBlock::p_successors>;
808 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, bool,&SgAsmBlock::p_successorsComplete>;
809 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, SgAsmBlock*,&SgAsmBlock::p_immediateDominator>;
810 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, size_t,&SgAsmBlock::p_cachedVertex>;
811 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, double,&SgAsmBlock::p_codeLikelihood>;
812 friend struct Rose::Traits::generated::describe_field_t<SgAsmBlock, int64_t,&SgAsmBlock::p_stackDeltaOut>;
813
814/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
815
816
817 };
818#endif
819
820// postdeclarations for SgAsmBlock
821
822/* #line 823 "../../../src/frontend/SageIII//SgAsmBlock.h" */
823
824/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
825
826/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
827
828
829/* #line 830 "../../../src/frontend/SageIII//SgAsmBlock.h" */
830
831#endif // ROSE_SgAsmBlock_H
832
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 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 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...
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 serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
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.