diff options
author | Bryce McKinlay <mckinlay@redhat.com> | 2004-06-26 20:40:31 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2004-06-26 21:40:31 +0100 |
commit | ed7f23690a8c1cf8295cf151719d7b07f7b68bce (patch) | |
tree | ec8c7b5d06daedd0915d6edd58a293686a084f4b /gcc/java/jcf-parse.c | |
parent | c872077c88496940e82e8f52988d98a94c9c5d29 (diff) | |
download | gcc-ed7f23690a8c1cf8295cf151719d7b07f7b68bce.zip gcc-ed7f23690a8c1cf8295cf151719d7b07f7b68bce.tar.gz gcc-ed7f23690a8c1cf8295cf151719d7b07f7b68bce.tar.bz2 |
PR java/1207, java/16178
PR java/1207, java/16178
* jcf-parse.c (load_class): Return immediately if passed a type decl
where CLASS_FROM_SOURCE_P is set. Remove FIXME.
* parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
before calling load_class.
(qualify_and_find): Likewise.
(find_in_imports_on_demand): Likewise.
(find_applicable_accessible_methods_list): Likewise.
Co-Authored-By: Ranjit Mathew <rmathew@hotmail.com>
From-SVN: r83719
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index c948a1a..42c3df3 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -562,10 +562,6 @@ read_class (tree name) /* Load CLASS_OR_NAME. CLASS_OR_NAME can be a mere identifier if called from the parser, otherwise it's a RECORD_TYPE node. If VERBOSE is 1, print error message on failure to load a class. */ - -/* Replace calls to load_class by having callers call read_class directly - - and then perhaps rename read_class to load_class. FIXME */ - void load_class (tree class_or_name, int verbose) { @@ -581,7 +577,12 @@ load_class (tree class_or_name, int verbose) name = TYPE_NAME (TREE_PURPOSE (class_or_name)); /* Or it's a type in the making */ else - name = DECL_NAME (TYPE_NAME (class_or_name)); + { + /* If the class is from source code, then it must already be loaded. */ + if (CLASS_FROM_SOURCE_P (class_or_name)) + return; + name = DECL_NAME (TYPE_NAME (class_or_name)); + } saved = name; while (1) |