📄 tree.h
字号:
which may be different from the type seen in the program. */#define DECL_ARG_TYPE(NODE) ((NODE)->decl.initial) /* In PARM_DECL. *//* These two fields describe where in the source code the declaration was. */#define DECL_SOURCE_FILE(NODE) ((NODE)->decl.filename)#define DECL_SOURCE_LINE(NODE) ((NODE)->decl.linenum)/* Holds the size of the datum, as a tree expression. Need not be constant. */#define DECL_SIZE(NODE) ((NODE)->decl.size)/* Holds the alignment required for the datum. */#define DECL_ALIGN(NODE) ((NODE)->decl.frame_size)/* Holds the machine mode corresponding to the declaration of a variable or field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a FIELD_DECL. */#define DECL_MODE(NODE) ((NODE)->decl.mode)/* Holds the RTL expression for the value of a variable or function. If PROMOTED_MODE is defined, the mode of this expression may not be same as DECL_MODE. In that case, DECL_MODE contains the mode corresponding to the variable's data type, while the mode of DECL_RTL is the mode actually used to contain the data. */#define DECL_RTL(NODE) ((NODE)->decl.rtl)/* For PARM_DECL, holds an RTL for the stack slot or register where the data was actually passed. */#define DECL_INCOMING_RTL(NODE) ((NODE)->decl.saved_insns.r)/* For FUNCTION_DECL, if it is inline, holds the saved insn chain. */#define DECL_SAVED_INSNS(NODE) ((NODE)->decl.saved_insns.r)/* For FUNCTION_DECL, if it is inline, holds the size of the stack frame, as an integer. */#define DECL_FRAME_SIZE(NODE) ((NODE)->decl.frame_size)/* For FUNCTION_DECL, if it is built-in, this identifies which built-in operation it is. */#define DECL_FUNCTION_CODE(NODE) \ ((enum built_in_function) (NODE)->decl.frame_size)#define DECL_SET_FUNCTION_CODE(NODE,VAL) \ ((NODE)->decl.frame_size = (int) (VAL))/* For a FIELD_DECL, holds the size of the member as an integer. */#define DECL_FIELD_SIZE(NODE) ((NODE)->decl.saved_insns.i)/* The DECL_VINDEX is used for FUNCTION_DECLS in two different ways. Before the struct containing the FUNCTION_DECL is laid out, DECL_VINDEX may point to a FUNCTION_DECL in a base class which is the FUNCTION_DECL which this FUNCTION_DECL will replace as a virtual function. When the class is laid out, this pointer is changed to an INTEGER_CST node which is suitable for use as an index into the virtual function table. */#define DECL_VINDEX(NODE) ((NODE)->decl.vindex)/* For FIELD_DECLS, DECL_FCONTEXT is the *first* baseclass in which this FIELD_DECL is defined. This information is needed when writing debugging information about vfield and vbase decls for C++. */#define DECL_FCONTEXT(NODE) ((NODE)->decl.vindex)/* Every ..._DECL node gets a unique number. */#define DECL_UID(NODE) ((NODE)->decl.uid)/* For any sort of a ..._DECL node, this points to the original (abstract) decl node which this decl is an instance of, or else it is NULL indicating that this decl is not an instance of some other decl. */#define DECL_ABSTRACT_ORIGIN(NODE) ((NODE)->decl.abstract_origin)/* Nonzero for any sort of ..._DECL node means this decl node represents an inline instance of some original (abstract) decl from an inline function; suppress any warnings about shadowing some other variable. */#define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != (tree) 0)/* Nonzero if a _DECL means that the name of this decl should be ignored for symbolic debug purposes. */#define DECL_IGNORED_P(NODE) ((NODE)->decl.ignored_flag)/* Nonzero for a given ..._DECL node means that this node represents an "abstract instance" of the given declaration (e.g. in the original declaration of an inline function). When generating symbolic debugging information, we musn't try to generate any address information for nodes marked as "abstract instances" because we don't actually generate any code or allocate any data space for such instances. */#define DECL_ABSTRACT(NODE) ((NODE)->decl.abstract_flag)/* Nonzero if a _DECL means that no warnings should be generated just because this decl is unused. */#define DECL_IN_SYSTEM_HEADER(NODE) ((NODE)->decl.in_system_header_flag)/* Language-specific decl information. */#define DECL_LANG_SPECIFIC(NODE) ((NODE)->decl.lang_specific)/* In a VAR_DECL or FUNCTION_DECL, nonzero means external reference: do not allocate storage, and refer to a definition elsewhere. */#define DECL_EXTERNAL(NODE) ((NODE)->decl.external_flag)/* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'. In LABEL_DECL nodes, nonzero means that an error message about jumping into such a binding contour has been printed for this label. */#define DECL_REGISTER(NODE) ((NODE)->decl.regdecl_flag)/* In a FIELD_DECL, indicates this field should be bit-packed. */#define DECL_PACKED(NODE) ((NODE)->decl.regdecl_flag)/* Nonzero in a ..._DECL means this variable is ref'd from a nested function. For VAR_DECL nodes, PARM_DECL nodes, and FUNCTION_DECL nodes. For LABEL_DECL nodes, nonzero if nonlocal gotos to the label are permitted. Also set in some languages for variables, etc., outside the normal lexical scope, such as class instance variables. */#define DECL_NONLOCAL(NODE) ((NODE)->decl.nonlocal_flag)/* Nonzero in a FUNCTION_DECL means this function can be substituted where it is called. */#define DECL_INLINE(NODE) ((NODE)->decl.inline_flag)/* Nonzero in a FUNCTION_DECL means this is a built-in function that is not specified by ansi C and that users are supposed to be allowed to redefine for any purpose whatever. */#define DECL_BUILT_IN_NONANSI(NODE) ((NODE)->common.unsigned_flag)/* Nonzero in a FIELD_DECL means it is a bit field, and must be accessed specially. */#define DECL_BIT_FIELD(NODE) ((NODE)->decl.bit_field_flag)/* In a LABEL_DECL, nonzero means label was defined inside a binding contour that restored a stack level and which is now exited. */#define DECL_TOO_LATE(NODE) ((NODE)->decl.bit_field_flag)/* In a FUNCTION_DECL, nonzero means a built in function. */#define DECL_BUILT_IN(NODE) ((NODE)->decl.bit_field_flag)/* Used in VAR_DECLs to indicate that the variable is a vtable. It is also used in FIELD_DECLs for vtable pointers. */#define DECL_VIRTUAL_P(NODE) ((NODE)->decl.virtual_flag)/* Additional flags for language-specific uses. */#define DECL_LANG_FLAG_0(NODE) ((NODE)->decl.lang_flag_0)#define DECL_LANG_FLAG_1(NODE) ((NODE)->decl.lang_flag_1)#define DECL_LANG_FLAG_2(NODE) ((NODE)->decl.lang_flag_2)#define DECL_LANG_FLAG_3(NODE) ((NODE)->decl.lang_flag_3)#define DECL_LANG_FLAG_4(NODE) ((NODE)->decl.lang_flag_4)#define DECL_LANG_FLAG_5(NODE) ((NODE)->decl.lang_flag_5)#define DECL_LANG_FLAG_6(NODE) ((NODE)->decl.lang_flag_6)#define DECL_LANG_FLAG_7(NODE) ((NODE)->decl.lang_flag_7)struct tree_decl{ char common[sizeof (struct tree_common)]; char *filename; int linenum; union tree_node *size; unsigned int uid;#ifdef ONLY_INT_FIELDS int mode : 8;#else enum machine_mode mode : 8;#endif unsigned external_flag : 1; unsigned nonlocal_flag : 1; unsigned regdecl_flag : 1; unsigned inline_flag : 1; unsigned bit_field_flag : 1; unsigned virtual_flag : 1; unsigned ignored_flag : 1; unsigned abstract_flag : 1; unsigned in_system_header_flag : 1; /* room for seven more */ unsigned lang_flag_0 : 1; unsigned lang_flag_1 : 1; unsigned lang_flag_2 : 1; unsigned lang_flag_3 : 1; unsigned lang_flag_4 : 1; unsigned lang_flag_5 : 1; unsigned lang_flag_6 : 1; unsigned lang_flag_7 : 1; union tree_node *name; union tree_node *context; union tree_node *arguments; union tree_node *result; union tree_node *initial; union tree_node *abstract_origin; /* The PRINT_NAME field is marked for death. */ char *print_name; union tree_node *assembler_name; struct rtx_def *rtl; /* acts as link to register transfer language (rtl) info */ /* For a FUNCTION_DECL, if inline, this is the size of frame needed. If built-in, this is the code for which built-in function. For other kinds of decls, this is DECL_ALIGN. */ int frame_size; /* For FUNCTION_DECLs: points to insn that constitutes its definition on the permanent obstack. For any other kind of decl, this is the alignment. */ union { struct rtx_def *r; int i; } saved_insns; union tree_node *vindex; /* Points to a structure whose details depend on the language in use. */ struct lang_decl *lang_specific;};/* Define the overall contents of a tree node. It may be any of the structures declared above for various types of node. */union tree_node{ struct tree_common common; struct tree_int_cst int_cst; struct tree_real_cst real_cst; struct tree_string string; struct tree_complex complex; struct tree_identifier identifier; struct tree_decl decl; struct tree_type type; struct tree_list list; struct tree_vec vec; struct tree_exp exp; struct tree_block block; };/* Add prototype support. */#ifndef PROTO#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)#define PROTO(ARGS) ARGS#else#define PROTO(ARGS) ()#endif#endif#define NULL_TREE (tree) NULL/* Define a generic NULL if one hasn't already been defined. */#ifndef NULL#define NULL 0#endif#ifndef GENERIC_PTR#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)#define GENERIC_PTR void *#else#define GENERIC_PTR char *#endif#endif#ifndef NULL_PTR#define NULL_PTR ((GENERIC_PTR)0)#endif/* Format for global names of constructor and destructor functions. */#ifndef CONSTRUCTOR_NAME_FORMAT /* Some machines need to override this. */#ifndef NO_DOLLAR_IN_LABEL#define CONSTRUCTOR_NAME_FORMAT "_GLOBAL_$I$%s"#else#define CONSTRUCTOR_NAME_FORMAT "_GLOBAL_.I.%s"#endif#endif/* The following functions accept a wide integer argument. Rather than having to cast on every function call, we use a macro instead, that is defined here and in rtl.h. */#ifndef exact_log2#define exact_log2(N) exact_log2_wide ((HOST_WIDE_INT) (N))#define floor_log2(N) floor_log2_wide ((HOST_WIDE_INT) (N))#endif#if 0/* At present, don't prototype xrealloc, since all of the callers don't cast their pointers to char *, and all of the xrealloc's don't use void * yet. */extern char *xrealloc PROTO((void *, unsigned));#elseextern char *xrealloc ();#endifextern char *oballoc PROTO((int));extern char *permalloc PROTO((int));extern char *savealloc PROTO((int));extern char *xmalloc PROTO((unsigned));extern void free PROTO((void *));/* Lowest level primitive for allocating a node. The TREE_CODE is the only argument. Contents are initialized to zero except for a few of the common fields. */extern tree make_node PROTO((enum tree_code));/* Make a copy of a node, with all the same contents except for TREE_PERMANENT. (The copy is permanent iff nodes being made now are permanent.) */extern tree copy_node PROTO((tree));/* Make a copy of a chain of TREE_LIST nodes. */extern tree copy_list PROTO((tree));/* Make a TREE_VEC. */extern tree make_tree_vec PROTO((int));/* Return the (unique) IDENTIFIER_NODE node for a given name. The name is supplied as a char *. */extern tree get_identifier PROTO((char *));/* Construct various types of nodes. */#define build_int_2(LO,HI) \ build_int_2_wide ((HOST_WIDE_INT) (LO), (HOST_WIDE_INT) (HI))#if 0/* We cannot define prototypes for the variable argument functions, since they have not been ANSI-fied, and an ANSI compiler would complain when compiling the definition of these functions. */extern tree build PROTO((enum tree_code, tree, ...));extern tree build_nt PROTO((enum tree_code, ...));extern tree build_parse_node PROTO((enum tree_code, ...));#elseextern tree build ();extern tree build_nt ();extern tree build_parse_node ();#endifextern tree build_int_2_wide PROTO((HOST_WIDE_INT, HOST_WIDE_INT));extern tree build_real PROTO((tree, REAL_VALUE_TYPE));extern tree build_real_from_int_cst PROTO((tree, tree));extern tree build_complex PROTO((tree, tree));extern tree build_string PROTO((int, char *));extern tree build1 PROTO((enum tree_code, tree, tree));extern tree build_tree_list PROTO((tree, tree));extern tree build_decl_list PROTO((tree, tree));extern tree build_decl PROTO((enum tree_code, tree, tree));extern tree build_block PROTO((tree, tree, tree, tree, tree));/* Construct various nodes representing data types. */extern tree make_signed_type PROTO((int));extern tree make_unsigned_type PROTO((int));extern tree signed_or_unsigned_type PROTO((int, tree));extern void fixup_unsigned_type PROTO((tree));extern tree build_pointer_type PROTO((tree));extern tree build_reference_type PROTO((tree));extern tree build_index_type PROTO((tree));extern tree build_index_2_type PROTO((tree, tree));extern tree build_array_type PROTO((tree, tree));extern tree build_function_type PROTO((tree, tree));extern tree build_method_type PROTO((tree, tree));extern tree build_offset_type PROTO((tree, tree));extern tree build_complex_type PROTO((tree));extern tree array_type_nelts PROTO((tree));/* Construct expressions, performing type checking. GCC and G++ use different calling sequences for build_binary_op, and build_indirect_ref, so don't include a prototype here. */extern tree build_binary_op ();extern tree build_indirect_ref ();extern tree build_unary_op PROTO((enum tree_code, tree, int));/* From expmed.c. Since rtl.h is included after tree.h, we can't
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -