OSDN Git Service

Do not rewrite out of SSA scalar dependences crossing the limits of the scop.
[pf3gnuchains/gcc-fork.git] / gcc / java / java-tree.h
index 0482abe..3addcca 100644 (file)
@@ -112,64 +112,11 @@ struct JCF;
 /* The virtual offset symbol table. Used by the runtime to fill out
    the otable. */
 
-extern int flag_filelist_file;
-
-/* When nonzero, permit the use of the assert keyword.  */
-
-extern int flag_assert;
-
-/* When nonzero, assume all native functions are implemented with
-   JNI, not CNI.  */
-
-extern int flag_jni;
-
-/* When nonzero, always check for a non gcj generated classes archive.  */
-
-extern int flag_force_classes_archive_check;
-
 /* Resource name.  */
 extern const char *resource_name;
 
 /* Turned to 1 if -Wall was encountered. See lang.c for their meanings.  */
 extern int flag_wall;
-extern int flag_redundant;
-
-/* When nonzero, warn when source file is newer than matching class
-   file.  */
-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;
-
-/* When nonzero, assume the runtime uses a hash table to map an
-   object to its synchronization structure.  */
-extern int flag_hash_synchronization;
-
-/* When nonzero, generate checks for references to NULL.  */
-extern int flag_check_references;
-
-/* Used through STATIC_CLASS_INIT_OPT_P to check whether static
-   initialization optimization should be performed.  */
-extern int flag_optimize_sci;
-
-/* Generate instances of Class at runtime.  */
-extern int flag_indirect_classes;
-
-/* When nonzero, use offset tables for virtual method calls
-   in order to improve binary compatibility. */
-extern int flag_indirect_dispatch;
-
-/* When zero, don't generate runtime array store checks. */
-extern int flag_store_check;
-
-/* When nonzero, generate only a limited set of class meta-data. */
-extern int flag_reduced_reflection;
 
 /* The Java .class file that provides main_class;  the main input file. */
 extern GTY(()) struct JCF * current_jcf;
@@ -750,11 +697,12 @@ union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
     (DECL_LANG_SPECIFIC (NODE)->u.v.vtable)
 
 /* Create a DECL_LANG_SPECIFIC if necessary. */
