Java: Remove set_nested_class_simple_name_value()

Ranjit Mathew rmathew@gmail.com
Fri Jun 25 08:12:00 GMT 2004


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/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /