This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Java: Remove set_nested_class_simple_name_value()


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]