ROSE 0.11.145.247
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
465 virtual std::set<Rose::BinaryAnalysis::Address> explicitConstants() const;
466
476 size_t semanticFailure() const;
477 void semanticFailure(size_t);
478 void incrementSemanticFailure();
489 bool normalizeOperands();
490
492 // Serialization
494#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
495private:
496 template<class S>
497 void userSerializeBoost(S &s) {
498 s & BOOST_SERIALIZATION_NVP(semanticFailure_);
499 }
500#endif
501
503 // Deprecated
505public:
506 // [Robb Matzke 2023-11-07]: deprecated
507 const SgUnsignedCharList& get_raw_bytes() const ROSE_DEPRECATED("use get_rawBytes");
508 void set_raw_bytes(const SgUnsignedCharList&) ROSE_DEPRECATED("use set_rawBytes");
509public:
511 virtual ~SgAsmInstruction();
512
513public:
516
517public:
519 SgAsmInstruction(Rose::BinaryAnalysis::Address const& address,
520 uint8_t const& architectureId);
521
522protected:
529 void initializeProperties();
530
531
532// End of memberFunctionString
533// Start of memberFunctionString
534/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
535
536// *** COMMON CODE SECTION BEGINS HERE ***
537
538 public:
539
540 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
541 // and not required which is required to match the other aspects of the copy mechanism code generation.
542 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
543 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
544 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
545 // virtual SgNode* copy ( const SgCopyHelp & help) const;
546
548 virtual std::string class_name() const override;
549
551 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
552
554 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
555 // static const VariantT static_variant = V_SgAsmInstruction;
556 enum { static_variant = V_SgAsmInstruction };
557
558 /* the generated cast function */
560 ROSE_DLL_API friend SgAsmInstruction* isSgAsmInstruction( SgNode * s );
561
563 ROSE_DLL_API friend const SgAsmInstruction* isSgAsmInstruction( const SgNode * s );
564
565 // ******************************************
566 // * Memory Pool / New / Delete
567 // ******************************************
568
569 public:
571 static const unsigned pool_size; //
573 static std::vector<unsigned char *> pools; //
575 static SgAsmInstruction * next_node; //
576
578 static unsigned long initializeStorageClassArray(SgAsmInstructionStorageClass *); //
579
581 static void clearMemoryPool(); //
582 static void deleteMemoryPool(); //
583
585 static void extendMemoryPoolForFileIO(); //
586
588 static SgAsmInstruction * getPointerFromGlobalIndex(unsigned long); //
590 static SgAsmInstruction * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
591
593 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
595 static void resetValidFreepointers(); //
597 static unsigned long getNumberOfLastValidPointer(); //
598
599
600#if defined(INLINE_FUNCTIONS)
602 inline void *operator new (size_t size);
603#else
605 void *operator new (size_t size);
606#endif
608 void operator delete (void* pointer, size_t size);
609
610 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
611 void operator delete (void* pointer)
612 {
613 // This is the generated delete operator...
614 SgAsmInstruction::operator delete (pointer,sizeof(SgAsmInstruction));
615 }
616
618 static size_t numberOfNodes();
619
621 static size_t memoryUsage();
622
623 // End of scope which started in IR nodes specific code
624 /* */
625
626 /* name Internal Functions
627 \brief Internal functions ... incomplete-documentation
628
629 These functions have been made public as part of the design, but they are suggested for internal use
630 or by particularly knowledgeable users for specialized tools or applications.
631
632 \internal We could not make these private because they are required by user for special purposes. And
633 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
634
635 */
636
637 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
638 // overridden in every class by *generated* implementation
640 virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override;
641 // MS: 06/28/02 container of names of variables or container indices
642 // used used in the traversal to access AST successor nodes
643 // overridden in every class by *generated* implementation
646 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override;
647
648 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
649 // than all the vector copies. The implementation for these functions is generated for each class.
651 virtual size_t get_numberOfTraversalSuccessors() const override;
653 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) const override;
655 virtual size_t get_childIndex(SgNode *child) const override;
656
657#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
658 // MS: 08/16/2002 method for generating RTI information
660 virtual RTIReturnType roseRTI() override;
661#endif
662 /* */
663
664
665
666 /* name Deprecated Functions
667 \brief Deprecated functions ... incomplete-documentation
668
669 These functions have been deprecated from use.
670 */
671 /* */
672
674 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
675
676 // JJW (10/16/2008): Changed to a single function in Node.code, and put
677 // getVariant() in #if 0 block to prevent confusing Doxygen
678#if 0
680 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
682 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
683#endif
684 /* */
685
686
687
688
689 public:
690 /* name Traversal Support Functions
691 \brief Traversal support functions ... incomplete-documentation
692
693 These functions have been made public as part of the design, but they are suggested for internal use
694 or by particularly knowledgable users for specialized tools or applications.
695 */
696 /* */
697
698 // DQ (11/26/2005): Support for visitor pattern mechanims
699 // (inferior to ROSE traversal mechanism, experimental).
703
704 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
706 virtual void accept (ROSE_VisitorPattern & visitor) override;
707
708 // DQ (12/26/2005): Support for traversal based on the memory pool
711 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
712
716
717 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
718 // This traversal helps support internal tools that call static member functions.
719 // note: this function operates on the memory pools.
722 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
723 /* */
724
725 public:
726 /* NodeId support functions */
728 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
731 static SgAsmInstruction* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
734 static std::string getNodeIdString(SgAsmInstruction* sgnode);
735 static std::string getNodeIdStringInternal(SgAsmInstruction* sgnode);
736
737 public:
738 /* name Memory Allocation Functions
739 \brief Memory allocations functions ... incomplete-documentation
740
741 These functions have been made public as part of the design, but they are suggested for internal use
742 or by particularly knowledgable users for specialized tools or applications.
743 */
744 /* */
745
756 virtual bool isInMemoryPool() override;
757
768 virtual void checkDataMemberPointersIfInMemoryPool() override;
769
770 // DQ (4/30/2006): Modified to be a const function.
785 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
786
797
809 virtual long getChildIndex( SgNode* childNode ) const override;
810
811 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
812 // comment here (changed to be a C style comment and not be a doxygen comment).
813 /* \brief Constructor for use by AST File I/O Mechanism
814
815 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
816 which obtained via fast binary file I/O from disk.
817 */
818 // SgAsmInstruction( SgAsmInstructionStorageClass& source );
819
820
821
822
823
824 // JH (10/24/2005): methods added to support the ast file IO
825 private:
826
827 /* name AST Memory Allocation Support Functions
828 \brief Memory allocations support....
829
830 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
831 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
832 and support the AST File I/O Mechanism.
833 */
834 /* */
835
836 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
837 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
838 that I use the same type everywhere, if any changes are made. THe second one declares the type
839 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
840 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
841 a correspinding one in the AST_FILE_IO class!
842 */
843 // DQ (9/2/2015): This typedef is no longer used, we can't define the
844 // comment here (changed to be a C style comment and not be a doxygen comment).
845 /* \brief Typedef used for low level memory access.
846 */
847 // typedef unsigned char* TestType;
848
849 // DQ (9/2/2015): This typedef is no longer used, we can't define the
850 // comment here (changed to be a C style comment and not be a doxygen comment).
851 /* \brief Typedef used to hold memory addresses as values.
852 */
853 // typedef unsigned long AddressType;
854
855
856
857 // necessary, to have direct access to the p_freepointer and the private methods !
859 friend class AST_FILE_IO;
860
862 friend class SgAsmInstructionStorageClass;
863
865 friend class AstSpecificDataManagingClass;
866
868 friend class AstSpecificDataManagingClassStorageClass;
869 public:
871 SgAsmInstruction( const SgAsmInstructionStorageClass& source );
872
873 // private: // JJW hack
874 /*
875 name AST Memory Allocation Support Variables
876 Memory allocations support variables
877
878 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
879 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
880 and support the AST File I/O Mechanism.
881 */
882 /* */
883
884 public:
885
886 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
887 // to current node (so that it will work cleanly with build functions to specify patterns).
888 // virtual SgNode* addRegExpAttribute();
895
896#ifndef _MSC_VER
897// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
898// and likely never fully implemented nor tested. Files remain in the src tree but are no
899// longer built.
900#define BUILD_ATERM_SUPPORT 0
901 #if BUILD_ATERM_SUPPORT
902 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
903 // DQ (10/4/2014): Adding ATerm support to ROSE.
913 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
914 virtual ATerm generate_ATerm() override;
915
917 virtual void generate_ATerm_Annotation(ATerm & term) override;
918 #endif
919 #endif // BUILD_ATERM_SUPPORT
920#endif
921 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
922 // virtual generate_AST(ATerm & term);
923 // virtual void read_ATerm_Annotation(ATerm & term);
924
925// *** COMMON CODE SECTION ENDS HERE ***
926
927
928// End of memberFunctionString
929// Start of memberFunctionString
930/* #line 710 "/workspace/src/ROSETTA/Grammar/Node.code" */
931
932 // the generated cast function
933 // friend ROSE_DLL_API SgAsmInstruction* isSgAsmInstruction ( SgNode* s );
934
935 typedef SgAsmStatement base_node_type;
936
937
938// End of memberFunctionString
939
940
941
942
943
944
945 protected:
946// Start of memberFunctionString
947uint8_t p_architectureId;
948
949// End of memberFunctionString
950// Start of memberFunctionString
951SgUnsignedCharList p_rawBytes;
952
953// End of memberFunctionString
954// Start of memberFunctionString
955SgAsmOperandList* p_operandList;
956
957// End of memberFunctionString
958// Start of memberFunctionString
959SgAsmInstruction* p_delaySlot;
960
961// End of memberFunctionString
962// Start of memberFunctionString
963SgAsmExprListExp* p_semantics;
964
965// End of memberFunctionString
966
968 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, uint8_t,&SgAsmInstruction::p_architectureId>;
969 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgUnsignedCharList,&SgAsmInstruction::p_rawBytes>;
970 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmOperandList*,&SgAsmInstruction::p_operandList>;
971 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmInstruction*,&SgAsmInstruction::p_delaySlot>;
972 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmExprListExp*,&SgAsmInstruction::p_semantics>;
973
974/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
975
976
977 };
978#endif
979
980// postdeclarations for SgAsmInstruction
981
982/* #line 983 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
983
984/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
985
986/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
987
988
989/* #line 990 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
990
991#endif // ROSE_SgAsmInstruction_H
992
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.