OSDN Git Service

PR 44103
[pf3gnuchains/gcc-fork.git] / gcc / java / java-tree.h
index 9ab7660..c60298b 100644 (file)
@@ -145,6 +145,9 @@ extern int flag_newer;
 /* When nonzero, call a library routine to do integer divisions. */
 extern int flag_use_divide_subroutine;
 
+/* When nonzero, use atomic builtins. */
+extern int flag_use_atomic_builtins;
+
 /* When nonzero, generate code for the Boehm GC.  */
 extern int flag_use_boehm_gc;
 
@@ -711,6 +714,8 @@ union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
 /* List of checked thrown exceptions, as specified with the `throws'
    keyword */
 #define DECL_FUNCTION_THROWS(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.throws_list)
+/* VAR_DECL containing the caught exception object.  */
+#define DECL_FUNCTION_EXC_OBJ(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.exc_obj)
 /* For each function decl, init_test_table contains a hash table whose
    entries are keyed on class names, and whose values are local
    boolean decls.  The variables are intended to be TRUE when the
@@ -782,6 +787,7 @@ struct GTY(()) lang_decl_func {
   int arg_slot_count;
   source_location last_line;   /* End line number for a function decl */
   tree throws_list;            /* Exception specified by `throws' */
+  tree exc_obj;                        /* Decl holding the exception object.  */
 
   /* Class initialization test variables  */
   htab_t GTY ((param_is (struct treetreehash_entry))) init_test_table;
@@ -985,7 +991,6 @@ struct GTY(()) lang_type {
 struct eh_range;
 
 extern void java_parse_file (int);
-extern bool java_mark_addressable (tree);
 extern tree java_type_for_mode (enum machine_mode, int);
 extern tree java_type_for_size (unsigned int, int);
 extern tree java_truthvalue_conversion (tree);
@@ -1119,7 +1124,7 @@ extern int find_class_or_string_constant (struct CPool *, int, tree);
 
 extern tree pushdecl_top_level (tree);
 extern tree pushdecl_function_level (tree);
-extern tree java_replace_reference (tree, bool);
+extern tree java_replace_references (tree *, int *, void *);
 extern int alloc_class_constant (tree);
 extern void init_expr_processing (void);
 extern void push_super_field (tree, tree);
@@ -1224,6 +1229,8 @@ extern void java_read_sourcefilenames (const char *fsource_filename);
 
 extern void rewrite_reflection_indexes (void *);
 
+int cxx_keyword_p (const char *name, int length);
+
 #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL)
 
 /* Access flags etc for a method (a FUNCTION_DECL): */
@@ -1435,15 +1442,15 @@ extern tree *type_map;
 #define DECL_INNER_CLASS_LIST(NODE) DECL_INITIAL (TYPE_DECL_CHECK (NODE))
 
 /* Add a FIELD_DECL to RECORD_TYPE RTYPE.
-   The field has name NAME (a char*), and type FTYPE.
+   The field has name NAME (a char*), a type FTYPE, and a location of LOC.
    Unless this is the first field, FIELD most hold the previous field.
    FIELD is set to the newly created FIELD_DECL.
 
    We set DECL_ARTIFICIAL so these fields get skipped by make_class_data
    if compiling java.lang.Object or java.lang.Class. */
 
-#define PUSH_FIELD(RTYPE, FIELD, NAME, FTYPE) \
-{ tree _field = build_decl (FIELD_DECL, get_identifier ((NAME)), (FTYPE)); \
+#define PUSH_FIELD(LOC, RTYPE, FIELD, NAME, FTYPE) \
+{ tree _field = build_decl (LOC, FIELD_DECL, get_identifier ((NAME)), (FTYPE)); \
   if (TYPE_FIELDS (RTYPE) == NULL_TREE)        \
     TYPE_FIELDS (RTYPE) = _field;      \
   else                                 \
@@ -1454,50 +1461,54 @@ extern tree *type_map;
 
 #define FINISH_RECORD(RTYPE) layout_type (RTYPE)
 
-/* Start building a RECORD_TYPE constructor with a given TYPE in CONS. */
-#define START_RECORD_CONSTRUCTOR(CONS, CTYPE) \
+/* Start building a RECORD_TYPE constructor's elements in V.  The
+   constructor will have type CTYPE.  */
+#define START_RECORD_CONSTRUCTOR(V, CTYPE) \
   do \
     { \
-      CONS = build_constructor ((CTYPE), VEC_alloc (constructor_elt, gc, 0)); \
-      CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), TYPE_FIELDS (CTYPE), \
-                             NULL); \
+      V = VEC_alloc (constructor_elt, gc, 0); \
+      CONSTRUCTOR_APPEND_ELT (V, TYPE_FIELDS (CTYPE), NULL); \
     } \
   while (0)
 
-/* Append a field initializer to CONS for the dummy field for the inherited
+/* Append a field initializer to V for the dummy field for the inherited
    fields.  The dummy field has the given VALUE, and the same type as the
    super-class.   Must be specified before calls to PUSH_FIELD_VALUE. */
-#define PUSH_SUPER_VALUE(CONS, VALUE) \
+#define PUSH_SUPER_VALUE(V, VALUE) \
   do \
     { \
-      constructor_elt *_elt___ = VEC_last (constructor_elt, \
-                                          CONSTRUCTOR_ELTS (CONS)); \
+      constructor_elt *_elt___ = VEC_last (constructor_elt, V); \
       tree _next___ = TREE_CHAIN (_elt___->index); \
       gcc_assert (!DECL_NAME (_elt___->index)); \
       _elt___->value = VALUE; \
-      CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), _next___, NULL); \
+      CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \
     } \
   while (0)
 
-/* Append a field initializer to CONS for a field with the given VALUE.
+/* Append a field initializer to V for a field with the given VALUE.
    NAME is a char* string used for error checking;
    the initializer must be specified in order. */
-#define PUSH_FIELD_VALUE(CONS, NAME, VALUE)                            \
+#define PUSH_FIELD_VALUE(V, NAME, VALUE)                               \
   do \
     { \
-      constructor_elt *_elt___ = VEC_last (constructor_elt, \
-                                          CONSTRUCTOR_ELTS (CONS)); \
+      constructor_elt *_elt___ = VEC_last (constructor_elt, V); \
       tree _next___ = TREE_CHAIN (_elt___->index); \
       gcc_assert (strcmp (IDENTIFIER_POINTER (DECL_NAME (_elt___->index)), \
                          NAME) == 0); \
       _elt___->value = VALUE; \
-      CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (CONS), _next___, NULL); \
+      CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \
     } \
   while (0)
 
-/* Finish creating a record CONSTRUCTOR CONS. */
-#define FINISH_RECORD_CONSTRUCTOR(CONS) \
-  VEC_pop (constructor_elt, CONSTRUCTOR_ELTS (CONS))
+/* Finish creating a record CONSTRUCTOR CONS with type CTYPE and elements V.  */
+#define FINISH_RECORD_CONSTRUCTOR(CONS, V, CTYPE)        \
+  do \
+    { \
+      VEC_pop (constructor_elt, V); \
+      CONS = build_constructor (CTYPE, V); \
+      TREE_CONSTANT (CONS) = 0; \
+    } \
+  while (0)
 
 #define BLOCK_EXPR_DECLS(NODE)  BLOCK_VARS(NODE)
 #define BLOCK_EXPR_BODY(NODE)   BLOCK_SUBBLOCKS(NODE)