ROSE 0.11.145.192
SgAsmFunction.h
1
2#ifndef ROSE_SgAsmFunction_H
3#define ROSE_SgAsmFunction_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmSynthesizedDeclaration.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 SgAsmFunction
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmFunction.h" */
25/* #line 16074 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/AddressIntervalSet.h>
28#include <sageContainer.h>
29
30#ifdef ROSE_SgAsmFunction_IMPL
31#include <SgAsmInstruction.h>
32#endif
33
34
35/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
36
37/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
38
39#if !defined(DOCUMENTATION)
40// Class Definition for SgAsmFunction
41class ROSE_DLL_API SgAsmFunction : public SgAsmSynthesizedDeclaration
42 {
43 public:
44
45
46/* #line 47 "../../../src/frontend/SageIII//SgAsmFunction.h" */
47
48 virtual SgNode* copy ( SgCopyHelp& help) const override;
49// Start of memberFunctionString
50/* #line 16181 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
51
52
53 //----------------------- Boost serialization for SgAsmFunction -----------------------
54#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
55private:
56 friend class boost::serialization::access;
57
58 template<class S>
59 void serialize(S &s, const unsigned /*version*/) {
60 debugSerializationBegin("SgAsmFunction");
61 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmSynthesizedDeclaration);
62 s & BOOST_SERIALIZATION_NVP(p_name);
63 s & BOOST_SERIALIZATION_NVP(p_reason);
64 s & BOOST_SERIALIZATION_NVP(p_reasonComment);
65 s & BOOST_SERIALIZATION_NVP(p_functionKind);
66 s & BOOST_SERIALIZATION_NVP(p_mayReturn);
67 s & BOOST_SERIALIZATION_NVP(p_nameMd5);
68 s & BOOST_SERIALIZATION_NVP(p_statementList);
69 s & BOOST_SERIALIZATION_NVP(p_dest);
70 s & BOOST_SERIALIZATION_NVP(p_entryVa);
71 s & BOOST_SERIALIZATION_NVP(p_cachedVertex);
72 s & BOOST_SERIALIZATION_NVP(p_stackDelta);
73 s & BOOST_SERIALIZATION_NVP(p_callingConvention);
74 debugSerializationEnd("SgAsmFunction");
75 }
76#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
78 // Local types
80public:
82 enum MayReturn {
83 RET_UNKNOWN,
84 RET_NEVER,
85 RET_SOMETIMES,
86 RET_ALWAYS
87 };
88
92 enum FunctionReason {
93 // NOTE: If you add more here, then fix Partitioner::parse_switches()
94 // Also fix SgAsmFunction::reason_key()
95 FUNC_NONE = 0x00000000,
96 FUNC_THUNK_TARGET= 0x00004000,
97 FUNC_EXCEPTION_HANDLER
98 = 0x00008000,
99 FUNC_ENTRY_POINT = 0x00010000,
100 FUNC_CALL_TARGET = 0x00020000,
103 FUNC_CALL_INSN = 0x00040000,
109 FUNC_EH_FRAME = 0x00080000,
110 FUNC_SYMBOL = 0x00100000,
111 FUNC_PATTERN = 0x00200000,
116 FUNC_GRAPH = 0x00400000,
120 FUNC_USERDEF = 0x00800000,
121 FUNC_PADDING = 0x01000000,
126 FUNC_DISCONT = 0x02000000,
129 FUNC_INSNHEAD = 0x04000000,
130 FUNC_IMPORT = 0x08000000,
133 FUNC_LEFTOVERS = 0x10000000,
137 FUNC_INTRABLOCK = 0x20000000,
145 FUNC_THUNK = 0x40000000,
154 FUNC_EXPORT = 0x80000000,
156 FUNC_DEFAULT = 0xefff80ff,
158 /*========= Miscellaneous Reasons ===========================================================================
159 * The first half of the range (1-127, inclusive) is used for algorithms defined by ROSE. The second half is
160 * availalble for users to use as they see fit. */
161 FUNC_MISCMASK = 0x000000ff,
167 FUNC_INTERPADFUNC = 1,
170 FUNC_PESCRAMBLER_DISPATCH = 2,
171 FUNC_CONFIGURED = 3,
172 FUNC_CMDLINE = 4,
173 FUNC_SCAN_RO_DATA = 5,
174 FUNC_INSN_RO_DATA = 6,
176 };
177
179 enum function_kind_enum {
180 e_unknown = 0,
181 e_standard = 1,
182 e_library = 2,
183 e_imported = 3,
184 e_thunk = 4,
185 e_last
186 };
187
189 // Properties
191public:
192public:
198 std::string const& get_name() const;
199 void set_name(std::string const&);
202public:
209 unsigned const& get_reason() const;
210 void set_reason(unsigned const&);
213public:
221 std::string const& get_reasonComment() const;
222 void set_reasonComment(std::string const&);
225public:
231 SgAsmFunction::function_kind_enum const& get_functionKind() const;
232 void set_functionKind(SgAsmFunction::function_kind_enum const&);
235public:
239 SgAsmFunction::MayReturn const& get_mayReturn() const;
240 void set_mayReturn(SgAsmFunction::MayReturn const&);
243public:
249 std::string const& get_nameMd5() const;
250 void set_nameMd5(std::string const&);
253public:
259 SgAsmStatementPtrList const& get_statementList() const;
260 SgAsmStatementPtrList& get_statementList();
261 void set_statementList(SgAsmStatementPtrList const&);
263 // FIXME[Robb P Matzke 2017-02-13]: unused?
264public:
265 SgAsmStatementPtrList const& get_dest() const;
266 void set_dest(SgAsmStatementPtrList const&);
267
268public:
275 rose_addr_t const& get_entryVa() const;
276 void set_entryVa(rose_addr_t const&);
279public:
286 SgSymbolTable* const& get_symbolTable() const;
287 void set_symbolTable(SgSymbolTable* const&);
289 // FIXME[Robb P Matzke 2017-02-13]: what is this?
290public:
291 size_t const& get_cachedVertex() const;
292 void set_cachedVertex(size_t const&);
293
294public:
304 int64_t const& get_stackDelta() const;
305 void set_stackDelta(int64_t const&);
308public:
317 std::string const& get_callingConvention() const;
318 void set_callingConvention(std::string const&);
321 // Functions
323public:
326
330 void removeStatement(SgAsmStatement* statement);
331
336 SgAsmBlock* get_entryBlock() const;
337
341 static std::string reasonKey(const std::string &prefix = "");
342
344 std::string reasonString(bool pad) const;
345
349 static std::string reasonString(bool pad, unsigned reason);
350
352 class NodeSelector {
353 public:
354 virtual ~NodeSelector() {}
355 virtual bool operator()(SgNode*) = 0;
356 };
357
397 size_t get_extent(Rose::BinaryAnalysis::AddressIntervalSet *emap=NULL, rose_addr_t *lo_addr=NULL, rose_addr_t *hi_addr=NULL,
398 NodeSelector *selector=NULL);
399
405 bool get_sha1(uint8_t digest[20]/*out*/, NodeSelector *selector=NULL);
406
408 // Deprecated 2023-11
410public:
411 function_kind_enum get_function_kind() const ROSE_DEPRECATED("use get_functionKind");
412 void set_function_kind(function_kind_enum) ROSE_DEPRECATED("use set_functionKind");
413 MayReturn get_may_return() const ROSE_DEPRECATED("use get_mayReturn");
414 void set_may_return(MayReturn) ROSE_DEPRECATED("use set_mayReturn");
415 const std::string& get_name_md5() const ROSE_DEPRECATED("use get_nameMd5");
416 void set_name_md5(const std::string&) ROSE_DEPRECATED("use set_nameMd5");
417 rose_addr_t get_entry_va() const ROSE_DEPRECATED("use get_entryVa");
418 void set_entry_va(rose_addr_t) ROSE_DEPRECATED("use set_entryVa");
419 SgSymbolTable* get_symbol_table() const ROSE_DEPRECATED("use get_symbolTable");
420 void set_symbol_table(SgSymbolTable*) ROSE_DEPRECATED("use set_symbolTable");
421 size_t get_cached_vertex() const ROSE_DEPRECATED("use get_cachedVertex");
422 void set_cached_vertex(size_t) ROSE_DEPRECATED("use set_cachedVertex");
423 void append_statement(SgAsmStatement*) ROSE_DEPRECATED("use appendStatement");
424 void remove_statement(SgAsmStatement* statement) ROSE_DEPRECATED("use removeStatement");
425 SgAsmBlock* get_entry_block() const ROSE_DEPRECATED("use get_entryBlock");
426 static std::string reason_key(const std::string &prefix="") ROSE_DEPRECATED("use reasonKey");
427 std::string reason_str(bool) const ROSE_DEPRECATED("use reasonString");
428 static std::string reason_str(bool, unsigned) ROSE_DEPRECATED("use reasonString");
429public:
431 virtual ~SgAsmFunction();
432
433public:
436
437public:
439 SgAsmFunction(rose_addr_t const& address,
440 std::string const& name,
441 unsigned const& reason,
442 SgAsmFunction::function_kind_enum const& functionKind);
443
444protected:
451 void initializeProperties();
452
453
454// End of memberFunctionString
455// Start of memberFunctionString
456/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
457
458// *** COMMON CODE SECTION BEGINS HERE ***
459
460 public:
461
462 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
463 // and not required which is required to match the other aspects of the copy mechanism code generation.
464 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
465 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
466 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
467 // virtual SgNode* copy ( const SgCopyHelp & help) const;
468
470 virtual std::string class_name() const override;
471
473 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
474
476 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
477 // static const VariantT static_variant = V_SgAsmFunction;
478 enum { static_variant = V_SgAsmFunction };
479
480 /* the generated cast function */
482 ROSE_DLL_API friend SgAsmFunction* isSgAsmFunction( SgNode * s );
483
485 ROSE_DLL_API friend const SgAsmFunction* isSgAsmFunction( const SgNode * s );
486
487 // ******************************************
488 // * Memory Pool / New / Delete
489 // ******************************************
490
491 public:
493 static const unsigned pool_size; //
495 static std::vector<unsigned char *> pools; //
497 static SgAsmFunction * next_node; //
498
500 static unsigned long initializeStorageClassArray(SgAsmFunctionStorageClass *); //
501
503 static void clearMemoryPool(); //
504 static void deleteMemoryPool(); //
505
507 static void extendMemoryPoolForFileIO(); //
508
510 static SgAsmFunction * getPointerFromGlobalIndex(unsigned long); //
512 static SgAsmFunction * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
513
515 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
517 static void resetValidFreepointers(); //
519 static unsigned long getNumberOfLastValidPointer(); //
520
521
522#if defined(INLINE_FUNCTIONS)
524 inline void *operator new (size_t size);
525#else
527 void *operator new (size_t size);
528#endif
530 void operator delete (void* pointer, size_t size);
531
532 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
533 void operator delete (void* pointer)
534 {
535 // This is the generated delete operator...
536 SgAsmFunction::operator delete (pointer,sizeof(SgAsmFunction));
537 }
538
540 static size_t numberOfNodes();
541
543 static size_t memoryUsage();
544
545 // End of scope which started in IR nodes specific code
546 /* */
547
548 /* name Internal Functions
549 \brief Internal functions ... incomplete-documentation
550
551 These functions have been made public as part of the design, but they are suggested for internal use
552 or by particularly knowledgeable users for specialized tools or applications.
553
554 \internal We could not make these private because they are required by user for special purposes. And
555 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
556
557 */
558
559 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
560 // overridden in every class by *generated* implementation
562 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
563 // MS: 06/28/02 container of names of variables or container indices
564 // used used in the traversal to access AST successor nodes
565 // overridden in every class by *generated* implementation
568 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
569
570 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
571 // than all the vector copies. The implementation for these functions is generated for each class.
573 virtual size_t get_numberOfTraversalSuccessors() override;
575 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
577 virtual size_t get_childIndex(SgNode *child) override;
578
579#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
580 // MS: 08/16/2002 method for generating RTI information
582 virtual RTIReturnType roseRTI() override;
583#endif
584 /* */
585
586
587
588 /* name Deprecated Functions
589 \brief Deprecated functions ... incomplete-documentation
590
591 These functions have been deprecated from use.
592 */
593 /* */
594
596 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
597
598 // JJW (10/16/2008): Changed to a single function in Node.code, and put
599 // getVariant() in #if 0 block to prevent confusing Doxygen
600#if 0
602 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
604 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
605#endif
606 /* */
607
608
609
610
611 public:
612 /* name Traversal Support Functions
613 \brief Traversal support functions ... incomplete-documentation
614
615 These functions have been made public as part of the design, but they are suggested for internal use
616 or by particularly knowledgable users for specialized tools or applications.
617 */
618 /* */
619
620 // DQ (11/26/2005): Support for visitor pattern mechanims
621 // (inferior to ROSE traversal mechanism, experimental).
625
626 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
628 virtual void accept (ROSE_VisitorPattern & visitor) override;
629
630 // DQ (12/26/2005): Support for traversal based on the memory pool
633 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
634
638
639 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
640 // This traversal helps support internal tools that call static member functions.
641 // note: this function operates on the memory pools.
644 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
645 /* */
646
647 public:
648 /* NodeId support functions */
650 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
653 static SgAsmFunction* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
656 static std::string getNodeIdString(SgAsmFunction* sgnode);
657 static std::string getNodeIdStringInternal(SgAsmFunction* sgnode);
658
659 public:
660 /* name Memory Allocation Functions
661 \brief Memory allocations functions ... incomplete-documentation
662
663 These functions have been made public as part of the design, but they are suggested for internal use
664 or by particularly knowledgable users for specialized tools or applications.
665 */
666 /* */
667
678 virtual bool isInMemoryPool() override;
679
690 virtual void checkDataMemberPointersIfInMemoryPool() override;
691
692 // DQ (4/30/2006): Modified to be a const function.
707 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
708
719
731 virtual long getChildIndex( SgNode* childNode ) const override;
732
733 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
734 // comment here (changed to be a C style comment and not be a doxygen comment).
735 /* \brief Constructor for use by AST File I/O Mechanism
736
737 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
738 which obtained via fast binary file I/O from disk.
739 */
740 // SgAsmFunction( SgAsmFunctionStorageClass& source );
741
742
743
744
745
746 // JH (10/24/2005): methods added to support the ast file IO
747 private:
748
749 /* name AST Memory Allocation Support Functions
750 \brief Memory allocations support....
751
752 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
753 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
754 and support the AST File I/O Mechanism.
755 */
756 /* */
757
758 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
759 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
760 that I use the same type everywhere, if any changes are made. THe second one declares the type
761 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
762 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
763 a correspinding one in the AST_FILE_IO class!
764 */
765 // DQ (9/2/2015): This typedef is no longer used, we can't define the
766 // comment here (changed to be a C style comment and not be a doxygen comment).
767 /* \brief Typedef used for low level memory access.
768 */
769 // typedef unsigned char* TestType;
770
771 // DQ (9/2/2015): This typedef is no longer used, we can't define the
772 // comment here (changed to be a C style comment and not be a doxygen comment).
773 /* \brief Typedef used to hold memory addresses as values.
774 */
775 // typedef unsigned long AddressType;
776
777
778
779 // necessary, to have direct access to the p_freepointer and the private methods !
781 friend class AST_FILE_IO;
782
784 friend class SgAsmFunctionStorageClass;
785
787 friend class AstSpecificDataManagingClass;
788
790 friend class AstSpecificDataManagingClassStorageClass;
791 public:
793 SgAsmFunction( const SgAsmFunctionStorageClass& source );
794
795 // private: // JJW hack
796 /*
797 name AST Memory Allocation Support Variables
798 Memory allocations support variables
799
800 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
801 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
802 and support the AST File I/O Mechanism.
803 */
804 /* */
805
806 public:
807
808 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
809 // to current node (so that it will work cleanly with build functions to specify patterns).
810 // virtual SgNode* addRegExpAttribute();
817
818#ifndef _MSC_VER
819// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
820// and likely never fully implemented nor tested. Files remain in the src tree but are no
821// longer built.
822#define BUILD_ATERM_SUPPORT 0
823 #if BUILD_ATERM_SUPPORT
824 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
825 // DQ (10/4/2014): Adding ATerm support to ROSE.
835 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
836 virtual ATerm generate_ATerm() override;
837
839 virtual void generate_ATerm_Annotation(ATerm & term) override;
840 #endif
841 #endif // BUILD_ATERM_SUPPORT
842#endif
843 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
844 // virtual generate_AST(ATerm & term);
845 // virtual void read_ATerm_Annotation(ATerm & term);
846
847// *** COMMON CODE SECTION ENDS HERE ***
848
849
850// End of memberFunctionString
851// Start of memberFunctionString
852/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
853
854 // the generated cast function
855 // friend ROSE_DLL_API SgAsmFunction* isSgAsmFunction ( SgNode* s );
856
857 typedef SgAsmSynthesizedDeclaration base_node_type;
858
859
860// End of memberFunctionString
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875 protected:
876// Start of memberFunctionString
877std::string p_name;
878
879// End of memberFunctionString
880// Start of memberFunctionString
881unsigned p_reason;
882
883// End of memberFunctionString
884// Start of memberFunctionString
885std::string p_reasonComment;
886
887// End of memberFunctionString
888// Start of memberFunctionString
890
891// End of memberFunctionString
892// Start of memberFunctionString
893SgAsmFunction::MayReturn p_mayReturn;
894
895// End of memberFunctionString
896// Start of memberFunctionString
897std::string p_nameMd5;
898
899// End of memberFunctionString
900// Start of memberFunctionString
901SgAsmStatementPtrList p_statementList;
902
903// End of memberFunctionString
904// Start of memberFunctionString
905SgAsmStatementPtrList p_dest;
906
907// End of memberFunctionString
908// Start of memberFunctionString
909rose_addr_t p_entryVa;
910
911// End of memberFunctionString
912// Start of memberFunctionString
913SgSymbolTable* p_symbolTable;
914
915// End of memberFunctionString
916// Start of memberFunctionString
917size_t p_cachedVertex;
918
919// End of memberFunctionString
920// Start of memberFunctionString
921int64_t p_stackDelta;
922
923// End of memberFunctionString
924// Start of memberFunctionString
925std::string p_callingConvention;
926
927// End of memberFunctionString
928
930 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, std::string,&SgAsmFunction::p_name>;
931 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, unsigned,&SgAsmFunction::p_reason>;
932 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, std::string,&SgAsmFunction::p_reasonComment>;
933 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, SgAsmFunction::function_kind_enum,&SgAsmFunction::p_functionKind>;
934 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, SgAsmFunction::MayReturn,&SgAsmFunction::p_mayReturn>;
935 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, std::string,&SgAsmFunction::p_nameMd5>;
936 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, SgAsmStatementPtrList,&SgAsmFunction::p_statementList>;
937 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, SgAsmStatementPtrList,&SgAsmFunction::p_dest>;
938 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, rose_addr_t,&SgAsmFunction::p_entryVa>;
939 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, SgSymbolTable*,&SgAsmFunction::p_symbolTable>;
940 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, size_t,&SgAsmFunction::p_cachedVertex>;
941 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, int64_t,&SgAsmFunction::p_stackDelta>;
942 friend struct Rose::Traits::generated::describe_field_t<SgAsmFunction, std::string,&SgAsmFunction::p_callingConvention>;
943
944/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
945
946
947 };
948#endif
949
950// postdeclarations for SgAsmFunction
951
952/* #line 953 "../../../src/frontend/SageIII//SgAsmFunction.h" */
953
954/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
955
956/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
957
958
959/* #line 960 "../../../src/frontend/SageIII//SgAsmFunction.h" */
960
961#endif // ROSE_SgAsmFunction_H
962
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.
function_kind_enum
Constants for the "function_kind" property.
MayReturn
Whether a function returns.
Base class for statement-like subclasses.
Base class for synthesized declarations.
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.
This class represents the symbol tables used in both SgScopeStatement and the SgFunctionTypeSymbolTab...
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
ROSE_DLL_API int set_name(SgInitializedName *initializedNameNode, SgName new_name)
set_name of symbol in symbol table.
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,...
std::string get_name(const SgNode *node)
Generate a useful name to describe the SgNode.
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 * FunctionReason(int64_t)
Convert SgAsmFunction::FunctionReason enum constant to a string.
const char * MayReturn(int64_t)
Convert SgAsmFunction::MayReturn enum constant to a string.
const char * function_kind_enum(int64_t)
Convert SgAsmFunction::function_kind_enum enum constant to a string.