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

📄 cp-tree.h

📁 早期freebsd实现
💻 H
📖 第 1 页 / 共 5 页
字号:
  enum languages language : 8;#endif  unsigned operator_attr : 1;  unsigned constructor_attr : 1;  unsigned returns_first_arg : 1;  unsigned preserves_first_arg : 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 constructor_for_vbase_attr : 1;  unsigned dummy : 13;  tree visibility;  tree context;};struct lang_decl{  struct lang_decl_flags decl_flags;  struct template_info *template_info;  tree main_decl_variant;  struct pending_inline *pending_inline_info;  tree vbase_init_list;  tree chain;#ifdef SOS  tree dynamic_index;#endif};/* 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')/* 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)/* For FUNCTION_DECLs: nonzero means that this function is a constructor   for an object with virtual baseclasses.  */#define DECL_CONSTRUCTOR_FOR_VBASE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_for_vbase_attr)/* For FUNCTION_DECLs: nonzero means that the constructor   is known to return a non-zero `this' unchanged.  */#define DECL_RETURNS_FIRST_ARG(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.returns_first_arg)/* Nonzero for FUNCTION_DECL means that this constructor is known to   not make any assignment to `this', and therefore can be trusted   to return it unchanged.  Otherwise, we must re-assign `current_class_decl'   after performing base initializations.  */#define DECL_PRESERVES_THIS(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.preserves_first_arg)/* Nonzero for _DECL means that this decl appears in (or will appear   in) as a member in a RECORD_TYPE or UNION_TYPE node.  It is also for   detecting circularity in case members are multiply defined.  In the   case of a VAR_DECL, it is also used to determine how program storage   should be allocated.  */#define DECL_IN_AGGR_P(NODE) (DECL_LANG_FLAG_3(NODE))/* Nonzero for FUNCTION_DECL means that this decl is just a   friend declaration, and should not be added to the list of   member functions for this class.  */#define DECL_FRIEND_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.friend_attr)/* Nonzero for FUNCTION_DECL means that this decl is a static   member function.  */#define DECL_STATIC_FUNCTION_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.static_function)/* Nonzero for FUNCTION_DECL means that this member function   has `this' as const X *const.  */#define DECL_CONST_MEMFUNC_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.const_memfunc)/* Nonzero for FUNCTION_DECL means that this member function   has `this' as volatile X *const.  */#define DECL_VOLATILE_MEMFUNC_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.volatile_memfunc)/* Nonzero for FUNCTION_DECL means that this member function   exists only as part of an abstract class's interface.  */#define DECL_ABSTRACT_VIRTUAL_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.abstract_virtual)/* Nonzero if allocated on permanent_obstack.  */#define LANG_DECL_PERMANENT(LANGDECL) ((LANGDECL)->decl_flags.permanent_attr)/* The _TYPE context in which this _DECL appears.  This field is used   only to compute visibility information.  */#define DECL_CLASS_CONTEXT(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.context)/* For a FUNCTION_DECL: the chain through which the next method   in the method chain is found.  We now use TREE_CHAIN to   link into the FIELD_DECL chain.  */#if 1#define DECL_CHAIN(NODE) (DECL_LANG_SPECIFIC(NODE)->chain)#else#define DECL_CHAIN(NODE) (TREE_CHAIN (NODE))#endif/* Points back to the decl which caused this lang_decl to be allocated.  */#define DECL_MAIN_VARIANT(NODE) (DECL_LANG_SPECIFIC(NODE)->main_decl_variant)/* For a FUNCTION_DECL: if this function was declared inline inside of   a class declaration, this is where the text for the function is   squirreled away.  */#define DECL_PENDING_INLINE_INFO(NODE) (DECL_LANG_SPECIFIC(NODE)->pending_inline_info)/* Holds information about how virtual base classes should be initialized   by this constructor *if* this constructor is the one to perform   such initialization.  */#define DECL_VBASE_INIT_LIST(NODE) (DECL_LANG_SPECIFIC(NODE)->vbase_init_list)/* For a TEMPLATE_DECL: template-specific information.  */#define DECL_TEMPLATE_INFO(NODE) (DECL_LANG_SPECIFIC(NODE)->template_info)/* Nonzero in INT_CST means that this int is negative by dint of   using a twos-complement negated operand.  */#define TREE_NEGATED_INT(NODE) (TREE_LANG_FLAG_0 (NODE))/* Nonzero in any kind of _EXPR or _REF node means that it is a call   to a storage allocation routine.  If, later, alternate storage   is found to hold the object, this call can be ignored.  */#define TREE_CALLS_NEW(NODE) (TREE_LANG_FLAG_1 (NODE))/* Nonzero in any kind of _TYPE that uses multiple inheritance   or virtual baseclasses.  */#define TYPE_USES_COMPLEX_INHERITANCE(NODE) (TREE_LANG_FLAG_1 (NODE))/* Nonzero in IDENTIFIER_NODE means that this name is overloaded, and   should be looked up in a non-standard way.  */#define TREE_OVERLOADED(NODE) (TREE_LANG_FLAG_0 (NODE))#define DECL_OVERLOADED(NODE) (DECL_LANG_FLAG_4 (NODE))/* Nonzero if this (non-TYPE)_DECL has its virtual attribute set.   For a FUNCTION_DECL, this is when the function is a virtual function.   For a VAR_DECL, this is when the variable is a virtual function table.   For a FIELD_DECL, when the field is the field for the virtual function table.   For an IDENTIFIER_NODE, nonzero if any function with this name   has been declared virtual.   For a _TYPE if it uses virtual functions (or is derived from   one that does).  */#define TYPE_VIRTUAL_P(NODE) (TREE_LANG_FLAG_2 (NODE))/* Same, but tells if this field is private in current context.  */#define DECL_PRIVATE(NODE) (DECL_LANG_FLAG_5 (NODE))/* Same, but tells if this field is private in current context.  */#define DECL_PROTECTED(NODE) (DECL_LANG_FLAG_6(NODE))#define DECL_PUBLIC(NODE) (DECL_LANG_FLAG_7(NODE))/* Record whether a typedef for type `int' was actually `signed int'.  */#define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp))/* Nonzero if the type T promotes to itself.   ANSI C states explicitly the list of types that promote;   in particular, short promotes to int even if they have the same width.  */#define C_PROMOTING_INTEGER_TYPE_P(t)				\  (TREE_CODE ((t)) == INTEGER_TYPE				\   && (TYPE_MAIN_VARIANT (t) == char_type_node			\       || TYPE_MAIN_VARIANT (t) == signed_char_type_node	\       || TYPE_MAIN_VARIANT (t) == unsigned_char_type_node	\       || TYPE_MAIN_VARIANT (t) == short_integer_type_node	\       || TYPE_MAIN_VARIANT (t) == short_unsigned_type_node))/* Mark which labels are explicitly declared.   These may be shadowed, and may be referenced from nested functions.  */#define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)/* Record whether a type or decl was written with nonconstant size.   Note that TYPE_SIZE may have simplified to a constant.  */#define C_TYPE_VARIABLE_SIZE(type) TREE_LANG_FLAG_4 (type)#define C_DECL_VARIABLE_SIZE(type) DECL_LANG_FLAG_8 (type)/* Nonzero for _TYPE means that the _TYPE defines   at least one constructor.  */#define TYPE_HAS_CONSTRUCTOR(NODE) (TYPE_LANG_FLAG_1(NODE))/* When appearing in an INDIRECT_REF, it means that the tree structure   underneath is actually a call to a constructor.  This is needed   when the constructor must initialize local storage (which can   be automatically destroyed), rather than allowing it to allocate   space from the heap.   When appearing in a SAVE_EXPR, it means that underneath   is a call to a constructor.   When appearing in a CONSTRUCTOR, it means that it was   a GNU C constructor expression.   When appearing in a FIELD_DECL, it means that this field   has been duly initialized in its constructor.  */#define TREE_HAS_CONSTRUCTOR(NODE) (TREE_LANG_FLAG_4(NODE))/* Indicates that a NON_LVALUE_EXPR came from a C++ reference.   Used to generate more helpful error message in case somebody   tries to take its address.  */#define TREE_REFERENCE_EXPR(NODE) (TREE_LANG_FLAG_3(NODE))/* Nonzero for _TYPE means that the _TYPE defines a destructor.  */#define TYPE_HAS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_2(NODE))/* Nonzero for _TYPE node means that creating an object of this type   will involve a call to a constructor.  This can apply to objects   of ARRAY_TYPE if the type of the elements needs a constructor.  */#define TYPE_NEEDS_CONSTRUCTING(NODE) (TYPE_LANG_FLAG_3(NODE))#define TYPE_NEEDS_CONSTRUCTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.needs_constructor)/* Nonzero for _TYPE node means that destroying an object of this type   will involve a call to a destructor.  This can apply to objects   of ARRAY_TYPE is the type of the elements needs a destructor.  */#define TYPE_NEEDS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_4(NODE))/* Nonzero for VAR_DECL node means that `external' was specified in   its declaration.  */#define DECL_THIS_EXTERN(NODE) (DECL_LANG_FLAG_2(NODE))/* Nonzero for SAVE_EXPR if used to initialize a PARM_DECL.  */#define PARM_DECL_EXPR(NODE) (TREE_LANG_FLAG_2(NODE))/* Nonzero in FUNCTION_DECL means it is really an operator.   Just used to communicate formatting information to dbxout.c.  */#define DECL_OPERATOR(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.operator_attr)/* Define fields and accessors for nodes representing declared names.  *//* C++: A derived class may be able to directly use the virtual   function table of a base class.  When it does so, it may   still have a decl node used to access the virtual function   table (so that variables of this type can initialize their   virtual function table pointers by name).  When such thievery   is committed, know exactly which base class's virtual function   table is the one being stolen.  This effectively computes the   transitive closure.  */#define DECL_VPARENT(NODE) ((NODE)->decl.arguments)/* Make a slot so we can implement nested types.  This slot holds   the IDENTIFIER_NODE that uniquely names the nested type.  This   is for TYPE_DECLs only.  */#if !PARANOID#define DECL_NESTED_TYPENAME(NODE) ((NODE)->decl.arguments)#else#define DECL_NESTED_TYPENAME(NODE) (*DECL_NESTED_TYPENAME_PTR(NODE))#ifdef __GNUC____inline#endifstatic tree * DECL_NESTED_TYPENAME_PTR(NODE) tree NODE; { return  (my_friendly_assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 'd', 346),   &(NODE)->decl.arguments) ;}#endif/* C++: all of these are overloaded!  These apply only to TYPE_DECLs.  */#define DECL_FRIENDLIST(NODE) (DECL_INITIAL (NODE))#define DECL_UNDEFINED_FRIENDS(NODE) ((NODE)->decl.result)#define DECL_WAITING_FRIENDS(NODE) ((tree)(NODE)->decl.rtl)#define SET_DECL_WAITING_FRIENDS(NODE,VALUE) ((NODE)->decl.rtl=(struct rtx_def*)VALUE)/* The DECL_VISIBILITY is used to record under which context   special visibility rules apply.  */#define DECL_VISIBILITY(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.visibility)/* C++: all of these are overloaded!   These apply to PARM_DECLs and VAR_DECLs.  */#define DECL_REFERENCE_SLOT(NODE) ((tree)(NODE)->decl.arguments)#define SET_DECL_REFERENCE_SLOT(NODE,VAL) ((NODE)->decl.arguments=VAL)/* For local VAR_DECLs, holds index into gc-protected obstack.  */#define DECL_GC_OFFSET(NODE) ((NODE)->decl.result)/* Accessor macros for C++ template decl nodes.  */#define DECL_TEMPLATE_IS_CLASS(NODE)    (DECL_RESULT(NODE) == NULL_TREE)#define DECL_TEMPLATE_PARMS(NODE)       DECL_ARGUMENTS(NODE)/* For class templates.  */#define DECL_TEMPLATE_MEMBERS(NODE)     DECL_INITIAL(NODE)/* For function, method, class-data templates.  */#define DECL_TEMPLATE_RESULT(NODE)      DECL_RESULT(NODE)#define DECL_TEMPLATE_INSTANTIATIONS(NODE) DECL_VINDEX(NODE)/* ...and for unexpanded-parameterized-type nodes.  */#define UPT_TEMPLATE(NODE)      TREE_PURPOSE(TYPE_VALUES(NODE))#define UPT_PARMS(NODE)         TREE_VALUE(TYPE_VALUES(NODE))#ifdef SOS#define DECL_DINDEX(NODE) (DECL_LANG_SPECIFIC(NODE)->dynamic_index)#endif/* An enumeration of the kind of tags that C++ accepts.  */enum tag_types { record_type, class_type, union_type, enum_type, exception_type };/* Zero means prototype weakly, as in ANSI C (no args means nothing).   Each language context defines how this variable should be set.  */extern int strict_prototype;extern int strict_prototypes_lang_c, strict_prototypes_lang_cplusplus;/* Non-zero means that if a label exists, and no other identifier   applies, use the value of the label.  */extern int flag_labels_ok;/* Non-zero means to collect statistics which might be expensive   and to print them when we are done.  */extern int flag_detailed_statistics;/* Non-zero means warn in function declared in derived class has the   same name as a virtual in the base class, but fails to match the   type signature of any virtual function in the base class.  */

⌨️ 快捷键说明

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