⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cp-tree.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
   found within this class.  The TREE_PURPOSE of each node is the name   of the type; the TREE_VALUE is the type itself.  This list includes   nested member class templates.  */#define CLASSTYPE_TAGS(NODE)		(TYPE_LANG_SPECIFIC(NODE)->tags)/* If this class has any bases, this is the number of the base class from   which our VFIELD is based, -1 otherwise.  If this class has no base   classes, this is not used.   In D : B1, B2, PARENT would be 0, if D's vtable came from B1,   1, if D's vtable came from B2.  */#define CLASSTYPE_VFIELD_PARENT(NODE)	(TYPE_LANG_SPECIFIC(NODE)->vfield_parent)/* Remove when done merging.  */#define CLASSTYPE_VFIELD(NODE) TYPE_VFIELD(NODE)/* The number of virtual functions defined for this   _CLASSTYPE node.  */#define CLASSTYPE_VSIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->vsize)/* The list of binfos of virtual base classes that this type uses.  */#define CLASSTYPE_VBASECLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->vbases)/* The virtual function pointer fields that this type contains.  */#define CLASSTYPE_VFIELDS(NODE) (TYPE_LANG_SPECIFIC(NODE)->vfields)/* Number of baseclasses defined for this type.   0 means no base classes.  */#define CLASSTYPE_N_BASECLASSES(NODE) \  (TYPE_BINFO_BASETYPES (NODE) ? TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES(NODE)) : 0)/* Used for keeping search-specific information.  Any search routine   which uses this must define what exactly this slot is used for.  */#define CLASSTYPE_SEARCH_SLOT(NODE) (TYPE_LANG_SPECIFIC(NODE)->search_slot)/* These are the size, mode and alignment of the type without its   virtual base classes, for when we use this type as a base itself.  */#define CLASSTYPE_SIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->size)#define CLASSTYPE_ALIGN(NODE) (TYPE_LANG_SPECIFIC(NODE)->align)/* A cons list of virtual functions which cannot be inherited by   derived classes.  When deriving from this type, the derived   class must provide its own definition for each of these functions.  */#define CLASSTYPE_ABSTRACT_VIRTUALS(NODE) (TYPE_LANG_SPECIFIC(NODE)->abstract_virtuals)/* Nonzero means that this aggr type has been `closed' by a semicolon.  */#define CLASSTYPE_GOT_SEMICOLON(NODE) (TYPE_LANG_SPECIFIC (NODE)->type_flags.got_semicolon)/* Nonzero means that the main virtual function table pointer needs to be   set because base constructors have placed the wrong value there.   If this is zero, it means that they placed the right value there,   and there is no need to change it.  */#define CLASSTYPE_NEEDS_VIRTUAL_REINIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.needs_virtual_reinit)/* Nonzero means that if this type has virtual functions, that   the virtual function table will be written out.  */#define CLASSTYPE_VTABLE_NEEDS_WRITING(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.vtable_needs_writing)/* Nonzero means that this type has an X() constructor.  */#define TYPE_HAS_DEFAULT_CONSTRUCTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_default_ctor)/* Nonzero means the type declared a ctor as private or protected.  We   use this to make sure we don't try to generate a copy ctor for a    class that has a member of type NODE.  */#define TYPE_HAS_NONPUBLIC_CTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_nonpublic_ctor)/* Ditto, for operator=.  */#define TYPE_HAS_NONPUBLIC_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_nonpublic_assign_ref)/* Nonzero means that this type contains a mutable member */#define CLASSTYPE_HAS_MUTABLE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_mutable)#define TYPE_HAS_MUTABLE_P(NODE) (cp_has_mutable_p (NODE))/* Nonzero means that this type is meant for communication via COM.  */#define CLASSTYPE_COM_INTERFACE(NODE) \  (TYPE_LANG_SPECIFIC(NODE)->type_flags.com_interface)/* A list of class types of which this type is a friend.  The   TREE_VALUE is normally a TYPE, but will be a TEMPLATE_DECL in the   case of a template friend.  */#define CLASSTYPE_FRIEND_CLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->friend_classes)/* A list of the classes which grant friendship to this class.  */#define CLASSTYPE_BEFRIENDING_CLASSES(NODE) \  (TYPE_LANG_SPECIFIC (NODE)->befriending_classes)/* Say whether this node was declared as a "class" or a "struct".  */#define CLASSTYPE_DECLARED_CLASS(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.declared_class)/* Nonzero if this class has const members which have no specified initialization.  */#define CLASSTYPE_READONLY_FIELDS_NEED_INIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.const_needs_init)/* Nonzero if this class has ref members which have no specified initialization.  */#define CLASSTYPE_REF_FIELDS_NEED_INIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.ref_needs_init)/* Nonzero if this class is included from a header file which employs   `#pragma interface', and it is not included in its implementation file.  */#define CLASSTYPE_INTERFACE_ONLY(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_only)/* Same as above, but for classes whose purpose we do not know.  */#define CLASSTYPE_INTERFACE_UNKNOWN(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown)#define CLASSTYPE_INTERFACE_KNOWN(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown == 0)#define SET_CLASSTYPE_INTERFACE_UNKNOWN_X(NODE,X) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown = !!(X))#define SET_CLASSTYPE_INTERFACE_UNKNOWN(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown = 1)#define SET_CLASSTYPE_INTERFACE_KNOWN(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown = 0)/* Nonzero if a _DECL node requires us to output debug info for this class.  */#define CLASSTYPE_DEBUG_REQUESTED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.debug_requested)/* Additional macros for inheritance information.  *//* The BINFO_INHERITANCE_CHAIN is used opposite to the description in   gcc/tree.h.  In particular if D is derived from B then the BINFO   for B (in D) will have a BINFO_INHERITANCE_CHAIN pointing to   D.  In tree.h, this pointer is described as pointing in other   direction.  There is a different BINFO for each path to a virtual   base; BINFOs for virtual bases are not shared.  In addition, shared   versions of each of the virtual class BINFOs are stored in   CLASSTYPE_VBASECLASSES.   We use TREE_VIA_PROTECTED and TREE_VIA_PUBLIC, but private   inheritance is indicated by the absence of the other two flags, not   by TREE_VIAR_PRIVATE, which is unused.   The TREE_CHAIN is for scratch space in search.c.  *//* Nonzero means marked by DFS or BFS search, including searches   by `get_binfo' and `get_base_distance'.  */#define BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED(BINFO_TYPE(NODE)):TREE_LANG_FLAG_0(NODE))/* Macros needed because of C compilers that don't allow conditional   expressions to be lvalues.  Grr!  */#define SET_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=1))#define CLEAR_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=0))/* Nonzero means marked in search through virtual inheritance hierarchy.  */#define BINFO_VBASE_MARKED(NODE) CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))/* Modifier macros */#define SET_BINFO_VBASE_MARKED(NODE) SET_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))#define CLEAR_BINFO_VBASE_MARKED(NODE) CLEAR_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))/* Nonzero means marked in search for members or member functions.  */#define BINFO_FIELDS_MARKED(NODE) \  (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED2 (BINFO_TYPE (NODE)):TREE_LANG_FLAG_2(NODE))#define SET_BINFO_FIELDS_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED2(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_2(NODE)=1))#define CLEAR_BINFO_FIELDS_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED2(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_2(NODE)=0))/* Nonzero means that this class is on a path leading to a new vtable.  */#define BINFO_VTABLE_PATH_MARKED(NODE) \  (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):TREE_LANG_FLAG_3(NODE))#define SET_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=1))#define CLEAR_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=0))/* Nonzero means that this class has a new vtable.  */#define BINFO_NEW_VTABLE_MARKED(NODE) \  (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):TREE_LANG_FLAG_4(NODE))#define SET_BINFO_NEW_VTABLE_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_4(NODE)=1))#define CLEAR_BINFO_NEW_VTABLE_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_4(NODE)=0))/* Nonzero means this class has done dfs_pushdecls.  */#define BINFO_PUSHDECLS_MARKED(NODE) BINFO_VTABLE_PATH_MARKED (NODE)#define SET_BINFO_PUSHDECLS_MARKED(NODE) SET_BINFO_VTABLE_PATH_MARKED (NODE)#define CLEAR_BINFO_PUSHDECLS_MARKED(NODE) CLEAR_BINFO_VTABLE_PATH_MARKED (NODE)/* Used by various search routines.  */#define IDENTIFIER_MARKED(NODE) TREE_LANG_FLAG_0 (NODE)/* Accessor macros for the vfield slots in structures.  *//* Get the assoc info that caused this vfield to exist.  */#define VF_BINFO_VALUE(NODE) TREE_PURPOSE (NODE)/* Get that same information as a _TYPE.  */#define VF_BASETYPE_VALUE(NODE) TREE_VALUE (NODE)/* Get the value of the top-most type dominating the non-`normal' vfields.  */#define VF_DERIVED_VALUE(NODE) (VF_BINFO_VALUE (NODE) ? BINFO_TYPE (VF_BINFO_VALUE (NODE)) : NULL_TREE)/* Get the value of the top-most type that's `normal' for the vfield.  */#define VF_NORMAL_VALUE(NODE) TREE_TYPE (NODE)/* Nonzero for TREE_LIST node means that this list of things   is a list of parameters, as opposed to a list of expressions.  */#define TREE_PARMLIST(NODE) ((NODE)->common.unsigned_flag) /* overloaded! *//* For FUNCTION_TYPE or METHOD_TYPE, a list of the exceptions that   this type can raise.  Each TREE_VALUE is a _TYPE.  The TREE_VALUE   will be NULL_TREE to indicate a throw specification of `(...)', or,   equivalently, no throw specification.  */#define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_NONCOPIED_PARTS (NODE)/* For FUNCTION_TYPE or METHOD_TYPE, return 1 iff it is declared `throw()'.  */#define TYPE_NOTHROW_P(NODE) \  (TYPE_RAISES_EXCEPTIONS (NODE) \   && TREE_VALUE (TYPE_RAISES_EXCEPTIONS (NODE)) == NULL_TREE)/* The binding level associated with the namespace.  */#define NAMESPACE_LEVEL(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.level)/* If a DECL has DECL_LANG_SPECIFIC, it is either a lang_decl_flags or   a lang_decl (which has lang_decl_flags as its initial prefix).  A   FUNCTION_DECL, NAMESPACE_DECL, TYPE_DECL, or USING_DECL may have a   full lang_decl.  A FIELD_DECL, or a static data member VAR_DECL,   will have only lang_decl_flags.  Thus, one should only access the   members of lang_decl that are not in lang_decl_flags for DECLs that   are not FIELD_DECLs or VAR_DECLs.  */struct lang_decl_flags{#ifdef ONLY_INT_FIELDS  int language : 8;#else  enum languages language : 8;#endif  unsigned operator_attr : 1;  unsigned constructor_attr : 1;  unsigned friend_attr : 1;  unsigned static_function : 1;  unsigned const_memfunc : 1;  unsigned volatile_memfunc : 1;  unsigned abstract_virtual : 1;  unsigned permanent_attr : 1 ;  unsigned mutable_flag : 1;  unsigned is_default_implementation : 1;  unsigned saved_inline : 1;  unsigned use_template : 2;  unsigned nonconverting : 1;  unsigned declared_inline : 1;  unsigned not_really_extern : 1;  unsigned needs_final_overrider : 1;  unsigned bitfield : 1;  unsigned defined_in_class : 1;  unsigned constructor_for_vbase_attr : 2;  unsigned dummy : 3;  tree access;  tree context;  tree memfunc_pointer_to;  tree template_info;  struct binding_level *level;};struct lang_decl{  struct lang_decl_flags decl_flags;  tree main_decl_variant;  tree befriending_classes;  struct pending_inline *pending_inline_info;};/* Non-zero if NODE is a _DECL with TREE_READONLY set.  */#define TREE_READONLY_DECL_P(NODE) \  (TREE_READONLY (NODE) && TREE_CODE_CLASS (TREE_CODE (NODE)) == 'd')/* Non-zero iff DECL is memory-based.  The DECL_RTL of   certain const variables might be a CONST_INT, or a REG   in some cases.  We cannot use `memory_operand' as a test   here because on most RISC machines, a variable's address   is not, by itself, a legitimate address.  */#define DECL_IN_MEMORY_P(NODE) \  (DECL_RTL (NODE) != NULL_RTX && GET_CODE (DECL_RTL (NODE)) == MEM)/* For FUNCTION_DECLs: return the language in which this decl   was declared.  */#define DECL_LANGUAGE(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.language)/* For FUNCTION_DECLs: nonzero means that this function is a constructor.  */#define DECL_CONSTRUCTOR_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_attr)/* There ought to be a better way to find out whether or not something is   a destructor.  */#define DECL_DESTRUCTOR_P(NODE)				\  (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (NODE))	\   && DECL_LANGUAGE (NODE) == lang_cplusplus)#define DECL_CONV_FN_P(NODE)						     \  (IDENTIFIER_TYPENAME_P (DECL_NAME (NODE)) && TREE_TYPE (DECL_NAME (NODE)))#define CONSTRUCTOR_FOR_VBASE   1#define CONSTRUCTOR_FOR_PVBASE  2#define DESTRUCTOR_FOR_PVBASE   3/* For FUNCTION_DECLs: nonzero means that this function is a con/destructor   for an object with virtual baseclasses.  */#define DECL_CONSTRUCTOR_FOR_VBASE(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_for_vbase_attr)/* Nonzero means that this function is a constructor for an object   with virtual baseclasses.  */#define DECL_CONSTRUCTOR_FOR_VBASE_P(NODE) \  (DECL_CONSTRUCTOR_FOR_VBASE (NODE) == CONSTRUCTOR_FOR_VBASE)/* Nonzero means that this function is a constructor for an object   with virtual baseclasses which have virtual functions.  */#define DECL_CONSTRUCTOR_FOR_PVBASE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_for_vbase_attr == CONSTRUCTOR_FOR_PVBASE)/* Nonzero means that this function is a destructor for an object   with virtual baseclasses which have virtual functions.  */#define DECL_DESTRUCTOR_FOR_PVBASE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_for_vbase_attr == DESTRUCTOR_FOR_PVBASE)/* Nonzero means that this function is a wrapper around a PVBASE ctor.  */#define DECL_VLIST_CTOR_WRAPPER_P(NODE) \  (DECL_CONSTRUCTOR_FOR_VBASE_P (NODE) && DECL_VLIST_CTOR_WRAPPED (NODE)\   && TREE_CODE (DECL_VLIST_CTOR_WRAPPED (NODE)) == FUNCTION_DECL \   && DECL_CONSTRUCTOR_FOR_PVBASE_P (DECL_VLIST_CTOR_WRAPPED (NODE)))/* Refers to original function that NODE wraps.  */#define DECL_VLIST_CTOR_WRAPPED(NODE)  DECL_MEMFUNC_POINTER_TO (NODE)/* Non-zero for a FUNCTION_DECL that declares a type-info function.  */#define DECL_TINFO_FN_P(NODE) 					\  (TREE_CODE (NODE) == FUNCTION_DECL				\   && DECL_ARTIFICIAL (NODE)					\   && DECL_LANG_SPECIFIC(NODE)->decl_flags.mutable_flag)/* Mark NODE as a type-info function.  */#define SET_DECL_TINFO_FN_P(NODE) \  (DECL_LANG_SPECIFIC((NODE))->decl_flags.mutable_flag = 1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -