?? tree.h
字號:
/* 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;};/* Define fields and accessors for some nodes that represent expressions. *//* In a SAVE_EXPR node. */#define SAVE_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[1])/* 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 expression and reference nodes. */#define TREE_OPERAND(NODE, I) ((NODE)->exp.operands[I])#define TREE_COMPLEXITY(NODE, I) ((NODE)->exp.complexity)struct tree_exp{ char common[sizeof (struct tree_common)]; int complexity; union tree_node *operands[1];};/* 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_SIZE(NODE) ((NODE)->type.size)#define TYPE_SIZE_UNIT(NODE) ((NODE)->type.size_unit)#define TYPE_MODE(NODE) ((NODE)->type.mode)#define TYPE_ALIGN(NODE) ((NODE)->type.align)#define TYPE_VALUES(NODE) ((NODE)->type.values)#define TYPE_DOMAIN(NODE) ((NODE)->type.values)#define TYPE_FIELDS(NODE) ((NODE)->type.values)#define TYPE_ARG_TYPES(NODE) ((NODE)->type.values)#define TYPE_METHOD_BASETYPE(NODE) ((NODE)->type.max)#define TYPE_OFFSET_BASETYPE(NODE) ((NODE)->type.max)#define TYPE_SEP(NODE) ((NODE)->type.sep)#define TYPE_SEP_UNIT(NODE) ((NODE)->type.sep_unit)#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.sep)#define TYPE_MAX_VALUE(NODE) ((NODE)->type.max)#define TYPE_PRECISION(NODE) ((NODE)->type.sep_unit)#define TYPE_PARSE_INFO(NODE) ((NODE)->type.parse_info)#define TYPE_SYMTAB_ADDRESS(NODE) ((NODE)->type.symtab_address)#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_BASETYPES(NODE) ((NODE)->type.basetypes)#define TYPE_NONCOPIED_PARTS(NODE) ((NODE)->type.noncopied_parts)#define TYPE_LANG_SPECIFIC(NODE) ((NODE)->type.lang_specific)struct tree_type{ char common[sizeof (struct tree_common)]; union tree_node *values; union tree_node *sep; union tree_node *size; enum machine_mode mode : 8; unsigned char size_unit; unsigned char align; unsigned char sep_unit; union tree_node *pointer_to; union tree_node *reference_to; int parse_info; int symtab_address; union tree_node *name; union tree_node *max; union tree_node *next_variant; union tree_node *main_variant; union tree_node *basetypes; union tree_node *noncopied_parts; /* Points to a structure whose details depend on the language in use. */ struct lang_type *lang_specific;};/* Define fields and accessors for nodes representing declared names. */#define DECL_VOFFSET(NODE) ((NODE)->decl.voffset) /* In FIELD_DECLs and maybe PARM_DECLs. */#define DECL_RESULT_TYPE(NODE) ((NODE)->decl.voffset) /* In FUNCTION_DECLs. */#define DECL_VOFFSET_UNIT(NODE) ((NODE)->decl.voffset_unit)#define DECL_OFFSET(NODE) ((NODE)->decl.offset)#define DECL_FUNCTION_CODE(NODE) ((enum built_in_function) (NODE)->decl.offset)#define DECL_SET_FUNCTION_CODE(NODE,VAL) ((NODE)->decl.offset = (int) (VAL))#define DECL_NAME(NODE) ((NODE)->decl.name)#define DECL_PRINT_NAME(NODE) ((NODE)->decl.print_name)#define DECL_ASSEMBLER_NAME(NODE) ((NODE)->decl.assembler_name)#define DECL_CONTEXT(NODE) ((NODE)->decl.context)#define DECL_FIELD_CONTEXT(NODE) ((NODE)->decl.context)#define DECL_ARGUMENTS(NODE) ((NODE)->decl.arguments) /* In FUNCTION_DECL. */#define DECL_ARG_TYPE(NODE) ((NODE)->decl.arguments) /* In PARM_DECL. */#define DECL_RESULT(NODE) ((NODE)->decl.result)#define DECL_INITIAL(NODE) ((NODE)->decl.initial)#define DECL_SOURCE_FILE(NODE) ((NODE)->decl.filename)#define DECL_SOURCE_LINE(NODE) ((NODE)->decl.linenum)#define DECL_SIZE(NODE) ((NODE)->decl.size)#define DECL_SIZE_UNIT(NODE) ((NODE)->decl.size_unit)#define DECL_ALIGN(NODE) ((NODE)->decl.align)#define DECL_MODE(NODE) ((NODE)->decl.mode)#define DECL_RTL(NODE) ((NODE)->decl.rtl)#define DECL_BLOCK_SYMTAB_ADDRESS(NODE) ((NODE)->decl.block_symtab_address)#define DECL_SYMTAB_INDEX(NODE) ((NODE)->decl.block_symtab_address)#define DECL_SAVED_INSNS(NODE) ((NODE)->decl.saved_insns)#define DECL_FRAME_SIZE(NODE) ((NODE)->decl.frame_size)#define DECL_LANG_SPECIFIC(NODE) ((NODE)->decl.lang_specific)struct tree_decl{ char common[sizeof (struct tree_common)]; char *filename; int linenum; union tree_node *size; enum machine_mode mode : 8; unsigned char size_unit; unsigned char align; unsigned char voffset_unit; union tree_node *name; union tree_node *context; int offset; union tree_node *voffset; union tree_node *arguments; union tree_node *result; union tree_node *initial; char *print_name; char *assembler_name; struct rtx_def *rtl; /* acts as link to register transfer language (rtl) info */ int frame_size; /* For FUNCTION_DECLs: size of stack frame */ struct rtx_def *saved_insns; /* For FUNCTION_DECLs: points to insn that constitutes its definition on the permanent obstack. */ int block_symtab_address; /* Points to a structure whose details depend on the language in use. */ struct lang_decl *lang_specific;};/* Define fields and accessors for nodes representing statements. These are now obsolete for C, except for LET_STMT, which is used to record the structure of binding contours (and the names declared in each contour) for the sake of outputting debugging info. Perhaps they will be used once again for other languages. *//* For LABEL_STMT, GOTO_STMT, RETURN_STMT, LOOP_STMT, COMPOUND_STMT, ASM_STMT. */#define STMT_SOURCE_LINE(NODE) ((NODE)->stmt.linenum)#define STMT_SOURCE_FILE(NODE) ((NODE)->stmt.filename)#define STMT_BODY(NODE) ((NODE)->stmt.body)struct tree_stmt{ char common[sizeof (struct tree_common)]; char *filename; int linenum; union tree_node *body;};/* For IF_STMT. *//* #define STMT_SOURCE_LINE(NODE) *//* #define STMT_SOURCE_FILE(NODE) */#define STMT_COND(NODE) ((NODE)->if_stmt.cond)#define STMT_THEN(NODE) ((NODE)->if_stmt.thenpart)#define STMT_ELSE(NODE) ((NODE)->if_stmt.elsepart)struct tree_if_stmt{ char common[sizeof (struct tree_common)]; char *filename; int linenum; union tree_node *cond, *thenpart, *elsepart;};/* For LET_STMT and WITH_STMT. *//* #define STMT_SOURCE_LINE(NODE) *//* #define STMT_SOURCE_FILE(NODE) *//* #define STMT_BODY(NODE) */#define STMT_VARS(NODE) ((NODE)->bind_stmt.vars)#define STMT_SUPERCONTEXT(NODE) ((NODE)->bind_stmt.supercontext)#define STMT_BIND_SIZE(NODE) ((NODE)->bind_stmt.bind_size)#define STMT_TYPE_TAGS(NODE) ((NODE)->bind_stmt.type_tags)#define STMT_SUBBLOCKS(NODE) ((NODE)->bind_stmt.subblocks)struct tree_bind_stmt{ char common[sizeof (struct tree_common)]; char *filename; int linenum; union tree_node *body, *vars, *supercontext, *bind_size, *type_tags; union tree_node *subblocks;};/* For CASE_STMT. */#define STMT_CASE_INDEX(NODE) ((NODE)->case_stmt.index)#define STMT_CASE_LIST(NODE) ((NODE)->case_stmt.case_list)struct tree_case_stmt{ char common[sizeof (struct tree_common)]; char *filename; int linenum; union tree_node *index, *case_list;};/* Define the overall contents of a tree node. It may be any of the structures declared aboveunion 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_exp exp; struct tree_stmt stmt; struct tree_if_stmt if_stmt; struct tree_bind_stmt bind_stmt; struct tree_case_stmt case_stmt;};extern char *oballoc ();extern char *permalloc ();/* Lowest level primitive for allocating a node. The TREE_CODE is the only argument. Contents are initialized
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -