ROSE 0.11.145.272
SgAsmInstruction.h
1
2#ifndef ROSE_SgAsmInstruction_H
3#define ROSE_SgAsmInstruction_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 SgAsmInstruction
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
25/* #line 43831 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/Address.h>
28#include <Rose/BinaryAnalysis/Architecture/BasicTypes.h>
29#include <Rose/BinaryAnalysis/MemoryMap.h>
30#include <sageContainer.h>
31#include <Sawyer/Cached.h>
32
33#ifdef ROSE_SgAsmInstruction_IMPL
34#include <SgAsmExprListExp.h>
35#include <SgAsmOperandList.h>
36#endif
37
38
39/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
40
41/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
42
43#if !defined(DOCUMENTATION)
44// Class Definition for SgAsmInstruction
45class ROSE_DLL_API SgAsmInstruction : public SgAsmStatement
46 {
47 public:
48
49
50/* #line 51 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
51
52 virtual SgNode* copy ( SgCopyHelp& help) const override;
53// Start of memberFunctionString
54/* #line 43900 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
55
56
57 //----------------------- Boost serialization for SgAsmInstruction -----------------------
58#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
59private:
60 friend class boost::serialization::access;
61
62 template<class S>
63 void serialize(S &s, const unsigned /*version*/) {
64 debugSerializationBegin("SgAsmInstruction");
65 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmStatement);
66 {
67 auto temp = architectureIdSerialize(p_architectureId);
68 s & boost::serialization::make_nvp("p_architectureId", temp);
69 p_architectureId = architectureIdDeserialize(temp);
70 }
71 s & BOOST_SERIALIZATION_NVP(p_rawBytes);
72 s & BOOST_SERIALIZATION_NVP(p_operandList);
73 s & BOOST_SERIALIZATION_NVP(p_delaySlot);
74 userSerializeBoost(s);
75 debugSerializationEnd("SgAsmInstruction");
76 }
77#endif // ROSE_ENABLE_BOOST_SERIALIZATION
79 // Local types
81private:
82 struct SemanticFailure {
83 size_t n;
84 SemanticFailure(): n(0) {}
85
86#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
87 private:
88 friend class boost::serialization::access;
89 template<class S>
90 void serialize(S &s, const unsigned /*version*/) {
91 s & BOOST_SERIALIZATION_NVP(n);
92 }
93#endif
94 };
95
97 // Properties
99public:
100public:
112 uint8_t const& get_architectureId() const;
114 // Architecture registration IDs change from run to run, so serialize the architecture name instead. The architecture names
115 // will probably not change as frequently as their registration IDs.
116 std::string architectureIdSerialize(uint8_t id) const;
117 uint8_t architectureIdDeserialize(const std::string &name) const;
118public:
124 SgUnsignedCharList const& get_rawBytes() const;
125 void set_rawBytes(SgUnsignedCharList const&);
128public:
135 SgAsmOperandList* const& get_operandList() const;
136 void set_operandList(SgAsmOperandList* const&);
139public:
152 SgAsmInstruction* const& get_delaySlot() const;
153 void set_delaySlot(SgAsmInstruction* const&);
155 // FIXME[Robb Matzke 2023-03-18]: is the lack of serialization a bug?
156public:
164 SgAsmExprListExp* const& get_semantics() const;
165 void set_semantics(SgAsmExprListExp* const&);
168 // Non-property data members
170private:
171 SemanticFailure semanticFailure_;
172
173public:
178 static const int64_t INVALID_STACK_DELTA; // [Robb Matzke 2024-10-01]: deprecated; use an optional type instead
179
181 // Functions
183public:
191 Rose::BinaryAnalysis::Architecture::BaseConstPtr architecture() const /*final*/;
192
199 std::string get_mnemonic() const;
200
201 // [Robb Matzke 2023-12-04]: deprecated
202 virtual std::string description() const final ROSE_DEPRECATED("use Architecture::Base::instructionDescription");
203
205 size_t nOperands() const;
206
210 SgAsmExpression* operand(size_t) const;
211
212 // [Robb Matzke 2023-12-04]: deprecated
213 virtual bool terminatesBasicBlock() final ROSE_DEPRECATED("use Architecture::Base::terminatesBasicBlock");
214 virtual bool isFunctionCallFast(const std::vector<SgAsmInstruction*>&, Rose::BinaryAnalysis::Address *target,
215 Rose::BinaryAnalysis::Address *ret) final
216 ROSE_DEPRECATED("use Architecture::Base::isFunctionCallFast");
217 virtual bool isFunctionCallSlow(const std::vector<SgAsmInstruction*>&, Rose::BinaryAnalysis::Address *target,
218 Rose::BinaryAnalysis::Address *ret) final
219 ROSE_DEPRECATED("use Architecture::Base::isFunctionCallSlow");
220 virtual bool isFunctionReturnFast(const std::vector<SgAsmInstruction*>&) final
221 ROSE_DEPRECATED("use Architecture::Base::isFunctionReturnFast");
222 virtual bool isFunctionReturnSlow(const std::vector<SgAsmInstruction*>&) final
223 ROSE_DEPRECATED("use Architecture::Base::isFunctionReturnSlow");
224 virtual Sawyer::Optional<Rose::BinaryAnalysis::Address> branchTarget() final
225 ROSE_DEPRECATED("use Architecture::Base::branchTarget");
226
230 bool isFirstInBlock();
231
235 bool isLastInBlock();
236
371 virtual bool hasEffect();
372
381 virtual bool hasEffect(const std::vector<SgAsmInstruction*>&, bool allow_branch=false,
382 bool relax_stack_semantics=false);
383
393 virtual std::vector<std::pair<size_t,size_t> >
394 findNoopSubsequences(const std::vector<SgAsmInstruction*>& insns, bool allow_branch=false,
395 bool relax_stack_semantics=false);
396
397 // [Robb Matzke 2023-12-04]: deprecated
398 virtual Rose::BinaryAnalysis::AddressSet getSuccessors(bool &complete)
399 ROSE_DEPRECATED("use Architecture::Base::getSuccessors");
400 virtual Rose::BinaryAnalysis::AddressSet getSuccessors(const std::vector<SgAsmInstruction*> &basicBlock,
401 bool &complete,
402 const Rose::BinaryAnalysis::MemoryMap::Ptr &initial_memory =
403 Rose::BinaryAnalysis::MemoryMap::Ptr())
404 ROSE_DEPRECATED("use Architecture::Base::getSuccessors");
405
411 virtual size_t get_size() const;
412
413 // [Robb Matzke 2023-12-05]: deprecated
414 virtual bool isUnknown() const final ROSE_DEPRECATED("use Architecture::Base::isUnknown");
415
449 virtual unsigned get_anyKind() const;
450
454 virtual std::string toString() const;
455
459 virtual std::string toStringNoAddr() const;
460
464 virtual std::string toStringNoColor() const;
465
470 virtual std::string toStringNoAddrNoColor() const;
471
476 virtual std::set<Rose::BinaryAnalysis::Address> explicitConstants() const;
477
487 size_t semanticFailure() const;
488 void semanticFailure(size_t);
489 void incrementSemanticFailure();
500 bool normalizeOperands();
501
503 // Serialization
505#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
506private:
507 template<class S>
508 void userSerializeBoost(S &s) {
509 s & BOOST_SERIALIZATION_NVP(semanticFailure_);
510 }
511#endif
512
514 // Deprecated
516public:
517 // [Robb Matzke 2023-11-07]: deprecated
518 const SgUnsignedCharList& get_raw_bytes() const ROSE_DEPRECATED("use get_rawBytes");
519 void set_raw_bytes(const SgUnsignedCharList&) ROSE_DEPRECATED("use set_rawBytes");
520public:
522 virtual ~SgAsmInstruction();
523
524public:
527
528public:
530 SgAsmInstruction(Rose::BinaryAnalysis::Address const& address,
531 uint8_t const& architectureId);
532
533protected:
540 void initializeProperties();
541
542
543// End of memberFunctionString
544// Start of memberFunctionString
545/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
546
547// *** COMMON CODE SECTION BEGINS HERE ***
548
549 public:
550
551 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
552 // and not required which is required to match the other aspects of the copy mechanism code generation.
553 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
554 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
555 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
556 // virtual SgNode* copy ( const SgCopyHelp & help) const;
557
559 virtual std::string class_name() const override;
560
562 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
563
565 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
566 // static const VariantT static_variant = V_SgAsmInstruction;
567 enum { static_variant = V_SgAsmInstruction };
568
569 /* the generated cast function */
571 ROSE_DLL_API friend SgAsmInstruction* isSgAsmInstruction( SgNode * s );
572
574 ROSE_DLL_API friend const SgAsmInstruction* isSgAsmInstruction( const SgNode * s );
575
576 // ******************************************
577 // * Memory Pool / New / Delete
578 // ******************************************
579
580 public:
582 static const unsigned pool_size; //
584 static std::vector<unsigned char *> pools; //
586 static SgAsmInstruction * next_node; //
587
589 static unsigned long initializeStorageClassArray(SgAsmInstructionStorageClass *); //
590
592 static void clearMemoryPool(); //
593 static void deleteMemoryPool(); //
594
596 static void extendMemoryPoolForFileIO(); //
597
599 static SgAsmInstruction * getPointerFromGlobalIndex(unsigned long); //
601 static SgAsmInstruction * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
602
604 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
606 static void resetValidFreepointers(); //
608 static unsigned long getNumberOfLastValidPointer(); //
609
610
611#if defined(INLINE_FUNCTIONS)
613 inline void *operator new (size_t size);
614#else
616 void *operator new (size_t size);
617#endif
619 void operator delete (void* pointer, size_t size);
620
621 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
622 void operator delete (void* pointer)
623 {
624 // This is the generated delete operator...
625 SgAsmInstruction::operator delete (pointer,sizeof(SgAsmInstruction));
626 }
627
629 static size_t numberOfNodes();
630
632 static size_t memoryUsage();
633
634 // End of scope which started in IR nodes specific code
635 /* */
636
637 /* name Internal Functions
638 \brief Internal functions ... incomplete-documentation
639
640 These functions have been made public as part of the design, but they are suggested for internal use
641 or by particularly knowledgeable users for specialized tools or applications.
642
643 \internal We could not make these private because they are required by user for special purposes. And
644 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
645
646 */
647
648 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
649 // overridden in every class by *generated* implementation
651 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
652 // MS: 06/28/02 container of names of variables or container indices
653 // used used in the traversal to access AST successor nodes
654 // overridden in every class by *generated* implementation
657 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
658
659 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
660 // than all the vector copies. The implementation for these functions is generated for each class.
662 virtual size_t get_numberOfTraversalSuccessors() const override;
664 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
666 virtual size_t get_childIndex(SgNode *child) const override;
667
668#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
669 // MS: 08/16/2002 method for generating RTI information
671 virtual RTIReturnType roseRTI() override;
672#endif
673 /* */
674
675
676
677 /* name Deprecated Functions
678 \brief Deprecated functions ... incomplete-documentation
679
680 These functions have been deprecated from use.
681 */
682 /* */
683
685 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
686
687 // JJW (10/16/2008): Changed to a single function in Node.code, and put
688 // getVariant() in #if 0 block to prevent confusing Doxygen
689#if 0
691 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
693 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
694#endif
695 /* */
696
697
698
699
700 public:
701 /* name Traversal Support Functions
702 \brief Traversal support functions ... incomplete-documentation
703
704 These functions have been made public as part of the design, but they are suggested for internal use
705 or by particularly knowledgable users for specialized tools or applications.
706 */
707 /* */
708
709 // DQ (11/26/2005): Support for visitor pattern mechanims
710 // (inferior to ROSE traversal mechanism, experimental).
714
715 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
717 virtual void accept (ROSE_VisitorPattern & visitor) override;
718
719 // DQ (12/26/2005): Support for traversal based on the memory pool
722 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
723
727
728 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
729 // This traversal helps support internal tools that call static member functions.
730 // note: this function operates on the memory pools.
733 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
734 /* */
735
736 public:
737 /* NodeId support functions */
739 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
742 static SgAsmInstruction* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
745 static std::string getNodeIdString(SgAsmInstruction* sgnode);
746 static std::string getNodeIdStringInternal(SgAsmInstruction* sgnode);
747
748 public:
749 /* name Memory Allocation Functions
750 \brief Memory allocations functions ... incomplete-documentation
751
752 These functions have been made public as part of the design, but they are suggested for internal use
753 or by particularly knowledgable users for specialized tools or applications.
754 */
755 /* */
756
767 virtual bool isInMemoryPool() override;
768
779 virtual void checkDataMemberPointersIfInMemoryPool() override;
780
781 // DQ (4/30/2006): Modified to be a const function.
796 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
797
808
820 virtual long getChildIndex( SgNode* childNode ) const override;
821
822 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
823 // comment here (changed to be a C style comment and not be a doxygen comment).
824 /* \brief Constructor for use by AST File I/O Mechanism
825
826 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
827 which obtained via fast binary file I/O from disk.
828 */
829 // SgAsmInstruction( SgAsmInstructionStorageClass& source );
830
831
832
833
834
835 // JH (10/24/2005): methods added to support the ast file IO
836 private:
837
838 /* name AST Memory Allocation Support Functions
839 \brief Memory allocations support....
840
841 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
842 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
843 and support the AST File I/O Mechanism.
844 */
845 /* */
846
847 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
848 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
849 that I use the same type everywhere, if any changes are made. THe second one declares the type
850 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
851 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
852 a correspinding one in the AST_FILE_IO class!
853 */
854 // DQ (9/2/2015): This typedef is no longer used, we can't define the
855 // comment here (changed to be a C style comment and not be a doxygen comment).
856 /* \brief Typedef used for low level memory access.
857 */
858 // typedef unsigned char* TestType;
859
860 // DQ (9/2/2015): This typedef is no longer used, we can't define the
861 // comment here (changed to be a C style comment and not be a doxygen comment).
862 /* \brief Typedef used to hold memory addresses as values.
863 */
864 // typedef unsigned long AddressType;
865
866
867
868 // necessary, to have direct access to the p_freepointer and the private methods !
870 friend class AST_FILE_IO;
871
873 friend class SgAsmInstructionStorageClass;
874
876 friend class AstSpecificDataManagingClass;
877
879 friend class AstSpecificDataManagingClassStorageClass;
880 public:
882 SgAsmInstruction( const SgAsmInstructionStorageClass& source );
883
884 // private: // JJW hack
885 /*
886 name AST Memory Allocation Support Variables
887 Memory allocations support variables
888
889 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
890 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
891 and support the AST File I/O Mechanism.
892 */
893 /* */
894
895 public:
896
897 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
898 // to current node (so that it will work cleanly with build functions to specify patterns).
899 // virtual SgNode* addRegExpAttribute();
906
907#ifndef _MSC_VER
908// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
909// and likely never fully implemented nor tested. Files remain in the src tree but are no
910// longer built.
911#define BUILD_ATERM_SUPPORT 0
912 #if BUILD_ATERM_SUPPORT
913 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
914 // DQ (10/4/2014): Adding ATerm support to ROSE.
924 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
925 virtual ATerm generate_ATerm() override;
926
928 virtual void generate_ATerm_Annotation(ATerm & term) override;
929 #endif
930 #endif // BUILD_ATERM_SUPPORT
931#endif
932 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
933 // virtual generate_AST(ATerm & term);
934 // virtual void read_ATerm_Annotation(ATerm & term);
935
936// *** COMMON CODE SECTION ENDS HERE ***
937
938
939// End of memberFunctionString
940// Start of memberFunctionString
941/* #line 710 "/workspace/src/ROSETTA/Grammar/Node.code" */
942
943 // the generated cast function
944 // friend ROSE_DLL_API SgAsmInstruction* isSgAsmInstruction ( SgNode* s );
945
946 typedef SgAsmStatement base_node_type;
947
948
949// End of memberFunctionString
950
951
952
953
954
955
956 protected:
957// Start of memberFunctionString
958uint8_t p_architectureId;
959
960// End of memberFunctionString
961// Start of memberFunctionString
962SgUnsignedCharList p_rawBytes;
963
964// End of memberFunctionString
965// Start of memberFunctionString
966SgAsmOperandList* p_operandList;
967
968// End of memberFunctionString
969// Start of memberFunctionString
970SgAsmInstruction* p_delaySlot;
971
972// End of memberFunctionString
973// Start of memberFunctionString
974SgAsmExprListExp* p_semantics;
975
976// End of memberFunctionString
977
979 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, uint8_t,&SgAsmInstruction::p_architectureId>;
980 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgUnsignedCharList,&SgAsmInstruction::p_rawBytes>;
981 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmOperandList*,&SgAsmInstruction::p_operandList>;
982 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmInstruction*,&SgAsmInstruction::p_delaySlot>;
983 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmExprListExp*,&SgAsmInstruction::p_semantics>;
984
985/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
986
987
988 };
989#endif
990
991// postdeclarations for SgAsmInstruction
992
993/* #line 994 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
994
995/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
996
997/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
998
999
1000/* #line 1001 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
1001
1002#endif // ROSE_SgAsmInstruction_H
1003
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
List of expression nodes.
Base class for expressions.
Base class for machine instructions.
List of operands for an instruction.
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::shared_ptr< const Base > BaseConstPtr
Reference counted pointer for Architecture::Base.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
The ROSE library.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
Sawyer support library.