-#define MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC(T)                 \
-  if (DECL_LANG_SPECIFIC (T) == NULL)                          \
-    {                                                          \
-      DECL_LANG_SPECIFIC ((T)) = GGC_CNEW (struct lang_decl);  \
-      DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR;            \
+#define MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC(T)                       \
+  if (DECL_LANG_SPECIFIC (T) == NULL)                                \
+    {                                                                \
+      DECL_LANG_SPECIFIC ((T))                                       \
+        = ggc_alloc_cleared_lang_decl (sizeof (struct lang_decl));   \
+      DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR;                  \
     }
 
 /* A ConstantExpression, after folding and name resolution. */
@@ -776,7 +724,7 @@ struct GTY(()) lang_decl_func {
   int max_stack;
   int arg_slot_count;
   source_location last_line;   /* End line number for a function decl */
-  tree throws_list;            /* Exception specified by `throws' */
+  VEC(tree,gc) *throws_list;   /* Exception specified by `throws' */
   tree exc_obj;                        /* Decl holding the exception object.  */
 
   /* Class initialization test variables  */
@@ -840,7 +788,7 @@ typedef struct GTY(()) type_assertion {
 
 extern tree java_treetreehash_find (htab_t, tree);
 extern tree * java_treetreehash_new (htab_t, tree);
-extern htab_t java_treetreehash_create (size_t size, int ggc);
+extern htab_t java_treetreehash_create (size_t size);
 
 /* DECL_LANG_SPECIFIC for VAR_DECL, PARM_DECL and sometimes FIELD_DECL
    (access methods on outer class fields) and final fields. */
@@ -861,7 +809,7 @@ struct GTY(()) lang_decl_var {
 
 enum lang_decl_desc {LANG_DECL_FUNC, LANG_DECL_VAR};
 
-struct GTY(()) lang_decl {
+struct GTY((variable_size)) lang_decl {
   enum lang_decl_desc desc;
   union lang_decl_u
     {
@@ -879,7 +827,7 @@ struct GTY(()) lang_decl {
 #define MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC(T) \
   if (TYPE_LANG_SPECIFIC ((T)) == NULL)                \
      TYPE_LANG_SPECIFIC ((T))                  \
-     = GGC_CNEW (struct lang_type);
+       = ggc_alloc_cleared_lang_type (sizeof (struct lang_type));
 
 #define TYPE_DUMMY(T)          (TYPE_LANG_SPECIFIC(T)->dummy_class)
 
@@ -916,31 +864,42 @@ struct GTY(()) lang_decl {
 #define TYPE_REFLECTION_DATASIZE(T)                                    \
                                (TYPE_LANG_SPECIFIC (T)->reflection_datasize)
 
-struct GTY(()) lang_type {
+typedef struct GTY(()) method_entry_d {
+  tree method;
+  tree special;
+} method_entry;
+
+DEF_VEC_O(method_entry);
+DEF_VEC_ALLOC_O(method_entry,gc);
+
+/* FIXME: the variable_size annotation here is needed because these types are
+   variable-sized in some other frontends.  Due to gengtype deficiency the GTY
+   options of such types have to agree across all frontends. */
+struct GTY((variable_size)) lang_type {
   tree signature;
   struct JCF *jcf;
   struct CPool *cpool;
   tree cpool_data_ref;         /* Cached */
   tree package_list;           /* List of package names, progressive */
 
-  tree otable_methods;          /* List of static decls referred to by this
-                                  class.  */
+  VEC(method_entry,gc) *otable_methods; /* List of static decls referred
+                                          to by this class.  */
   tree otable_decl;            /* The static address table.  */
   tree otable_syms_decl;
 
-  tree atable_methods;          /* List of static decls referred to by this
-                                  class.  */
+  VEC(method_entry,gc) *atable_methods; /* List of abstract methods
+                                          referred to by this class.  */
   tree atable_decl;            /* The static address table.  */
   tree atable_syms_decl;
 
-  tree itable_methods;          /* List of interfaces methods referred
-                                  to by this class.  */
+  VEC(method_entry,gc) *itable_methods; /* List of interface methods
+                                          referred to by this class.  */
   tree itable_decl;            /* The interfaces table.  */
   tree itable_syms_decl;
 
   tree ctable_decl;             /* The table of classes for the runtime
                                   type matcher.  */
-  tree catch_classes;
+  VEC(constructor_elt,gc) *catch_classes;
 
   htab_t GTY ((param_is (struct treetreehash_entry))) type_to_runtime_map;   
                                 /* The mapping of classes to exception region
@@ -980,7 +939,7 @@ struct GTY(()) lang_type {
 /* Defined in java-except.h  */
 struct eh_range;
 
-extern void java_parse_file (int);
+extern void java_parse_file (void);
 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);
@@ -1103,7 +1062,8 @@ extern void make_class_data (tree);
 extern int alloc_name_constant (int, tree);
 extern int alloc_constant_fieldref (tree, tree);
 extern void emit_register_classes (tree *);
-extern tree emit_symbol_table (tree, tree, tree, tree, tree, int);
+extern tree emit_symbol_table (tree, tree, VEC(method_entry,gc) *,
+                              tree, tree, int);
 extern void lang_init_source (int);
 extern void write_classfile (tree);
 extern char *print_int_node (tree);
@@ -1206,7 +1166,7 @@ extern void register_exception_range(struct eh_range *, int, int);
 extern void finish_method (tree);
 extern void java_expand_body (tree);
 
-extern int get_symbol_table_index (tree, tree, tree *);
+extern int get_symbol_table_index (tree, tree, VEC(method_entry,gc) **);
 
 extern tree make_catch_class_record (tree, tree);
 extern tree emit_catch_table (tree);
@@ -1448,7 +1408,7 @@ extern tree *type_map;
   if (TYPE_FIELDS (RTYPE) == NULL_TREE)        \
     TYPE_FIELDS (RTYPE) = _field;      \
   else                                 \
-    TREE_CHAIN(FIELD) = _field;                \
+    DECL_CHAIN(FIELD) = _field;                \
   DECL_CONTEXT (_field) = (RTYPE);     \
   DECL_ARTIFICIAL (_field) = 1;                \
   FIELD = _field; }
@@ -1472,7 +1432,7 @@ extern tree *type_map;
   do \
     { \
       constructor_elt *_elt___ = VEC_last (constructor_elt, V); \
-      tree _next___ = TREE_CHAIN (_elt___->index); \
+      tree _next___ = DECL_CHAIN (_elt___->index); \
       gcc_assert (!DECL_NAME (_elt___->index)); \
       _elt___->value = VALUE; \
       CONSTRUCTOR_APPEND_ELT (V, _next___, NULL); \
@@ -1486,7 +1446,7 @@ extern tree *type_map;
   do \
     { \
       constructor_elt *_elt___ = VEC_last (constructor_elt, V); \
-      tree _next___ = TREE_CHAIN (_elt___->index); \
+      tree _next___ = DECL_CHAIN (_elt___->index); \
       gcc_assert (strcmp (IDENTIFIER_POINTER (DECL_NAME (_elt___->index)), \
                          NAME) == 0); \
       _elt___->value = VALUE; \