summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-17 20:25:10 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-17 20:25:10 +0000
commit4dc59628182202d0220ac69c1a077b4231c41c7b (patch)
treec5d09960634fce6071fe139f352b7cdb7d3d81bf /gcc
parent503bda681ce04d0d6aca16e4bd9888aff5694b89 (diff)
downloadgcc-4dc59628182202d0220ac69c1a077b4231c41c7b.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40584 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog15
-rw-r--r--gcc/java/parse.h1
-rw-r--r--gcc/java/parse.y24
3 files changed, 20 insertions, 20 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 50efdcde427..298cc4ca514 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -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.
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index 8a7bae56a1b..98845d7977b 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -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)
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 2100c66c245..f36c4decf35 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -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--;