This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Java: Remove set_nested_class_simple_name_value()
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Bryce McKinlay <mckinlay at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 25 Jun 2004 12:18:23 +0530
- Subject: Re: Java: Remove set_nested_class_simple_name_value()
- References: <40DA4171.9000600@redhat.com> <cbe6t0$rrm$1@sea.gmane.org> <40DB8992.6040909@redhat.com>
Bryce McKinlay wrote:
> Ranjit Mathew wrote:
>
>
>>Another thing that puzzles me is that apparently we keep
>>laying out the classes in all_class_list again and again and again
>>if we encounter multiple files given on the command line or
>>taken via a JAR on the command line.
>
>
> Interesting, do you mean that layout_class is being called multiple
> times for the same class? Any idea what causes this?
Yes, sort of.
Whenever we parse a source or class file, we add it to
all_class_list (ref. maybe_create_class_interface_decl() in
parse.y and jcf_parse() in jcf-parse.c).
This list is cleared only in java_layout_classes(), which is
called only by java_expand_classes(), which is called only at
the end of parsing all input files in java_parse_file() in
jcf-parse.c.
Meanwhile, each invocation of parse_class_file() in jcf-parse.c
results in a call to java_layout_seen_class_methods(), which
lays out all the classes in all_class_list. This method is called
for each class file found in a JAR/ZIP file or on the command
line.
That's why I said what I said.
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/