OSDN Git Service

2001-07-30 H.J. Lu (hjl@gnu.org)
[pf3gnuchains/gcc-fork.git] / gcc / tree.h
index 22763fa..efd4e6c 100644 (file)
@@ -84,7 +84,7 @@ extern const char *const built_in_class_names[4];
 /* Codes that identify the various built in functions
    so that expand_call can identify them quickly.  */
 
-#define DEF_BUILTIN(x) x,
+#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA) ENUM,
 enum built_in_function
 {
 #include "builtins.def"
@@ -130,6 +130,7 @@ struct tree_common
 {
   union tree_node *chain;
   union tree_node *type;
+  void *aux;
   ENUM_BITFIELD(tree_code) code : 8;
   unsigned side_effects_flag : 1;
   unsigned constant_flag : 1;
@@ -188,7 +189,7 @@ struct tree_common
        TREE_OVERFLOW in
            INTEGER_CST, REAL_CST, COMPLEX_CST
        TREE_PUBLIC in
-           VAR_DECL or FUNCTION_DECL
+           VAR_DECL or FUNCTION_DECL or IDENTIFIER_NODE
        TREE_VIA_PUBLIC in
            TREE_LIST or TREE_VEC
        EXPR_WFL_EMIT_LINE_NOTE in
@@ -261,7 +262,8 @@ struct tree_common
    bounded_flag:
 
        TREE_BOUNDED in
-          expressions, VAR_DECL, PARM_DECL, FIELD_DECL, FUNCTION_DECL
+          expressions, VAR_DECL, PARM_DECL, FIELD_DECL, FUNCTION_DECL,
+          IDENTIFIER_NODE
        TYPE_BOUNDED in
           ..._TYPE
 */
@@ -517,7 +519,7 @@ extern void tree_class_check_failed PARAMS ((const tree, int,
 
 /* In a VAR_DECL or FUNCTION_DECL,
    nonzero means name is to be accessible from outside this module.
-   In an identifier node, nonzero means an external declaration
+   In an IDENTIFIER_NODE, nonzero means an external declaration
    accessible from outside this module was previously seen
    for this name in an inner scope.  */
 #define TREE_PUBLIC(NODE) ((NODE)->common.public_flag)
@@ -728,16 +730,27 @@ struct tree_complex
   union tree_node *imag;
 };
 \f
+#include "hashtable.h"
+
 /* Define fields and accessors for some special-purpose tree nodes.  */
 
-#define IDENTIFIER_LENGTH(NODE) (IDENTIFIER_NODE_CHECK (NODE)->identifier.length)
-#define IDENTIFIER_POINTER(NODE) (IDENTIFIER_NODE_CHECK (NODE)->identifier.pointer)
+#define IDENTIFIER_LENGTH(NODE) \
+       (IDENTIFIER_NODE_CHECK (NODE)->identifier.id.len)
+#define IDENTIFIER_POINTER(NODE) \
+       ((char *) IDENTIFIER_NODE_CHECK (NODE)->identifier.id.str)
+
+/* Translate a hash table identifier pointer to a tree_identifier
+   pointer, and vice versa.  */
+
+#define HT_IDENT_TO_GCC_IDENT(NODE) \
+       ((tree) ((char *) (NODE) - sizeof (struct tree_common)))
+#define GCC_IDENT_TO_HT_IDENT(NODE) \
+       (&((struct tree_identifier *) (NODE))->id)
 
 struct tree_identifier
 {
   struct tree_common common;
-  int length;
-  const char *pointer;
+  struct ht_identifier id;
 };
 
 /* In a TREE_LIST node.  */
@@ -835,6 +848,33 @@ struct tree_exp
    the debugging output format in use.  */
 #define BLOCK_NUMBER(NODE) (BLOCK_CHECK (NODE)->block.block_num)
 
+/* If block reordering splits a lexical block into discontiguous
+   address ranges, we'll make a copy of the original block.
+
+   Note that this is logically distinct from BLOCK_ABSTRACT_ORIGIN.
+   In that case, we have one source block that has been replicated
+   (through inlining or unrolling) into many logical blocks, and that
+   these logical blocks have different physical variables in them.
+
+   In this case, we have one logical block split into several
+   non-contiguous address ranges.  Most debug formats can't actually
+   represent this idea directly, so we fake it by creating multiple
+   logical blocks with the same variables in them.  However, for those
+   that do support non-contiguous regions, these allow the original
+   logical block to be reconstructed, along with the set of address
+   ranges.
+
+   One of the logical block fragments is arbitrarily chosen to be
+   the ORIGIN.  The other fragments will point to the origin via
+   BLOCK_FRAGMENT_ORIGIN; the origin itself will have this pointer
+   be null.  The list of fragments will be chained through 
+   BLOCK_FRAGMENT_CHAIN from the origin.  */
+
+#define BLOCK_FRAGMENT_ORIGIN(NODE) \
+  (BLOCK_CHECK (NODE)->block.fragment_origin)
+#define BLOCK_FRAGMENT_CHAIN(NODE) \
+  (BLOCK_CHECK (NODE)->block.fragment_chain)
+
 struct tree_block
 {
   struct tree_common common;
@@ -847,6 +887,8 @@ struct tree_block
   union tree_node *subblocks;
   union tree_node *supercontext;
   union tree_node *abstract_origin;
+  union tree_node *fragment_origin;
+  union tree_node *fragment_chain;
 };
 \f
 /* Define fields and accessors for nodes representing data types.  */
@@ -1335,7 +1377,10 @@ struct tree_type
 /* For a FIELD_DECL in a QUAL_UNION_TYPE, records the expression, which
    if nonzero, indicates that the field occupies the type.  */
 #define DECL_QUALIFIER(NODE) (FIELD_DECL_CHECK (NODE)->decl.initial)
-/* These two fields describe where in the source code the declaration was.  */
+/* These two fields describe where in the source code the declaration
+   was.  If the declaration appears in several places (as for a C
+   function that is declared first and then defined later), this
+   information should refer to the definition.  */
 #define DECL_SOURCE_FILE(NODE) (DECL_CHECK (NODE)->decl.filename)
 #define DECL_SOURCE_LINE(NODE) (DECL_CHECK (NODE)->decl.linenum)
 /* Holds the size of the datum, in bits, as a tree expression.
@@ -1952,13 +1997,6 @@ extern tree get_identifier               PARAMS ((const char *));
 
 extern tree maybe_get_identifier       PARAMS ((const char *));
 
-/* Look up an identifier with the name TEXT, replace its identifier
-   node with NODE, and return the old identifier node.  This is used
-   by languages which need to enable and disable keywords based on
-   context; e.g. see remember_protocol_qualifiers in objc/objc-act.c.  */
-
-extern tree set_identifier             PARAMS ((const char *, tree));
-
 /* Construct various types of nodes.  */
 
 #define build_int_2(LO,HI)  \
@@ -2031,8 +2069,14 @@ extern tree make_tree                    PARAMS ((tree, struct rtx_def *));
 extern tree build_type_attribute_variant PARAMS ((tree, tree));
 extern tree build_decl_attribute_variant PARAMS ((tree, tree));
 
-extern tree merge_machine_decl_attributes PARAMS ((tree, tree));
-extern tree merge_machine_type_attributes PARAMS ((tree, tree));
+/* Default versions of target-overridable functions.  */
+
+extern tree merge_decl_attributes PARAMS ((tree, tree));
+extern tree merge_type_attributes PARAMS ((tree, tree));
+extern int default_valid_attribute_p PARAMS ((tree, tree, tree, tree));
+extern int default_comp_type_attributes PARAMS ((tree, tree));
+extern void default_set_default_type_attributes PARAMS ((tree));
+extern void default_insert_attributes PARAMS ((tree, tree *));
 
 /* Split a list of declspecs and attributes into two.  */
 
@@ -2060,6 +2104,12 @@ extern tree lookup_attribute             PARAMS ((const char *, tree));
 
 extern tree merge_attributes           PARAMS ((tree, tree));
 
+#ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
+/* Given two Windows decl attributes lists, possibly including
+   dllimport, return a list of their union .  */
+extern tree merge_dllimport_decl_attributes PARAMS ((tree, tree));
+#endif
+
 /* Return a version of the TYPE, qualified as indicated by the
    TYPE_QUALS, if one exists.  If no qualified version exists yet,
    return NULL_TREE.  */
@@ -2113,12 +2163,17 @@ typedef struct record_layout_info_s
   unsigned int record_align;
   /* The alignment of the record so far, not including padding, in bits.  */
   unsigned int unpacked_align;
+  /* The alignment of the record so far, allowing for the record to be
+     padded only at the end, in bits.  */
+  unsigned int unpadded_align;
   /* The static variables (i.e., class variables, as opposed to
      instance variables) encountered in T.  */
   tree pending_statics;
   int packed_maybe_necessary;
 } *record_layout_info;
 
+extern void set_lang_adjust_rli                PARAMS ((void (*) PARAMS
+                                                ((record_layout_info))));
 extern record_layout_info start_record_layout PARAMS ((tree));
 extern tree bit_from_pos               PARAMS ((tree, tree));
 extern tree byte_from_pos              PARAMS ((tree, tree));
@@ -2511,6 +2566,7 @@ extern tree get_set_constructor_bytes             PARAMS ((tree,
                                                       unsigned char *, int));
 extern tree get_callee_fndecl                   PARAMS ((tree));
 extern void set_decl_assembler_name             PARAMS ((tree));
+extern int type_num_arguments                   PARAMS ((tree));
 \f
 /* In stmt.c */
 
@@ -2553,6 +2609,7 @@ extern void end_cleanup_deferral          PARAMS ((void));
 extern int is_body_block                       PARAMS ((tree));
 
 extern int conditional_context                 PARAMS ((void));
+extern struct nesting * current_nesting_level  PARAMS ((void));
 extern tree last_cleanup_this_contour          PARAMS ((void));
 extern void expand_start_case                  PARAMS ((int, tree, tree,
                                                       const char *));
@@ -2627,10 +2684,6 @@ extern void init_decl_processing         PARAMS ((void));
 /* Function to identify which front-end produced the output file. */
 extern const char *lang_identify                       PARAMS ((void));
 
-/* Called by report_error_function to print out function name.
- * Default may be overridden by language front-ends.  */
-extern void (*print_error_function) PARAMS ((const char *));
-
 /* Function to replace the DECL_LANG_SPECIFIC field of a DECL with a copy.  */
 extern void copy_lang_decl                     PARAMS ((tree));
 
@@ -2709,10 +2762,10 @@ extern void print_obstack_name          PARAMS ((char *, FILE *,
 #endif
 extern void expand_function_end                PARAMS ((const char *, int, int));
 extern void expand_function_start      PARAMS ((tree, int));
+extern void expand_pending_sizes        PARAMS ((tree));
 
 extern int real_onep                   PARAMS ((tree));
 extern int real_twop                   PARAMS ((tree));
-extern void start_identifier_warnings  PARAMS ((void));
 extern void gcc_obstack_init           PARAMS ((struct obstack *));
 extern void init_obstacks              PARAMS ((void));
 extern void build_common_tree_nodes    PARAMS ((int));
@@ -2827,6 +2880,9 @@ extern int div_and_round_double           PARAMS ((enum tree_code, int,
 /* In stmt.c */
 extern void emit_nop                   PARAMS ((void));
 extern void expand_computed_goto       PARAMS ((tree));
+extern bool parse_output_constraint     PARAMS ((const char **,
+                                                int, int, int,
+                                                bool *, bool *, bool *));
 extern void expand_asm_operands                PARAMS ((tree, tree, tree, tree, int,
                                                 const char *, int));
 extern int any_pending_cleanups                PARAMS ((int));
@@ -2858,11 +2914,6 @@ extern tree get_file_function_name PARAMS ((int));
 \f
 /* Interface of the DWARF2 unwind info support.  */
 
-/* Decide whether we want to emit frame unwind information for the current
-   translation unit.  */
-
-extern int dwarf2out_do_frame          PARAMS ((void));
-
 /* Generate a new label for the CFI info to refer to.  */
 
 extern char *dwarf2out_cfi_label       PARAMS ((void));
@@ -2892,15 +2943,6 @@ extern void dwarf2out_return_save        PARAMS ((const char *, long));
 
 extern void dwarf2out_return_reg       PARAMS ((const char *, unsigned));
 
-/* Output a marker (i.e. a label) for the beginning of a function, before
-   the prologue.  */
-
-extern void dwarf2out_begin_prologue   PARAMS ((void));
-
-/* Output a marker (i.e. a label) for the absolute end of the generated
-   code for a function definition.  */
-
-extern void dwarf2out_end_epilogue     PARAMS ((void));
 \f
 /* Redefine abort to report an internal error w/o coredump, and
    reporting the location of the error in the source file.  This logic