Annotation of researchv10dc/cmd/gcc/tree.h, revision 1.1.1.1

1.1       root        1: /* Front-end tree definitions for GNU compiler.
                      2:    Copyright (C) 1987 Free Software Foundation, Inc.
                      3: 
                      4: This file is part of GNU CC.
                      5: 
                      6: GNU CC is distributed in the hope that it will be useful,
                      7: but WITHOUT ANY WARRANTY.  No author or distributor
                      8: accepts responsibility to anyone for the consequences of using it
                      9: or for whether it serves any particular purpose or works at all,
                     10: unless he says so in writing.  Refer to the GNU CC General Public
                     11: License for full details.
                     12: 
                     13: Everyone is granted permission to copy, modify and redistribute
                     14: GNU CC, but only under the conditions described in the
                     15: GNU CC General Public License.   A copy of this license is
                     16: supposed to have been given to you along with GNU CC so you
                     17: can know your rights and responsibilities.  It should be in a
                     18: file named COPYING.  Among other things, the copyright notice
                     19: and this notice must be preserved on all copies.  */
                     20: 
                     21: 
                     22: /* codes of tree nodes */
                     23: 
                     24: #define DEFTREECODE(SYM, STRING, TYPE, NARGS)   SYM,
                     25: 
                     26: enum tree_code {
                     27: #include "tree.def"
                     28: };
                     29: 
                     30: #undef DEFTREECODE
                     31: 
                     32: /* Indexed by enum tree_code, contains a character which is
                     33:    `e' for an expression, `r' for a reference, `c' for a constant,
                     34:    `d' for a decl, `t' for a type, `s' for a statement,
                     35:    and `x' for anything else (TREE_LIST, IDENTIFIER, etc).  */
                     36: 
                     37: extern char *tree_code_type[];
                     38: 
                     39: /* Number of argument-words in each kind of tree-node.  */
                     40: 
                     41: extern int tree_code_length[];
                     42: 
                     43: /* Get the definition of `enum machine_mode' */
                     44: 
                     45: #ifndef HAVE_MACHINE_MODES
                     46: #define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT)  SYM,
                     47: 
                     48: enum machine_mode {
                     49: #include "machmode.def"
                     50: };
                     51: 
                     52: #undef DEF_MACHMODE
                     53: 
                     54: #define HAVE_MACHINE_MODES
                     55: 
                     56: #endif /* not HAVE_MACHINE_MODES */
                     57: 
                     58: #ifndef NUM_MACHINE_MODES
                     59: #define NUM_MACHINE_MODES (int) MAX_MACHINE_MODE
                     60: #endif
                     61: 
                     62: /* Codes that identify the various built in functions
                     63:    so that expand_call can identify them quickly.  */
                     64: 
                     65: enum built_in_function
                     66: {
                     67:   NOT_BUILT_IN,
                     68:   BUILT_IN_ALLOCA,
                     69:   BUILT_IN_ABS,
                     70:   BUILT_IN_FABS,
                     71:   BUILT_IN_LABS,
                     72:   BUILT_IN_FFS,
                     73:   BUILT_IN_DIV,
                     74:   BUILT_IN_LDIV,
                     75:   BUILT_IN_FFLOOR,
                     76:   BUILT_IN_FCEIL,
                     77:   BUILT_IN_FMOD,
                     78:   BUILT_IN_FREM,
                     79:   BUILT_IN_MEMCPY,
                     80:   BUILT_IN_MEMCMP,
                     81:   BUILT_IN_MEMSET,
                     82:   BUILT_IN_FSQRT,
                     83:   BUILT_IN_GETEXP,
                     84:   BUILT_IN_GETMAN
                     85: };
                     86: 
                     87: /* The definition of tree nodes fills the next several pages.  */
                     88: 
                     89: /* A tree node can represent a data type, a variable, an expression
                     90:    or a statement.  Each node has a TREE_CODE which says what kind of
                     91:    thing it represents.  Some common codes are:
                     92:    INTEGER_TYPE -- represents a type of integers.
                     93:    ARRAY_TYPE -- represents a type of pointer.
                     94:    VAR_DECL -- represents a declared variable.
                     95:    INTEGER_CST -- represents a constant integer value.
                     96:    PLUS_EXPR -- represents a sum (an expression).
                     97: 
                     98:    As for the contents of a tree node: there are some fields
                     99:    that all nodes share.  Each TREE_CODE has various special-purpose
                    100:    fields as well.  The fields of a node are never accessed directly,
                    101:    always through accessor macros.  */
                    102: 
                    103: /* This type is used everywhere to refer to a tree node.  */
                    104: 
                    105: typedef union tree_node *tree;
                    106: 
                    107: #define NULL_TREE (tree) NULL
                    108: 
                    109: /* Every kind of tree node starts with this structure,
                    110:    so all nodes have these fields.
                    111: 
                    112:    See the accessor macros, defined below, for documentation of the fields.  */
                    113: 
                    114: struct tree_common
                    115: {
                    116:   int uid;
                    117:   union tree_node *chain;
                    118:   union tree_node *type;
                    119:   enum tree_code code : 8;
                    120: 
                    121:   unsigned external_attr : 1;
                    122:   unsigned public_attr : 1;
                    123:   unsigned static_attr : 1;
                    124:   unsigned volatile_attr : 1;
                    125:   unsigned packed_attr : 1;
                    126:   unsigned readonly_attr : 1;
                    127:   unsigned literal_attr : 1;
                    128:   unsigned nonlocal_attr : 1;
                    129:   unsigned permanent_attr : 1;
                    130:   unsigned addressable_attr : 1;
                    131:   unsigned regdecl_attr : 1;
                    132:   unsigned this_vol_attr : 1;
                    133:   unsigned unsigned_attr : 1;
                    134:   unsigned asm_written_attr: 1;
                    135:   unsigned inline_attr : 1;
                    136: };
                    137: 
                    138: /* Define accessors for the fields that all tree nodes have
                    139:    (though some fields are not used for all kinds of nodes).  */
                    140: 
                    141: /* The unique id of a tree node distinguishes it from all other nodes
                    142:    in the same compiler run.  */
                    143: #define TREE_UID(NODE) ((NODE)->common.uid)
                    144: 
                    145: /* The tree-code says what kind of node it is.
                    146:    Codes are defined in tree.def.  */
                    147: #define TREE_CODE(NODE) ((NODE)->common.code)
                    148: #define TREE_SET_CODE(NODE, VALUE) ((NODE)->common.code = (VALUE))
                    149: 
                    150: /* In all nodes that are expressions, this is the data type of the expression.
                    151:    In POINTER_TYPE nodes, this is the type that the pointer points to.
                    152:    In ARRAY_TYPE nodes, this is the type of the elements.  */
                    153: #define TREE_TYPE(NODE) ((NODE)->common.type)
                    154: 
                    155: /* Nodes are chained together for many purposes.
                    156:    Types are chained together to record them for being output to the debugger
                    157:    (see the function `chain_type').
                    158:    Decls in the same scope are chained together to record the contents
                    159:    of the scope.
                    160:    Statement nodes for successive statements used to be chained together.
                    161:    Often lists of things are represented by TREE_LIST nodes thaht
                    162:    are chained together.  */
                    163: 
                    164: #define TREE_CHAIN(NODE) ((NODE)->common.chain)
                    165: 
                    166: /* Define many boolean fields that all tree nodes have.  */
                    167: 
                    168: /* In a VAR_DECL or FUNCTION_DECL,
                    169:    nonzero means external reference:
                    170:    do not allocate storage, and refer to a definition elsewhere.  */
                    171: #define TREE_EXTERNAL(NODE) ((NODE)->common.external_attr)
                    172: 
                    173: /* In a VAR_DECL, nonzero means allocate static storage.
                    174:    In a FUNCTION_DECL, currently nonzero if function has been defined.  */
                    175: #define TREE_STATIC(NODE) ((NODE)->common.static_attr)
                    176: 
                    177: /* In a VAR_DECL or FUNCTION_DECL,
                    178:    nonzero means name is to be accessible from outside this module.  */
                    179: #define TREE_PUBLIC(NODE) ((NODE)->common.public_attr)
                    180: 
                    181: /* In VAR_DECL nodes, nonzero means address of this is needed.
                    182:    So it cannot be in a register.
                    183:    In a FUNCTION_DECL, nonzero means its address is needed.
                    184:    So it must be compiled even if it is an inline function.
                    185:    In CONSTRUCTOR nodes, it means are all constants suitable
                    186:    for output as assembly-language initializers.
                    187:    In LABEL_DECL nodes, it means a goto for this label has been seen 
                    188:    from a place outside all binding contours that restore stack levels,
                    189:    or that an error message about jumping into such a binding contour
                    190:    has been printed for this label.  */
                    191: #define TREE_ADDRESSABLE(NODE) ((NODE)->common.addressable_attr)
                    192: 
                    193: /* In VAR_DECL nodes, nonzero means declared `register'.  */
                    194: #define TREE_REGDECL(NODE) ((NODE)->common.regdecl_attr)
                    195: 
                    196: /* In any expression, nonzero means it has side effects or reevaluation
                    197:    of the whole expression could produce a different value.
                    198:    This is set if any subexpression is a function call, a side effect
                    199:    or a reference to a volatile variable.
                    200:    In a ..._DECL, this is set only of the declaration said `volatile'.
                    201:    In a ..._TYPE, nonzero means the type is volatile-qualified.  */
                    202: #define TREE_VOLATILE(NODE) ((NODE)->common.volatile_attr)
                    203: 
                    204: /* Nonzero means this expression is volatile in the C sense:
                    205:    its address should be of type `volatile WHATEVER *'.
                    206:    If this bit is set, so is `volatile_attr'.  */
                    207: #define TREE_THIS_VOLATILE(NODE) ((NODE)->common.this_vol_attr)
                    208: 
                    209: /* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node,
                    210:    nonzero means it may not be the lhs of an assignment.
                    211:    In a ..._TYPE node, means this type is const-qualified.  */
                    212: #define TREE_READONLY(NODE) ((NODE)->common.readonly_attr)
                    213: 
                    214: /* Nonzero in a FIELD_DECL means it is a bit-field; it may occupy
                    215:    less than a storage unit, and its address may not be taken, etc.
                    216:    This controls layout of the containing record.
                    217:    In a LABEL_DECL, nonzero means label was defined inside a binding
                    218:    contour that restored a stack level and which is now exited.  */
                    219: #define TREE_PACKED(NODE) ((NODE)->common.packed_attr)
                    220: 
                    221: /* Value of expression is constant.
                    222:    Always appears in all ..._CST nodes.
                    223:    May also appear in an arithmetic expression, an ADDR_EXPR or a CONSTRUCTOR
                    224:    if the value is constant.  */
                    225: #define TREE_LITERAL(NODE) ((NODE)->common.literal_attr)
                    226: 
                    227: /* Nonzero in a ..._DECL means this variable is ref'd from a nested function.
                    228:    Cannot happen in C because it does not allow nested functions, as of now.
                    229:    For VAR_DECL nodes, PARM_DECL nodes, and
                    230:    maybe FUNCTION_DECL or LABEL_DECL nodes.  */
                    231: #define TREE_NONLOCAL(NODE) ((NODE)->common.nonlocal_attr)
                    232: 
                    233: /* Nonzero means permanent node;
                    234:    node will continue to exist for the entire compiler run.
                    235:    Otherwise it will be recycled at the end of the function.  */
                    236: #define TREE_PERMANENT(NODE) ((NODE)->common.permanent_attr)
                    237: 
                    238: /* In INTEGER_TYPE or ENUMERAL_TYPE nodes, means an unsigned type.
                    239:    In FIELD_DECL nodes, means an unsigned bit field.  */
                    240: #define TREE_UNSIGNED(NODE) ((NODE)->common.unsigned_attr)
                    241: 
                    242: /* Nonzero in a VAR_DECL means assembler code has been written.
                    243:    Nonzero in a FUNCTION_DECL means that the function has been compiled.
                    244:    This is interesting in an inline function, since it might not need
                    245:    to be compiled separately.  */
                    246: #define TREE_ASM_WRITTEN(NODE) ((NODE)->common.asm_written_attr)
                    247: 
                    248: /* Nonzero in a FUNCTION_DECL means this function can be substituted
                    249:    where it is called.  */
                    250: #define TREE_INLINE(NODE) ((NODE)->common.inline_attr)
                    251: 
                    252: /* Define additional fields and accessors for nodes representing constants.  */
                    253: 
                    254: /* In an INTEGER_CST node.  These two together make a 64 bit integer.
                    255:    If the data type is signed, the value is sign-extended to 64 bits
                    256:    even though not all of them may really be in use.
                    257:    In an unsigned constant shorter than 64 bits, the extra bits are 0.  */
                    258: #define TREE_INT_CST_LOW(NODE) ((NODE)->int_cst.int_cst_low)
                    259: #define TREE_INT_CST_HIGH(NODE) ((NODE)->int_cst.int_cst_high)
                    260: 
                    261: #define INT_CST_LT(A, B)  \
                    262: (TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B)                 \
                    263:  || (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B)            \
                    264:      && ((unsigned) TREE_INT_CST_LOW (A) < (unsigned) TREE_INT_CST_LOW (B))))
                    265: 
                    266: #define INT_CST_LT_UNSIGNED(A, B)  \
                    267: ((unsigned) TREE_INT_CST_HIGH (A) < (unsigned) TREE_INT_CST_HIGH (B)     \
                    268:  || ((unsigned) TREE_INT_CST_HIGH (A) == (unsigned) TREE_INT_CST_HIGH (B) \
                    269:      && ((unsigned) TREE_INT_CST_LOW (A) < (unsigned) TREE_INT_CST_LOW (B))))
                    270: 
                    271: struct tree_int_cst
                    272: {
                    273:   char common[sizeof (struct tree_common)];
                    274:   long int_cst_low;
                    275:   long int_cst_high;
                    276: };
                    277: 
                    278: /* In REAL_CST, STRING_CST, COMPLEX_CST nodes, and CONSTRUCTOR nodes,
                    279:    and generally in all kinds of constants that could
                    280:    be given labels (rather than being immediate).  */
                    281: 
                    282: #define TREE_CST_RTL(NODE) ((NODE)->real_cst.rtl)
                    283: 
                    284: /* In a REAL_CST node.  */
                    285: #define TREE_REAL_CST(NODE) ((NODE)->real_cst.real_cst)
                    286: 
                    287: struct tree_real_cst
                    288: {
                    289:   char common[sizeof (struct tree_common)];
                    290:   struct rtx_def *rtl; /* acts as link to register transfer language
                    291:                                   (rtl) info */
                    292:   double real_cst;
                    293: };
                    294: 
                    295: /* In a STRING_CST */
                    296: #define TREE_STRING_LENGTH(NODE) ((NODE)->string.length)
                    297: #define TREE_STRING_POINTER(NODE) ((NODE)->string.pointer)
                    298: 
                    299: struct tree_string
                    300: {
                    301:   char common[sizeof (struct tree_common)];
                    302:   struct rtx_def *rtl; /* acts as link to register transfer language
                    303:                                   (rtl) info */
                    304:   int length;
                    305:   char *pointer;
                    306: };
                    307: 
                    308: /* In a COMPLEX_CST node.  */
                    309: #define TREE_REALPART(NODE) ((NODE)->complex.real)
                    310: #define TREE_IMAGPART(NODE) ((NODE)->complex.imag)
                    311: 
                    312: struct tree_complex
                    313: {
                    314:   char common[sizeof (struct tree_common)];
                    315:   struct rtx_def *rtl; /* acts as link to register transfer language
                    316:                                   (rtl) info */
                    317:   union tree_node *real;
                    318:   union tree_node *imag;
                    319: };
                    320: 
                    321: /* Define fields and accessors for some special-purpose tree nodes.  */
                    322: 
                    323: #define IDENTIFIER_LENGTH(NODE) ((NODE)->identifier.length)
                    324: #define IDENTIFIER_POINTER(NODE) ((NODE)->identifier.pointer)
                    325: #define IDENTIFIER_GLOBAL_VALUE(NODE) ((NODE)->identifier.global_value)
                    326: #define IDENTIFIER_LOCAL_VALUE(NODE) ((NODE)->identifier.local_value)
                    327: #define IDENTIFIER_LABEL_VALUE(NODE) ((NODE)->identifier.label_value)
                    328: #define IDENTIFIER_IMPLICIT_DECL(NODE) ((NODE)->identifier.implicit_decl)
                    329: 
                    330: struct tree_identifier
                    331: {
                    332:   char common[sizeof (struct tree_common)];
                    333:   int length;
                    334:   char *pointer;
                    335:   union tree_node *global_value;
                    336:   union tree_node *local_value;
                    337:   union tree_node *label_value;
                    338:   union tree_node *implicit_decl;
                    339: };
                    340: 
                    341: /* In a TREE_LIST node.  */
                    342: #define TREE_PURPOSE(NODE) ((NODE)->list.purpose)
                    343: #define TREE_VALUE(NODE) ((NODE)->list.value)
                    344: 
                    345: struct tree_list
                    346: {
                    347:   char common[sizeof (struct tree_common)];
                    348:   union tree_node *purpose;
                    349:   union tree_node *value;
                    350: };
                    351: 
                    352: /* Define fields and accessors for some nodes that represent expressions.  */
                    353: 
                    354: /* In a SAVE_EXPR node.  */
                    355: #define SAVE_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[1])
                    356: 
                    357: /* In a RTL_EXPR node.  */
                    358: #define RTL_EXPR_SEQUENCE(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[0])
                    359: #define RTL_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[1])
                    360: 
                    361: /* In a CALL_EXPR node.  */
                    362: #define CALL_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[2])
                    363: 
                    364: /* In a CONSTRUCTOR node.  */
                    365: #define CONSTRUCTOR_ELTS(NODE) TREE_OPERAND (NODE, 1)
                    366: 
                    367: /* In expression and reference nodes.  */
                    368: #define TREE_OPERAND(NODE, I) ((NODE)->exp.operands[I])
                    369: #define TREE_COMPLEXITY(NODE, I) ((NODE)->exp.complexity)
                    370: 
                    371: struct tree_exp
                    372: {
                    373:   char common[sizeof (struct tree_common)];
                    374:   int complexity;
                    375:   union tree_node *operands[1];
                    376: };
                    377: 
                    378: /* Define fields and accessors for nodes representing data types.  */
                    379: 
                    380: /* See tree.def for documentation of the use of these fields.  */
                    381: 
                    382: #define TYPE_SIZE(NODE) ((NODE)->type.size)
                    383: #define TYPE_SIZE_UNIT(NODE) ((NODE)->type.size_unit)
                    384: #define TYPE_MODE(NODE) ((NODE)->type.mode)
                    385: #define TYPE_ALIGN(NODE) ((NODE)->type.align)
                    386: #define TYPE_VALUES(NODE) ((NODE)->type.values)
                    387: #define TYPE_DOMAIN(NODE) ((NODE)->type.values)
                    388: #define TYPE_FIELDS(NODE) ((NODE)->type.values)
                    389: #define TYPE_ARG_TYPES(NODE) ((NODE)->type.values)
                    390: #define TYPE_SEP(NODE) ((NODE)->type.sep)
                    391: #define TYPE_SEP_UNIT(NODE) ((NODE)->type.sep_unit)
                    392: #define TYPE_POINTER_TO(NODE) ((NODE)->type.pointer_to)
                    393: #define TYPE_MIN_VALUE(NODE) ((NODE)->type.sep)
                    394: #define TYPE_MAX_VALUE(NODE) ((NODE)->type.max)
                    395: #define TYPE_PRECISION(NODE) ((NODE)->type.sep_unit)
                    396: #define TYPE_PARSE_INFO(NODE) ((NODE)->type.parse_info)
                    397: #define TYPE_SYMTAB_ADDRESS(NODE) ((NODE)->type.symtab_address)
                    398: #define TYPE_NAME(NODE) ((NODE)->type.name)
                    399: #define TYPE_NEXT_VARIANT(NODE) ((NODE)->type.next_variant)
                    400: #define TYPE_MAIN_VARIANT(NODE) ((NODE)->type.main_variant)
                    401: 
                    402: struct tree_type
                    403: {
                    404:   char common[sizeof (struct tree_common)];
                    405:   union tree_node *values;
                    406:   union tree_node *sep;
                    407:   union tree_node *size;
                    408:   enum machine_mode mode;
                    409:   unsigned char size_unit;
                    410:   unsigned char align;
                    411:   unsigned char sep_unit;
                    412:   enum machine_mode elt_mode;  /* Unused */
                    413:   union tree_node *pointer_to;
                    414:   int parse_info;
                    415:   int symtab_address;
                    416:   union tree_node *name;
                    417:   union tree_node *max;
                    418:   union tree_node *next_variant;
                    419:   union tree_node *main_variant;
                    420: };
                    421: 
                    422: /* Define fields and accessors for nodes representing declared names.  */
                    423: 
                    424: #define DECL_VOFFSET(NODE) ((NODE)->decl.voffset)
                    425: #define DECL_VOFFSET_UNIT(NODE) ((NODE)->decl.voffset_unit)
                    426: #define DECL_OFFSET(NODE) ((NODE)->decl.offset)
                    427: #define DECL_FUNCTION_CODE(NODE) ((enum built_in_function) (NODE)->decl.offset)
                    428: #define DECL_SET_FUNCTION_CODE(NODE,VAL) ((NODE)->decl.offset = (int) (VAL))
                    429: #define DECL_NAME(NODE) ((NODE)->decl.name)
                    430: #define DECL_CONTEXT(NODE) ((NODE)->decl.context)
                    431: #define DECL_ARGUMENTS(NODE) ((NODE)->decl.arguments)
                    432: #define DECL_ARG_TYPE(NODE) ((NODE)->decl.arguments)
                    433: #define DECL_RESULT(NODE) ((NODE)->decl.result)
                    434: #define DECL_INITIAL(NODE) ((NODE)->decl.initial)
                    435: #define DECL_SOURCE_FILE(NODE) ((NODE)->decl.filename)
                    436: #define DECL_SOURCE_LINE(NODE) ((NODE)->decl.linenum)
                    437: #define DECL_SIZE(NODE) ((NODE)->decl.size)
                    438: #define DECL_SIZE_UNIT(NODE) ((NODE)->decl.size_unit)
                    439: #define DECL_ALIGN(NODE) ((NODE)->decl.align)
                    440: #define DECL_MODE(NODE) ((NODE)->decl.mode)
                    441: #define DECL_RTL(NODE) ((NODE)->decl.rtl)
                    442: #define DECL_BLOCK_SYMTAB_ADDRESS(NODE) ((NODE)->decl.block_symtab_address)
                    443: #define DECL_SYMTAB_INDEX(NODE) ((NODE)->decl.block_symtab_address)
                    444: #define DECL_SAVED_INSNS(NODE) ((NODE)->decl.saved_insns)
                    445: #define DECL_FRAME_SIZE(NODE) ((NODE)->decl.frame_size)
                    446: 
                    447: struct tree_decl
                    448: {
                    449:   char common[sizeof (struct tree_common)];
                    450:   char *filename;
                    451:   int linenum;
                    452:   union tree_node *size;
                    453:   enum machine_mode mode;
                    454:   unsigned char size_unit;
                    455:   unsigned char align;
                    456:   unsigned char voffset_unit;
                    457:   union tree_node *name;
                    458:   union tree_node *context;
                    459:   int offset;
                    460:   union tree_node *voffset;
                    461:   union tree_node *arguments;
                    462:   union tree_node *result;
                    463:   union tree_node *initial;
                    464:   struct rtx_def *rtl; /* acts as link to register transfer language
                    465:                                   (rtl) info */
                    466:   int frame_size;              /* For FUNCTION_DECLs: size of stack frame */
                    467:   struct rtx_def *saved_insns; /* For FUNCTION_DECLs: points to insn that
                    468:                                   constitute its definition on the
                    469:                                   permanent obstack.  */
                    470:   int block_symtab_address;
                    471: };
                    472: 
                    473: /* Define fields and accessors for nodes representing statements.
                    474:    These are now obsolete for C, except for LET_STMT, which is used
                    475:    to record the structure of binding contours (and the names declared
                    476:    in each contour) for the sake of outputting debugging info.
                    477:    Perhaps they will be used once again for other languages.  */
                    478: 
                    479: /* For LABEL_STMT, GOTO_STMT, RETURN_STMT, LOOP_STMT,
                    480:    COMPOUND_STMT, ASM_STMT.  */
                    481: #define STMT_SOURCE_LINE(NODE) ((NODE)->stmt.linenum)
                    482: #define STMT_SOURCE_FILE(NODE) ((NODE)->stmt.filename)
                    483: #define STMT_BODY(NODE) ((NODE)->stmt.body)
                    484: 
                    485: struct tree_stmt
                    486: {
                    487:   char common[sizeof (struct tree_common)];
                    488:   char *filename;
                    489:   int linenum;
                    490:   union tree_node *body;
                    491: };
                    492: 
                    493: /* For IF_STMT.  */
                    494: 
                    495: /* #define STMT_SOURCE_LINE(NODE) */
                    496: /* #define STMT_SOURCE_FILE(NODE) */
                    497: #define STMT_COND(NODE) ((NODE)->if_stmt.cond)
                    498: #define STMT_THEN(NODE) ((NODE)->if_stmt.thenpart)
                    499: #define STMT_ELSE(NODE) ((NODE)->if_stmt.elsepart)
                    500: 
                    501: struct tree_if_stmt
                    502: {
                    503:   char common[sizeof (struct tree_common)];
                    504:   char *filename;
                    505:   int linenum;
                    506:   union tree_node *cond, *thenpart, *elsepart;
                    507: };
                    508: 
                    509: /* For LET_STMT and WITH_STMT.  */
                    510: 
                    511: /* #define STMT_SOURCE_LINE(NODE) */
                    512: /* #define STMT_SOURCE_FILE(NODE) */
                    513: /* #define STMT_BODY(NODE) */
                    514: #define STMT_VARS(NODE) ((NODE)->bind_stmt.vars)
                    515: #define STMT_SUPERCONTEXT(NODE) ((NODE)->bind_stmt.supercontext)
                    516: #define STMT_BIND_SIZE(NODE) ((NODE)->bind_stmt.bind_size)
                    517: #define STMT_TYPE_TAGS(NODE) ((NODE)->bind_stmt.type_tags)
                    518: 
                    519: struct tree_bind_stmt
                    520: {
                    521:   char common[sizeof (struct tree_common)];
                    522:   char *filename;
                    523:   int linenum;
                    524:   union tree_node *body, *vars, *supercontext, *bind_size, *type_tags;
                    525: };
                    526: 
                    527: /* For CASE_STMT.  */
                    528: 
                    529: #define STMT_CASE_INDEX(NODE) ((NODE)->case_stmt.index)
                    530: #define STMT_CASE_LIST(NODE) ((NODE)->case_stmt.case_list)
                    531: 
                    532: struct tree_case_stmt
                    533: {
                    534:   char common[sizeof (struct tree_common)];
                    535:   char *filename;
                    536:   int linenum;
                    537:   union tree_node *index, *case_list;
                    538: };
                    539: 
                    540: /* Define the overall contents of a tree node.
                    541:    It may be any of the structures declared above
                    542:    for various types of node.  */
                    543: 
                    544: union tree_node
                    545: {
                    546:   struct tree_common common;
                    547:   struct tree_int_cst int_cst;
                    548:   struct tree_real_cst real_cst;
                    549:   struct tree_string string;
                    550:   struct tree_complex complex;
                    551:   struct tree_identifier identifier;
                    552:   struct tree_decl decl;
                    553:   struct tree_type type;
                    554:   struct tree_list list;
                    555:   struct tree_exp exp;
                    556:   struct tree_stmt stmt;
                    557:   struct tree_if_stmt if_stmt;
                    558:   struct tree_bind_stmt bind_stmt;
                    559:   struct tree_case_stmt case_stmt;
                    560: };
                    561: 
                    562: extern char *oballoc ();
                    563: extern char *permalloc ();
                    564: 
                    565: /* Lowest level primitive for allocating a node.
                    566:    The TREE_CODE is the only argument.  Contents are initialized
                    567:    to zero except for a few of the common fields.  */
                    568: 
                    569: extern tree make_node ();
                    570: 
                    571: /* Make a copy of a node, with all the same contents except
                    572:    for TREE_UID and TREE_PERMANENT.  (The copy is permanent
                    573:    iff nodes being made now are permanent.)  */
                    574: 
                    575: extern tree copy_node ();
                    576: 
                    577: /* Return the (unique) IDENTIFIER_NODE node for a given name.
                    578:    The name is supplied as a char *.  */
                    579: 
                    580: extern tree get_identifier ();
                    581: 
                    582: /* Construct various types of nodes.  */
                    583: 
                    584: extern tree build_int_2 ();
                    585: extern tree build_real ();
                    586: extern tree build_real_from_string ();
                    587: extern tree build_real_from_int_cst ();
                    588: extern tree build_complex ();
                    589: extern tree build_string ();
                    590: extern tree build ();
                    591: extern tree build_nt ();
                    592: extern tree build_tree_list ();
                    593: extern tree build_decl ();
                    594: extern tree build_let ();
                    595: 
                    596: /* Construct various nodes representing data types.  */
                    597: 
                    598: extern tree make_signed_type ();
                    599: extern tree make_unsigned_type ();
                    600: extern void fixup_unsigned_type ();
                    601: extern tree build_pointer_type ();
                    602: extern tree build_array_type ();
                    603: extern tree build_function_type ();
                    604: 
                    605: /* Construct expressions, performing type checking.  */
                    606: 
                    607: extern tree build_binary_op ();
                    608: extern tree build_indirect_ref ();
                    609: extern tree build_unary_op ();
                    610: 
                    611: /* Given a type node TYPE, and CONSTP and VOLATILEP, return a type
                    612:    for the same kind of data as TYPE describes.
                    613:    Variants point to the "main variant" (which has neither CONST nor VOLATILE)
                    614:    via TYPE_MAIN_VARIANT, and it points to a chain of other variants
                    615:    so that duplicate variants are never made.
                    616:    Only main variants should ever appear as types of expressions.  */
                    617: 
                    618: extern tree build_type_variant ();
                    619: 
                    620: /* Given a ..._TYPE node, calculate the TYPE_SIZE, TYPE_SIZE_UNIT,
                    621:    TYPE_ALIGN and TYPE_MODE fields.
                    622:    If called more than once on one node, does nothing except
                    623:    for the first time.  */
                    624: 
                    625: extern void layout_type ();
                    626: 
                    627: /* Given a hashcode and a ..._TYPE node (for which the hashcode was made),
                    628:    return a canonicalized ..._TYPE node, so that duplicates are not made.
                    629:    How the hash code is computed is up to the caller, as long as any two
                    630:    callers that could hash identical-looking type nodes agree.  */
                    631: 
                    632: extern tree type_hash_canon ();
                    633: 
                    634: /* Given a VAR_DECL, PARM_DECL, RESULT_DECL or FIELD_DECL node,
                    635:    calculates the DECL_SIZE, DECL_SIZE_UNIT, DECL_ALIGN and DECL_MODE
                    636:    fields.  Call this only once for any given decl node.
                    637: 
                    638:    Second argument is the boundary that this field can be assumed to
                    639:    be starting at (in bits).  Zero means it can be assumed aligned
                    640:    on any boundary that may be needed.  */
                    641: 
                    642: extern void layout_decl ();
                    643: 
                    644: /* Fold constants as much as possible in an expression.
                    645:    Returns the simplified expression.
                    646:    Acts only on the top level of the expression;
                    647:    if the argument itself cannot be simplified, its
                    648:    subexpressions are not changed.  */
                    649: 
                    650: extern tree fold ();
                    651: 
                    652: /* combine (tree_code, exp1, exp2) where EXP1 and EXP2 are constants
                    653:    returns a constant expression for the result of performing
                    654:    the operation specified by TREE_CODE on EXP1 and EXP2.  */
                    655: 
                    656: extern tree combine ();
                    657: 
                    658: extern tree convert ();
                    659: extern tree convert_units ();
                    660: extern tree size_in_bytes ();
                    661: extern tree genop ();
                    662: extern tree build_int ();
                    663: 
                    664: /* Type for sizes of data-type.  */
                    665: 
                    666: extern tree sizetype;
                    667: 
                    668: /* Concatenate two lists (chains of TREE_LIST nodes) X and Y
                    669:    by making the last node in X point to Y.
                    670:    Returns X, except if X is 0 returns Y.  */
                    671: 
                    672: extern tree chainon ();
                    673: 
                    674: /* Make a new TREE_LIST node from specified PURPOSE, VALUE and CHAIN.  */
                    675: 
                    676: extern tree tree_cons ();
                    677: 
                    678: /* Return the last tree node in a chain.  */
                    679: 
                    680: extern tree tree_last ();
                    681: 
                    682: /* Reverse the order of elements in a chain, and return the new head.  */
                    683: 
                    684: extern tree nreverse ();
                    685: 
                    686: /* Returns the length of a chain of nodes
                    687:    (number of chain pointers to follow before reaching a null pointer).  */
                    688: 
                    689: extern int list_length ();
                    690: 
                    691: /* integer_zerop (tree x) is nonzero if X is an integer constant of value 0 */
                    692: 
                    693: extern int integer_zerop ();
                    694: 
                    695: /* integer_onep (tree x) is nonzero if X is an integer constant of value 1 */
                    696: 
                    697: extern int integer_onep ();
                    698: 
                    699: /* integer_all_onesp (tree x) is nonzero if X is an integer constant
                    700:    all of whose significant bits are 1.  */
                    701: 
                    702: extern int integer_all_onesp ();
                    703: 
                    704: /* type_unsigned_p (tree x) is nonzero if the type X is an unsigned type
                    705:    (all of its possible values are >= 0).
                    706:    If X is a pointer type, the value is 1.
                    707:    If X is a real type, the value is 0.  */
                    708: 
                    709: extern int type_unsigned_p ();
                    710: 
                    711: /* staticp (tree x) is nonzero if X is a reference to data allocated
                    712:    at a fixed address in memory.  */
                    713: 
                    714: extern int staticp ();
                    715: 
                    716: /* Gets an error if argument X is not an lvalue.
                    717:    Also returns 1 if X is an lvalue, 0 if not.  */
                    718: 
                    719: extern int lvalue_or_else ();
                    720: 
                    721: /* save_expr (EXP) returns an expression equivalent to EXP
                    722:    but it can be used multiple times within context CTX
                    723:    and only evaluate EXP once.  */
                    724: 
                    725: extern tree save_expr ();
                    726: 
                    727: /* stabilize_reference (EXP) returns an reference equivalent to EXP
                    728:    but it can be used multiple times
                    729:    and only evaluate the subexpressions once.  */
                    730: 
                    731: extern tree stabilize_reference ();
                    732: 
                    733: /* Return EXP, stripped of any conversions to wider types
                    734:    in such a way that the result of converting to type FOR_TYPE
                    735:    is the same as if EXP were converted to FOR_TYPE.
                    736:    If FOR_TYPE is 0, it signifies EXP's type.  */
                    737: 
                    738: extern tree get_unwidened ();
                    739: 
                    740: /* Return OP or a simpler expression for a narrower value
                    741:    which can be sign-extended or zero-extended to give back OP.
                    742:    Store in *UNSIGNEDP_PTR either 1 if the value should be zero-extended
                    743:    or 0 if the value should be sign-extended.  */
                    744: 
                    745: extern tree get_narrower ();
                    746: 
                    747: /* Given PRECISION and UNSIGNEDP, return a suitable type-tree
                    748:    for an integer type with at least that precision.
                    749:    The definition of this resides in language-specific code
                    750:    as the repertoir of available types may vary.  */
                    751: 
                    752: extern tree type_for_size ();
                    753: 
                    754: /* Given an integer type T, return a type like T but unsigned.
                    755:    If T is unsigned, the value is T.
                    756:    The definition of this resides in language-specific code
                    757:    as the repertoir of available types may vary.  */
                    758: 
                    759: extern tree unsigned_type ();
                    760: 
                    761: /* Given an integer type T, return a type like T but signed.
                    762:    If T is signed, the value is T.
                    763:    The definition of this resides in language-specific code
                    764:    as the repertoir of available types may vary.  */
                    765: 
                    766: extern tree signed_type ();
                    767: 
                    768: /* Return the floating type node for a given floating machine mode.  */
                    769: 
                    770: extern tree get_floating_type ();
                    771: 
                    772: /* Given the FUNCTION_DECL for the current function,
                    773:    return zero if it is ok for this function to be inline.
                    774:    Otherwise return a warning message with a single %s
                    775:    for the function's name.  */
                    776: 
                    777: extern char *function_cannot_inline_p ();
                    778: 
                    779: /* Declare commonly used variables for tree structure.  */
                    780: 
                    781: /* An integer constant with value 0 */
                    782: extern tree integer_zero_node;
                    783: 
                    784: /* An integer constant with value 1 */
                    785: extern tree integer_one_node;
                    786: 
                    787: /* An integer constant with value 0 whose type is sizetype.  */
                    788: extern tree size_zero_node;
                    789: 
                    790: /* An integer constant with value 1 whose type is sizetype.  */
                    791: extern tree size_one_node;
                    792: 
                    793: /* A constant of type pointer-to-int and value 0 */
                    794: extern tree null_pointer_node;
                    795: 
                    796: /* A node of type ERROR_MARK.  */
                    797: extern tree error_mark_node;
                    798: 
                    799: /* The type node for the void type.  */
                    800: extern tree void_type_node;
                    801: 
                    802: /* The type node for the ordinary (signed) integer type.  */
                    803: extern tree integer_type_node;
                    804: 
                    805: /* The type node for the unsigned integer type.  */
                    806: extern tree unsigned_type_node;
                    807: 
                    808: /* The type node for the ordinary character type.  */
                    809: extern tree char_type_node;
                    810: 
                    811: /* Points to the name of the input file from which the current input
                    812:    being parsed originally came (before it went into cpp).  */
                    813: extern char *input_filename;
                    814: 
                    815: /* Nonzero for -pedantic switch: warn about anything
                    816:    that standard C forbids.  */
                    817: extern int pedantic;
                    818: 
                    819: /* In stmt.c */
                    820: 
                    821: extern tree get_last_expr ();
                    822: extern void expand_expr_stmt(), clear_last_expr();
                    823: extern void expand_label(), expand_goto(), expand_asm();
                    824: extern void expand_start_cond(), expand_end_cond();
                    825: extern void expand_start_else(), expand_end_else();
                    826: extern void expand_start_loop(), expand_start_loop_continue_elsewhere();
                    827: extern void expand_loop_continue_here();
                    828: extern void expand_end_loop();
                    829: extern int expand_continue_loop();
                    830: extern int expand_exit_loop(), expand_exit_loop_if_false();
                    831: extern int expand_exit_something();
                    832: 
                    833: extern void expand_start_delayed_expr ();
                    834: extern tree expand_end_delayed_expr ();
                    835: extern void expand_emit_delayed_expr ();
                    836: 
                    837: extern void expand_null_return(), expand_return();
                    838: extern void expand_start_bindings(), expand_end_bindings();
                    839: extern void expand_start_case(), expand_end_case();
                    840: extern int pushcase();
                    841: extern void expand_start_function(), expand_end_function();

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.