parse.h (JDEP_SOLV): Removed.
authorPer Bothner <per@bothner.com>
Sat, 17 Mar 2001 20:25:10 +0000 (12:25 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Sat, 17 Mar 2001 20:25:10 +0000 (12:25 -0800)
* parse.h (JDEP_SOLV):  Removed.
* parse.y (incomplete_class_list):  Removed.
(register_incomplete_type):  Use JDEP_TO_RESOLVE instead of JDEP_SOLV.

* parse.y (obtain_incomplete_type): Removed.  It doesn't work if
resolve_class changes the name of an array type that is on the list
and then someone else looks for the modified name.  Also, seems liable
to break when compiling multiple source files at once.  So the simplest
is to just remove incomplete_class_list - it is only a minor
space win and it is not even clear it saves time.

* parse.y (resolve_class):  Remove unneeded promote_type.

From-SVN: r40584

gcc/java/ChangeLog
gcc/java/parse.h
gcc/java/parse.y

index 50efdcde427a1139cb5e211adab01ef88a92fc38..298cc4ca514289245fee71c94c4c67ec61d1c3e3 100644 (file)
@@ -1,3 +1,18 @@
+2001-03-17  Per Bothner  <per@bothner.com>
+
+       * parse.h (JDEP_SOLV):  Removed.
+       * parse.y (incomplete_class_list):  Removed.
+       (register_incomplete_type):  Use JDEP_TO_RESOLVE instead of JDEP_SOLV.
+
+       * parse.y (obtain_incomplete_type): Removed.  It doesn't work if
+       resolve_class changes the name of an array type that is on the list
+       and then someone else looks for the modified name.  Also, seems liable
+       to break when compiling multiple source files at once.  So the simplest
+       is to just remove incomplete_class_list - it is only a minor
+       space win and it is not even clear it saves time.
+
+       * parse.y (resolve_class):  Remove unneeded promote_type.
+
 2001-03-15  Per Bothner  <per@bothner.com>
 
        * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
index 8a7bae56a1bda705be6bbba8c57efc2ac24e6685..98845d7977b4b57fdcf65ed35281d5a7415ad86e 100644 (file)
@@ -494,7 +494,6 @@ typedef struct _jdep {
 #define JDEP_DECL(J)          ((J)->decl)
 #define JDEP_DECL_WFL(J)      ((J)->decl)
 #define JDEP_KIND(J)          ((J)->kind)
-#define JDEP_SOLV(J)          ((J)->solv)
 #define JDEP_WFL(J)           ((J)->wfl)
 #define JDEP_MISC(J)          ((J)->misc)
 #define JDEP_ENCLOSING(J)     ((J)->enclosing)
index 2100c66c24556755534a900b94f1e59d00fab86d..f36c4decf3531c47dee4f772113d2ef8d4c25aa4 100644 (file)
@@ -409,14 +409,11 @@ static tree current_this;
    the list of the catch clauses of the currently analysed try block. */
 static tree currently_caught_type_list;
 
-static tree src_parse_roots[2] = { NULL_TREE, NULL_TREE };
+static tree src_parse_roots[1] = { NULL_TREE };
 
 /* All classes seen from source code */
 #define gclass_list src_parse_roots[0]
 
-/* List of non-complete classes */
-#define incomplete_class_list src_parse_roots[1]
-
 /* Check modifiers. If one doesn't fit, retrieve it in its declaration
    line and point it out.  */
 /* Should point out the one that don't fit. ASCII/unicode, going
@@ -4979,7 +4976,7 @@ static tree
 obtain_incomplete_type (type_name)
      tree type_name;
 {
-  tree ptr, name;
+  tree ptr = NULL_TREE, name;
 
   if (TREE_CODE (type_name) == EXPR_WITH_FILE_LOCATION)
     name = EXPR_WFL_NODE (type_name);
@@ -4988,17 +4985,8 @@ obtain_incomplete_type (type_name)
   else
     abort ();
 
-  for (ptr = incomplete_class_list; ptr; ptr = TREE_CHAIN (ptr))
-    if (TYPE_NAME (ptr) == name)
-      break;
-
-  if (!ptr)
-    {
-      BUILD_PTR_FROM_NAME (ptr, name);
-      layout_type (ptr);
-      TREE_CHAIN (ptr) = incomplete_class_list;
-      incomplete_class_list = ptr;
-    }
+  BUILD_PTR_FROM_NAME (ptr, name);
+  layout_type (ptr);
 
   return ptr;
 }
@@ -5020,7 +5008,7 @@ register_incomplete_type (kind, wfl, decl, ptr)
 
   JDEP_KIND (new) = kind;
   JDEP_DECL (new) = decl;
-  JDEP_SOLV (new) = ptr;
+  JDEP_TO_RESOLVE (new) = ptr;
   JDEP_WFL (new) = wfl;
   JDEP_CHAIN (new) = NULL;
   JDEP_MISC (new) = NULL_TREE;
@@ -5476,8 +5464,6 @@ resolve_class (enclosing, class_type, decl, cl)
     {
       while (base != name)
        {
-         if (TREE_CODE (resolved_type) == RECORD_TYPE)
-           resolved_type  = promote_type (resolved_type);
          resolved_type = build_java_array_type (resolved_type, -1);
          CLASS_LOADED_P (resolved_type) = 1;
          name--;