diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-15 14:13:03 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-15 14:13:03 +0000 |
commit | 8f6353e5a4aeffccb7fc73b584908119ae54247e (patch) | |
tree | acb467137b30cf006a229fb261743c29c869d147 /gcc/java/jcf-parse.c | |
parent | 3884f97b3c4caf8f0d9099939e421c0576649cd8 (diff) | |
download | gcc-8f6353e5a4aeffccb7fc73b584908119ae54247e.tar.gz |
2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
PR java/23891
* parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
the newly created type. Set import lists here, not in create_class.
(jdep_resolve_class): Set current_class.
(do_resolve_class): Use current_class's TYPE_PACKAGE to determine
the current package context, not ctxp->package.
(cicp_cache): Removed.
(class_in_current_package): Simplify implementation using
TYPE_PACKAGE.
* jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
* java-tree.h (TYPE_PACKAGE): New macro.
(struct lang_type): New member 'package'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104305 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 425dc4d2746..5d22f88d843 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -444,6 +444,7 @@ give_name_to_class (JCF *jcf, int i) abort (); else { + tree package_name = NULL_TREE, tmp; tree this_class; int j = JPOOL_USHORT1 (jcf, i); /* verify_constant_pool confirmed that j is a CONSTANT_Utf8. */ @@ -469,6 +470,9 @@ give_name_to_class (JCF *jcf, int i) jcf->cpool.data[i].t = this_class; JPOOL_TAG (jcf, i) = CONSTANT_ResolvedClass; + split_qualified_name (&package_name, &tmp, + DECL_NAME (TYPE_NAME (this_class))); + TYPE_PACKAGE (this_class) = package_name; return this_class; } } |