📄 tree.h
字号:
/* In INTEGER_TYPE or ENUMERAL_TYPE nodes, means an unsigned type. In FIELD_DECL nodes, means an unsigned bit field. The same bit is used in functions as DECL_BUILT_IN_NONANSI. */#define TREE_UNSIGNED(NODE) ((NODE)->common.unsigned_flag)/* Nonzero in a VAR_DECL means assembler code has been written. Nonzero in a FUNCTION_DECL means that the function has been compiled. This is interesting in an inline function, since it might not need to be compiled separately. Nonzero in a RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE or ENUMERAL_TYPE if the sdb debugging info for the type has been written. In a BLOCK node, nonzero if reorder_blocks has already seen this block. */#define TREE_ASM_WRITTEN(NODE) ((NODE)->common.asm_written_flag)/* Nonzero in a _DECL if the name is used in its scope. Nonzero in an expr node means inhibit warning if value is unused. In IDENTIFIER_NODEs, this means that some extern decl for this name was used. */#define TREE_USED(NODE) ((NODE)->common.used_flag)/* Nonzero for a tree node whose evaluation could result in the raising of an exception. Not implemented yet. */#define TREE_RAISES(NODE) ((NODE)->common.raises_flag)/* Used in classes in C++. */#define TREE_PRIVATE(NODE) ((NODE)->common.private_flag)/* Used in classes in C++. In a BLOCK node, this is BLOCK_HANDLER_BLOCK. */#define TREE_PROTECTED(NODE) ((NODE)->common.protected_flag)/* These flags are available for each language front end to use internally. */#define TREE_LANG_FLAG_0(NODE) ((NODE)->common.lang_flag_0)#define TREE_LANG_FLAG_1(NODE) ((NODE)->common.lang_flag_1)#define TREE_LANG_FLAG_2(NODE) ((NODE)->common.lang_flag_2)#define TREE_LANG_FLAG_3(NODE) ((NODE)->common.lang_flag_3)#define TREE_LANG_FLAG_4(NODE) ((NODE)->common.lang_flag_4)#define TREE_LANG_FLAG_5(NODE) ((NODE)->common.lang_flag_5)#define TREE_LANG_FLAG_6(NODE) ((NODE)->common.lang_flag_6)/* Define additional fields and accessors for nodes representing constants. *//* In an INTEGER_CST node. These two together make a 2-word integer. If the data type is signed, the value is sign-extended to 2 words even though not all of them may really be in use. In an unsigned constant shorter than 2 words, the extra bits are 0. */#define TREE_INT_CST_LOW(NODE) ((NODE)->int_cst.int_cst_low)#define TREE_INT_CST_HIGH(NODE) ((NODE)->int_cst.int_cst_high)#define INT_CST_LT(A, B) \(TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \ || (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B) \ && ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (A) \ < (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (B))))#define INT_CST_LT_UNSIGNED(A, B) \(((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ == (unsigned HOST_WIDE_INT ) TREE_INT_CST_HIGH (B)) \ && (((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (A) \ < (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (B)))))struct tree_int_cst{ char common[sizeof (struct tree_common)]; HOST_WIDE_INT int_cst_low; HOST_WIDE_INT int_cst_high;};/* In REAL_CST, STRING_CST, COMPLEX_CST nodes, and CONSTRUCTOR nodes, and generally in all kinds of constants that could be given labels (rather than being immediate). */#define TREE_CST_RTL(NODE) ((NODE)->real_cst.rtl)/* In a REAL_CST node. *//* We can represent a real value as either a `double' or a string. Strings don't allow for any optimization, but they do allow for cross-compilation. */#define TREE_REAL_CST(NODE) ((NODE)->real_cst.real_cst)#include "real.h"struct tree_real_cst{ char common[sizeof (struct tree_common)]; struct rtx_def *rtl; /* acts as link to register transfer language (rtl) info */ REAL_VALUE_TYPE real_cst;};/* In a STRING_CST */#define TREE_STRING_LENGTH(NODE) ((NODE)->string.length)#define TREE_STRING_POINTER(NODE) ((NODE)->string.pointer)struct tree_string{ char common[sizeof (struct tree_common)]; struct rtx_def *rtl; /* acts as link to register transfer language (rtl) info */ int length; char *pointer;};/* In a COMPLEX_CST node. */#define TREE_REALPART(NODE) ((NODE)->complex.real)#define TREE_IMAGPART(NODE) ((NODE)->complex.imag)struct tree_complex{ char common[sizeof (struct tree_common)]; struct rtx_def *rtl; /* acts as link to register transfer language (rtl) info */ union tree_node *real; union tree_node *imag;};/* Define fields and accessors for some special-purpose tree nodes. */#define IDENTIFIER_LENGTH(NODE) ((NODE)->identifier.length)#define IDENTIFIER_POINTER(NODE) ((NODE)->identifier.pointer)struct tree_identifier{ char common[sizeof (struct tree_common)]; int length; char *pointer;};/* In a TREE_LIST node. */#define TREE_PURPOSE(NODE) ((NODE)->list.purpose)#define TREE_VALUE(NODE) ((NODE)->list.value)struct tree_list{ char common[sizeof (struct tree_common)]; union tree_node *purpose; union tree_node *value;};/* In a TREE_VEC node. */#define TREE_VEC_LENGTH(NODE) ((NODE)->vec.length)#define TREE_VEC_ELT(NODE,I) ((NODE)->vec.a[I])#define TREE_VEC_END(NODE) (&((NODE)->vec.a[(NODE)->vec.length]))struct tree_vec{ char common[sizeof (struct tree_common)]; int length; union tree_node *a[1];};/* Define fields and accessors for some nodes that represent expressions. *//* In a SAVE_EXPR node. */#define SAVE_EXPR_CONTEXT(NODE) TREE_OPERAND(NODE, 1)#define SAVE_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[2])/* In a RTL_EXPR node. */#define RTL_EXPR_SEQUENCE(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[0])#define RTL_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[1])/* In a CALL_EXPR node. */#define CALL_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[2])/* In a CONSTRUCTOR node. */#define CONSTRUCTOR_ELTS(NODE) TREE_OPERAND (NODE, 1)/* In ordinary expression nodes. */#define TREE_OPERAND(NODE, I) ((NODE)->exp.operands[I])#define TREE_COMPLEXITY(NODE) ((NODE)->exp.complexity)struct tree_exp{ char common[sizeof (struct tree_common)]; int complexity; union tree_node *operands[1];};/* In a BLOCK node. */#define BLOCK_VARS(NODE) ((NODE)->block.vars)#define BLOCK_TYPE_TAGS(NODE) ((NODE)->block.type_tags)#define BLOCK_SUBBLOCKS(NODE) ((NODE)->block.subblocks)#define BLOCK_SUPERCONTEXT(NODE) ((NODE)->block.supercontext)/* Note: when changing this, make sure to find the places that use chainon or nreverse. */#define BLOCK_CHAIN(NODE) TREE_CHAIN (NODE)#define BLOCK_ABSTRACT_ORIGIN(NODE) ((NODE)->block.abstract_origin)#define BLOCK_ABSTRACT(NODE) ((NODE)->block.abstract_flag)#define BLOCK_END_NOTE(NODE) ((NODE)->block.end_note)/* Nonzero means that this block is prepared to handle exceptions listed in the BLOCK_VARS slot. */#define BLOCK_HANDLER_BLOCK(NODE) ((NODE)->block.handler_block_flag)struct tree_block{ char common[sizeof (struct tree_common)]; unsigned handler_block_flag : 1; unsigned abstract_flag : 1; union tree_node *vars; union tree_node *type_tags; union tree_node *subblocks; union tree_node *supercontext; union tree_node *abstract_origin; struct rtx_def *end_note;};/* Define fields and accessors for nodes representing data types. *//* See tree.def for documentation of the use of these fields. Look at the documentation of the various ..._TYPE tree codes. */#define TYPE_UID(NODE) ((NODE)->type.uid)#define TYPE_SIZE(NODE) ((NODE)->type.size)#define TYPE_MODE(NODE) ((NODE)->type.mode)#define TYPE_VALUES(NODE) ((NODE)->type.values)#define TYPE_DOMAIN(NODE) ((NODE)->type.values)#define TYPE_FIELDS(NODE) ((NODE)->type.values)#define TYPE_METHODS(NODE) ((NODE)->type.maxval)#define TYPE_VFIELD(NODE) ((NODE)->type.minval)#define TYPE_ARG_TYPES(NODE) ((NODE)->type.values)#define TYPE_METHOD_BASETYPE(NODE) ((NODE)->type.maxval)#define TYPE_OFFSET_BASETYPE(NODE) ((NODE)->type.maxval)#define TYPE_POINTER_TO(NODE) ((NODE)->type.pointer_to)#define TYPE_REFERENCE_TO(NODE) ((NODE)->type.reference_to)#define TYPE_MIN_VALUE(NODE) ((NODE)->type.minval)#define TYPE_MAX_VALUE(NODE) ((NODE)->type.maxval)#define TYPE_PRECISION(NODE) ((NODE)->type.precision)#define TYPE_SYMTAB_ADDRESS(NODE) ((NODE)->type.symtab.address)#define TYPE_SYMTAB_POINTER(NODE) ((NODE)->type.symtab.pointer)#define TYPE_NAME(NODE) ((NODE)->type.name)#define TYPE_NEXT_VARIANT(NODE) ((NODE)->type.next_variant)#define TYPE_MAIN_VARIANT(NODE) ((NODE)->type.main_variant)#define TYPE_BINFO(NODE) ((NODE)->type.binfo)#define TYPE_NONCOPIED_PARTS(NODE) ((NODE)->type.noncopied_parts)#define TYPE_CONTEXT(NODE) ((NODE)->type.context)#define TYPE_OBSTACK(NODE) ((NODE)->type.obstack)#define TYPE_LANG_SPECIFIC(NODE) ((NODE)->type.lang_specific)/* A TREE_LIST of IDENTIFIER nodes of the attributes that apply to this type. */#define TYPE_ATTRIBUTES(NODE) ((NODE)->type.attributes)/* The alignment necessary for objects of this type. The value is an int, measured in bits. */#define TYPE_ALIGN(NODE) ((NODE)->type.align)#define TYPE_STUB_DECL(NODE) (TREE_CHAIN (NODE))/* In a RECORD_TYPE, UNION_TYPE or QUAL_UNION_TYPE, it means the type has BLKmode only because it lacks the alignment requirement for its size. */#define TYPE_NO_FORCE_BLK(NODE) ((NODE)->type.no_force_blk_flag)/* Nonzero in a type considered volatile as a whole. */#define TYPE_VOLATILE(NODE) ((NODE)->common.volatile_flag)/* Means this type is const-qualified. */#define TYPE_READONLY(NODE) ((NODE)->common.readonly_flag)/* These flags are available for each language front end to use internally. */#define TYPE_LANG_FLAG_0(NODE) ((NODE)->type.lang_flag_0)#define TYPE_LANG_FLAG_1(NODE) ((NODE)->type.lang_flag_1)#define TYPE_LANG_FLAG_2(NODE) ((NODE)->type.lang_flag_2)#define TYPE_LANG_FLAG_3(NODE) ((NODE)->type.lang_flag_3)#define TYPE_LANG_FLAG_4(NODE) ((NODE)->type.lang_flag_4)#define TYPE_LANG_FLAG_5(NODE) ((NODE)->type.lang_flag_5)#define TYPE_LANG_FLAG_6(NODE) ((NODE)->type.lang_flag_6)/* If set in an ARRAY_TYPE, indicates a string type (for languages that distinguish string from array of char). If set in a SET_TYPE, indicates a bitstring type. */#define TYPE_STRING_FLAG(NODE) ((NODE)->type.string_flag)/* Indicates that objects of this type must be initialized by calling a function when they are created. */#define TYPE_NEEDS_CONSTRUCTING(NODE) ((NODE)->type.needs_constructing_flag)/* Indicates that objects of this type (a UNION_TYPE), should be passed the same way that the first union alternative would be passed. */#define TYPE_TRANSPARENT_UNION(NODE) ((NODE)->type.transparent_union_flag)/* Indicated that objects of this type should be layed out in as compact a way as possible. */#define TYPE_PACKED(NODE) ((NODE)->type.packed_flag)struct tree_type{ char common[sizeof (struct tree_common)]; union tree_node *values; union tree_node *size; union tree_node *attributes; unsigned uid; unsigned char precision;#ifdef ONLY_INT_FIELDS int mode : 8;#else enum machine_mode mode : 8;#endif unsigned string_flag : 1; unsigned no_force_blk_flag : 1; unsigned needs_constructing_flag : 1; unsigned transparent_union_flag : 1; unsigned packed_flag : 1; 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; /* room for 4 more bits */ unsigned int align; union tree_node *pointer_to; union tree_node *reference_to; union {int address; char *pointer; } symtab; union tree_node *name; union tree_node *minval; union tree_node *maxval; union tree_node *next_variant; union tree_node *main_variant; union tree_node *binfo; union tree_node *noncopied_parts; union tree_node *context; struct obstack *obstack; /* Points to a structure whose details depend on the language in use. */ struct lang_type *lang_specific;};/* Define accessor macros for information about type inheritance and basetypes. A "basetype" means a particular usage of a data type for inheritance in another type. Each such basetype usage has its own "binfo" object to describe it. The binfo object is a TREE_VEC node. Inheritance is represented by the binfo nodes allocated for a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -