b370870e7c9cd38d5bd1b1e52f289f2b1429ae83
[platform/upstream/gcc.git] / gcc / java / ChangeLog
1 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2
3         * lang.c (java_handle_option): Likewise.
4
5 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
6
7         * lang.c (java_handle_option): Special-casing of optional
8         joined arguments no longer needed.
9         * lang.opt: Update switches that take optional argument.
10
11 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
12
13         * lang.opt: Declare Java.
14         * lang.c (java_init_options): Update.
15
16 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
17
18         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
19
20 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
21
22         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
23         * lang.c (java_handle_option): -MD and -MMD have an underscore.
24         * lang.opt: -MD and -MMD have an underscore.
25
26 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
27
28         * class.c (emit_register_classes): Adjust init_function_start
29         call.
30         * decl.c (complete_start_java_method): Likewise.
31         * resource.c (write_resource_constructor): Likewise.
32
33 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
34
35         * Make-lang.in: Update to use options.c and options.h.
36         * lang.c: Include options.h not j-options.h.
37         (java_handle_option): Abort on unrecognized option.
38         (java_init_options): Request Java switches.
39
40 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
41
42         * Make-lang.in: Handle mostlyclean.
43
44 2003-06-11  Tom Tromey  <tromey@redhat.com>
45
46         * lang.c (java_handle_option): Update dependency_tracking for
47         OPT_MF case.
48
49         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
50         empty argument.
51
52 2003-06-10  Andrew Haley  <aph@redhat.com>
53
54         * resource.c (write_resource_constructor): Use expand_expr to
55         generate the address of the label attached to a resource.
56         * Make-lang.in (java/resource.o): Add expr.h
57
58 2003-06-10  Andrew Haley  <aph@redhat.com>
59
60         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
61         (java_decl_ok_for_sibcall): New.
62
63 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
64
65         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
66         (java/j-options.c, java/j-options.h): New.
67         * java-tree.h (resource_name, compile_resource_file,
68         compile_resource_data): Constify.
69         * jcf-write.c (jcf_write_base_directory): Similarly.
70         * jcf.h (jcf_write_base_directory): Similarly.
71         * lang.c: Include j-options.h.
72         (cl_options_count, cl_options, string_option, java_decode_option,
73         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
74         process_option_with_no): Remove.
75         (resource_name): Constify.
76         (LANG_HOOKS_HANDLE_OPTION): Override.
77         (java_handle_option): New.
78         (java_init): Don't call jcf_path_init.
79         (java_init_options): Call jcf_path_init.
80         * lang.opt: New.
81         * resource.c (compile_resource_data, compile_resource_file): Constify.
82
83 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
84
85         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
86         (struct lang_decl_func): Add last_line field.
87         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
88         DECL_SOURCE_LINE_LAST): Remove.
89         * parse.y (missing_return_error, finish_method_declaration,
90         lookup_cl, start_artificial_method_body, source_end_java_method,
91         start_complete_expand_method): Adjust.
92
93 2003-06-08  Tom Tromey  <tromey@redhat.com>
94
95         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
96         fno-assume-compiled.
97
98 2003-06-08  Roger Sayle  <roger@eyesopen.com>
99
100         * builtins.c (define_builtin_type, builtin_types): Delete.
101         (define_builtin): Rewritten to take just the built-in code,
102         the function's name, type and fallback library function name.
103         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
104         (initialize_builtins): Overhaul to define the GCC builtins
105         used by gcj manually, providing the Java run-time's
106         implementations as the fallback library function.
107
108 2003-06-08  Anthony Green  <green@redhat.com>
109
110         * parse.y (patch_cast): Fix conversions from floating-point to
111         integral types.
112
113 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
114
115         * Make-lang.in: Update.
116         * lang.c: Include opts.h. Define cl_options_count and cl_options.
117
118 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
119
120         * lang.c (java_init_options): Update.
121
122 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
123
124         * Make-lang.in:  Add support for stageprofile and stagefeedback
125
126 2003-05-31  Roger Sayle  <roger@eyesopen.com>
127
128         * lang.c (java_init_options): Prescribe wrap-around two's
129         complement arithmetic overflow by setting flag_wrapv.
130
131 2003-05-29  Roger Sayle  <roger@eyesopen.com>
132
133         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
134         (builtin_record): Add an additional builtin_code field to
135         record which GCC built-in corresponds to the Java function.
136         (java_builtins):  Add new entries for atan, atan2, exp, log,
137         pow and tan.
138         (max_builtin, min_builtin, abs_builtin): Perform constant
139         folding on the resulting tree.
140         (java_build_function_call_expr): Likewise, perform constant
141         folding on the resulting tree.
142         (initialize_builtins): The NULL creators are now allowed in
143         the java_builtins table, which is now terminated by an entry
144         with builtin_code == END_BUILTINS.
145         (check_for_builtin): Likewise.  If the matching creator is
146         NULL, construct the call using java_build_function_call_expr
147         directly with the decl for the corresponding builtin_code.
148
149 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
150
151         * win32-host.c: Normalize copyright boilerplate.
152
153 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
154
155         * parse.y (print_int_node): Use string concatentation on
156         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
157         function calls into one.
158
159 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
160
161         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
162         fatal_io_error with calls to fatal_error; add ": %m" to the end of
163         all the affected error messages.
164
165 2003-05-13  Richard Henderson  <rth@redhat.com>
166
167         * class.c (layout_class_method): Set DECL_EXTERNAL.
168         * decl.c (java_mark_decl_local, java_mark_class_local): New.
169         * java-tree.h (java_mark_class_local): Declare.
170         * jcf-parse.c (parse_class_file): Use it.
171         * parse.y (java_expand_classes): Likewise.
172
173 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
174
175         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
176         * lex.h: #include input.h.
177         * jv-scan.c (input_filename): Remove.
178
179 2003-05-02  Tom Tromey  <tromey@redhat.com>
180
181         PR java/10491:
182         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
183         (handle_inner_classes): New function.
184
185 2003-05-01  Tom Tromey  <tromey@redhat.com>
186
187         PR java/10459:
188         * parse.y (finish_for_loop): Do nothing if update expression is a
189         EXPR_WFL_NODE wrapping nothing.
190         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
191
192 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
193
194         * lex.h (input_lineno): Remove declaration.
195         * parse-scan.y: #include input.h.
196         (input_filename): Remove declaration.
197         (input_location): Add definition.
198         (input_line): Remove definition.
199
200 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
201
202         * lex.h (lineno): Rename to ...
203         (input_line): ... here
204         * parse-scan.y (lineno): Rename to ...
205         (input_line): ... here.
206         (reset_report): Rename lineno to input_line.
207         * check-init.c (check_init): Likewise.
208         * class.c (push_class): Likewise.
209         * decl.c (complete_start_java_method, end_java_method): Likewise.
210         * expr.c (expand_byte_code): Likewise.
211         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
212         * jcf-write.c (generate_bytecode_insns): Likewise.
213         * lex.c (java_init_lex, java_allocate_new_line,
214         do_java_lex): Likewise.
215         * parse.h (YYNOT_TWICE): Likewise.
216         * parse.y (empty_statement, expression_statement,
217         java_pop_parser_context, java_parser_context_save_global,
218         yyerror, register_fields, method_header, safe_layout_class,
219         find_in_imports_on_demand, create_artificial_method,
220         source_end_java_method, start_complete_expand_method,
221         build_thisn_assign, java_complete_lhs,
222         maybe_absorb_scoping_block): Likewise.
223
224 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
225
226         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
227         '/' when computing java source filename
228
229 2003-04-13  Tom Tromey  <tromey@redhat.com>
230
231         * gjavah.c (print_c_decl): Indentation fix.
232
233 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
234
235         * class.c (make_field_value, make_method_value, get_dispatch_table)
236         (make_class_data, emit_offset_symbol_table)
237         * constants.c (build_constants_constructor)
238         * java-tree.h (START_RECORD_CONSTRUCTOR)
239         * parse.y (maybe_build_array_element_wfl):
240         Use build_constructor.
241
242 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
243
244         PR java/10253:
245         * parse.y (string_convert_int_cst): Always use at least one digit
246         in string conversion. Remove ASCII dependence.
247         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
248
249 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
250
251         * Make-lang.in: added win32-host.c
252         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
253         resolves to open() on non-Win32 platforms and
254         Win32-specific jcf_open_exact_case() on Win32
255         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
256         when trying .java and .class files
257         * win32-host.c: added to repository. Defines
258         Win32-specific jcf_open_exact_case()
259
260 2003-04-10  Andrew Haley  <aph@redhat.com>
261
262         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
263         (maybe_free_localvar): Renamed from localvar_free.
264         Add new arg, really.
265         (generate_bytecode_insns): Set new variable, jsrs.
266         Only free local vars if no jsr insns have been emittted.
267         Call maybe_free_localvar, not localvar_free.
268
269 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
270
271         * gcj.texi: Remove @ at start of file.
272
273 2003-03-25  Tom Tromey  <tromey@redhat.com>
274
275         * parse.y (create_interface): Call CHECK_DEPRECATED.
276
277 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
278
279         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
280
281 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
282
283         * javaop.h (jfloat, jdouble): Make them structures mirroring
284         the bit fields of IEEE float and double respectively.
285         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
286         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
287         (union Word, union DWord): Delete.
288         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
289
290         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
291         D_NAN_MASK): Delete.
292         (jni_print_float, jni_print_double): New.  Generate
293         hexadecimal floating constants.
294         (print_field_info): Use jni_print_float/double.
295
296         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
297         finite floating point numbers for output; special case
298         non-finite floats.
299
300 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
301
302         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
303         Replace 0 and 1 with true and false in return statements.
304
305 2003-03-19  Tom Tromey  <tromey@redhat.com>
306
307         * lex.c (do_java_lex): Renamed from java_lex.
308         (java_lex): New function.
309         Include timevar.h.
310
311 2003-03-13  Tom Tromey  <tromey@redhat.com>
312
313         * parse.y (resolve_inner_class): Error if qualifier is a primitive
314         type.
315
316 2003-03-04  Andrew Haley  <aph@redhat.com>
317
318         * gjavah.c (is_first_data_member): New global variable.
319         (print_c_decl): If it's the first data member, align it as the
320         superclass.
321         (process_file): Set is_first_data_member.
322
323 2003-03-11  Tom Tromey  <tromey@redhat.com>
324
325         * parse.y (resolve_field_access): Initialize class if field is
326         found in another static field.
327         * expr.c (build_class_init): Don't optimize out initialization of
328         implemented interface.
329
330 2003-03-11  Andrew Haley  <aph@redhat.com>
331
332         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
333         warning.
334
335 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
336
337         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
338         and DIR_SEPARATOR_2 for a target.
339         Correct minor typos.
340
341         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
342         and DIR_SEPARATOR_2 for a target into account.
343
344 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
345
346         * lang.c (java_init): Update prototype, move code to java_post_options.
347         (java_post_options): Similarly.
348
349 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
350
351         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
352         compare file name components depending on the case-sensitivity
353         or otherwise of the host file system.
354
355         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
356         "strcmp" to compare file name components.
357         Use IS_DIR_SEPARATOR instead of comparing directly against
358         DIR_SEPARATOR.
359         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
360         comparing directly against DIR_SEPARATOR.
361
362 2003-03-04  Tom Tromey  <tromey@redhat.com>
363
364         * Make-lang.in (java.tags): New target.
365
366 2003-03-01  Roger Sayle  <roger@eyesopen.com>
367
368         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
369         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
370
371 2003-03-01  Tom Tromey  <tromey@redhat.com>
372
373         * parse.y (jdep_resolve_class): Only check deprecation if we found
374         a decl.
375
376 2003-02-28  Tom Tromey  <tromey@redhat.com>
377
378         PR java/9695:
379         * class.c (maybe_layout_super_class): Always pass a WFL to
380         do_resolve_class.
381         * parse.y (do_resolve_class): Updated comment to explain
382         parameters.
383
384 2003-02-26  Tom Tromey  <tromey@redhat.com>
385
386         * jcf-write.c (generate_classfile): Check whether class is
387         deprecated before writing attribute count.
388
389 2003-02-25  Roger Sayle  <roger@eyesopen.com>
390
391         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
392         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
393
394 2003-02-23  Tom Tromey  <tromey@redhat.com>
395
396         * lang-options.h: Added -Wdeprecated.
397         * gcj.texi (Warnings): Document -Wdeprecated.
398         * java-tree.h (flag_deprecated): Declare.
399         * lang.c (lang_W_options): Added deprecated.
400         (flag_deprecated): New global.
401         * chartables.h: Rebuilt.
402         * gen-table.pl (process_one): Look at whitespace.
403         (print_tables): Define LETTER_SPACE, LETTER_MASK.
404         * parse.h (CLEAR_DEPRECATED): New macro.
405         (CHECK_DEPRECATED_NO_RESET): New macro.
406         * jcf-parse.c (handle_deprecated): New function.
407         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
408         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
409         * parse.y (resolve_type_during_patch): Check deprecation.
410         (jdep_resolve_class): Likewise.
411         (process_imports): Likewise.
412         (resolve_expression_name): Likewise.
413         (check_deprecation): Strip arrays from decl.  Check
414         flag_deprecated.
415         (patch_method_invocation): Also check the particular constructor
416         for deprecation.
417         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
418         * jcf-write.c (append_deprecated_attribute): New function.
419         (generate_classfile): Generate deprecated attribute when
420         appropriate.
421         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
422         (java_lex) [case '*']: Simplify logic.
423         (java_start_char_p): Use LETTER_MASK.
424         (java_part_char_p): Likewise.
425         (java_space_char_p): New function.
426
427 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
428
429         Change base class access representation.
430         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
431         (add_interface_do): Likewise.
432
433 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
434
435         * decl.c (java_init_decl_processing): Change
436         soft_lookupjnimethod_node to reflect the change in
437         signature of _Jv_LookupJNIMethod in libjava/jni.cc
438         * expr.c (build_jni_stub): Calculate and pass the size
439         on the stack of the arguments to a JNI function. Use
440         new target macro MODIFY_JNI_METHOD_CALL to allow a
441         target to modify the call to a JNI method.
442
443 2003-02-08  Roger Sayle  <roger@eyesopen.com>
444
445         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
446         instead of basename to avoid compiler warnings on Tru64.
447
448 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
449
450         * gcj.texi: Update to GFDL 1.2.
451
452 2003-01-31  Andrew Haley  <aph@redhat.com>
453
454         * parse.y (java_expand_classes): Scan the whole class list looking
455         for access methods that haven't yet been expanded.
456
457 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
458
459         Fix for java/4269:
460
461         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
462         to fix bootstrap on sparc-unknown-netbsdelf1.5.
463         * jcf-parse.c: Likewise.
464
465 2003-01-31  Mark Wielaard  <mark@klomp.org>
466
467         * gjavah.c (throwable_p): Allocate 1 more byte for string.
468
469 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
470
471         * class.c (make_class): Use BINFO_ELTS.
472         (set_super_info): Likewse.
473         (add_interface_do): Likewise.
474
475 2003-01-30  Tom Tromey  <tromey@redhat.com>
476
477         * jcf-parse.c (read_class): Update identifier's class value if it
478         changed during parsing.
479
480 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
481
482         * Make-lang.in (po-generated): Find the targets in $(parsedir).
483         Propagate change to all other rules as required.
484         (java/parse-scan.o): Add explicit dependency on
485         $(parsedir)/java/parse-scan.c .
486
487 2003-01-29  Tom Tromey  <tromey@redhat.com>
488
489         * parse.y (patch_assignment): Only transform the rhs of an
490         assignment when compiling to native.
491
492 2003-01-28  Tom Tromey  <tromey@redhat.com>
493
494         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
495
496 2003-01-28  Tom Tromey  <tromey@redhat.com>
497
498         * lex.c (java_lex): Don't include UEOF as part of token.
499         (java_read_unicode): Error if \u sequence prematurely terminated.
500
501 2003-01-27  Tom Tromey  <tromey@redhat.com>
502
503         * parse.y (java_check_regular_methods): Check for construct after
504         checking types in throws clause.
505
506 2003-01-24  Tom Tromey  <tromey@redhat.com>
507
508         * class.c (build_static_field_ref): Only a String or numeric field
509         can fold to a constant.
510
511 2003-01-23  Tom Tromey  <tromey@redhat.com>
512
513         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
514         file name in resource buffer.
515
516 2003-01-23  Tom Tromey  <tromey@redhat.com>
517
518         * expr.c (build_known_method_ref): Use method's context to find
519         method table index.
520
521 2003-01-23  Tom Tromey  <tromey@redhat.com>
522
523         * constants.c (set_constant_entry): Allocated cleared memory.
524
525 2003-01-22  Tom Tromey  <tromey@redhat.com>
526
527         * java-tree.h: Don't use PARAMS.
528         * resource.c: Add prototypes for all functions.
529         (write_resource_constructor): Use `const char *' to avoid
530         warning.
531
532 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
533
534         * jcf-parse.c (process_zip_dir): Remove unused variable.
535
536 2003-01-22  Tom Tromey  <tromey@redhat.com>
537
538         * expr.c (build_invokeinterface): Abort if method's context is not
539         an interface.
540
541 2003-01-22  Tom Tromey  <tromey@redhat.com>
542
543         * gcj.texi (Input and output files): Mention non-class entries.
544         * decl.c (java_init_decl_processing): Call
545         init_resource_processing.
546         * java-tree.h (compile_resource_data, write_resource_constructor,
547         compile_resource_file, init_resource_processing): Declare.
548         * config-lang.in (gtfiles): Added resource.c.
549         * Make-lang.in (gt-java-resource.h): New target.
550         (JAVA_OBJS): Added resource.o.
551         (java/resource.o): New target.
552         * resource.c: New file.
553         * class.c (compile_resource_file): Moved to resource.c.
554         (registerResource_libfunc): Likewise.
555         (utf8_decl_list): Mark with GTY; now static.
556         * jcf-parse.c (classify_zip_file): New function.
557         (parse_zip_file_entries): Use it; compile .properties files.
558         (process_zip_dir): Use classify_zip_file and compute_class_name.
559         Don't write class name into zip directory.
560         (java_parse_file): Call write_resource_constructor.
561         (compute_class_name): New function.
562         * jcf-io.c (read_zip_member): Reindented.
563
564 2003-01-21  Tom Tromey  <tromey@redhat.com>
565
566         * class.c (supers_all_compiled): New function.
567         (make_class_data): Use it.
568
569 2003-01-21  Tom Tromey  <tromey@redhat.com>
570
571         * parse.y (method_header): Native method can't be strictfp.
572         No method can be transient or volatile.
573
574 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
575
576         Make-lang.in (jvspec.o-warn): Add -Wno-error.
577
578 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
579
580         * check-init.c: Fix comment typos.
581         * class.c: Likewise.
582         * constants.c: Likewise.
583         * decl.c: Likewise.
584         * except.c: Likewise.
585         * expr.c: Likewise.
586         * java-except.h: Likewise.
587         * java-tree.h: Likewise.
588         * javaop.h: Likewise.
589         * jcf-dump.c: Likewise.
590         * jcf-io.c: Likewise.
591         * jcf-parse.c: Likewise.
592         * jcf-write.c: Likewise.
593         * lang.c: Likewise.
594         * mangle.c: Likewise.
595         * typeck.c: Likewise.
596         * verify.c: Likewise.
597
598 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
599
600         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
601         * jcf-write.c: Include "tm_p.h".
602
603 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
604
605         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
606
607 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
608
609         * builtins.c (java_build_function_call_expr): Renamed from
610         build_function_call_expr.  All callers changed.
611
612         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
613         * jcf-parse.c: Include tm_p.h.
614
615         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
616         warning.
617
618 2003-01-14  Tom Tromey  <tromey@redhat.com>
619
620         * class.c (make_class_data): Check that super is compiled before
621         building class reference to it.
622
623 2003-01-14  Andrew Haley  <aph@redhat.com>
624
625         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
626         varargs function -- correct.
627
628 2003-01-14  Andrew Haley  <aph@redhat.com>
629
630         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
631
632 2003-01-14  Andrew Haley  <aph@redhat.com>
633
634         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
635         varargs function -- correct.
636
637         * parse.y (patch_assignment): Copy the rhs of an assignment into a
638         temporary if the RHS is a reference.
639
640 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
641
642         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
643         * keyword.h: Regenerated.
644
645         * All Files: Convert to ISO C style function definitions.
646
647 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
648
649         * parse.y (check_pkg_class_access): ANSIfy definition.
650
651 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
652
653         * decl.c, parse-scan.y, parse.y: Don't cast return value of
654         xmalloc et al.
655
656         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
657
658 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
659
660         Merge from pch-branch:
661
662         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
663
664         * Make-lang.in (java/gjavah.o): Update dependencies.
665         * gjavah.c: Include ggc.h.
666
667         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
668
669         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
670         (JCFDUMP_OBJS): Add ggc-none.o.
671         (java/jcf-dump.o): Depend on GGC_H.
672         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
673         CPool substructures.
674         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
675         * jcf-dump.c: Include ggc.h.
676
677         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
678
679         * jcf.h (union cpool_entry): New.
680         (struct CPool): Use gengtype to mark.  Change field 'data' to be
681         an array of unions.
682         (struct JCF): Use gengtype to mark.
683         (CPOOL_UINT): Update for new cpool_entry type.
684         (CPOOL_USHORT1): Likewise.
685         (CPOOL_USHORT2): Likewise.
686         (CPOOL_FINISH): Use GC to free cpool subfields.
687         * parse.h (struct parser_ctxt): Mark field current_jcf.
688         * lex.c (java_init_lex): Use GC to allocate struct JCF.
689         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
690         (main_jcf): Use gengtype to mark.
691         (ggc_mark_jcf): Delete.
692         (get_constant): Update for new cpool_entry type.
693         (give_name_to_class): Likewise.
694         (get_class_constant): Likewise.
695         (init_outgoing_cpool): Use GGC to allocate struct CPool.
696         (java_parse_file): Use GGC to allocate struct JCF.
697         (init_jcf_parse): Don't call ggc_add_root.
698         * jcf-reader.c (jcf_parse_constant_pool): Update for new
699         cpool_entry type.
700         * java-tree.h (current_jcf): Use gengtype to mark.
701         (CPOOL_UTF): Update for new cpool_entry type.
702         (outgoing_cpool): Use gengtype to mark.
703         (struct lang_type): GC struct JCF and struct CPool.
704         * config-lang.in (gtfiles): Add jcf.h.
705         * constants.c (find_tree_constant): New.
706         (set_constant_entry): Allocate cpool subfields using GGC.  Update
707         for new cpool_entry type.
708         (find_constant1): Update for new cpool_entry type.
709         (find_constant2): Likewise.
710         (find_utf8_constant): Use find_tree_constant.
711         (find_class_or_string_constant): Remove unnecessary cast to jword.
712         Update for new cpool_entry type.
713         (count_constant_pool_bytes): Update for new cpool_entry type.
714         (write_constant_pool): Likewise.
715         (alloc_name_constant): Use find_tree_constant.
716         (build_constants_constructor): Update for new cpool_entry type.
717
718         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
719
720         * parse.y (mark_parser_ctxt): Delete.
721         (goal): Don't use ggc_add_root.
722         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
723         (java_pop_parser_context): Let GC free parser_ctxt.
724         (java_parser_context_resume): Likewise.
725         * parse.h (struct parser_ctxt): Use gengtype to mark.
726         (ctxp): Likewise.
727         (ctxp_for_generation): Likewise.
728         * lex.h (struct java_lc_s): Mark for gengtype.
729         (java_lexer): Rearrange for gengtype.
730         * config-lang.in (gtfiles): Add lex.h, parse.h.
731
732 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
733
734         * All Files: Remove PARAMS macro.
735
736         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
737         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
738         `__STDC__' macros.
739
740         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
741         VA_CLOSE.
742
743 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
744
745         * Make-lang.in (java.install-common, java.uninstall,
746         java.install-info, java.install-man): Prepend $(DESTDIR)
747         to destination paths in all (un)installation commands.
748         (java.install-common): Rewrite $(LN) command to support
749         DESTDIR with "ln" as well as with "ln -s".
750
751 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
752
753         * java-tree.h: Protect against multiple inclusion.
754
755 2003-01-07  Tom Tromey  <tromey@redhat.com>
756
757         * class.c (add_assume_compiled): Don't adjust parent if we're
758         already at the root of tree.
759
760 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
761
762         * lang.c (dump_compound_expr): Prototype.
763
764 2003-01-03  Tom Tromey  <tromey@redhat.com>
765
766         Fix for PR java/8712:
767         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
768         when simply checking against `null'.
769
770 2003-01-03  Tom Tromey  <tromey@redhat.com>
771
772         * gcj.texi (Standard Properties): Document http.proxyHost and
773         http.proxyPort.
774
775         * gcj.texi (GNU Classpath Properties): Document new properties.
776
777 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
778
779         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
780         java/lang-options.h, java/mangle.c, java/mangle_name.c,
781         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
782
783 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
784
785         * Make-lang.in, boehm.c, buffer.c,
786           buffer.h, builtins.c, class.c,
787           config-lang.in, constants.c,
788           convert.h, decl.c, except.c,
789           expr.c, java-except.h,
790           java-tree.h, javaop.def,
791           jcf-parse.c, jcf-write.c,
792           jv-scan.c, jvgenmain.c,
793           jvspec.c, keyword.gperf,
794           keyword.h, lang-options.h,
795           lang-specs.h, lang.c, lex.c,
796           lex.h, mangle.c, mangle_name.c,
797           parse-scan.y, parse.h, parse.y,
798           typeck.c, verify.c, xref.c,
799           xref.h: Replace "GNU CC" with
800           "GCC" in the copyright header.
801
802         * check-init.c, gjavah.c, javaop.h,
803           jcf-depend.c, jcf-dump.c, jcf-io.c,
804           jcf-path.c, jcf-reader.c, jcf.h,
805           zextract.c, zipfile.h: These files are
806           "part of GCC". Also say "GCC" not "GNU CC".
807
808 2002-12-30  DJ Delorie  <dj@redhat.com>
809
810         * Make-lang.in: Protect against texi2pod/pod2man failing.
811
812 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
813
814         * gcj.texi: Use @copying.
815
816 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
817
818         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
819         print_cxx_classname.
820         (print_cxx_classname): Add add_scope parameter.
821         (print_class_decls): Do not emit a semicolon after the extern
822         "Java" block.
823         (process_file): Adjust calls to print_cxx_classname.
824
825 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
826
827         * gcj.texi: Include Cover Texts in man page.
828
829 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
830
831         * class.c (build_static_field_ref): Check FIELD_FINAL.
832
833         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
834         instead of current_constant_pool_data_ref.
835         * java-tree.h (current_constant_pool_data_ref): Undefine.
836         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
837         * jcf-parse.c (init_outgoing_cpool): Don't initialize
838         current_constant_pool_data_ref.
839
840         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
841         not build_internal_class_name.
842
843         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
844         Use it when class ref isn't certain to be compiled.
845
846 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
847
848         * gcj.texi: Include gcc-common.texi.
849         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
850         $(srcdir)/doc/include/gcc-common.texi.
851
852 2002-12-22  Anthony Green  <green@redhat.com>
853
854         * gcj.texi (Limitations): Add note about org.xml.sax and
855         org.w3c.dom.
856
857 2002-12-20  Tom Tromey  <tromey@redhat.com>
858
859         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
860         where minimum case value is Integer.MIN_VALUE.
861         Fixes PR java/8955.
862
863 2002-12-18  Andrew Haley  <aph@redhat.com>
864
865         * parse.y (patch_invoke): Force evaluation order when `check' is
866         set.  For PR libgcj/8945.
867
868 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
869
870         * gcj.texi: Change version number to 3.4.
871
872 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
873         Andrew Haley <aph@redhat.com>
874
875         * parse.y (source_end_java_method): Remove custom encoding of line
876         numbers for a function decl before passing it to the back end.
877
878 2002-12-03  Andrew Haley  <aph@redhat.com>
879
880         * class.c (make_class_data): New field, "chain".
881         * decl.c (java_init_decl_processing): Likewise.
882
883 2002-12-02  Tom Tromey  <tromey@redhat.com>
884
885         For PR java/8740:
886         * parse.y (do_resolve_class): Handle qualified name via
887         recursion.
888
889 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
890
891         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
892         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
893         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
894         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
895         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
896         Include coretypes.h and tm.h.
897         * Make-lang.in: Update dependencies.
898
899 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
900
901         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
902
903 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
904
905         * jcf-reader.c: Don't expand JCF_readu4 inside the
906         expansion of JCF_SKIP.
907
908 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
909
910         * jcf-reader.c: Don't expand JCF_readu4 inside the
911         expansion of JCF_SKIP.
912
913 2002-11-22  Tom Tromey  <tromey@redhat.com>
914
915         * parse.y (patch_binop): Cast right hand side of shift expression
916         to `int'.  Fixes PR java/8676.
917
918 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
919             Andrew Haley <aph@redhat.com>
920
921         * gcc/java/jcf-write.c (write_classfile): Remove target
922         class file, if it exists, before renaming the temporary
923         class file to it.
924
925 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
926
927         * jvspec.c (lang_specific_spec_functions): New.
928
929 2002-11-18  Tom Tromey  <tromey@redhat.com>
930
931         Fix for PR java/7912:
932         * expr.c (can_widen_reference_to): Allow cast of array to
933         Cloneable or Serializable.
934         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
935         (java_io_serializable_identifier_node): Likewise.
936         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
937         (valid_ref_assignconv_cast_p): Use new identifier nodes.
938         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
939         java_io_serializable.
940         * decl.c (java_init_decl_processing): Initialize
941         java_lang_cloneable_identifier_node and
942         java_io_serializable_identifier_node.
943         (java_lang_cloneable_identifier_node): New global.
944         (java_io_serializable_identifier_node): Likewise.
945
946 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
947
948         * buffer.c: Remove unnecessary casts.
949         * check-init.c: Likewise.
950         * class.c: Likewise.
951         * constants.c: Likewise.
952         * decl.c: Likewise.
953         * except.c: Likewise.
954         * gjavah.c: Likewise.
955         * jcf-io.c: Likewise.
956         * jcf-parse.c: Likewise.
957         * jcf-path.c: Likewise.
958         * jvspec.c: Likewise.
959         * lang.c: Likewise.
960         * lex.c: Likewise.
961         * verify.c: Likewise.
962
963 2002-11-06  Tom Tromey  <tromey@redhat.com>
964
965         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
966         a JNI header.
967
968 2002-11-05  Tom Tromey  <tromey@redhat.com>
969
970         Fix for PR java/6388.
971         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
972         * java-tree.h (enum java_tree_index): New values
973         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
974         (decimal_int_max, decimal_long_max): New defines.
975         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
976         (error_if_numeric_overflow): Rewrote range checking.
977         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
978         decimal_long_max.
979
980 2002-11-02  Tom Tromey  <tromey@redhat.com>
981
982         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
983
984         * class.c (make_method_value): Put class name, not signature, into
985         `throws' field.  For PR java/8415.
986
987 2002-10-24  Tom Tromey  <tromey@redhat.com>
988
989         * gcj.texi (Invoking gij): Document --showversion.
990         (Standard Properties): java.library.path now set.
991
992 2002-10-23  Tom Tromey  <tromey@redhat.com>
993
994         * gjavah.c (decode_signature_piece): In JNI mode, print
995         `jobjectArray' when array depth is nonzero.
996         Fixes PR java/8296.
997
998 2002-10-15  Andrew Haley  <aph@redhat.com>
999
1000         * parse.y (patch_invoke): Call force_evaluation_order on a static
1001         arg list.
1002         (resolve_qualified_expression_name): Call force_evaluation_order
1003         on a arg list that is part of a Qualified Expression Name.
1004
1005         * lang.c (dump_compound_expr): New.
1006         (java_dump_tree): New.
1007
1008 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
1009
1010         * gcj.texi: Added item describing the GCJ runtime property
1011         "gnu.gcj.progname".
1012
1013 2002-10-15  Richard Henderson  <rth@redhat.com>
1014
1015         * jcf-parse.c (get_constant): Fix type warning.
1016
1017 2002-10-15  Andrew Haley  <aph@redhat.com>
1018
1019         * java-tree.h (java_inlining_merge_static_initializers): Declare.
1020         (java_inlining_map_static_initializers): Declare.
1021
1022 2002-10-14  Andrew Haley  <aph@redhat.com>
1023
1024         * tree-inline.c (remap_block): All local class initialization
1025         flags go in the outermost scope.
1026         (expand_call_inline): Call java_inlining_map_static_initializers.
1027         (expand_call_inline): Call java_inlining_merge_static_initializers.
1028         * java/lang.c (merge_init_test_initialization): New.
1029         (java_inlining_merge_static_initializers): New.
1030         (inline_init_test_initialization): New.
1031         (java_inlining_map_static_initializers): New.
1032
1033 2002-10-11  Mark Wielaard  <mark@klomp.org>
1034
1035         * gcj.texi (Compatibility): Add Limitations and Extensions section.
1036
1037 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1038
1039         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
1040
1041 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1042
1043         * parse.y (merge_string_cste): Add parentheses around & within |.
1044
1045 2002-10-08  Tom Tromey  <tromey@redhat.com>
1046
1047         * parse.y (variable_declarator_id): Simplify error path for
1048         array declarator error.  For PR java/8003.
1049
1050 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
1051
1052         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
1053         bug_report_url.
1054
1055 2002-10-08  Andrew Haley  <aph@redhat.com>
1056
1057         * parse.y (attach_init_test_initialization_flags): Check for
1058         error_mark_node.
1059
1060 2002-10-07  Anthony Green  <green@redhat.com>
1061
1062         * parse.y (merge_string_cste): Fix bug in string concatenation.
1063
1064 2002-10-03  Michael Koch  <konqueror@gmx.de>
1065
1066         * gcj.texi (Standard properties):
1067         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
1068
1069 2002-10-02  Roger Sayle  <roger@eyesopen.com>
1070
1071         PR optimization/6627
1072         * lang.c (java_init): If storing the vbit in function
1073         pointers, ensure that force_align_functions_log is atleast
1074         one to aid compatability with g++ vtables.
1075
1076 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
1077
1078         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
1079         foul of type-based aliasing.
1080
1081 2002-09-30  Anthony Green  <green@redhat.com>
1082
1083         * gcj.texi (Invoking jv-scan): Fix texinfo.
1084
1085 2002-09-28  Anthony Green  <green@redhat.com>
1086
1087         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
1088         (Code Generation): Add -fno-assert documentation.
1089         * jv-scan.c (flag_assert): New global.
1090         (options): Add assert option.
1091         (help): Add --no-assert documentation.
1092         * parse-scan.y (flag_assert): New global.
1093         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
1094         (flag_assert): New global.
1095         * java-tree.h (flag_assert): New global.
1096         * lex.c (java_lex): Obey flag_assert.
1097         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
1098         calling cc1.
1099
1100 2002-09-26  Andrew Haley  <aph@redhat.com>
1101
1102         * expr.c (build_java_array_length_access): Check for null pointer.
1103         * expr.c (expand_java_arrayload): Likewise.
1104
1105 2002-09-21  Richard Henderson  <rth@redhat.com>
1106
1107         * jcf-parse.c (get_constant): Decode from IEEE no matter
1108         what the target format.
1109
1110 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
1111
1112         * ChangeLog: Follow spelling conventions.
1113         * class.c: Likewise.
1114         * decl.c: Likewise.
1115         * expr.c: Likewise.
1116         * gjavah.c: Likewise.
1117         * java-tree.h: Likewise.
1118         * jcf-dump.c: Likewise.
1119         * jcf-parse.c: Likewise.
1120         * jvspec.c: Likewise.
1121         * lang.c: Likewise.
1122         * mangle.c: Likewise.
1123         * parse.y: Likewise.
1124
1125 2002-09-17  Tom Tromey  <tromey@redhat.com>
1126
1127         * lex.c (java_read_unicode_collapsing_terminators): Handle case
1128         where \r appears at EOF.  Fixes PR java/7950.
1129
1130 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1131
1132         * jvspec.c (lang_specific_driver): Remove unused variable.
1133
1134 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
1135
1136         * java-tree.h (union lang_tree_node): Add chain_next option.
1137
1138 2002-09-16  Richard Henderson  <rth@redhat.com>
1139
1140         * jcf-parse.c (get_constant): Runtime check for IEEE format;
1141         use new real.h interface.
1142         * jcf-write.c (find_constant_index): Use new real.h interface.
1143         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
1144
1145 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
1146
1147         * lang.c: Follow spelling conventions.
1148
1149 2002-09-11  Per Bothner  <per@bothner.com>
1150
1151         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
1152         constant to the type of the field.
1153         (java_complete_tree):  Remove now-redundant code.
1154
1155         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
1156
1157 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
1158
1159         For PR java/5794:
1160         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
1161         return label if a ret instruction for the jsr has been reached.
1162
1163 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
1164
1165         * parse.y (DIR_SEPARATOR): Don't define.
1166         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
1167
1168 2002-08-28  Andrew Haley  <aph@redhat.com>
1169
1170         * verify.c (verify_jvm_instructions): Allow exception handler
1171         inside code that is being protected, but generate a warning.
1172         * except.c (link_handler): Initialize `expanded' in new eh_range.
1173         (binding_depth, is_class_level, current_pc): Declare extern.
1174
1175 2002-09-01  Mark Wielaard <mark@klomp.org>
1176
1177         * gcj.texi: Add chapter about system properties.
1178         Fixed some typos.
1179
1180 2002-08-26  Tom Tromey  <tromey@redhat.com>
1181
1182         * parse.y (try_builtin_assignconv): Allow narrowing primitive
1183         conversion if RHS_TYPE is byte, short, or char.
1184
1185 2002-08-22  Tom Tromey  <tromey@redhat.com>
1186
1187         * gcj.texi (Invoking gij): Document -cp and -classpath.
1188
1189 2002-08-21  Tom Tromey  <tromey@redhat.com>
1190
1191         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
1192         $(prefix)/share.  For PR libgcj/7633.
1193
1194         For PR java/6005 and PR java/7611:
1195         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
1196         (java_can_use_bit_fields_p): New function.
1197
1198 2002-08-16  Tom Tromey  <tromey@redhat.com>
1199
1200         * gcj.texi (Class Initialization): Mention class initialization of
1201         arrays.
1202
1203 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
1204
1205         * Make-lang.in (java-tree-inline.o): New.
1206         (JAVA_OBJS): Add java-tree-inline.o.
1207         * parse.y (source_end_java_method): Call java_optimize_inline.
1208         (java_expand_method_bodies): Save method's tree in
1209         DECL_SAVED_TREE.
1210         (add_stmt_to_compound): Keep track of the number of statments.
1211         * lang.c (java_init): Enable flag_inline_trees.
1212         (java_post_options): If flag_inline_functions is on, enable
1213         flag_inline_trees instread.
1214         (decl_constant_value): New.
1215         (java_tree_inlining_walk_subtrees): New.
1216         * java-tree.h (DECL_NUM_STMTS): New macro.
1217         (java_optimize_inline): Declare.
1218         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
1219         Handle a LABEL_EXPR.
1220         * decl.c (build_result_decl): If we already have a DECL_RESULT
1221         don't make another.
1222         (dump_function): New.
1223         (java_optimize_inline): New.
1224         (dump_function): New.
1225
1226 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
1227
1228         For PR java/7483:
1229         * parse.y (build_assertion): Invert return from
1230         desiredAssertionStatus.
1231
1232 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1233
1234         * jcf-write.c (get_access_flags): Return correct access flags for
1235         private and protected inner classes.
1236
1237 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1238
1239         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
1240
1241 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
1242
1243         * mangle_name.c: Don't include obstack.h twice.
1244         * xref.c: Don't include obstack.h.
1245
1246 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
1247
1248         * class.c: (permanent_obstack): Delete declaration.
1249         * constants.c: (permanent_obstack): Delete declaration.
1250         * except.c: (permanent_obstack): Delete declaration.
1251         * expr.c: (permanent_obstack): Delete declaration.
1252         * jcf-parse.c: (permanent_obstack): Delete declaration.
1253         (saveable_obstack): Delete declaration.
1254         * parse.h: (permanent_obstack): Delete declaration.
1255         * typeck.c: (permanent_obstack): Delete declaration.
1256
1257 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
1258
1259         * gcj.texi (version-gcc): Increase to 3.3.
1260
1261 2002-07-22  Tom Tromey  <tromey@redhat.com>
1262
1263         * lex.c (java_lex): Check for `e' or `E' after 0.
1264
1265 2002-07-21  Richard Henderson  <rth@redhat.com>
1266
1267         * lang.c (java_unsafe_for_reeval): New.
1268         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
1269
1270 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
1271
1272         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
1273         (jcf_path_init): Use GET_ENVIRONMENT.
1274
1275 2002-07-10  Roger Sayle  <roger@eyesopen.com>
1276             Zack Weinberg <zack@codesourcery.com>
1277
1278         * builtins.c (initialize_builtins): Remove defines that
1279         handled C/C++ specific junk hereby removed from builtins.def.
1280
1281 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
1282
1283         * lang.c (java_post_options): Update prototype.
1284
1285 2002-07-05  Roger Sayle  <roger@eyesopen.com>
1286
1287         * builtins.c (initialize_builtins): Ignore the additional
1288         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
1289         the builtins.def file.
1290
1291 2002-07-01  Tom Tromey  <tromey@redhat.com>
1292
1293         For PR libgcj/7073:
1294         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
1295         specially.
1296
1297 2002-07-01  Roger Sayle  <roger@eyesopen.com>
1298
1299         * java/decl.c (builtin_function): Accept additional parameter.
1300         (java_init_decl_processing): Pass an additional NULL_TREE
1301         argument to builtin_function.
1302
1303 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
1304
1305         * gcj.texi: Fixed gcj invocation example so that it compiles.
1306
1307 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1308
1309         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
1310         * parse.y (mark_parser_ctxt): Likewise.
1311         (check_modifiers, declare_local_variables): Avoid incorrect
1312         hardcoded constant 10.
1313
1314         * lex.c (java_read_char): Avoid "comparison is always true"
1315         warning.
1316
1317 2002-06-25  Andreas Schwab  <schwab@suse.de>
1318
1319         * expr.c (JSR): Avoid undefined operation on PC.
1320
1321 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1322
1323         * decl.c (clear_binding_level): Const-ify.
1324
1325 2002-06-13  Akim Demaille  <akim@epita.fr>
1326
1327         * parse.y (class_declaration, interface_declaration): Make sure
1328         all their rules have an action, in order to avoid meaningless `$$
1329         = $1' and their type clashes.
1330
1331 2002-06-11  Tom Tromey  <tromey@redhat.com>
1332
1333         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
1334         * parse-scan.y (statement_without_trailing_substatement): Added
1335         assert_statement.
1336         (assert_statement): New rule.
1337         * java-tree.h (struct lang_type) [assertions]: New field.
1338         (TYPE_USES_ASSERTIONS): New macro.
1339         (CLASS_USES_ASSERTIONS): Likewise.
1340         (FIELD_SYNTHETIC): New define.
1341         * lex.c (java_lval;): Added ASSERT_TK.
1342         * parse.y (ASSERT_TK): Added.
1343         (statement_without_trailing_substatement): Added assert_statement.
1344         (assert_statement): New rule.
1345         (build_assertion): New function.
1346         (maybe_generate_pre_expand_clinit): Create and initialize
1347         $assertionsDisabled.
1348         (lookup_package_type): Removed decl.
1349         * keyword.h: Rebuilt.
1350         * keyword.gperf (assert): New token.
1351
1352 2002-06-10  Akim Demaille  <akim@epita.fr>
1353
1354         * parse.y (interface_type_list, class_member_declaration)
1355         (unary_expression_not_plus_minus): Remove duplicate %type.
1356         Whitespace changes.
1357
1358 2002-06-09  Tom Tromey  <tromey@redhat.com>
1359
1360         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
1361
1362         * parse.y (method_header): Give error message in all cases.
1363         Fixes PR java/6865.
1364
1365 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1366
1367         Don't use RTL inlining. Fix for PR java/6820.
1368         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
1369         (flag_really_inline): New.
1370         (java_decode_option): Set flag_really_inline if -finline-functions
1371         is seen.
1372         (java_post_options): New function. Turn off inlining unless
1373         flag_really_inline is set.
1374
1375 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1376
1377         * gjavah.c (throwable_p): Accept argument as either a classname or
1378         signature fragment. Create null-terminated classname string for super
1379         when calling itself recursively.
1380         (decode_signature_piece): Skip first character from class name
1381         signature when calling throwable_p.
1382
1383 2002-06-08  H.J. Lu  (hjl@gnu.org)
1384
1385         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
1386
1387 2002-06-04  Tom Tromey  <tromey@redhat.com>
1388
1389         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
1390
1391 2002-06-04  Michael Koch  <konqueror@gmx.de>
1392
1393         * gcj.texi (Input Options): Fixed typo.
1394
1395 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
1396
1397         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
1398         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
1399         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
1400         and all now-pointless local variables.  Rename other local
1401         variables to reflect their not being handles.
1402
1403         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
1404         #if JCF_USE_STDIO blocks.
1405
1406         * parse.y: Add missing semicolon at end of rule.
1407
1408 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
1409
1410         * check-init.c (attach_initialized_static_class): Delete, unused.
1411         * parse.y: Use htab_t instead of struct hashtable, update
1412         all uses.
1413         * java-tree.h: Include hashtab.h instead of hash.h.
1414         (struct lang_decl_func): Use htab_t, set up for gengtype.
1415         (struct init_test_hash_entry): Delete.
1416         (struct treetreehash_entry): New.
1417         (java_treetreehash_find): New
1418         (java_treetreehash_new): New prototype.
1419         (java_treetreehash_create): New prototype.
1420         (java_mark_tree): Delete prototype.
1421         (java_hash_hash_tree_node): Delete prototype.
1422         (java_hash_compare_tree_node): Delete prototype.
1423         (attach_initialized_static_class): Delete prototype.
1424         * expr.c (build_class_init): Update to use java_treetreehash
1425         functions.
1426         (java_expand_expr): Update to use htab_t.
1427         (emit_init_test_initialization): Likewise.
1428         * decl.c (java_mark_tree): Delete.
1429         * class.c (init_test_hash_newfunc): Delete.
1430         (java_hash_hash_tree_node): Delete.
1431         (java_hash_compare_tree_node): Delete.
1432         (add_method_1): Update to use java_treetreehash functions.
1433         (JAVA_TREEHASHHASH_H): New macro.
1434         (java_treetreehash_hash): New function.
1435         (java_treetreehash_compare): New function.
1436         (java_treetreehash_find): New function.
1437         (java_treetreehash_new): New function.
1438         (java_treetreehash_create): New function.
1439         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
1440
1441         * Make-lang.in (java/parse.o): Depend on debug.h.
1442         * java-tree.h (struct lang_identifier): Use gengtype.
1443         (union lang_tree_node): New.
1444         (struct lang_decl_func): Use gengtype.
1445         (struct lang_decl_var): Likewise.
1446         (struct lang_decl): Likewise.
1447         * parse.y: Include debug.h.
1448         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
1449
1450         * lang.c (struct language_function): New dummy structure.
1451
1452         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
1453         descriminator for DECL_LANG_SPECIFIC.
1454         (struct lang_decl_func): Rename from struct lang_decl.
1455         (enum lang_decl_desc): New.
1456         (struct lang_decl): Make it a union.  Update all the accessor macros.
1457         (struct lang_type): Use gengtype.
1458         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
1459         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
1460         are now the same size.
1461         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
1462         use discriminator to mark DECL_LANG_SPECIFIC.
1463
1464         * Make-lang.in (gt-java-builtins.h): New rule.
1465         (java/builtins.o): Add dependency on gt-<filename>.h.
1466         * builtins.c: Use gengtype for roots.
1467         (union string_or_tree): Use gengtype.
1468         (struct builtin_record): Use gengtype.
1469         * config-lang.in (gtfiles): Add builtins.c.
1470
1471         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
1472         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
1473         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
1474         gt-java-parse.h, gtype-java.h): Add rules to generate.
1475         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
1476         (class.o): Add dependency on gt-*.h.
1477         (constants.o): Likewise.
1478         (decl.o): Likewise.
1479         (expr.o): Likewise.
1480         (jcf-parse.o): Likewise.
1481         (jcf-write.o): Likewise.
1482         (lang.o): Likewise.
1483         * config-lang.in (gtfiles): New.
1484         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
1485         * constants.c: Replace uses of ggc_add_* with GTY markers.
1486         Include gt-*.h.
1487         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
1488         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
1489         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
1490         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
1491         Include gt-*.h.
1492         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
1493         Include gt-*.h.
1494         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
1495         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
1496         gt-*.h.
1497         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
1498         Include gtype-java.h.
1499
1500 2002-06-02  Tom Tromey  <tromey@redhat.com>
1501
1502         Fix for PR java/5913:
1503         * parse.y (patch_binop): Call patch_string on op1.
1504
1505 2002-06-02  Tom Tromey  <tromey@redhat.com>
1506
1507         Fix for PR java/1343, PR java/6336:
1508         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
1509         formatting.  Changed return type.
1510         (anonymous_class_counter): Moved to top of file.
1511         (maybe_make_nested_class_name): Append number to class name for
1512         function-local classes.
1513
1514 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
1515
1516         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
1517         * Make-lang.in: Update dependency lists.
1518
1519 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
1520
1521         * gjavah.c (throwable_p): Do not free the name of the class after
1522         passing it to find_class.
1523         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
1524         * jcf-io.c (dirent.h): Include it.
1525         (fnmatch.h): Likewise.
1526         (compare_path): New function.
1527         (java_or_class_file): Likewise.
1528         (memoized_dirlist_entry): New type.
1529         (memoized_dirlist_lookup_eq): New function.
1530         (memoized_dirlists): New variable.
1531         (caching_stat): New function.
1532         (memoized_class_lookup_eq): New function.
1533         (memoized_class_lookups): Likewise.
1534         (find_class): Use memoized_class_lookups and caching_stat.
1535         * jcf.h (JCF_USE_SCANDIR): Define.
1536         * parse.y (java_expand_classes): Write the class files in reverse
1537         order.
1538
1539 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1540
1541         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
1542
1543 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
1544
1545         * jcf-write.c (write_classfile): Unlink the temporary file if it
1546         cannot be renamed.  Use concat to build up the name of the
1547         temporary file.
1548
1549 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
1550
1551         * jcf-write.c (write_classfile): Write the file to a
1552         temporary file and then rename it.
1553
1554 2002-05-07  Tom Tromey  <tromey@redhat.com>
1555
1556         * gjavah.c (throwable_p): Use xstrdup, not strdup.
1557
1558         Fix for PR java/1200:
1559         * gjavah.c (throwable_p): New function.
1560         (decode_signature_piece): Use it.  A `WeakReference' isn't the
1561         same as a `jweak'.
1562         Include hashtab.h.
1563         (gcjh_streq): New function.
1564
1565 2002-05-07  Andreas Jaeger  <aj@suse.de>
1566
1567         * parse.y (finish_for_loop): Fix if statement.
1568
1569 2002-05-06  Tom Tromey  <tromey@redhat.com>
1570
1571         Fix for PR java/5941:
1572         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
1573         loop update expression.
1574         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
1575         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
1576
1577 2002-05-04  Mark Wielaard  <mark@klomp.org>
1578
1579         For PR java/6519:
1580         * parse.y (build_string_concatenation): Return just op1 only when op2
1581         is null and op1 is a STRING_CST, otherwise always construct a
1582         StringBuffer.
1583
1584 2002-04-27  Tom Tromey  <tromey@redhat.com>
1585
1586         For PR java/6382:
1587         * parse.y (string_convert_int_cst): New function.
1588         (merge_string_cste): Use it.
1589
1590 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
1591
1592         * java-tree.h (java_parse_file): Update.
1593         (java_set_yydebug): Remove.
1594         * jcf-parse.c (yydebug): Remove.
1595         (java_set_yydebug): Die.
1596         (java_parse_file): Update.
1597         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
1598
1599 2002-04-24  Tom Tromey  <tromey@redhat.com>
1600
1601         For PR java/6425:
1602         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
1603         EXPR_WFL_QUALIFICATION of qual_wfl.
1604
1605 2002-04-23  Per Bothner  <per@bothner.com>
1606
1607         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
1608         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
1609         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
1610
1611 2002-04-23  Tom Tromey  <tromey@redhat.com>
1612
1613         For PR java/6314:
1614         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
1615         recognize `-fcompile-resource='.
1616         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
1617         a bit.
1618
1619 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
1620
1621         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
1622         paths. Fixes PR java/2791.
1623
1624 2002-04-19  Andrew Haley  <aph@redhat.com>
1625
1626         * jcf-write.c (push_long_const): lo, hi: New variables.
1627         Use rshift_double to extract the high part of a 64-bit long.
1628         Use WORD_TO_INT to extract the low part.
1629
1630         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
1631         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
1632         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
1633
1634 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1635
1636         * typeck.c (incomplete_type_error): Remove.
1637
1638 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1639
1640         * class.c (make_class_data): Set DECL_ALIGN on static class data,
1641         for hash synchronization.
1642         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
1643         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
1644         class_type_node.
1645
1646 2002-04-16  Mark Wielaard  <mark@klomp.org>
1647
1648         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
1649         negative zero.
1650
1651 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1652
1653         Fix for PR java/6294:
1654         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
1655         interfaces.
1656
1657 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1658
1659         Fix for PR java/6085:
1660         * parse.y (patch_method_invocation): Always use build_access_to_thisn
1661         to get enclosing "this" argument for inner-class constructor
1662         invocation. Pass correct arguments to build_access_to_thisn.
1663
1664 2002-04-10  Andreas Jaeger  <aj@suse.de>
1665
1666         * gcj.texi (Input Options): Fix extdirs patch.
1667
1668 2002-04-10  Anthony Green  <green@redhat.com>
1669
1670         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
1671
1672 2002-04-09  Anthony Green  <green@redhat.com>
1673
1674         * gcj.texi (Input Options): Add --extdirs documentation.
1675         * jcf-dump.c (OPT_extdirs): New macro.
1676         (options): Add extdirs option.
1677         (help): Describe --extdirs.
1678         (main): Handle OPT_extdirs.
1679         * gjavah.c (OPT_extdirs): New macro.
1680         (options): Add extdirs option.
1681         (help): Describe --extdirs.
1682         (main): Handle OPT_extdirs.
1683         * jcf-path.c (jcf_path_init): Add extdirs support.
1684         (jcf_path_extdirs_arg): New function.
1685         (extensions): New variable to hold extensions path entries.
1686         * jvspec.c: Remove -fextdirs= when compiling main().
1687         * lang.c (java_decode_option): Handle -fextdirs=.
1688         * jcf.h (jcf_path_extdirs_arg): Declare new function.
1689         * Make-lang.in: Compile jcf-path with version info for use in
1690         identifying the appropriate libgcj.jar.
1691
1692 2002-04-08  Tom Tromey  <tromey@redhat.com>
1693
1694         For PR libgcj/5303:
1695         * .cvsignore: Added rmic.1 and rmiregistry.1.
1696         * gcj.texi (Top): Link to new nodes.
1697         (Invoking rmic): New node.
1698         (Invoking rmiregistry): Likewise.
1699         * Make-lang.in (java.generated-manpages): Added rmic.1 and
1700         rmiregistry.1.
1701         (java.maintainer-clean): Likewise.
1702         ($(srcdir)/java/rmic.1): New target.
1703         ($(srcdir)/java/rmiregistry.1): Likewise.
1704         (java.install-man): Handle rmic.1 and rmiregistry.1.
1705
1706 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1707
1708         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
1709         Add note about handling uncaught exceptions. Add an exception handler
1710         to example.
1711
1712 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1713
1714         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
1715         after using it to patch CALL_EXPR.
1716
1717 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1718
1719         * gcj.texi (Invocation): Document CNI invocation API.
1720
1721 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
1722
1723         * expr.c (truthvalue_conversion): Rename.  Update.
1724         (expand_compare): Update.
1725         * java-tree.h (java_truthvalue_conversion): New.
1726         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
1727
1728 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1729
1730         * java-tree.h (java_mark_addressable): New.
1731         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
1732         * typeck.c (mark_addressable): Rename, update.
1733
1734 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1735
1736         * expr.c (build_java_binop): Update.
1737         * java-tree.h (java_signed_type, java_unsigned_type,
1738         java_signed_or_unsigned_type): Update.
1739         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1740         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
1741         * parse.y (patch_binop): Update.
1742         * typeck.c (signed_or_unsigned_type, unsigned_type,
1743         signed_type): Update.
1744
1745 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
1746
1747         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
1748         (java_dummy_print): Remove.
1749         (lang_print_error): Rename.  Exit early if inhibiting output.
1750         (inhibit_error_printing_function): New.
1751         (java_init): Don't set hook.
1752         (lang_init_source): Use new boolean.
1753
1754 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
1755
1756         * parse.y (do_resolve_class): Fix infinite recursion.
1757
1758 2002-03-29  Tom Tromey  <tromey@redhat.com>
1759
1760         * parse.y (check_inner_circular_reference): Ignore incomplete
1761         types.
1762
1763 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
1764
1765         * Make-lang.in (builtins.o): Update.
1766         * boehm.c (get_boehm_type_descriptor): Update.
1767         * builtins.c: Include langhooks.h.
1768         * decl.c (java_init_decl_processing): Update.
1769         * java-tree.h (java_type_for_mode, java_type_for_size): New.
1770         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
1771         Redefine.
1772         * typeck.c (type_for_mode, type_for_size): Update.
1773
1774 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
1775
1776         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
1777
1778 2002-03-28  Tom Tromey  <tromey@redhat.com>
1779
1780         * except.c (expand_end_java_handler): If the handler type is NULL,
1781         use java.lang.Throwable.  Fixes PR java/5986.
1782
1783 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
1784
1785         Fix for PR java/4715:
1786         * jcf-parse.c (parse_source_file_3): New function.
1787         (read_class): Call it.
1788         (java_parse_file): Likewise.
1789
1790 2002-03-28  Jan Hubicka  <jh@suse.cz>
1791
1792         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
1793
1794 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1795
1796         * parse.y (resolve_package): Initialize "decl".
1797         (lookup_package_type): Remove unused function.
1798
1799 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1800
1801         Fix for PR java/5993:
1802         * parse.y (resolve_package): Return the decl if resolution was
1803         successful. Don't special case "java.lang" and "java.lang.reflect"
1804         packages. Set type_name to the merged identifier.
1805         (resolved_qualified_expression_name): Print error using "name" if
1806         resolve_package returns NULL_TREE.
1807
1808 2002-03-27  Tom Tromey  <tromey@redhat.com>
1809
1810         * expr.c (expand_invoke): Don't generate null pointer check if
1811         we're calling <init>.
1812
1813 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
1814
1815         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
1816         fix prototype.
1817         * java-tree.h (java_lang_expand_expr): Similarly.
1818         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
1819         (java_init): Don't set hook.
1820
1821 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1822
1823         Fix for PR java/5850:
1824         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
1825         context if field was not found in the current scope.
1826         * expr.c (lookup_field): Don't look in enclosing contexts.
1827
1828 2002-03-26  Tom Tromey  <tromey@redhat.com>
1829
1830         Fix for PR java/5942:
1831         * parse.y (init_src_parse): Added sanity check.
1832         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
1833         elements, not 11.
1834
1835 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
1836
1837         * decl.c (lang_mark_tree): Rename java_mark_tree.
1838         * java-tree.h (java_mark_tree): New.
1839         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
1840
1841 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
1842
1843         * lex.c: Change java_perform_atof to take normal parameters
1844         instead of a pointer to a parameter block.  Call it directly
1845         from java_lex.
1846
1847 2002-03-22  Mark Wielaard  <mark@klomp.org>
1848
1849         Fix for PR java/5368:
1850         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
1851         when printing error message.
1852
1853 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
1854
1855         * decl.c (maybe_build_cleanup): Remove.
1856
1857 2002-03-22  Tom Tromey  <tromey@redhat.com>
1858
1859         Andrew Haley  <aph@cambridge.redhat.com>
1860
1861         * expr.c (build_field_ref): Don't build a check if the field is a
1862         member of `this'.
1863
1864 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
1865
1866         Fix for PR java/6026:
1867         * lex.c (java_lex): Fix parsing of consecutive floats.
1868
1869 2002-03-21  Tom Tromey  <tromey@redhat.com>
1870
1871         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
1872         class.
1873
1874 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
1875
1876         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
1877         insert_block, getdecls, kept_level_p, global_bindings_p): New.
1878
1879 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
1880
1881         * gcj.texi: @code{gcj} becomes @command{gcj}.
1882         @code{gcc} becomes @command{gcc}.
1883         GcjRaw changed to gnu.gcc.RawData.
1884
1885 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
1886
1887         * decl.c (start_java_method): Use new hook.
1888         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
1889         (java_init): Remove old hook.
1890
1891 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
1892
1893         * builtins.c (define_builtin): Do nothing if `type' is null.
1894         Fixes PR java/5876.
1895
1896 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1897
1898         * parse.y (parser_check_super_interface): Fix error message
1899         grammar/order.
1900
1901 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1902
1903         * jcf-parse.c (get_constant): Delete unused variables.
1904
1905 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
1906
1907         * java-tree.h (java_parse_file): New.
1908         * jcf-parse.c (yyparse): Rename java_parse_file.
1909         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
1910
1911 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1912
1913         * parse.y (craft_constructor): Return the constructor decl.
1914         (java_expand_classes): Update comments.
1915         (lookup_method_invoke): Call fix_constructors immediately for
1916         anonymous class. Fixes PR java/5935.
1917
1918 2002-03-15  Anthony Green  <green@redhat.com>
1919
1920         * jcf-parse.c (yyparse): Don't emit class registration
1921         constructor when compiling resource files.
1922
1923 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1924
1925         * lang.c (java_tree_code_type, java_tree_code_length,
1926         tree_code_name): Delete.
1927         (tree_code_type, tree_code_length, tree_code_name): Define.
1928         (java_init): Don't try to copy into the various tree_code
1929         arrays.
1930
1931 2002-03-12  Tom Tromey  <tromey@redhat.com>
1932
1933         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
1934         UTF-8, not UCS-2.  Fixes PR java/5923.
1935
1936         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
1937         a call_expr wrapped in a convert.  Fixes PR java/5848.
1938
1939 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1940
1941         * jcf-write.c (write_classfile): Improve error strings.
1942
1943 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
1944
1945         * lex.c: Adjust comments to GNU standards.
1946
1947 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
1948
1949         Fix for PR java/5902:
1950         * lex.c (java_lex): Fix parsing of literals.
1951
1952 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1953
1954         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
1955         to prevent it getting evaluated twice in the store checking case.
1956         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
1957         examining OBJECT.
1958
1959 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1960
1961         * decl.c (java_init_decl_processing): Make sure class_type_node
1962         alignment is not less than 64 bits if hash synchronization is enabled.
1963
1964 2002-03-08  Per Bothner  <per@bothner.com>
1965
1966         * parse.y (java_complete_lhs):  Check if patch_assignment
1967         returned an error-mark.
1968
1969         * parse.y (try_builtin_assignconv):  Don't special-case zero.
1970
1971 2002-03-08  Per Bothner  <per@bothner.com>
1972
1973         Fix for PR java/5812.
1974         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
1975         here instead of in JSR macro.  Likewise with load_type_state call.
1976         Do the latter on if the return_pc has been verified (the jsr returns).
1977         (JSR):  Now just call build_java_jsr.
1978
1979 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
1980
1981         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
1982         (java.install-common): Link native driver to
1983         JAVA_TARGET_INSTALL_NAME.
1984
1985 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
1986
1987         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
1988         * builtins.c(sin_builtin): Likewise
1989         * builtins.c(sqrt_builtin): Likewise
1990
1991 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
1992
1993         * java/expr.c, java/jcf-parse.c, java/lex.c:
1994         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
1995         REAL_ARITHMETIC blocks unconditional.  Delete some further
1996         #ifdef blocks predicated on REAL_ARITHMETIC.
1997
1998 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1999
2000         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
2001         explicit sizeof/sizeof.
2002         * decl.c (java_init_decl_processing): Likewise.
2003         * jcf-parse.c (init_jcf_parse): Likewise.
2004         * parse.y (init_src_parse): Likewise.
2005
2006 2002-03-02  Per Bothner  <per@bothner.com>
2007
2008         Make --CLASSPATH by a synonym for --classpath and -classpath.
2009         Implement --bootclasspath.
2010         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
2011         (classpath_l):  Remove.
2012         (jcf_path_CLASSPATH_arg):  Remove.
2013         (jcf_path_bootclasspath_arg):  New function.
2014         (jcf_path_seal):  Simplify accordingly.
2015
2016         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
2017         (jcf_path_CLASSPATH):  Remove declaration.
2018         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
2019         (lang_specific_driver):  Translate -bootclasspath.
2020         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
2021         * lang.c (decode_lang_options):  Do jcf_path_init first.
2022         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
2023         * gjavah.c:  Also handle --bootclasspath.
2024         Handle --CLASSPATH as a synonum for --classpath.
2025         * jcf-dump.c: Likewise.
2026
2027         "." is not part of system path, but is the default for --classpath.
2028         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
2029         (jcf_path_seal):  Add "." if no CLASSPATH specified.
2030
2031         * gcj.texi:  Document changes.
2032
2033 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2034
2035         * expr.c (build_java_arraystore_check): Fix formatting.
2036
2037 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
2038
2039         Fix for PR java/5758, java/5632:
2040         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
2041         inner-class separator too.
2042         * parse.y (do_resolve_class): New local `decl_result.'
2043         Progressively build a name for what can have been loaded.
2044
2045 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2046
2047         * expr.c (java_array_data_offset): Removed function.
2048         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
2049         (build_java_array_length_access): Obtain "length" value using a
2050         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
2051         (build_java_arrayaccess): Correct comment. Access "data" using a
2052         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
2053         (build_java_arraystore_check): New function.
2054         (expand_java_arraystore): Use build_java_arraystore_check.
2055         * parse.y (patch_assignment): Simplify code to insert a store check
2056         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
2057         * check-init.c (check_init): Update to reflect that an array length
2058         access is now a COMPONENT_REF.
2059         * gcj.texi (Code Generation): Improve documentation of
2060         -fno-bounds-check. Add documentation for -fno-store-check.
2061         * java-tree.h (flag_store_check): Declare.
2062         (build_java_arraystore_check): Declare.
2063         * lang.c (flag_store_check): Initialize to 1.
2064         (lang_f_options): Add store-check option.
2065         * jvspec.c: Don't pass store-check option to jvgenmain.
2066         * lang-options.h: Add help string for -fno-store-check.
2067
2068 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
2069
2070         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
2071         * java-tree.h (java_dup_lang_specific_decl): New.
2072         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
2073
2074 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
2075
2076         * builtins.c, decl.c: Delete traditional-mode-related code
2077         copied from the C front end but not used, or used only to
2078         permit the compiler to link.
2079
2080 2002-02-22  Tom Tromey  <tromey@redhat.com>
2081
2082         Fix for PR java/2369:
2083         * jvspec.c (verify_class_name): New function.
2084         (lang_specific_driver): Call it.
2085         (JAVA_START_CHAR_P): New macro.
2086         (JAVA_PART_CHAR_P): Likewise.
2087
2088 2002-02-22  Per Bothner  <per@bothner.com>
2089
2090         * class.c:  Change vtable to be more compatible with g++ v3 abi.
2091         (get_dispatch_table):  Prepend offset-to-top (always 0) and
2092         type_info pointer (currently unimplemented hence NULL) to vtable.
2093         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
2094         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
2095         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
2096         (build_dtable_decl):  Add declarations for new fields.
2097
2098 2002-02-20  Per Bothner  <per@bothner.com>
2099
2100         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
2101         to finit$ (otherwise generate_bytecode_insns drops it). However, we
2102         don't need to set it on the COMPOUND_EXPR - the caller does that.
2103
2104 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
2105
2106         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
2107         `--CLASSPATH' becomes `--classpath.'
2108         * gjavah.c: Likewise.
2109         * jcf-dump.c: Likewise.
2110         * lang-options.h: Likewise.
2111         * lang.c: Likewise.
2112         * jcf-path.c: Updated comment.
2113         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
2114         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
2115         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
2116         (jcf_path_CLASSPATH_arg): Ditto.
2117         (classpath_u): Updated leading comment.
2118
2119 2002-02-20  Per Bothner  <per@bothner.com>
2120
2121         * builtins.c (check_for_builtin):  New function.
2122         (build_call_or_builtin):  Remove.
2123         * java-tree.h:  Update accordingly.
2124         * expr.c (expand_invoke):  Use build + check_for_builtin instead
2125         of build_call_or_builtin.
2126         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
2127         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
2128         flag (which had caused jcf-write to incorrectly emit invokevirtual).
2129
2130 2002-02-17  Tom Tromey  <tromey@redhat.com>
2131
2132         * java-tree.h (TYPE_STRICTFP): New macro.
2133         (struct lang_type) [strictfp]: New field.
2134         (CLASS_STRICTFP): New macro.
2135         (METHOD_STRICTFP): New macro.
2136         (struct lang_decl) [strictfp]: New field.
2137         * parse.y (method_header): Disallow strictfp constructor or
2138         abstract method.
2139         (STRICT_TK): Move before MODIFIER_TK.
2140         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
2141         (METHOD_MODIFIERS): Likewise.
2142         (INTERFACE_MODIFIERS): Likewise.
2143         * jcf-write.c (get_access_flags): Likewise.
2144         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
2145         (add_method_1): Likewise.
2146         (get_access_flags_from_decl): Likewise.
2147         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
2148         recognize strictfp flag.
2149         * jcf.h (ACC_STRICT): New define.
2150
2151 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
2152
2153         * class.c(build_utf8_ref): Move declaration of decl_size
2154
2155 2002-02-07  Tom Tromey  <tromey@redhat.com>
2156
2157         * gcj.texi (Input Options): --CLASSPATH does not suppress system
2158         path.
2159
2160 2002-02-04  Anthony Green  <green@redhat.com>
2161
2162         * class.c (build_utf8_ref): Put UTF-8 constants into merged
2163         sections if available.
2164
2165 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2166
2167         * parse.y (java_expand_classes): Fix typo in static field loop.
2168
2169 2002-02-02  Richard Henderson  <rth@redhat.com>
2170
2171         * class.c (add_field): Mark static fields external.
2172         (build_class_ref): Remove redundant set.
2173         * parse.y (java_expand_classes): Mark static fields of classes
2174         to be compiled as local.
2175         * jcf-parse.c (parse_class_file): Likewise.
2176
2177 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
2178
2179         * gcj.texi (About CNI): New node.
2180
2181 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
2182
2183         PR java/5080
2184         * jcf-parse.c : Check for HAVE_LOCALE_H before using
2185         setlocale() with LC_CTYPE as a parameter.
2186         * jv-scan.c: Same.
2187
2188 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
2189
2190         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
2191         Follow GNU Coding Standards for --version.
2192
2193 2002-01-28  Tom Tromey  <tromey@redhat.com>
2194
2195         * expr.c (build_jni_stub): Ensure storage for `meth' is
2196         generated.
2197         * parse.y (java_complete_expand_methods): Set
2198         current_function_decl before building JNI stub.
2199
2200 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
2201
2202         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
2203         BUILT_IN_SQRTF.
2204
2205 2002-01-22  Tom Tromey  <tromey@redhat.com>
2206
2207         * decl.c (java_init_decl_processing): Use add_predefined_file.
2208         Predefine RawData.java.
2209         (predef_filenames): Removed.
2210         (java_init_decl_processing): Don't register predef_filenames.
2211         * jcf-parse.c (add_predefined_file): New function.
2212         (predefined_filename_p): Rewrote.
2213         (predefined_filename_p): No longer static.
2214         * decl.c (java_init_decl_processing): Call initialize_builtins.
2215         * Make-lang.in (JAVA_OBJS): Added builtins.o.
2216         (java/builtins.o): New target.
2217         * builtins.c: New file.
2218         * parse.y (patch_invoke): Use build_call_or_builtin.
2219         * java-tree.h (build_call_or_builtin): Declare.
2220         (initialize_builtins): Declare.
2221         (java_set_exception_lang_code): Removed unused declaration.
2222         (PREDEF_FILENAMES_SIZE): Removed.
2223         (java_tree_index): Added JTI_PREDEF_FILENAMES.
2224         (predef_filenames): New define.
2225         (add_predefined_file): Declare.
2226         (predefined_filename_p): Declare.
2227         * expr.c (expand_invoke): Use build_call_or_builtin.
2228
2229 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2230
2231         * parse.y (patch_switch_statement): Fix format specifier.
2232
2233 2002-01-16  Tom Tromey  <tromey@redhat.com>
2234
2235         More for PR java/5365:
2236         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
2237         default.
2238         (process_file): Generate include for
2239         java.lang.UnsupportedOperationExceptions.
2240
2241 2002-01-15  Andreas Jaeger  <aj@suse.de>
2242
2243         * .cvsignore: Add man pages.
2244
2245 2002-01-15  Tom Tromey  <tromey@redhat.com>
2246
2247         Fix for PR java/5365:
2248         * gjavah.c (process_file): Turn class name into a file name.
2249
2250 2002-01-14  Matthias Klose  <doko@debian.org>
2251
2252         * gcj.texi: Fix whitespace and formatting errors in the
2253         synopsis of the man pages. Update copyright.
2254
2255 2002-01-14  Tom Tromey  <tromey@redhat.com>
2256
2257         For PR libgcj/5303:
2258         * Make-lang.in (java.install-man): Handle jv-convert man page.
2259         (java.generated-manpages): Added jv-convert.1.
2260         (java.uninstall): Remove jv-convert.1.
2261         (java.maintainer-clean): Likewise.
2262         ($(srcdir)/java/jv-convert.1): New target.
2263         * gcj.texi (Top): Link to jv-convert node.
2264         (Individual utilities): Likewise.
2265         (Invoking jv-convert): New node.
2266
2267 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
2268             Martin Kahlert  <martin.kahlert@infineon.com>
2269
2270         * jcf-parse.c (get_constant): Don't swap lo/hi for big
2271         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
2272
2273 2002-01-03  Graham Stott  <grahams@redhat.com>
2274
2275         * class.c (compile_resource_file): Update copyright date.
2276         Constify filename parameter.
2277         (java-tree.h): Update copyright date.
2278         (compile_resource_file): Constify filename parameter.
2279
2280 2002-01-03  Graham Stott  <grahams@redhat.com>
2281
2282         * gcc/jcf-parse.c: Update copyright date.
2283         (yyparse): Constify resource_filename.
2284
2285 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2286
2287         * parse.y (src_parse_roots): Don't needlessly zero init.
2288
2289 2001-12-31  Tom Tromey  <tromey@redhat.com>
2290
2291         * parse.y (dump_java_tree): New function.
2292         (source_end_java_method): Call it.
2293         (end_class_declaration): Likewise.
2294         * lang.c (java_decode_option): Call dump_switch_p.
2295
2296 2001-12-28  Tom Tromey  <tromey@redhat.com>
2297
2298         * gen-table.pl: Don't process characters after \uffff.  Added
2299         comment pointing to input file.
2300
2301 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2302
2303         * gen-table.pl: Const-ify output.  Document the location of a
2304         suitable unicode input file.
2305
2306         * chartables.h: Regenerate.
2307
2308 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2309
2310         * chartables.h: Const-ify.
2311         * gjavah.c (options): Likewise.
2312         * jcf-dump.c (options): Likewise.
2313         * jv-scan.c (options): Likewise.
2314         * lex.c (java_start_char_p, java_part_char_p): Likewise.
2315         * parse.y (binop_lookup): Likewise.
2316
2317 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2318
2319         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
2320         the static arrays that are output.
2321         * jvspec.c (jvgenmain_spec): Make static.
2322         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
2323         * keyword.h: Regenerate.
2324         * lang.c (string_option, process_option_with_no, lang_f_options,
2325         lang_W_options): Const-ify.
2326         * lex.c (java_lex): Likewise.
2327
2328 2001-12-21  Richard Henderson  <rth@redhat.com>
2329
2330         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
2331         (get_boehm_type_descriptor): ... here.  Arrange for the
2332         TREE_TYPE to get set properly.
2333
2334 2001-12-21  Richard Henderson  <rth@redhat.com>
2335
2336         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
2337         only if the target requires collect2.
2338
2339         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
2340
2341 2001-12-20  Tom Tromey  <tromey@redhat.com>
2342
2343         For PR java/4509:
2344         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
2345         CAN_COMPLETE_NORMALLY for the node.
2346         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
2347         generate code for second branch if first branch can't complete
2348         normally.
2349         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
2350         the loop head if the loop body can't complete normally.
2351
2352 2001-12-20  Tom Tromey  <tromey@redhat.com>
2353
2354         For PR java/4766:
2355         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
2356         case where `finally' clause can't complete normally.
2357
2358 2001-12-20  Tom Tromey  <tromey@redhat.com>
2359
2360         Fixes PR java/5057:
2361         * parse.y (analyze_clinit_body): Added this_class parameter.
2362         Check for more cases where we must keep <clinit>.
2363         (maybe_yank_clinit): Cleaned up flow control.
2364
2365 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2366
2367         * decl.c (java_init_decl_processing): Don't initialize
2368         finit_leg_identifier_node.
2369         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
2370         (finit_leg_identifier_node): Remove.
2371         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
2372
2373 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2374
2375         * mangle.c (mangle_member_name): Don't special-case for
2376         NO_DOLLAR_IN_LABEL.
2377         * mangle_name.c (unicode_mangling_length): Likewise.
2378         (append_unicode_mangled_name): Likewise.
2379         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
2380         code.
2381
2382 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2383
2384         * expr.c (build_java_array_length_access): Don't force null pointer
2385         check unless flag_check_references is set.
2386
2387 2001-12-20  Tom Tromey  <tromey@redhat.com>
2388
2389         Fix for PR java/3417:
2390         * parse.y (patch_assignment): Added special processing for
2391         `return'.
2392         (patch_return): Don't convert booleans to integers, and don't
2393         special-case `null'.
2394
2395 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
2396
2397         * config-lang.in (diff_excludes): Remove.
2398
2399 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
2400
2401         * gcj.texi: Update link to GCC manual.
2402
2403 2001-12-17  Tom Tromey  <tromey@redhat.com>
2404
2405         * parse.y (link_nested_class_to_enclosing): Removed useless
2406         statement.
2407
2408 2001-12-16  Tom Tromey  <tromey@redhat.com>
2409
2410         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
2411         Fixes PR java/5088.
2412
2413 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
2414
2415         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
2416         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
2417         spelling errors.
2418
2419 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2420
2421         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
2422
2423 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2424
2425         * decl.c (java_init_decl_processing): Build otable_type correctly.
2426         otable_decl is an otable_type.
2427
2428 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2429
2430         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
2431         otable_type, otable_ptr_type, method_symbol_type,
2432         method_symbols_array_type, method_symbols_array_ptr_type): New
2433         field/global tree definitions.
2434         (flag_indirect_dispatch): New flag.
2435         * decl.c (java_init_decl_processing): Initialize new otable and
2436         otable_syms type nodes and decls. Add new field "index" to
2437         method_type_node.
2438         * class.c (build_method_symbols_entry): New function.
2439         (make_method_value): Set "index" to to method's vtable index for
2440         virtual methods when indirect-dispatch is not used.
2441         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
2442         and set vtable_method_count to -1. Set otable and otable_syms field
2443         if indirect-dispatch is used and there was something to put in them.
2444         (build_method_symbols_entry): New function.
2445         (emit_offset_symbol_table): New function.
2446         * expr.c (get_offset_table_index): New function.
2447         (build_invokevirtual): Build array reference to otable at the index
2448         returned by get_offset_table_index, and use the result as the vtable
2449         offset.
2450         (build_invokeinterface): Similar.
2451         * jcf-parse.c (yyparse): If indirect-dispatch, call
2452         emit_offset_symbol_table at the end of compilation, after all classes
2453         have been generated.
2454         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
2455         * lang.c (flag_indirect_dispatch): Define.
2456         (lang_f_options): Add indirect-dispatch flag.
2457
2458 2001-12-14  Matthias Klose  <doko@debian.org>
2459
2460         * gcj.texi: Markup for man page generation. Document missing
2461         options printed by <tool> --help.
2462         Terminate description of gij's -ms option with a dot.
2463         * Make-lang.in ($(srcdir)/java/*.1): New targets.
2464         (java.generated-manpages java.install-man, java.uninstall,
2465         java-maintainer-clean) Updated.
2466
2467 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
2468
2469         * class.c (get_dispatch_table): Fix java vtable layout
2470         for TARGET_VTABLE_USES_DESCRIPTORS.
2471         * decl.c (java_init_decl_processing): Initialize
2472         alloc_no_finalizer_node, finalize_identifier_node.
2473         * expr.c (class_has_finalize_method): New function.
2474         (expand_java_NEW): Generate calls for finalizer-free allocation.
2475         (build_invokevirtual): Fix java vtable layout for
2476         TARGET_VTABLE_USES_DESCRIPTORS.
2477         * java-tree.h (enum java_tree_index): New entries:
2478         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
2479         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
2480         (class_has_finalize_method): declare.
2481         (HAS_FINALIZER_P): New macro.
2482         * parse.y (patch_invoke): Generate calls for finalizer-free
2483         allocation.
2484
2485 2001-12-12  Matthias Klose  <doko@debian.org>
2486
2487         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
2488         whitespace at end of line.
2489
2490 2001-12-11  Tom Tromey  <tromey@redhat.com>
2491
2492         * lex.c (java_init_lex): Define wfl_to_string as
2493         gnu.gcj.runtime.StringBuffer unless generating bytecode.
2494
2495 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
2496
2497         * class.c (make_method_value): Use null_pointer_node to
2498         represent empty exception table.
2499
2500 2001-12-10  Tom Tromey  <tromey@redhat.com>
2501
2502         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
2503
2504 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
2505
2506         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
2507
2508 2001-12-09  Per Bothner  <per@bothner.com>
2509
2510         * check-init.c (current_switch_has_default):  New static field.
2511         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
2512         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
2513         DEFAULT_EXPR seen, simulate a default alternative that copies state.
2514
2515 2001-12-09  Tom Tromey  <tromey@redhat.com>
2516
2517         * check-init.c (check_init): Don't allow pre- or post- increment
2518         or decrement of final variable.
2519         (final_assign_error): Minor error message rewording.
2520
2521 2001-12-08  Tom Tromey  <tromey@redhat.com>
2522
2523         * java-tree.h: Fixed typo.
2524
2525         * gjavah.c (decompile_method): Don't decompile to `return this'
2526         for static methods.
2527
2528         * gjavah.c (cxx_keywords): Re-sorted.
2529         * lex.c (cxx_keywords): Re-sorted.
2530
2531         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
2532         else.
2533
2534         * gjavah.c (print_namelet): Clear subnamelets.
2535         (HANDLE_METHOD): Set `method_printed' earlier.
2536
2537 2001-12-07  Tom Tromey  <tromey@redhat.com>
2538
2539         * lang.c (lang_f_options): Added
2540         optimize-static-class-initialization.
2541         (java_decode_option): Removed special case.
2542
2543 2001-12-07  Per Bothner  <per@bothner.com>
2544
2545         * check-init.c (check_init):  Fix typo freeing memory twice.
2546
2547 2001-12-05  Per Bothner  <per@bothner.com>
2548
2549         Restore support for static class initialization optimization.
2550         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
2551         * check-init.c (check_int):  At end of BLOCK handle initialization
2552         blocks, which used to be done in java_complete_expand_method but did
2553         not handle the case where check_for_initialization might allocate
2554         more than a word of bits.
2555         * decl.c (lang_make_tree):  The smic field is now a tree.
2556         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
2557         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
2558
2559         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
2560
2561         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
2562         Change from a hash table to a list.
2563         (struct_lang_decl):  Change field 'smic' to match.
2564         * class.c (add_method_1):  Initialize
2565         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
2566         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
2567         (java_expand_method_bodies): -here, since 'smic' is now a list.
2568         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
2569
2570         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
2571
2572         * class.c (java_hash_compare_tree_node):  Fix casts.
2573
2574 2001-12-04  Per Bothner  <per@bothner.com>
2575
2576         * check-init.c:   Handle definite unassignment to finals in addition
2577         to definite assignment.
2578         (loop_current_locals):  New field.
2579         (num_current_locals, int start_current_locals, num_current_words):
2580         Make static.
2581         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
2582         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
2583         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
2584         (get_variable_decl, check_final_reassigned):  New functions.
2585         (check_init, check_bool_init):  Modify as needed for checking finals.
2586         (check_for_initialization):  Take extra parameter and return void.
2587         Do extra start-up logic to check final fields for assignment.
2588         * parse.y (check_static_final_variable_assignment_flag,
2589         reset_static_final_variable_assignment_flag, check_final_assignment,
2590         check_final_variable_local_assignment_flag,
2591         reset_final_variable_indirect_assignment_flag,
2592         reset_final_variable_global_assignment_flag):  Remove functions.
2593         (java_complete_expand_methods, outer_field_access_fix,
2594         patch_assignment): Remove no-longer used logic.
2595         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
2596         * parse.y (register_fields, java_complete_tree):  Update accordingly.
2597
2598         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
2599         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
2600         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
2601
2602         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
2603
2604         * java-tree.h (DECL FINAL):  New bit-field.
2605         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
2606         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
2607         (DECL_INIT_CALLS_THIS):  New macro.
2608         (struct lang_decl):  New bit-field init_calls_this.
2609         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
2610         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
2611         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
2612         use it for both local variables and final fields.
2613         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
2614         and local_final.
2615         (struct lang_type):  Remove hfv bit-field.
2616         (check_for_initialization):  Change to return void.
2617
2618         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
2619         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
2620         * check-init.c (final_assign_error):  New helper function.
2621         (check_final_reassigned, check_init):  Use it.
2622         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
2623
2624         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
2625         bit-fields to unsigned.
2626
2627 2001-12-03  Per Bothner  <per@bothner.com>
2628
2629         * parse.y (patch_binop):  Minor constant folding.
2630
2631         * parse.y (build_current_thisn):  Shorter 'buffer'.
2632
2633 2001-12-03  Per Bothner  <per@bothner.com>
2634
2635         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
2636         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
2637         * jcf-write.c (generate_bytecode_insns):  Remove support for
2638         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
2639         * check-init.c (check_init):  Likewise.
2640
2641 2001-12-03  Per Bothner  <per@bothner.com>
2642
2643         * verify.c (subroutine_nesting):  New function.
2644         (verify_jvm_instructions):  Use it to fix logic for checking that
2645         we're done with the current subroutine.
2646
2647         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
2648         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
2649
2650 2001-12-03  Per Bothner  <per@bothner.com>
2651
2652         * jcf.h:  Fix obvious typo in comment.
2653         * typeck.c (build_null_signature):  Add comment.
2654
2655 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
2656
2657         * expr.c: Remove leading capital from diagnostic messages, as
2658         per GNU coding standards.
2659         * jcf-io.c: Similarly.
2660         * jcf-parse.c: Similarly.
2661         * jv-scan.c: Similarly.
2662         * jvspec.c: Similarly.
2663         * mangle.c: Similarly.
2664
2665 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
2666             Alexandre Petit-Bianco  <apbianco@redhat.com>
2667
2668         * expr.c (build_java_arrayaccess): Call save_expr on array for
2669         correct evaluation order, modified comment, fixed indentation.
2670         * parse.y: (patch_assignment): Correctly extract the array base
2671         from the tree generate by build_java_arrayaccess, added comments.
2672         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
2673         Fixes PR java/3096, PR java/3803, PR java/3965.
2674
2675 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2676
2677         * expr.c (expand_byte_code): Remove trailing periods from messages.
2678         * jcf-parse.c (load_class, jcf_parse): Similarly.
2679         * jcf-write.c (generate_classfile): Similarly.
2680         * lex.c (java_lex): Similarly.
2681
2682 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2683
2684         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
2685
2686 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2687
2688         * Make-lang.in (java.generated-manpages): New dummy target.
2689
2690 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2691
2692         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2693         ASM_FINAL_SPEC.
2694         (lang_specific_pre_link): Use set_input to set input_filename.
2695         Append `main' here.
2696         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2697         (main): Fix definition.
2698         Strip `main' from classname.
2699         Fixes PR java/227.
2700
2701 2001-11-18  Roger Sayle <roger@eyesopen.com>
2702
2703         * parse.h (java_expand_switch): Remove old prototype.
2704
2705 2001-11-18  Tom Tromey  <tromey@redhat.com>
2706
2707         Fix for PR java/1401:
2708         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
2709         arg0 is null.
2710         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
2711         correctly.
2712
2713 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2714
2715         * lang.c (finish_parse): Rename to java_finish.
2716         (LANG_HOOKS_FINISH, java_finish): New.
2717
2718 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
2719
2720         * decl.c (init_decl_processing): Rename java_init_decl_processing.
2721         * java-tree.h: New prototype.
2722         * lang.c (java_init): Update prototype.  Combine with old init_parse.
2723
2724 2001-11-13  Tom Tromey  <tromey@redhat.com>
2725
2726         * gjavah.c (method_signature): New global.
2727         (HANDLE_METHOD): Set it.
2728         (decompile_return_statement): New function.
2729         (decompile_method): Use it.
2730         (print_method_info): Removed `synth' argument.
2731
2732 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2733
2734         * java-tree.h (java_set_yydebug): New.
2735         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
2736         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
2737         (print_lang_decl, print_lang_type, print_lang_identifier,
2738         print_lang_statistics, lang_print_xnode): Remove.
2739
2740 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2741
2742         * jcf-parse.c (init_lex): Remove.
2743         * lang.c (language_string, lang_identify): Remove.
2744         (struct lang_hooks): Constify.
2745         (LANG_HOOKS_NAME): Override.
2746         (init_parse): Update.
2747
2748 2001-11-08  Andreas Franck  <afranck@gmx.de>
2749
2750         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
2751         program_transform_name the way suggested by autoconf.
2752         (java.install-common): Also transform auxiliary program names with
2753         program_transform_name.
2754
2755 2001-11-08  Tom Tromey  <tromey@cygnus.com>
2756
2757         * parse.y (trap_overflow_corner_case): New rule.
2758         (unary_expression): Use it.
2759         * lex.c (java_init_lex): Don't set minus_seen.
2760         (yylex): Don't use minus_seen.  Communicate overflow to parser for
2761         it to handle.
2762         (error_if_numeric_overflow): New function.
2763         * parse.h (minus_seen): Removed field.
2764         (JAVA_RADIX10_FLAG): New define.
2765
2766 2001-11-07  Tom Tromey  <tromey@redhat.com>
2767
2768         Patch for PR java/1414:
2769         * parse.y (case_label_list): New global.
2770         (goal): Register case_label_list with GC.
2771         (java_complete_lhs): Save new case on case_label_list.
2772         (patch_switch_statement): Check for duplicate case labels.
2773
2774 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
2775
2776         * parse.y (patch_assignment): Removed unused third argument.
2777         (java_complete_lhs): Removed unused third argument to patch_assignment.
2778
2779 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2780
2781         * lang.c: Include langhooks-def.h.
2782         * Make-lang.in: Update.
2783
2784 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
2785
2786         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2787
2788 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2789
2790         * mangle.c (find_compression_record_match): Don't match compression
2791         records for package name elements unless they occur at the start of
2792         the name. Fix for PR java/4717.
2793
2794 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2795
2796         * expr.c (expand_java_field_op): Don't special-case references to
2797         java.lang.PRIMTYPE.TYPE.
2798         (build_primtype_type_ref): Removed.
2799         * java-tree.h (build_primtype_type_ref): Remove prototype.
2800         * parse.y (maybe_build_primttype_type_ref): Removed.
2801         (complete_function_arguments): Don't special-case references to
2802         java.lang.PRIMTYPE.TYPE.
2803         (patch_assignment): Likewise.
2804         (array_constructor_check_entry): Likewise.
2805
2806 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
2807
2808         * mangle.c (static tree compression_table): Fixed leading comment.
2809         * parse.h (struct parser_ctxt): Fixed field comment.
2810         * parse.y (check_pkg_class_access): New prototype, fixed leading
2811         comment, new parameter used to emit error only if passed as true.
2812         (parse_check_super): Pass extra argument to check_pkg_class_access.
2813         (do_resolve_class): Likewise.
2814         (process_imports): Likewise.
2815         (read_import_dir): Fixed indentation.
2816         (find_in_imports_on_demand): New local class_type_name. Local
2817         node_to_use deleted. while loop changed into for loop. Report
2818         multiple definition only for accessible classes. Improved error
2819         message.
2820         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
2821         assigned to parameter list, fixed indentation. while loop changed
2822         into for loop, restore TREE_CHAIN on local `tem' before the next
2823         iteration.
2824
2825 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2826
2827         * lang.c (lang_get_alias_set): Deleted.
2828
2829 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2830
2831         * gjavah.c (jni_print_char): Fix thinko in last change.
2832
2833         * gjavah.c (jni_print_char, decode_signature_piece): Use
2834         safe-ctype macros and/or fold extra calls into fewer ones.
2835         * lex.c (java_read_unicode, java_lex): Likewise.
2836         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
2837         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
2838         * mangle_name.c (append_unicode_mangled_name,
2839         unicode_mangling_length): Likewise.
2840
2841 2001-10-17  Richard Henderson  <rth@redhat.com>
2842
2843         * Make-lang.in (java/lang.o): Depend on langhooks.h.
2844
2845 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
2846
2847         * lang.c (langhooks.h): Included.
2848         (LANG_HOOKS_INIT): Redefined.
2849         (LANG_HOOKS_INIT_OPTIONS): Likewise.
2850         (LANG_HOOKS_DECODE_OPTION): Likewise.
2851         (struct lang_hooks lang_hooks): New initialization.
2852
2853 2001-10-11  Per Bothner  <per@bothner.com>
2854
2855         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
2856         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
2857         The former is simpler, and jcf-write.c handles it better.
2858         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
2859         or WITH_CLEANUP_EXPR.
2860         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
2861         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
2862
2863         * parse.y (patch_if_else_statement):  If the condition is constant,
2864         optimize away the test.
2865
2866 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
2867
2868         * parse.y (patch_cast): Call patch_string on the first operand of
2869         the incoming node, update it if necessary. Fixes PR java/4510.
2870
2871 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2872
2873         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
2874         when name qualifier matches a package name.
2875
2876 2001-10-08  Tom Tromey  <tromey@redhat.com>
2877
2878         Fix for PR java/4489:
2879         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
2880         force a new label when computing `body_block'.
2881
2882 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2883
2884         * jcf-io.c (format_uint): Const-ify.
2885         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
2886         * lex.c (java_get_line_col): Likewise.
2887         * parse.y (build_incdec): Likewise.
2888
2889 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
2890
2891         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
2892         a NULL enclosing context if appropriate. Fixes PR java/4466.
2893
2894 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
2895
2896         * parse.y (patch_assignment): Use lvalue's original TYPE when
2897         building the final COMPOUND_EXPR.
2898         (try_reference_assignconv): Fixed leading comment.
2899
2900 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
2901
2902         * parse.y (check_final_variable_indirect_assignment): For
2903         COMPOUND_EXPR, return only if finals were found initialized
2904         properly, if not, keep on checking.
2905         (check_final_variable_global_assignment_flag): New local
2906         error_found, set when appropriate and used to decide whether to
2907         report uninitialized finals. Fixed typo in comment.
2908
2909 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
2910
2911         * decl.c (init_decl_processing): Fixed typo in predef_filenames
2912         last three initializations. Fixes PR java/4360.
2913
2914 2001-09-21  Richard Henderson  <rth@redhat.com>
2915
2916         * class.c (get_dispatch_table): Handle function descriptors.
2917         (build_dtable_decl): Likewise.
2918         * expr.c (build_invokevirtual): Likewise.
2919
2920 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
2921
2922         * parse.y (patch_method_invocation): Build class initialization
2923         when static finals are used to qualify method invocation.
2924         Fixes PR java/4366.
2925
2926 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
2927
2928         * parse.h: (WFL_STRIP_BRACKET): Re-written using
2929         build_type_name_from_array_name.
2930         (STRING_STRIP_BRACKETS): New macro.
2931         * parse.y (build_type_name_from_array_name): New function.
2932         (array_creation_expression:): Accumulate []s instead of [s.
2933         (cast_expression:): Accumulate []s instead of [s after cast type
2934         name.
2935         (build_array_from_name): Local string deleted, use
2936         build_type_name_from_array_name.
2937         (build_unresolved_array_type): Accumulate []s instead of [s after
2938         type name.
2939         (register_fields): Fixed comment.
2940         (resolve_class): Local name, base deleted, new locals tname and
2941         array_dims. Use build_type_name_from_array_name. Use array_dims to
2942         build array type.
2943         (purify_type_name): Use STRING_STRIP_BRACKETS.
2944
2945 2001-09-18  Andreas Jaeger  <aj@suse.de>
2946
2947         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
2948         * jv-scan.c: Likewise.
2949
2950 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
2951
2952         * parse.y (patch_method_invocation): Inner class creation context
2953         check not enforced within constructors. Fixes PR java/1873.
2954
2955 2001-09-16  Tom Tromey  <tromey@redhat.com>
2956
2957         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
2958         NOTE_PUSH for single-case push.  Fixes PR java/4189.
2959
2960 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
2961
2962         * java-tree.h (TYPE_IMPORT_LIST): New macro.
2963         (TYPE_IMPORT_DEMAND_LIST): Likewise.
2964         (struct lang_type): New fields import_list and import_demand_list.
2965         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
2966         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
2967         (do_resolve_class): New local saved_enclosing_type, initialized,
2968         passed as parameter to find_in_imports and find_in_imports_on_demand.
2969         (find_in_imports): Added paramater enclosing_type, use its
2970         TYPE_IMPORT_LIST when applicable.
2971         (find_in_imports_on_demand): Added parameter enclosing_type, use
2972         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
2973         declaration and initialization.
2974         (fold_constant_for_init): Switch/restore current_class to the
2975         appropriate context.
2976
2977 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
2978
2979         * verify.c (verify_jvm_instructions): Fix typo.
2980
2981 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2982
2983         * expr.c (expand_invoke): Const-ification.
2984         * parse.y (patch_method_invocation): Likewise.
2985
2986 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2987
2988         * gjavah.c (cxx_keywords): Const-ification.
2989         * keyword.gperf (java_keyword): Likewise.
2990         * lang.c (java_tree_code_name): Likewise.
2991         * lex.c (cxx_keywords): Likewise.
2992         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
2993
2994 2001-09-11  Richard Henderson  <rth@redhat.com>
2995
2996         * parse.h (ctxp_for_generation): Mark extern.
2997
2998 2001-09-10  Richard Henderson  <rth@redhat.com>
2999
3000         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
3001
3002 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
3003
3004         * typeck.c (java_array_type_length, build_prim_array_type):
3005         Represent empty arrays by NULL index.
3006
3007 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
3008
3009         * java-tree.h (compile_resource_file): Grouped with other prototypes.
3010         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
3011
3012 2001-09-06  Anthony Green  <green@redhat.com>
3013
3014         * class.c (O_BINARY): Define if necessary.
3015         (registerResource_libfunc): Declare.
3016         (init_class_processing): Initilize registerResource_libfunc.
3017         (compile_resource_file): New function.
3018         * java-tree.h (resource_name): Declare.
3019         (compile_resource_file): Declare.
3020         * jcf-parse.c (yyparse): Handle compiling java resource files.
3021         * lang.c (java_decode_option): Handle -fcompile-resource option.
3022         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
3023         resource files.
3024         * gcj.texi (Code Generation): Add documentation for -R flag.
3025
3026 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
3027
3028         * jcf-write.c (generate_classfile): Issue an error in case of
3029         field/initial value mismatch.
3030         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
3031         being initialized and we're generating bytecode.
3032         (java_complete_lhs): In MODIFY_EXPR section: added comments,
3033         set DECL_INITIAL properly when appropriate.
3034         Fixes PR java/4230
3035         Fixes PR java/4204
3036
3037 2001-09-01  Per Bothner  <per@bothner.com>
3038
3039         * parse.y (maybe_yank_clinit):  A field without an initializer is not
3040         relevant.  All initializers except static final and constant require
3041         <clinit>, regardless of flag_emit_class_files.
3042
3043 2001-08-31  Per Bothner  <per@bothner.com>
3044
3045         * class.c (set_constant_value):  When not emiting class files, then a
3046         String ConstantValue is a utf8const_ptr_type.
3047
3048 2001-08-30  Per Bothner  <per@bothner.com>
3049
3050         * jcf-write.c (generate_classfile):  Check that field is primitive
3051         or string before emitting ConstantValue attribute.
3052
3053 2001-08-30  Per Bothner  <per@bothner.com>
3054
3055         * parse.y (resolve_qualified_expression_name):  If creating a
3056         COMPOUND_EXPR, set it's type correctly.
3057
3058 2001-08-30  Per Bothner  <per@bothner.com>
3059
3060         * jcf-io.c (open_class):  Set filename field.
3061
3062         * jcf-parse,c (parse_class_file):  Set current_function_decl
3063         for better error message when Code attribute is missing.
3064
3065         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
3066         better diagnostics, especially for constructors.
3067
3068 2001-08-30  Per Bothner  <per@bothner.com>
3069
3070         * jcf-write.c (generate_classfile):  Don't write ConstantValue
3071         attribute if field is not final, for compatibility with jdk.
3072
3073         * jcf-write.c (generate_classfile):  Convert ConstantValue values
3074         to correct type.  Work-around for front-end bug.
3075         * class.c (set_constant_value):  Error if constant has wrong type.
3076
3077 2001-08-30  Per Bothner  <per@bothner.com>
3078
3079         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
3080         "Double" are printed at verbosity 1.
3081
3082         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
3083
3084         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
3085
3086 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
3087
3088         * parse.y (patch_assignment): Don't verify final re-assignment here.
3089         (java_complete_lhs): Verify assignments to finals calling
3090         patch_assignment. Verify re-assignments to finals before calling
3091         patch_assignment.
3092
3093 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
3094
3095         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
3096         Fixes PR java/1413
3097
3098 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3099
3100         * lex.c (java_lex): new local found_hex_digits. Set and then used
3101         in test to reject invalid hexadecimal numbers.
3102         * parse.y (java_complete_tree): Prevent unwanted cast with
3103         initialized floating point finals.
3104         (patch_binop): Emit a warning when detecting a division by zero,
3105         mark result not constant, don't simplify non integer division.
3106
3107 2001-08-28  Per Bothner  <per@bothner.com>
3108
3109         * jcf-write.c  (generate_bytecode_insns):  For increments and
3110         decrements just recurse to push constant.  Improvement on Mark's patch.
3111
3112 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
3113
3114         * jcf-write.c (generate_bytecode_insns): Generate an integer to
3115         real conversion for increments and decrements of reals.
3116
3117 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
3118
3119         * parse.y (resolve_qualified_expression_name): Handle unresolved
3120         qualified expressions, prevent numerical qualifiers, fixed typo.
3121         Fixes PR java/4141
3122
3123 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
3124
3125         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
3126         don't report anything but deprecated class when marked so. Handle
3127         VAR_DECL.
3128         (patch_method_invocation): Check deprecation on methods and types.
3129         (patch_binop): code becomes an enum tree_code, added default: to
3130         switch to handle that. Detect division by zero, try to fold and
3131         return before using a subroutine.
3132
3133 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
3134
3135         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
3136         file smaller than 4 bytes.
3137         * parse.y (check_inner_circular_reference): New function.
3138         (check_circular_reference): Likewise.
3139         (array_initializer:): Accept {,}.
3140         (java_check_circular_reference): Rewritten using
3141         check_circular_reference and check_inner_circular_reference.
3142         (java_complete_expand_method): Unconditionally save and restore
3143         the unpurged exception list.
3144         (build_dot_class_method_invocation): Unmangle signature parameter.
3145
3146 2001-08-21  Tom Tromey  <tromey@redhat.com>
3147
3148         * decl.c (init_decl_processing): Add `throws' field to method
3149         descriptor.
3150         * class.c (make_method_value): Compute `throws' field for method.
3151
3152 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
3153
3154         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
3155         circularity is detected.
3156         (ctors_unchecked_throws_clause_p): Fixed leading comment.
3157
3158 2001-08-17  Richard Henderson  <rth@redhat.com>
3159
3160         * class.c (emit_register_classes): Add align parameter to
3161         call to assemble_integer.
3162
3163 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
3164
3165         * jcf-parse.c (load_class): New locals saved and class_loaded. If
3166         loading a class_or_name fails, try considering an innerclass name
3167         and load the enclosing context.
3168         * parse.y (resolve_inner_class): New function.
3169         (find_as_inner_class): Added leading comment.
3170         (register_incomplete_type): Keep the current context as enclosing
3171         context for JDEP_FIELD dependencies.
3172         (do_resolve_class): Locals new_class_decl and super initialized to
3173         NULL. Call resolve_inner_class, explore the enclosing context
3174         superclass if necessary.
3175         Fixes PR java/4007
3176
3177 2001-08-16  Tom Tromey  <tromey@redhat.com>
3178
3179         * jcf-dump.c (main): Updated for change to jcf_path_seal.
3180         * gjavah.c (main): Updated for change to jcf_path_seal.
3181         * lang.c (version_flag): New global.
3182         (java_decode_option): Recognize `-version'.
3183         (java_init): Update for change to jcf_path_seal.
3184         * jcf.h (jcf_path_seal): Added `print' argument.
3185         * jcf-path.c (jcf_path_seal): Added `print' argument.
3186
3187 2001-08-13  Zack Weinberg  <zackw@panix.com>
3188
3189         * Make-lang.in (java/decl.o): Update dependencies.
3190         * decl.c: Include libfuncs.h, don't include toplev.h.
3191
3192 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
3193
3194         * decl.c (init_decl_processing): exception_type_node,
3195         class_not_found_type_node, and no_class_def_found_type_node
3196         initialized. predef_filenames augmented accordingly.
3197         instinit_identifier_node initialized.
3198         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
3199         * java-tree.h (enum java_tree_index): New entries
3200         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
3201         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
3202         (exception_type_node): New macro.
3203         (class_not_found_type_node): Likewise.
3204         (no_class_def_found_type_node): Likewise.
3205         (instinit_identifier_node): Likewise.
3206         (PREDEF_FILENAMES_SIZE): Adjusted.
3207         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
3208         (struct lang_type): Fixed typo in bitfield name.
3209         (DECL_INSTINIT_P): New macro.
3210         (ID_INSTINIT_P): Likewise.
3211         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
3212         attribute.
3213         * parse.y (encapsulate_with_try_catch): New function.
3214         (generate_instinit): Likewise.
3215         (build_instinit_invocation): Likewise.
3216         (ctors_unchecked_throws_clause_p): Likewise.
3217         (add_instance_initializer): Deleted.
3218         (build_instance_initializer): Likewise.
3219         (in_instance_initializer): Likewise.
3220         (check_method_redefinition): instinit$ not to be verified.
3221         (java_complete_expand_methods): Generate instinit$, simplified code.
3222         (build_dot_class_method): Eliminated unnecessary locals. Use
3223         encapsulate_with_try_catch, removed unnecessary code.
3224         (fix_constructors): New local iii. Use build_instinit_invocation.
3225         (patch_method_invocation): Added comment.
3226         (maybe_use_access_method): Don't consider instinit$.
3227         (find_applicable_accessible_methods_list): Shorten the search for
3228         instinit$ too.
3229         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
3230         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
3231         (patch_throw_statement): Likewise. Fixed typo.
3232
3233 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
3234
3235         Revert:
3236         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3237         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3238         ASM_FINAL_SPEC.
3239         (lang_specific_pre_link): Use set_input to set input_filename.
3240         Append `main' here.
3241         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3242         (main): Fix definition.
3243         Strip `main' from classname.
3244         Fixes PR java/227.
3245
3246 2001-08-11  Zack Weinberg  <zackw@panix.com>
3247
3248         * lex.h: Don't include setjmp.h.  Don't define
3249         SET_FLOAT_HANDLER or prototype set_float_handler.
3250
3251 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3252
3253         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
3254         `poplevel' in the right order.
3255
3256 2001-08-09  Richard Henderson  <rth@redhat.com>
3257
3258         * Make-lang.in (class.o): Depend on TARGET_H.
3259         * class.c (emit_register_classes): Use target hooks instead of
3260         assemble_constructor and assemble_destructor.
3261
3262 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
3263
3264         * check-init.c (flags.h): Include
3265         (check_init): Don't report uninitialized static class
3266         initialization flags, don't free bit index when doing static class
3267         initialization optimization.
3268         (check_for_initialization): Return type changed to `unsigned int.'
3269         (attach_initialized_static_class): New function.
3270         * class.c (add_method_1): Create the initialized static class
3271         table if necessary.
3272         (finish_class): Always emit deferred inline methods.
3273         * decl.c (emit_init_test_initialization): Moved to expr.c
3274         (complete_start_java_method): Don't traverse
3275         DECL_FUNCTION_INIT_TEST_TABLE.
3276         (lang_mark_tree): Mark hash tables in function decls.
3277         * expr.c (emit_init_test_initialization): Moved from decl.c.
3278         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
3279         initialization flag, set DECL_CONTEXT and
3280         LOCAL_CLASS_INITIALIZATION_FLAG.
3281         (java_lang_expand_expr): Emit initialization code for static class
3282         initialized flags when entering block, if necessary.
3283         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
3284         * java-tree.h (flag_optimize_sci): New global variable declaration.
3285         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
3286         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
3287         (LOCAL_FINAL_P): Fixed typo in comment.
3288         (FINAL_VARIABLE_P): Likewise.
3289         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
3290         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
3291         (struct lang_decl): New fields `ict', `smic' and `cif.'
3292         (check_for_initialization): New returned value for global.
3293         (attach_initialized_static_class): New global function.
3294         (STATIC_CLASS_INIT_OPT_P): New macro.
3295         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
3296         * lang.c (java_decode_option): Handle
3297         `-fno-optimize-static-class-initialization'
3298         * parse.y (start_complete_expand_method): New function.
3299         (java_expand_method_bodies): Likewise.
3300         (attach_init_test_initialization_flags): Likewise.
3301         (adjust_init_test_initialization): Likewise.
3302         (emit_test_initialization): Likewise.
3303         (java_complete_expand_methods): Nullify abstract and native method
3304         bodies.
3305         (java_complete_expand_method): New locals `fbody', `block_body'
3306         and `exception_copy.' Reorganized: directly return on empty method
3307         bodies, call `start_complete_expand_method', remember definitely
3308         initialized static class in function, don't expand method bodies.
3309         (java_expand_classes): Call `java_expand_method_bodies' before
3310         `finish_class' when compiling to native.
3311         (resolve_expression_name): Use `orig' after building outer class
3312         field access.
3313         (patch_invoke): Remember static method invokations.
3314
3315 2001-08-06  Richard Henderson  <rth@redhat.com>
3316
3317         * class.c (emit_register_classes): Pass a symbol_ref and priority
3318         to assemble_constructor.
3319
3320 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
3321
3322         * java-tree.h (all_class_filename): New macro.
3323         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
3324         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
3325         newly created IDENTIFIER_NODE to `all_class_filename.'
3326
3327 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
3328
3329         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
3330         Use ggc_add_tree_root to register roots.
3331
3332 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
3333
3334         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
3335         second operand calling check_init.
3336         * decl.c (complete_start_java_method): Swaped second and third
3337         arguments while creating WITH_CLEANUP_EXPR node.
3338         * jcf-write.c (generate_bytecode_insns): Use second operand
3339         instead of third when handling WITH_CLEANUP_EXPR.
3340         * parse.y (java_complete_lhs): Expand second operand of
3341         WITH_CLEANUP_EXPR nodes.
3342         (patch_synchronized_statement): Swaped second and third arguments
3343         while creating WITH_CLEANUP_EXPR node.
3344
3345 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
3346
3347         * parse.y (create_interface): Avoid cyclic inheritance report when
3348         syntax error encountered during class definition.
3349         Fixes PR java/2956
3350
3351 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3352
3353         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3354         ASM_FINAL_SPEC.
3355         (lang_specific_pre_link): Use set_input to set input_filename.
3356         Append `main' here.
3357         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3358         (main): Fix definition.
3359         Strip `main' from classname.
3360         Fixes PR java/227.
3361
3362 2001-07-18  Tom Tromey  <tromey@redhat.com>
3363
3364         For PR java/2812:
3365         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
3366         * lex.c (java_new_lexer): Use ICONV_CONST.
3367         (java_read_char): Likewise.
3368         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
3369         (jv-scan$(exeext)): Likewise.
3370
3371 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
3372
3373         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
3374         * parse.y (check_class_interface_creation): Allow `private' if the
3375         enclosing is not an interface.
3376         (create_interface): Interface tagged public if the enclosing
3377         context is an interface.
3378         (create_class): Class tagged public if the enclosing context
3379         is an interface.
3380         Fixes PR java/2959
3381
3382 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
3383
3384         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
3385         Fixes PR java/2665
3386
3387 2001-07-14  Tim Josling  <tej@melbpc.org.au>
3388
3389         * check-init.c (check_init): Remove references to EXPON_EXPR.
3390
3391 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
3392
3393         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
3394         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
3395         Fixes PR java/3602
3396
3397 2001-07-13  Tom Tromey  <tromey@redhat.com>
3398
3399         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
3400         invocation.
3401
3402 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
3403
3404         * parse.y (patch_method_invocation): Don't override primary if one
3405         is already provided, but let this$<n> be built. Fixed comment.
3406
3407 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
3408
3409         * parse.y (empty_statement:): Report empty statement error only
3410         when found at class declaration level.
3411         Fixes PR java/3635
3412
3413 2001-07-12  Tom Tromey  <tromey@redhat.com>
3414
3415         * expr.c (expand_load_internal): New function.
3416         (LOAD_INTERNAL): Use it.
3417
3418 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
3419
3420         * parse.y (verify_constructor_super): Compare anonymous class ctor
3421         args with `valid_method_invocation_conversion_p.'
3422         Fixes PR java/3285
3423
3424 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
3425
3426         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
3427         `-fsyntax-only.' Fixes PR java/3248
3428
3429 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
3430
3431         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
3432
3433 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
3434
3435         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
3436         current function is static. Fixes PR java/1970
3437
3438 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3439
3440         * parse.y (patch_method_invocation): Add enclosing context to ctor
3441         calls if necessary. Fixes PR java/2953
3442
3443 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3444
3445         * parse.y (resolve_package): Abort if qualified expression member
3446         isn't right.
3447         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
3448         Fixes PR java/1391
3449
3450 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
3451
3452         * verify.c: Don't use // comments.
3453
3454 2001-07-05  Tom Tromey  <tromey@redhat.com>
3455
3456         * lang.c (flag_assume_compiled): Removed.
3457         * java-tree.h (flag_assume_compiled): Removed.
3458         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
3459         -fhash-synchronization, -fuse-divide-subroutine,
3460         -fcheck-references, -femit-class-file, -femit-class-files,
3461         -fassume-compiled.  Updated --encoding information.  Changed
3462         -foutput-class-dir to `-d'.
3463
3464 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
3465
3466         * jcf-parse.c (parse_class_file): Add lineno parameter to
3467         debug_start_source_file call.
3468
3469 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
3470
3471         * gcj.texi: Use gpl.texi.
3472         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
3473         dependencies and use doc/include in search path.
3474
3475 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
3476
3477         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
3478         `this'.  If so, don't build instance initializers.
3479
3480 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
3481
3482         * parse.y (resolve_expression_name): Improved error message for
3483         inner class cases. Fixes PR java/1958
3484
3485 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3486
3487         * lang.c: #include diagnostic.h
3488         (lang_print_error): Add a `diagnostic_context *' parameter.
3489         (java_dummy_print): Likewise.
3490         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
3491
3492 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
3493
3494         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
3495         * jcf.h (typedef struct JCF): New bitfield `finished.'
3496         (JCF_FINISH): Set `finished.'
3497         (JCF_ZERO): Reset `finished.'
3498         Fixes PR java/2633
3499
3500 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
3501
3502         * parse.y (class_body_declaration:): Don't install empty instance
3503         initializers.
3504         Fixes PR java/1314
3505
3506 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
3507
3508         * class.c (set_super_info): Call `set_class_decl_access_flags.'
3509         (set_class_decl_access_flags): New function.
3510         * java-tree.h (set_class_decl_access_flags): New prototype.
3511         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
3512         (parse_class_file): New local `decl_max_locals.' Take wide types
3513         into account to compute DECL_MAX_LOCALS.
3514         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
3515         imports on demand.
3516
3517 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
3518
3519         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
3520
3521 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
3522
3523         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
3524         * parse.y (do_resolve_class): Moved comments out to leading comment
3525         section. Removed local `start', New local `_ht' and
3526         `circularity_hash.'  Record `enclosing' in hash table and search
3527         it to detect circularity.  Use `enclosing' as an argument to
3528         `lookup_cl.' Free the hash table when done.
3529
3530 2001-06-19  Tom Tromey  <tromey@redhat.com>
3531
3532         * lex.c (java_read_char): Disallow invalid and overlong
3533         sequences.  Fixes PR java/2319.
3534
3535 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
3536
3537         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
3538
3539 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
3540
3541         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
3542         arguments accordingly.
3543
3544 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
3545
3546         * gcj.texi: Move contents to just after title page.
3547
3548 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
3549
3550         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
3551         builtin type.
3552         (patch_incomplete_class_ref): Build the class ref, build the class
3553         init if necessary, complete the tree.
3554         Fixes PR java/2605
3555
3556 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
3557
3558         * parse.y (lookup_field_wrapper): Test `name' code.
3559         (resolve_qualified_expression_name): Test `qual_wfl' code.
3560         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
3561         handle `qual_wfl' by code.
3562         (maybe_build_primttype_type_ref): Test `wfl' code.
3563
3564 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
3565
3566         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
3567         fdl.texi.
3568         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
3569         the dvi file in the java directory.
3570
3571 2001-05-25  Sam TH  <sam@uchicago.edu>
3572
3573         * gen-table.pl javaop.h jcf.h lex.h,
3574         parse.h: Fix header include guards.
3575
3576 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
3577
3578         * jv-scan.c (version): Update copyright year.
3579
3580 2001-05-21  Per Bothner  <per@bothner.com>
3581
3582         * jcf-parse.c (read_class):  If class is from .class or .zip file
3583         and it's already been read, don't push/pop parser context.
3584
3585 2001-05-18  Per Bothner  <per@bothner.com>
3586
3587         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
3588         command line so the jvgenmain-generated main program comes first.
3589
3590 2001-05-15  Tom Tromey  <tromey@redhat.com>
3591
3592         * class.c (build_utf8_ref): Don't generate identifier based on
3593         utf8const contents.
3594
3595 2001-05-12  Richard Henderson  <rth@redhat.com>
3596
3597         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
3598         * expr.c (java_lang_expand_expr): Expand it.
3599         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
3600         calling build_exception_object_ref.
3601         * parse.y (catch_clause_parameter): Likewise.
3602         (build_dot_class_method): Likewise.
3603         (try_reference_assignconv): Likewise.
3604         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
3605         * jcf-write.c (generate_bytecode_insns): Likewise.
3606
3607 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
3608
3609         * parse.y (build_unresolved_array_type): Set
3610         EXPR_WFL_QUALIFICATION on the newly created wfl.
3611         Fixes PR java/2538. Fixes PR java/2535.
3612
3613 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
3614
3615         * parse.y (fix_constructors): Removed unnecessary assignment to
3616         local. Moved assignment to `this$<n>', fixed comments and
3617         indentation.
3618         (build_wfl_wrap): Fixed indentation.
3619         Fixes PR java/2598, java/2579 and java/2658.
3620
3621 2001-05-03  Mo DeJong  <mdejong@redhat.com>
3622
3623         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
3624         check for byte swap.
3625
3626 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
3627
3628         * expr.c (build_class_init): Move MODIFY_EXPR
3629         outside of COND_EXPR.  Remove variable `call'.
3630
3631 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3632
3633         * decl.c: NULL_PTR -> NULL.
3634         * jcf-write.c: Likewise.
3635
3636 2001-05-01  Tom Tromey  <tromey@redhat.com>
3637
3638         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
3639         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
3640         * gcj.texi: Updated copyright text.  Include fdl.texi.
3641         (Top): Link to new node.
3642
3643 2001-05-01  Per Bothner  <per@bothner.com>
3644
3645         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
3646
3647 2001-05-01  Per Bothner  <per@bothner.com>
3648
3649         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
3650         import_list contains the name, not the TREE_PURPOSE.
3651
3652 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3653
3654         * jcf-io.c (read_zip_member): Cast to long in comparison with
3655         signed value.
3656
3657         * jvspec.c (lang_specific_driver): Initialize variables.
3658
3659         * mangle.c (find_compression_record_match): Likewise.
3660
3661         * typeck.c (build_null_signature): Provide static prototype.  Mark
3662         parameter with ATTRIBUTE_UNUSED.
3663
3664         * verify.c (verify_jvm_instructions): Initialize variable.
3665
3666 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3667
3668         * parse.y (do_resolve_class): Check for cyclic inheritance during
3669         inner class resolution.
3670
3671 2001-04-27  Per Bothner  <per@bothner.com>
3672
3673         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
3674         while iterating, since that could cause gc to lose stuff.
3675
3676 2001-04-26  Per Bothner  <per@bothner.com>
3677
3678         Fix method search wrt scope of inner classes to match JLS2.
3679         * typeck.c (build_null_signature):  New static function.
3680         (has_method):  New function.  Uses build_null_signature and lookup_do.
3681         * java-tree.h (has_method):  New declaration.
3682         * parse.y (find_applicable_accessible_methods_list):  Do not search
3683         context of inner classes here.
3684         (patch_method_invocation):  Search scope, ie. current and outer clases,
3685         for method matching simple name, to find class.
3686
3687 2001-04-26  Per Bothner  <per@bothner.com>
3688
3689         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
3690         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
3691
3692         * constants.c (find_methodref_with_class_index):  New function.
3693         (find_methodref_index):  Use find_methodref_with_class_index.
3694         * java-tree.h (find_methodref_with_class_index):  New declaration.
3695         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
3696         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
3697         If context changed from interface to class, don't use invokeinterface.
3698
3699 2001-04-25  Per Bothner  <per@bothner.com>
3700
3701         * verify.c (verify_jvm_instructions):  For field instructions,
3702         check that field index is valid.  For invoke instructions, check that
3703         method index is valid.
3704
3705 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
3706
3707         * config-lang.in (target_libs): Copy from $libgcj_saved.
3708
3709 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3710
3711         * decl.c (init_decl_processing): Add new class "protectionDomain"
3712         field.
3713         * class.c (make_class_data): Set initial value for "protectionDomain".
3714
3715 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3716
3717         * jvspec.c (lang_specific_driver): Fix memory allocation
3718         deficit, by using concat in lieu of xmalloc/sprintf.
3719
3720 2001-04-20  Per Bothner  <per@bothner.com>
3721
3722         Fixes to compile multiple .class files at once.
3723         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
3724         * java-tree.h (CLASS_PARSED_P):  New macro.
3725         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
3726         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
3727         (read_class):  Avoid some code duplication.
3728         Don't call JCF_FINISH for a .class file - might be needed later.
3729         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
3730         rather than CLASS_LOADED_P, since latter implies class laid out.
3731         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
3732         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
3733
3734 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3735
3736         * Make-lang.in (java/boehm.o): Depend on toplev.h.
3737
3738         * boehm.c: Include toplev.h.
3739
3740 2001-04-06  Tom Tromey  <tromey@redhat.com>
3741             Alexandre Petit-Bianco  <apbianco@redhat.com>
3742
3743         Fix for PR gcj/1404 and PR gcj/2332:
3744         * parse.y (build_array_from_name): If we use the type_wfl then
3745         accumulate dimensions from the original type as well.
3746         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
3747
3748 2001-04-06  Tom Tromey  <tromey@redhat.com>
3749
3750         * parse.y (analyze_clinit_body): Return true if the second operand
3751         of a METHOD_EXPR is nonzero.
3752
3753 2001-04-06  Tom Tromey  <tromey@redhat.com>
3754
3755         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
3756         directory.
3757         ($(srcdir)/java/parse.c): Likewise.
3758
3759 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
3760
3761         * gcj.texi: Use `which-gcj' instead of `which-g77.'
3762         (version-gcc): Initialized.
3763         (which-gcj): Likewise.
3764
3765 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
3766
3767         * java-tree.h (struct lang_decl): New macro
3768         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
3769         * parse.y (build_instance_initializer): New function.
3770         (add_instance_initializer): Use it.
3771         (java_fix_constructors): Set `current_class' before fix pass.
3772         (fix_constructors): Just return if already fixed. Move `super()'
3773         invokation ahead. Use `build_instance_initializer.'
3774         Fixes PR java/1315.
3775
3776 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
3777
3778         * parse.y (resolve_qualified_expression_name): Pass field's
3779         DECL_CONTEXT to `not_accessible_p.'
3780         (not_accessible_p): Changed parameters order in `inherits_from_p'
3781         invokation.
3782
3783 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
3784
3785         * lang-options.h: Add flag_check_references.
3786
3787 2001-04-04  Per Bothner  <per@bothner.com>
3788
3789         * java-tree.h (CONSTANT_VALUE_P):  New macro.
3790         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
3791         * parse.y (maybe_build_class_init_for_field):  New static function.
3792         (resolve_expression_name, resolve_field_access):  Use
3793         maybe_build_class_init_for_field instead of build_class_init
3794         This does not do the init if the field is compile-time-constant.
3795         (resolve_field_access):  Simplify.
3796
3797         * parse.y (fold_constant_for_init):  Merge test into switch.
3798
3799 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
3800
3801         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
3802         on gansidecl.h.
3803         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
3804
3805 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
3806
3807         * expr.c (pop_type_0): Save the result of the first
3808         lang_printable_name call in a scratch buffer, so it
3809         won't be clobbered by the second call.
3810
3811 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
3812
3813         * parse-scan.y (array_type:): Rewritten.
3814         (type_declaration:): `empty_statement' replaces `SC_TK.'
3815         (class_member_declaration:): `empty statement' added.
3816         (method_body:): Simplified.
3817         (static_initializer:): Likewise.
3818         (primary_no_new_array:): Use `type_literals.'
3819         (type_literals:): New rule.
3820         (dims:): Set and update `bracket_count.'
3821         Fixes PR java/1074. Fixes PR java/2412.
3822
3823 2001-03-28  Hans Boehm  <boehm@acm.org>
3824
3825         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
3826         (get_boehm_type_descriptor): Set type on returned value to be a
3827         pointer length integer.
3828
3829 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3830
3831         * expr.c (pop_type_0): Call `concat' rather than building the
3832         string manually.
3833         (pop_type): Add format specifier in call to `error'.
3834
3835         * parse.y (patch_method_invocation): Avoid casting away
3836         const-ness.
3837
3838 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
3839
3840         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
3841
3842 2001-03-28  Richard Henderson  <rth@redhat.com>
3843
3844         IA-64 ABI Exception Handling:
3845         * Make-lang.in (except.o): Don't depend on eh-common.h.
3846         * check-init.c (check_init): Handle EXC_PTR_EXPR.
3847         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
3848         [soft_exceptioninfo_call_node]: Remove.
3849         [eh_personality_libfunc, lang_eh_runtime_type]: New.
3850         (end_java_method): No emit_handlers.
3851         * except.c (java_set_exception_lang_code): Remove.
3852         (method_init_exceptions): Don't call it.
3853         (prepare_eh_table_type): No CATCH_ALL_TYPE.
3854         (build_exception_object_ref): New.
3855         (expand_end_java_handler): Update for except.h name changes.
3856         (emit_handlers, expand_resume_after_catch): Remove.
3857         * expr.c (java_lang_expand_expr): Update for except.h name changes.
3858         (process_jvm_instruction): Use build_exception_object_ref.
3859         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
3860         (soft_exceptioninfo_call_node): Remove.
3861         (build_exception_object_ref): Declare.
3862         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
3863         soft_exceptioninfo_call_node.  Move processing ...
3864         [EXC_PTR_EXPR]: ... here.
3865         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
3866         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
3867         (source_end_java_method): No java_set_exception_lang_code or
3868         emit_handlers.
3869         (build_dot_class_method): Use build_exception_object_ref.
3870         (try_reference_assignconv): Check EXC_PTR_EXPR not
3871         soft_exceptioninfo_call_node.
3872
3873 2001-03-28  Richard Henderson  <rth@redhat.com>
3874
3875         * java-tree.h (throw_node): Define as a single member of
3876         java_global_trees instead of a separate array.
3877         (JTI_THROW_NODE): New.
3878         * decl.c (throw_node): Don't declare.
3879         (init_decl_processing): Init a scalar throw_node.
3880         Don't register it for gc.
3881         * check-init.c (check_init): Reference scalar throw_node.
3882         * expr.c (build_java_athrow): Likewise.
3883         * jcf-write.c (generate_bytecode_insns): Likewise.
3884         * parse.h (BUILD_THROW): Likewise.
3885
3886 2001-03-28  Richard Henderson  <rth@redhat.com>
3887
3888         * decl.c (end_java_method): Do not save and restore
3889         flag_non_call_exceptions.
3890         * parse.y (source_end_java_method): Likewise.
3891         * lang.c (flag_exceptions): Don't declare.
3892         (java_init_options): Set flag_non_call_exceptions.  Set
3893         flag_exceptions here ...
3894         (java_init): ... not here.
3895
3896 2001-03-27  Richard Henderson  <rth@redhat.com>
3897
3898         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
3899         exceptions_via_longjmp.
3900
3901         * lang.c (flag_new_exceptions): Don't declare it.
3902         (java_init_options): Or set it.
3903
3904 2001-03-27  Richard Henderson  <rth@redhat.com>
3905
3906         * decl.c (end_java_method): Rename asynchronous_exceptions to
3907         flag_non_call_exceptions.
3908         * parse.y (source_end_java_method): Likewise.
3909
3910 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3911
3912         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
3913
3914 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
3915
3916         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
3917
3918 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
3919
3920         * parse.y (find_as_inner_class): Follow current package
3921         indications not to mistakingly load an unrelated class.
3922
3923 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3924
3925         * constants.c (PUTN): Use memcpy, not bcopy.
3926
3927         * lex.c (java_read_char): Use memmove, not bcopy.
3928
3929         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
3930
3931 2001-03-23  Per Bothner  <per@bothner.com>
3932
3933         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
3934         macro for better error pin-pointing.
3935         * java-tree.h:  Fix typo in comment.
3936
3937         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
3938         Don't include jsr/goto in exception range.
3939         Check if start and end of exception range are the same (also TRY_EXPR).
3940         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
3941         However, do emit the following goto even if try_block is empty.
3942         Defer freeing exception_decl until after the finalizer, to make
3943         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
3944
3945         * parse.y (java_complete_lhs):  If the try-clause is empty, just
3946         return the finally-clause and vice versa.
3947
3948 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
3949
3950         * gcj.texi (Input Options): documented the check for attribute
3951         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
3952         * java-tree.h (flag_force_classes_archive_check): Declared extern.
3953         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
3954         (jcf_parse): Check for the right classes archive if necessary.
3955         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
3956         (jcf_parse_fields): Fixed indentation.
3957         * jcf-write.c (append_gcj_attribute): New function.
3958         (generate_classfile): Compute the attribute count, invoke
3959         `append_gcj_attribute'.
3960         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
3961         turned into bit-fields. New bit-field `right_zip.'
3962         (JCF_ZERO): Set `right_zip' to zero.
3963         * lang-options.h (-fforce-classes-archive-check): Added flag.
3964         * lang.c (flag_force_classes_archive_check): New flag.
3965         (lang_f_options): New entry `force-classes-archive-check.'
3966         Fixes PR java/1213.
3967
3968 2001-02-07  Andrew Haley  <aph@redhat.com>
3969
3970         * gcj.texi (Configure-time Options): Add -fcheck-references.
3971         * expr.c (build_java_indirect_ref): New function.
3972         (java_check_reference): New function.
3973         (build_java_array_length_access): Use build_java_indirect_ref to
3974         check for null references.
3975         (build_java_arrayaccess): Likewise.
3976         (build_get_class): Likewise.
3977         (build_field_ref): Likewise.
3978         (invoke_build_dtable): Likewise.
3979         (build_invokeinterface): Likewise.
3980         * lang.c (lang_f_options): Add flag_check_references.
3981         * jvspec.c (jvgenmain_spec): Add flag_check_references.
3982         * java-tree.h (flag_check_references): New variable.
3983         * lang.c (flag_check_references): Likewise.
3984         * parse.y (patch_invoke): Use java_check_reference.
3985         (patch_assignment): Allow for extra nesting in
3986         _Jv_CheckArrayStore.
3987
3988 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
3989
3990         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
3991         * lex.c (cxx_keywords): Likewise.
3992
3993 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
3994
3995         * parse.y (qualify_ambiguous_name): Broaden `length'
3996         recognition. Help MODIFY_EXPR be resolved as expression names.
3997         Fixes PR java/2066. Fixes PR java/2400.
3998
3999 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
4000
4001         * gjavah.c (process_file): Mark interface definitions with
4002         "__attribute__ ((java_interface))".
4003
4004 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
4005
4006         * class.c (layout_class): Fixed push_super_field's second
4007         argument. Fixes PR java/2333.
4008         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
4009         too early to lay innerclasses out.
4010
4011 2001-03-20  Tom Tromey  <tromey@redhat.com>
4012             Alexandre Petit-Bianco <apbianco@redhat.com>
4013
4014         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
4015         inside an array reference. Insertion of the array store check
4016         rewritten. Fixes PR java/2299.
4017
4018 2001-03-20  Tom Tromey  <tromey@redhat.com>
4019
4020         * lex.c (java_read_unicode): Only accept leading `u's.
4021
4022 2001-03-20  Tom Tromey  <tromey@redhat.com>
4023
4024         * jcf-parse.c (read_class): Initialize `class'.
4025
4026 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4027
4028         * jcf_parse.c (jcf_parse): Eliminate unused variable.
4029
4030 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
4031
4032         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
4033         (layout_class): Likewise.
4034         (layout_class_method): Likewise.
4035         (emit_register_classes): Likewise.
4036         * decl.c (builtin_function): Likewise.
4037         (give_name_to_locals): Likewise.
4038
4039 2001-03-19  Per Bothner  <per@bothner.com>
4040
4041         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
4042         before trying to load an inner class.
4043
4044         Fixes to process to command-line .class files in two passes.
4045         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
4046         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
4047         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
4048         * class.c (is_compiled_class):  Fix for renamed flag.
4049         * parse.y (maybe_create_class_interface_decl):  Likewise.
4050         * jcf-parse.c (yyparse):  Also set if compiling .class files.
4051         * jcf-parse.c (read_class);  Read current_class.
4052         (jcf_parse):  Make static.
4053         (load_inner_classes):  New function, with code moved from jcf_parse,
4054         because we need to inner classes after the command-line files are read.
4055         (yyparse):  Set finput to NULL when it doesn't need to be closed.
4056         Reduce use of main_jcf (basically only for archive) and
4057         use finput instead of main_jcf->read_state.
4058         Inline jcf_figure_file_type into yyparse.
4059         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
4060         Defer load_inner_classes and parse_class_file to a second pass,
4061         after we've correctly mapped command-line .clas fiels to classes.
4062         (jcf_figure_file_type):  Removed.
4063         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
4064         (JCF_ZERO):  Also clear zipd field.
4065         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
4066
4067 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4068
4069         * jcf-parse.c (yyparse): Change ch from char * to char.
4070
4071 2001-03-19  Per Bothner  <per@bothner.com>
4072
4073         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
4074         Add constructed filelist-file at end, following -xjava.  Thus any .o
4075         and library files are not affected by the -xjava.  Also wrap
4076         explicit @FILE with -xjava and -xnone.
4077
4078 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
4079
4080         * class.c (build_static_field_ref): Call make_decl_rtl() after
4081         setting the DECL_EXTERNAL flag.
4082
4083 2001-03-17  Per Bothner  <per@bothner.com>
4084
4085         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
4086
4087         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
4088         when result is is needed (target is STACK_TARGET).
4089
4090         * parse.h (JDEP_SOLV):  Removed.
4091         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
4092
4093         * parse.y (incomplete_class_list): Removed.
4094         (obtain_incomplete_type): Don't use or set incomplete_class_list.
4095         It doesn't work if resolve_class changes the name of an array type
4096         that is on the list and then someone else looks for the modified name.
4097         Also, seems liable to break when compiling multiple source files at
4098         once.  So the simplest is to just remove incomplete_class_list -
4099         it is only a minor space win and it is not even clear it saves time.
4100
4101         * parse.y (resolve_class):  Remove unneeded promote_type.
4102
4103 2001-03-15  Per Bothner  <per@bothner.com>
4104
4105         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
4106         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
4107         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
4108         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
4109
4110         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
4111         * parse.y (java_expand_classes):  Likewise.
4112
4113         * parse.y (expand_start_java_method):  Was only called once and had a
4114         misleading name, so inline in caller java_complete_expand_method.
4115         (enter_a_block):  Likewise inline in enter_block and remove.
4116
4117         Remove junk from when gcc/java was created (by copying from C/C++).
4118         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
4119         (struct binding_level):  Remove fields keep, keep_if_subblocks,
4120         more_cleanups_ok, have_cleanups (which have never been used).
4121         (pushlevel, poplevel):  Remove related useless code.
4122
4123         * class.c (make_class_data):  The class_dtable_decl (i.e. the
4124         vtable for Class) should be external, except when compiling Class.
4125
4126         * jvspec.c (lang_specific_driver):  Fix -C handling.
4127         Check -save-temps to see if temp @FILE should be deleted.
4128         Follow-up to/fix for February 16 patch.
4129
4130         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
4131         (type_stack_dup):  Remove no-longer neded error check.
4132
4133 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
4134
4135         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
4136         to 'for_pointer'. If this type is for a pointer (argument) mangling,
4137         don't surround the element with 'N..E' if the type name is
4138         unqualified.
4139
4140 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4141
4142         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
4143         DECL_RTL_SET_P, etc.
4144         (make_method_value): Likewise.
4145         (get_dispatch_table): Likewise.
4146
4147         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4148
4149 2001-03-07  Tom Tromey  <tromey@redhat.com>
4150
4151         * config-lang.in (lang_requires): Define.
4152
4153 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
4154
4155         * typeck.c (convert): Check flag_unsafe_math_optimizations,
4156         not flag_fast_math.
4157
4158 2001-03-05  Per Bothner  <per@bothner.com>
4159
4160         Fix a problem where rest_of_decl_compilation applied to
4161         class_dtable_decl causes problems because it was done too early,
4162         before output file was opened.
4163         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
4164         * class.c (class_dtable_decl):  Add macro - element of class_roots.
4165         (make_class_data):  Define class_dtable_decl.
4166         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
4167
4168 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4169
4170         * java/class.c, java/decl.c, java/java-tree.h: Replace all
4171         uses of 'boolean' with 'bool'.
4172
4173 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4174
4175         * lang-specs.h: Add zero initializer for cpp_spec field to all
4176         array elements.
4177
4178 2001-02-16  Per Bothner  <per@bothner.com>
4179
4180         Handle compiling multiple input files at once, and @FILE syntax.
4181         * gcj.texi:  Updated documentation to match.
4182         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
4183         * jcf-parse.c (parse_source_file):  Split into ...
4184         (parse_source_file_1):  New function - and:
4185         (parse_source_file_2):  New function.
4186         (yyparse):  On -ffilelist-file, open and scan named file.
4187         On first pass over files, only do parse_source_file_1.
4188         A new second pass calls parse_source_file_2 for each file to compile.
4189         (init_jcf_parse):  Call init_src_parse.
4190         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
4191         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
4192         as multiple input file combined in one compilation.
4193         * lang-options.h:  Add -ffilelist-file
4194         * lang.c (flag_filelist_file):  New flag variable.
4195         (lang_f_options):  Handle -ffilelist-file.
4196         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
4197         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
4198         gclass_list - use global fields of src_parse_roots instead.
4199         * parse.y (src_parse_roots):  New array.
4200         (incomplete_class_list, gclass_list):  New macros.
4201         (push_parser_context, java_pop_parser_context,
4202         java_parser_context_resume):  Don't fiddle with deleted fields.
4203         (various):  Use incomplete_class gclass_list and global macros
4204         instead of parse_ctxt fields - the lists are global.
4205         (init_src_parse):  New function.
4206
4207 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4208
4209         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
4210
4211 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4212
4213         * parse.y (check_inner_class_access): Moved declaration of local
4214         `enclosing_decl_type' to the right location.
4215
4216 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
4217
4218         * parse.y (parser_check_super_interface): Don't call
4219         check_pkg_class_access for an inner interface.
4220         (parser_check_super): Don't call check_pkg_class_access for inner
4221         class.
4222         (do_resolve_class): Simplify enclosing type loop. Don't call
4223         check_pkg_class_access if CL and DECL are not set.
4224         (find_in_imports_on_demand): Set DECL if class_type needed to be
4225         loaded. Don't call check_pkg_class_access for an inner class.
4226         (check_inner_class_access): Rewritten to implement member access
4227         rules as per spec 6.6.1.
4228         (check_pkg_class_access): Handle the empty package correctly.
4229         (in_same_package): New function. Determine if two classes are in the
4230         same package.
4231
4232 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
4233
4234         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
4235         method into array types.
4236         * parse.y (patch_method_invocation): Bypass access check on clone call
4237         to array instance.
4238
4239 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
4240
4241         * expr.c (build_instanceof): Check for arrays when trying fold to
4242         false.
4243
4244 2001-02-15  Jim Meyering  <meyering@lucent.com>
4245
4246         * Make-lang.in (java.install-common): Depend on `installdirs'.
4247         (java.install-info): Likewise.
4248
4249 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
4250
4251         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
4252
4253 2001-02-14  Tom Tromey  <tromey@redhat.com>
4254             Alexandre Petit-Bianco  <apbianco@cygnus.com>
4255
4256         Fix for PR java/1261.
4257         * typeck.c (build_java_array_type): Add public `clone' method to
4258         arrays.
4259         * parse.y (resolve_qualified_expression_name): Use current_class
4260         when checking for inaccessibility.
4261         (patch_method_invocation): Fixed error message when accessibility
4262         denied.  Added `from_super' argument.
4263
4264 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
4265
4266         * parse.y (resolve_class): Don't build a fake decl. Use the one
4267         already built.
4268         * typeck.c (build_java_array_type): Build and assign decl to array
4269         type.
4270
4271 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
4272
4273         * parse.y (not_accessible_p): Changed leading comment. Added extra
4274         `where' argument. Use it to enforce protected access rules.
4275         (resolve_qualified_expression_name): Added extra argument to
4276         not_accessible_p.
4277         (patch_method_invocation): Use argument `primary' to provide
4278         not_accessible_p with an extra argument.
4279         (lookup_method_invoke): Added extra argument to not_accessible_p.
4280         (search_applicable_method_list): Likewise.
4281
4282 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4283
4284         * parse.y (resolve_qualified_expression_name): Try to resolve as
4285         an inner class access only if `decl' is a TYPE_DECL.
4286
4287 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4288
4289         * decl.c (classdollar_identifier_node): Initialize.
4290         * java-tree.h (enum java_tree_index): New entry
4291         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
4292         (classdollar_identifier_node): New macro.
4293         (ID_CLASSDOLLAR_P): Likewise.
4294         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
4295         (build_dot_class_method_invocation): Likewise.
4296         (find_applicable_accessible_methods_list): `class$' can't be
4297         inherited.
4298
4299 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
4300
4301         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
4302
4303 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4304
4305         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
4306         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
4307         gone.
4308
4309 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4310
4311         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
4312         outside of the `__U' sequence too.
4313         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
4314         sequence too.
4315
4316 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4317
4318         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
4319
4320 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4321
4322         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
4323         (JVGENMAIN_OBJS): Likewise.
4324         * java-tree.h (append_gpp_mangled_name): New prototype.
4325         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
4326         Removed cast calling `gcc_add_root.'
4327         * jvgenmain.c (mangle_obstack): New global, initialized.
4328         (main): Use it.
4329         (do_mangle_class): Constify local `ptr.'
4330         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
4331         append_gpp_mangle_name and update `count' if necessary.
4332         Use `mangle_obstack.'
4333         * mangle.c (append_unicode_mangled_name): Removed.
4334         (append_gpp_mangled_name): Likewise.
4335         (unicode_mangling_length): Likewise.
4336         (mangle_member_name): Return type set to `void.'
4337         (mangle_field_decl): Don't append `U' in escaped names.
4338         (mangle_method_decl): Likewise.
4339         (mangle_member_name): Just use `append_gpp_mangled_name.'
4340         * mangle_name.c: New file.
4341
4342 2001-02-07  Per Bothner  <per@bothner.com>
4343
4344         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
4345
4346         * check-init.c (check_init):  Don't call done_alternative after
4347         processing loop code, as a LOOP_EXPR never terminates normally.
4348
4349 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
4350
4351         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
4352
4353 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4354
4355         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
4356         DECLs.
4357
4358 2001-02-06  Tom Tromey  <tromey@redhat.com>
4359
4360         * lex.c (java_new_lexer): Longer error message.
4361
4362 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
4363             Alexandre Petit-Bianco  <apbianco@cygnus.com>
4364
4365         * typeck.c (build_prim_array_type): Added leading comment.
4366         (build_java_array_type): Moved locals out of
4367         block. Always create the `data' field, fixed alignment to match
4368         C++.
4369
4370 2001-02-04  Tom Tromey  <tromey@redhat.com>
4371
4372         * expr.c (java_lang_expand_expr): Don't bother recomputing
4373         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
4374         Fixes PR java/1866.
4375
4376 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4377
4378         * parse.y (process_imports): Save the original name of the import
4379         for better error report.
4380
4381 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
4382
4383         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
4384         of macros used when compiling jvspec.c.
4385         * jvspec.c (lang_specific_driver): Link with the shared
4386         libgcc by default.
4387
4388 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4389
4390         * check-init.c (check_init): Call internal_error instead of fatal.
4391         * expr.c (java_lang_expand_expr): Likewise.
4392         * jcf-parse.c (get_constant): Likewise.
4393         * mangle.c (java_mangle_decl): Likewise.
4394         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
4395         (operator_string): Likewise.
4396         * check-init.c (check_init): Call abort instead of fatal.
4397         * class.c (build_class_ref): Likewise.
4398         * constants.c (write_constant_pool): Likewise.
4399         * decl.c (start_java_method): Likewise.
4400         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
4401         (java_stack_dup, encode_newarray_type): Likewise.
4402         (build_java_array_length_access): Likewise.
4403         (build_java_check_indexed_type, expand_java_pushc): Likewise.
4404         (build_java_soft_divmod, build_invokeinterface): Likewise.
4405         * java-tree.h (INNER_CLASS_P): Likewise.
4406         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
4407         (give_name_to_class, get_class_constant): Likewise.
4408         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
4409         (find_constant_index, generate_bytecode_conditional): Likewise.
4410         (generate_bytecode_insns, perform_relocations): Likewise.
4411         * lex.c (java_unget_unicode, java_lex): Likewise.
4412         * mangle.c (mangle_type, mangle_record_type): Likewise.
4413         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
4414         (finish_mangling): Likewise.
4415         * parse.h (MARK_FINAL_PARMS): Likewise.
4416         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
4417         (obtain_incomplete_type, java_complete_class): Likewise.
4418         (java_check_regular_methods, java_complete_expand_method): Likewise.
4419         (cut_identifier_in_qualified, check_deprecation): Likewise.
4420         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
4421         (java_complete_lhs, lookup_name_in_blocks): Likewise.
4422         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
4423         * typeck.c (set_local_type, parse_signature_type): Likewise.
4424         (parse_signature_string, build_java_signature): Likewise;
4425         (set_java_signature): Likewise.
4426         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
4427         * class.c (add_method): Call fatal_error instead of fatal.
4428         (build_static_field_ref): Likewise.
4429         * expr.c (build_known_method_ref, expand_invoke): Likewise.
4430         * jcf-parse.c (get_constant, jcf_parse): Likewise.
4431         * lex.c (java_new_new_lexer): Likewise.
4432         * jv-scan.c (main): Likewise.
4433         (fatal_error): Renamed from fatal.
4434         * jcf-parse.c (yyparse): Call fatal_io_error instead of
4435         pfatal_with_name.
4436         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
4437         (yyparse): Likewise.
4438         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
4439         * lex.c (java_get_line_col): Likewise.
4440         * jcf-parse.c (load_class): Make errors non-fatal.
4441         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
4442
4443 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
4444
4445         * jvgenmain.c (class_mangling_suffix): Remove unused string.
4446         (error): Remove unused function.
4447         (main): Don't use "__attribute__ alias" on generated class symbol.
4448
4449 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4450
4451         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
4452         argument.
4453         * parse.y (finish_method_declaration): Code accounting for WFLed
4454         method DECL_NAMEs deleted.
4455         (check_abstract_method_definitions): Likewise.
4456         (resolve_type_during_patch): Layout resolved type.
4457         * typeck.c (lookup_do): Removed unused local.
4458
4459 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
4460
4461         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
4462         * decl.c (init_decl_processing): Use integer_minus_one_node, not
4463         integer_negative_one_node.
4464         * expr.c (build_java_binop): Likewise.
4465
4466 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
4467
4468         * zextract.c (read_zip_archive): Read file_offset before writing
4469         zipd and consequently clobbering the header contents.
4470
4471 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4472
4473         * Make-lang.in: Remove all dependencies on defaults.h.
4474         * decl.c: Don't include defaults.h.
4475         * expr.c: Likewise.
4476         * parse.y: Likewise.
4477
4478 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4479
4480         * ChangeLog (2001-01-21): Fixed typo.
4481         * class.c (layout_class_method): Code accounting for WFLed
4482         method DECL_NAMEs deleted.
4483         * constant.c (find_methodref_index): Likewise.
4484         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
4485         * java-tree.h (DECL_FUNCTION_WFL): New macro.
4486         (struct lang_decl): New field `wfl'.
4487         (java_get_real_method_name): Prototype deleted.
4488         * mangle.c (mangle_method_decl): Code accounting for WFLed
4489         method DECL_NAMEs deleted.
4490         * parse.h (GET_METHOD_NAME): Macro deleted.
4491         * parse.y (reset_method_name): Deleted.
4492         (method_header): Set DECL_FUNCTION_WFL.
4493         (check_abstract_method_header): Code accounting for WFLed method
4494         DECL_NAMEs deleted.
4495         (java_get_real_method_name): Deleted.
4496         (check_method_redefinition): Code accounting for WFLed method
4497         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
4498         (java_check_regular_methods): Likewise.
4499         (java_check_abstract_methods): Likewise.
4500         (java_expand_classes): Don't call `reset_method_name.'
4501         (search_applicable_method_list): Use DECL_NAMEs instead of
4502         GET_METHOD_NAME.
4503         * typeck.c (lookup_do): Code accounting for WFLed method
4504         DECL_NAMEs deleted.
4505
4506 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
4507
4508         * lex.c (java_read_char): Check for EOF from getc first.
4509
4510 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4511
4512         * class.c (layout_class): Don't lay the superclass out if it's
4513         already being laid out.
4514         * jcf-parse.c (handle_innerclass_attribute): New function.
4515         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
4516         handle_innerclasses_attribute.
4517         (jcf_parse): Don't load an innerclasses if it's already being
4518         laid out.
4519         * jcf-write.c (append_innerclass_attribute_entry): Static
4520         `anonymous_name' and its initialization deleted. `ocii' and `ini'
4521         to be zero for anonymous classes.
4522
4523 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4524
4525         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
4526         necessary.
4527         * jcf-parse.c (set_source_filename): Use
4528         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
4529
4530 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4531
4532         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
4533         gets a unique asm name.
4534
4535 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4536
4537         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
4538         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
4539         if necessary.
4540         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
4541         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
4542         * parse.y (lookup_package_type_and_set_next): Deleted.
4543         (resolve_package): Removed unnecessary code.
4544         (find_applicable_accessible_methods_list): `finit$' can't be
4545         inherited.
4546         * verify.c (pop_argument_types): Added missing prototype.
4547
4548 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
4549
4550         * config-lang.in: Disable java by default.
4551
4552 2001-01-23  Tom Tromey  <tromey@redhat.com>
4553
4554         * gcj.texi (Copying): New node.
4555         Added copyright information.
4556
4557 2001-01-21  Per Bothner  <per@bothner.com>
4558
4559         Various fixes to allow compiling a compressed .jar/.zip archive.
4560         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
4561         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
4562         (struct ZipDirectory):  New field zipf points to owning ZipFile.
4563         * jcf.h (struct ZipDirectory):  Add forward declaration.
4564         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
4565         Remove seen_in_zip and zip_offset fields.
4566         (JCF_SEEN_IN_ZIP):  New macro.
4567         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
4568         * jcf-io.c:  Change all ZipFileCache to ZipFile.
4569         (read_zip_member):  New function.
4570         (open_in_zip):  Call read_zip_member.
4571         * jcf-parse.c (find_in_current_zip):  Remove function.
4572         (read_class):  Merge in find_in_current_zip functionality.
4573         Call read_zip_member if needed.
4574         (parse_zip_file_entries):  Use read_zip_member.
4575         (process_zip_dir):  Update for removed and added JCF fields.
4576         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
4577
4578 2001-01-21  Per Bothner  <per@bothner.com>
4579
4580         Minor optimization of static ggc roots.
4581         * jcf-parse.c (parse_roots):  New static field.
4582         (current_field, current_method, current_file_list):  Replace by macros
4583         naming fields of parse_roots.
4584         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
4585         * class.c (class_roots):  New static field.
4586         (registered_class, fields_ident, info_ident, class_list):
4587         New macros naming fields of parse_roots.
4588         (build_static_field_ref):  Don't register roots here.
4589         (layout_class):  Static field list replaced by macro class_list.
4590         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
4591         Initialize fields_ident and info_ident here.
4592
4593 2001-01-21  Per Bothner  <per@bothner.com>
4594
4595         * jcf-parse.c (ggc_mark_jcf):  New function.
4596         (init_jcf_parse):  Register current_jcf as ggc root.
4597
4598 2001-01-21  Per Bothner  <per@bothner.com>
4599
4600         * lang.c (put_decl_node):  Print method's name.
4601
4602 2001-01-21  Per Bothner  <per@bothner.com>
4603
4604         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
4605         (verify_jvm_instructions):  Use it, for better error messages on loads.
4606
4607 2001-01-21  Per Bothner  <per@bothner.com>
4608
4609         * verify.c (merge_type_state):  Still may have to merge even if
4610         LABEL_VERIFIED (label).
4611
4612 2001-01-21  Per Bothner  <per@bothner.com>
4613
4614         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
4615         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
4616
4617 2001-01-19  Per Bothner  <per@bothner.com>
4618
4619         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
4620         if expeting an interface type.  Refines Tom's change of 2000-09-12.
4621
4622 2001-01-18  Per Bothner  <per@bothner.com>
4623
4624         * gcj.texi (Input Options): Mention .java files.
4625
4626 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4627
4628         * lang-options.h (-Wunsupported-jdk11): Removed.
4629         * lang.c (flag_not_overriding): Deleted.
4630         (flag_static_local_jdk1_1): Likewise.
4631         (lang_W_options): Removed "unsupported-jdk11" entry.
4632         * parse.y (java_check_methods): Removed dead code.
4633
4634 2001-01-17  Tom Tromey  <tromey@redhat.com>
4635
4636         Changes suggested by Per Bothner:
4637         * gcj.texi (Input Options): Don't mention input files.
4638         (Code Generation): Updated --main information.
4639         (Invoking jcf-dump): Mention that --javap is incomplete.
4640         From Alexandre Petit-Bianco:
4641         (Warnings): Don't mention -Wunsupported-jdk11.
4642         My stuff:
4643         (Compatibility): Mention JDK 1.2-ness of libraries.
4644         (Resources): Mention resources used when writing gcj.
4645
4646 2001-01-17  Tom Tromey  <tromey@redhat.com>
4647
4648         * gcj.texi: New file.
4649         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
4650         (java.info): Depend on gcj.info.
4651         (java/gcj.dvi): New target.
4652         (java.dvi): Depend on gcj.dvi.
4653         (java.install-info): Wrote.
4654
4655 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
4656
4657         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
4658         having called make_decl_rtl.
4659
4660 2001-01-14  Per Bothner  <per@bothner.com>
4661
4662         Various patches to emit better messages on verification errors.
4663         * expr.c (push_type_0):  Return error indication on stack overflow,
4664         instead of callinfg fatal.
4665         (push_type):  Now just call push_type_0 (nd fatal on overflow).
4666         (pop_type_0):  Return detailed error message (in a char** argument).
4667         (pop_type):  If pop_type_0 fails, print error message.
4668         (pop_argument_types):  Moved to verify.c.
4669         * verify.c (pop_argument_types):  Moved from expr.c.
4670         Return a (possible) error message, rather than void.
4671         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
4672         (verify_jvm_instruction):  Use new macros, improving error messages.
4673         For case OPCODE_astore use object_ptr_type_node.
4674         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
4675         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
4676
4677         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
4678         constant, return body without wrapper.  (Improves constant folding.)
4679         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
4680
4681 2001-01-13  Per Bothner  <per@bothner.com>
4682
4683         * expr.c (expand_java_field_op):  Assigning to a final field outside
4684         an initializer does not violate JVM spec, so should be warning, not
4685         error.  (Sun's verifier does not complain - though MicroSoft's does.)
4686
4687 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
4688
4689         * gjavah.c (version), jcf-dump.c (version): Update copyright year
4690         to 2001.
4691
4692 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
4693
4694         * parse.y (resolve_expression_name): Permit instance variables from
4695         enclosing context in super constructor call.
4696         (resolve_qualified_expression_name): Permit enclosing class's qualified
4697         "this" in super constructor call.
4698
4699 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
4700
4701         * class.c (build_utf8_ref): Remove last argument in call to
4702         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
4703         (build_class_ref): Likewise.
4704         (build_static_field_ref): Likewise.
4705         (get_dispatch_table): Likewise.
4706         (layout_class_method): Likewise.
4707         (emit_register_classes): Likewise.
4708         * constants.c (build_constant_data_ref): Likewise.
4709         * decl.c (builtin_function): Likewise.
4710         (create_primitive_vtable): Likewise.
4711         * expr.c (build_known_method_def): Likewise.
4712         (build_jni_stub): Likewise.
4713         (java_lang_expand_expr): Likewise.
4714
4715 2001-01-10  Tom Tromey  <tromey@redhat.com>
4716
4717         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
4718
4719 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4720
4721         * java-tree.h (lang_printable_name_wls): New prototype.
4722         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
4723         rather than `current_class' to print type name. Don't prepend type
4724         names when printing constructor names.
4725         (lang_printable_name_wls): New function.
4726         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
4727         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
4728         * parse.y (patch_method_invocation): Message tuned for constructors.
4729         (not_accessible_p): Grant `private' access from within
4730         enclosing contexts.
4731
4732 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4733
4734         All files with updated copyright when applicable.
4735         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
4736         * class.c (mangle_class_field): Function removed.
4737         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
4738         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
4739         (build_class_ref): Call `java_mangle_class_field' instead of
4740         `mangle_class_field.'
4741         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
4742         (layout_class): Call `java_mangle_decl' instead of
4743         `mangle_static_field.'
4744         (cxx_keywords): Initialized static array moved to `lex.c.'
4745         (layout_class_method): Changed leading comment. Simplified to
4746         call `java_mangle_decl.' Local `ptr' moved in for loop body.
4747         * decl.c (lang_mark_tree): Mark field `package_list.'
4748         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
4749         (struct lang_type): New field `package_list.'
4750         (unicode_mangling_length): Prototype removed.
4751         (append_gpp_mangled_name, append_gpp_mangled_classtype,
4752         emit_unicode_mangled_name): Likewise.
4753         (cxx_keyword_p): New prototype.
4754         (java_mangle_decl, java_mangle_class_field,
4755         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
4756         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
4757         `build_expr_wfl.'
4758         * jvgenmain.c (main_method_prefix): Global variable removed.
4759         (main_method_suffix): Likewise.
4760         (do_mangle_classname): New function.
4761         (main): Call it. Format changed to accommodate new mangling scheme.
4762         * lex.c: (utf8_cmp): Conditionally prototyped.
4763         (cxx_keywords): Moved from class.c, conditionally defined.
4764         (utf8_cmp, cxx_keyword_p): Likewise.
4765         * mangle.c (obstack.h, ggc.h): Included.
4766         (mangle_field_decl): New function.
4767         (mangle_method_decl, mangle_type, mangle_pointer_type,
4768         mangle_array_type, mangle_record_type,
4769         find_compression_pointer_match, find_compression_array_match,
4770         find_compression_record_match,
4771         find_compression_array_template_match, set_type_package_list,
4772         entry_match_pointer_p, emit_compression_string, init_mangling,
4773         finish_mangling, compression_table_add, mangle_member_name): Likewise.
4774         (mangle_obstack): New global.
4775         (MANGLE_RAW_STRING): New macro.
4776         (unicode_mangling_length): Turned static.
4777         (append_unicode_mangled_name): Renamed from
4778         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
4779         replaces `obstack', removed from the parameter list.
4780         (append_gpp_mangled_name): Turned static. `mangle_obstack'
4781         replaces parameter `obstack', removed from the parameter list. Call
4782         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
4783         (append_gpp_mangled_classtype): Removed.
4784         (compression_table, compression_next): New static variables.
4785         * parse.y (temporary_obstack): Extern declaration removed.
4786
4787 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4788
4789         * parse.y (patch_binop): Compute missing type in error situations.
4790
4791 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
4792
4793         * class.c (make_class_data): Push initial value for "arrayclass".
4794         * decl.c (init_decl_processing): Add new class field "arrayclass".
4795
4796 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
4797
4798         From patha@softlab.ericsson.se:
4799         * parse.y (switch_label): Use build, not build1, to construct
4800         DEFAULT_EXPR.
4801
4802 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4803
4804         * lang.c (lang_decode_option): Change -MA to -MP.
4805         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
4806         Update to new prototype; do quote targets.
4807         (jcf_dependency_write): Update.
4808
4809 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
4810
4811         Shorten primitive array allocation path:
4812         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
4813         to create new primitive arrays.
4814         * expr.c (build_newarray): If generating native code, call
4815         soft_newarray_node with a reference to the primitive TYPE identifier
4816         instead of type_value.
4817
4818 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
4819
4820         Fix for PRs gcj/312 and gcj/253:
4821         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
4822         dest if they arn't already.
4823         * class.c (layout_class): Call maybe_layout_super_class on
4824         superinterfaces also, but only if compiling from bytecode.
4825
4826         Fix for PR gcj/373:
4827         * parse.y (create_class): Set ACC_STATIC if class is declared in an
4828         interface.
4829
4830 2000-12-15  Tom Tromey  <tromey@redhat.com>
4831
4832         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
4833         set.
4834
4835 2000-12-14  Andrew Haley  <aph@redhat.com>
4836
4837         * boehm.c (mark_reference_fields): Change test to correctly detect
4838         bitmap overflow.
4839
4840 2000-12-15  Andreas Jaeger  <aj@suse.de>
4841
4842         * config-lang.in (lang_dirs): Added.
4843
4844 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4845
4846         * parse.y (end_artificial_method_body): Fixed undefined behavior.
4847         Credits go to rth for finding it.
4848
4849 2000-12-13  Mike Stump  <mrs@wrs.com>
4850
4851         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
4852
4853 2000-11-07  Tom Tromey  <tromey@cygnus.com>
4854
4855         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
4856         * lex.c (java_ignorable_control_p): Removed.
4857         (java_letter_or_digit_p): Removed.
4858         (java_start_char_p): New function.
4859         (java_read_char): Return `int', not `unicode_t'.  Changed
4860         callers.
4861         (java_read_unicode): Likewise.
4862         (java_read_unicode_collapsing_terminators): Likewise.
4863         (java_get_unicode): Likewise.
4864         (java_new_lexer): Initialize hit_eof.
4865         (java_parse_end_comment): Take `int' argument.
4866         (java_parse_doc_section): Likewise.
4867         (java_parse_escape_sequence): Don't allow backlash-newline.
4868         Return `int'.
4869         * lex.h (JAVA_DIGIT_P): Removed.
4870         (_JAVA_LETTER_OR_DIGIT_P): Removed.
4871         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
4872         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
4873         (JAVA_PART_CHAR_P): New macro.
4874         (UEOF): Now -1.
4875         (JAVA_CHAR_ERROR): Now -2.
4876         (java_lexer): New field `hit_eof'.
4877         * chartables.h: New file.
4878         * gen-table.pl: new file.
4879
4880 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4881             Alexandre Petit-Bianco  <apbianco@cygnus.com>
4882
4883         * parse.y (java_complete_lhs): Only allow compound assignment of
4884         reference type if type is String.
4885
4886 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4887
4888         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
4889         jcf-path.c: Likewise.
4890
4891 2000-12-09  Anthony Green  <green@redhat.com>
4892
4893         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
4894         filestart and filename_length as int values.
4895
4896 2000-12-07  Mo DeJong  <mdejong@redhat.com>
4897
4898         * jcf-io.c (find_class): Correct the logic that tests to see if a
4899         .java file is newer than its .class file. The compiler was
4900         incorrectly printing a warning when file mod times were equal.
4901
4902 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
4903
4904         * jvgenmain.c: Use ISPRINT not isascii.
4905
4906 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4907
4908         * parse.y (end_artificial_method_body): Fixed typo.
4909
4910 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4911
4912         * parse.y (patch_method_invocation): Pick the correct enclosing
4913         context when creating inner class instances.
4914         Fixes gcj/332.
4915
4916 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
4917
4918         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
4919         Update copyright year to 2000.
4920
4921 2000-11-23  Anthony Green  <green@redhat.com>
4922
4923         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
4924         Move current_file_list out of yyparse and make it static.
4925
4926         * expr.c: Declare quick_stack and tree_list_free_list as static
4927         (init_expr_processing): Register quick_stack and
4928         tree_list_free_list roots.
4929
4930 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4931
4932         * parse.y (build_outer_field_access): New local `decl_ctx', use
4933         it. Check for field's context and current class immediate outer
4934         context inheritance.
4935         (outer_field_access_p): Consider fields inherited from the last
4936         enclosing context.
4937         (build_access_to_thisn): Stop at the last enclosing context if
4938         necessary.
4939         Fixes gcj/367.
4940
4941 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
4942
4943         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
4944
4945 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
4946
4947         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
4948         scratch buffer.
4949
4950 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4951
4952         * jv-scan.c (help): Document --complexity.
4953         (options): Added --complexity.
4954         (flag_complexity): New global.
4955         (main): Call `report'.
4956         * parse-scan.y (complexity): New global.
4957         (if_then_statement, if_then_else_statement,
4958         if_then_else_statement_nsi, switch_block_statement_group,
4959         while_expression, do_statement, for_begin, continue_statement,
4960         throw_statement, catch_clause, finally, method_invocation,
4961         conditional_and_expression, conditional_or_expression,
4962         conditional_expression): Update complexity.
4963         (reset_report): Reset complexity.
4964         (report): New function.
4965
4966 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4967
4968         * lex.c (yylex): Added STRICT_TK case.
4969         * parse.y (STRICT_TK): Added.
4970         * parse-scan.y (STRICT_TK): Added.
4971         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
4972         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
4973         file.
4974         * keyword.h: Rebuilt.
4975         * keyword.gperf (strictfp): Added.
4976
4977 2000-11-20  Tom Tromey  <tromey@cygnus.com>
4978
4979         * lex.c (yylex): Recognize floating point constants with leading
4980         0.
4981
4982 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4983
4984         * java-tree.h (cyclic_inheritance_report): Constify.
4985         * parse.y (cyclic_inheritance_report): Likewise.
4986
4987 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
4988
4989         * parse.y (goal): Remove call to ggc_add_string_root.
4990
4991 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
4992
4993         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
4994         Create string in scratch buffer, then pass to build_string.
4995
4996 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4997
4998         * parse.y (issue_warning_error_from_context): Add
4999         ATTRIBUTE_PRINTF.
5000
5001 2000-11-11  Anthony Green  <green@redhat.com>
5002
5003         * jcf-parse.c (process_zip_dir): Add finput parameter.
5004         (jcf_figure_file_type): Call process_zip_dir with appropriate
5005         argument.
5006
5007 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5008
5009         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
5010         * jcf-parse.c (jcf_figure_file_type): Likewise.
5011
5012 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
5013
5014         * parse.y (create_new_parser_context): Use memset () instead of
5015         bzero ().
5016
5017 2000-11-08  Tom Tromey  <tromey@cygnus.com>
5018
5019         * gjavah.c (process_file): Only include gcj/cni.h when generating
5020         CNI stubs.
5021
5022 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5023
5024         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
5025         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
5026         instead of bzero ().
5027
5028 2000-11-05  Tom Tromey  <tromey@cygnus.com>
5029
5030         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
5031         * lex.c (IS_ZERO): New define.
5032         (java_perform_atof): Error on floating point underflow.
5033
5034 2000-11-04  Tom Tromey  <tromey@cygnus.com>
5035
5036         * lex.c (java_parse_escape_sequence): Only read two octal
5037         characters if the first one is greater than 3.  Don't allow
5038         "octal" numbers to include the digits 8 or 9.
5039
5040 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
5041
5042         * Make-lang.in (java.distdir): Remove.
5043
5044 2000-11-03  Tom Tromey  <tromey@cygnus.com>
5045
5046         * Make-lang.in (java.dvi): New target.
5047         Partial fix for PR other/567.
5048
5049         * lang-options.h: Mention -Wout-of-date.
5050         * jcf-dump.c (flag_newer): New global.
5051         * gjavah.c (flag_newer): New global.
5052         * jcf-io.c (find_class): Only warn when flag_newer set.
5053         * lang.c (flag_newer): New global.
5054         (struct string_option): New declaration.
5055         (lang_W_options): New global.
5056         (process_option_with_no): New function.
5057         (lang_decode_option): Use it.
5058
5059         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
5060         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
5061         `$'.
5062
5063         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
5064         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
5065         * lex.c (java_read_unicode): Removed `term_context' argument.
5066         Recognize any number of `u' in `\u'.
5067         (java_read_unicode_collapsing_terminators): New function.
5068         (java_get_unicode): Use it.
5069         (java_lineterminator): Removed.
5070         (yylex): Produce error if character literal is newline or single
5071         quote.  Return if eof found in middle of `//' comment.  EOF in
5072         `//' comment is only an error if pedantic.
5073         (java_ignorable_control_p): New function.
5074         (java_parse_end_comment): Return if eof found in middle of
5075         comment.
5076         Include flags.h.
5077         * jv-scan.c (pedantic): New global.
5078
5079 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5080
5081         * parse.y (outer_field_access_p): Inherited fields aren't
5082         consider outer fields.
5083         (maybe_build_thisn_access_method): Use
5084         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
5085         (resolve_expression_name): Trigger an error if a static field
5086         is being accessed as an outer field.
5087
5088 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5089
5090         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
5091         Fixes gcj/365.
5092
5093 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
5094
5095         * Make-lang.in: Move all build rules here from Makefile.in,
5096         adapt to new context.  Wrap all rules that change the current
5097         directory in parentheses.  Expunge all references to $(P).
5098         When one command depends on another and they're run all at
5099         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
5100         all object-file generation rules.  Delete obsolete variables.
5101
5102         * Makefile.in: Delete.
5103         * config-lang.in: Delete outputs= line.
5104
5105 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5106
5107         * parse.y (patch_method_invocation): NULLify this_arg when already
5108         inserted.
5109         (maybe_use_access_method): Handle call to methods unrelated to the
5110         current class. Fixed comment.
5111         Fixes gcj/361.
5112
5113 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5114
5115        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
5116        scope.
5117
5118 2000-10-24  Tom Tromey  <tromey@cygnus.com>
5119
5120         * lex.c (java_new_lexer): Initialize new fields.  Work around
5121         broken iconv() implementations.
5122         (java_read_char): Swap bytes if required.  Use fallback decoder if
5123         required.
5124         (byteswap_init, need_byteswap): New globals.
5125         (java_destroy_lexer): Only close iconv handle if it is in use.
5126         * lex.h (java_lexer): New fields read_anything, byte_swap,
5127         use_fallback.
5128         Made out_buffer unsigned.
5129
5130 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5131
5132         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
5133         where an enclosing context can be set on the jdep.
5134         (do_resolve_class): Fixed identation.
5135
5136 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5137
5138         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
5139
5140         * jcf-reader.c (peek_attribute, skip_attribute): Only define
5141         when requested.
5142
5143         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
5144
5145         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
5146
5147 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5148
5149         * jcf-write.c (OP1): Update `last_bc'.
5150         (struct jcf_block): Fixed indentation and typo in comments.  New
5151         field `last_bc'.
5152         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
5153         follows `monitorenter'.
5154         * parse.y (patch_synchronized_statement): New local `tmp'. Call
5155         `patch_string'.
5156         Fixes gcj/232.
5157
5158 2000-10-16  Tom Tromey  <tromey@cygnus.com>
5159
5160         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
5161         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
5162         * lang-options.h: Added -MA, -MT, -MF..
5163         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
5164         (DEPEND_TARGET_SET): New macro.
5165         (DEPEND_FILE_ALREADY_SET): Likewise.
5166         (init_parse): Handle new flags.
5167         * jcf.h (jcf_dependency_print_dummies): Declare.
5168         * Make-lang.in (s-java): Added mkdeps.o.
5169         * Makefile.in (BACKEND): Added mkdeps.o.
5170         (../gcjh$(exeext)): Added mkdeps.o.
5171         (../jcf-dump$(exeext)): Added mkdeps.o.
5172         * jcf-depend.c: Include mkdeps.h.
5173         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
5174         add_entry): Removed.
5175         (jcf_dependency_reset): Rewrote.
5176         (dependencies): New global.
5177         (jcf_dependency_set_target): Rewrote.
5178         (jcf_dependency_add_target): Likewise.
5179         (jcf_dependency_add_file): Likewise.
5180         (munge): Removed.
5181         (print_ents): Removed.
5182         (jcf_dependency_write): Rewrote.
5183         (print_dummies): New global.
5184         (jcf_dependency_print_dummies): New function
5185         (jcf_dependency_write): Call deps_dummy_targets if required.
5186
5187 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5188
5189         * gjavah.c (add_class_decl): Removed unused variables `tname',
5190         `tlen' and `name_index'.
5191         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
5192         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
5193         in `wfl_operator' with value.
5194         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
5195         (jcf_figure_file_type): Fixed identation.
5196         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
5197         * parse.y (analyze_clinit_body): New function.
5198         (static_initializer:): Reset `current_static_block'.
5199         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
5200         `wfl_operator' with new value.
5201         (lookup_cl): Use EXPR_WFL_FILENAME.
5202         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
5203         analyze_clinit_body.
5204         (build_outer_field_access): Access to this$<n> built from
5205         current_class, not its outer context.
5206         (build_access_to_thisn): Fixed leading comment. Tidied things up.
5207         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
5208         (patch_method_invocation): Use `is_static_flag' when already
5209         initialized.
5210         (patch_newarray): Removed assignment in ternary operator.
5211
5212 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5213
5214         * except.c (free_eh_ranges): Don't free `whole_range'.
5215
5216 2000-10-15  Anthony Green  <green@redhat.com>
5217
5218         * decl.c (init_decl_processing): Call init_class_processing before
5219         anything else.
5220
5221 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5222
5223         * check-init.c (check_init): Fixed leading comment. Use
5224         LOCAL_FINAL_P.
5225         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5226         (give_name_to_locals): Likewise.
5227         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
5228         fields in lang_decl_var.
5229         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
5230         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
5231         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
5232         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
5233         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
5234         (LOCAL_FINAL): Rewritten.
5235         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
5236         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
5237         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
5238         `init_final' fields.
5239         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
5240         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
5241         (TYPE_HAS_FINAL_VARIABLE): New macro.
5242         (struct lang_type): Added `afv' field.
5243         * parse.y (check_static_final_variable_assignment_flag): New function.
5244         (reset_static_final_variable_assignment_flag): Likewise.
5245         (check_final_variable_local_assignment_flag): Likewise.
5246         (reset_final_variable_local_assignment_flag): Likewise.
5247         (check_final_variable_indirect_assignment): Likewise.
5248         (check_final_variable_global_assignment_flag): Likewise.
5249         (add_inner_class_fields): Use LOCAL_FINAL_P.
5250         (register_fields): Handle local finals and final variables.
5251         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
5252         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5253         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5254         on local finals.
5255         (java_complete_expand_methods): Loop to set
5256         TYPE_HAS_FINAL_VARIABLE. Call
5257         `reset_final_variable_local_assignment_flag' and
5258         `check_final_variable_local_assignment_flag' accordingly before
5259         and after constructor expansion. Call
5260         `reset_static_final_variable_assignment_flag'
5261         before expanding <clinit> and after call
5262         `check_static_final_variable_assignment_flag' if the
5263         current_class isn't an interface. After all methods have been
5264         expanded, call `check_final_variable_global_assignment_flag' and
5265         `check_static_final_variable_assignment_flag' if the current class
5266         is an interface.
5267         (maybe_yank_clinit): Fixed typo in comment.
5268         (build_outer_field_access_methods): Removed old sanity check. Use
5269         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5270         Don't create access methods for finals.
5271         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
5272         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
5273         existing DECL_INIT has been processed.
5274         (java_complete_lhs): Likewise.
5275         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
5276         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
5277         logic.
5278         (patch_assignment): Use LOCAL_FINAL_P.
5279         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
5280         DECL_INITIAL is nullified.
5281         Fixes gcj/163.
5282
5283 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5284
5285         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
5286
5287         * Makefile.in (parse.c, parse-scan.c): Likewise.
5288
5289 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
5290
5291         * class.c (temporary_obstack): Remove.
5292         (make_class): Don't mess with obstascks.
5293         (push_class): Likewise.
5294         (set_super_info): Likewise.
5295         (add_method_1): Likewise.
5296         (add_method): Likewise.
5297         (add_field): Likewise.
5298         (build_utf8_ref): Likewise.
5299         (build_class_ref): Likewise.
5300         (build_static_field_ref): Likewise.
5301         (finish_class): Likewise.
5302         (push_super_field): Likewise.
5303         (layout_class): Likewise.
5304         (layout_class_methods): Likewise.
5305         (init_class_processing): Likewise.
5306         * constants.c (get_tag_node): Likewise.
5307         (build_constant_data_ref): Likewise.
5308         * decl.c (ggc_p): Remove.
5309         (copy_lang_decl): Use ggc_alloc.
5310         (complete_start_java_method): Don't mess with obstacks.
5311         (start_java_method): Likewise.
5312         (end_java_method): Likewise.
5313         * except.c (link_handler): Use xmalloc.
5314         (free_eh_ranges): New function.
5315         (method_init_exceptions): Use it.
5316         (add_handler): Use xmalloc.
5317         (expand_start_java_handler): Don't mess with obstacks.
5318         (prepare_eh_table_type): Likewise.
5319         (expand_end_java_handler): Likewise.
5320         * expr.c (push_value): Likewise.
5321         (create_label_decl): Likewise.
5322         (build_jni_stub): Likewise.
5323         (java_lang_expand_expr): Likewise.
5324         (note_instructions): Use xrealloc.
5325         (java_push_constant_from_pool): Don't mess with obstacks.
5326         (process_jvm_instruction): Likewise.
5327         * java-tree.h (cyclic_inheritance_report): Remove duplicate
5328         declaration.
5329         * jcf-parse.c (get_constant): Don't mess with obstacks.
5330         (read_class): Likewise.
5331         (jcf_parse): Likewise.
5332         * lex.c (expression_obstack): Remove.
5333         (java_lex): Don't use obstack_free.
5334         * parse.h (exit_java_complete_class): Don't mess with obstacks.
5335         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
5336         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
5337         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
5338         * parse.y (gaol): Add more GC roots.
5339         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
5340         (lookup_field_wrapper): Likewise.
5341         (obtain_incomplete_type): Don't mess with obstacks.
5342         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
5343         macros.
5344         (craft_constructor): Don't mess with obstacks.
5345         (safe_layout_class): Likewise.
5346         (java_complete_class): Likewise.
5347         (source_end_java_method): Likewise.
5348         (build_outer_field_access_methods): Likewise.
5349         (build_outer_method_access_method): Likewise.
5350         (maybe_build_thisn_access_method): Likewise.
5351         (build_dot_class_method_invocation): Likewise.
5352         (java_complete_tree): Likewise.
5353         (java_complete_lhs): Likewise.
5354         (do_merge_string_cste): Likewise.
5355         (patch_string_cst): Likewise.
5356         (array_constructor_check_entry): Likewise.
5357         * typeck.c (build_java_array_type): Likewise.
5358         (parse_signature_string): Likewise.
5359         (build_java_signature): Likewise.
5360
5361 2000-10-12  Tom Tromey  <tromey@cygnus.com>
5362
5363         Fix for PR gcj/356:
5364         * gjavah.c (add_class_decl): Don't special-case inner classes.
5365         (add_namelet): Likewise.
5366
5367 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
5368
5369         * java-tree.h: Constify current_encoding.
5370         * lang.c: Constify current_encoding.
5371
5372 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
5373
5374         * jvgenmain.c (class_mangling_suffix): Omit `.'.
5375         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
5376
5377 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5378
5379         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
5380         patch. Fixes gcj/340.
5381
5382 2000-10-10  Tom Tromey  <tromey@cygnus.com>
5383
5384         * lex.c (java_new_lexer): Initialize out_first and out_last
5385         fields.
5386         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
5387
5388 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5389
5390         * parse.y (pop_current_osb): New function.
5391         (array_type:): Use `dims:', changed actions
5392         accordingly. Suggested by Anthony Green.
5393         (array_creation_expression:): Used pop_current_osb.
5394         (cast_expression:): Likewise.
5395         (search_applicable_method_list): Fixed indentation.
5396
5397 2000-10-08  Anthony Green  <green@redhat.com>
5398
5399         * parse.y (array_type_literal): Remove production.
5400         (type_literals): Refer to array_type, not array_type_literal.
5401
5402 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5403
5404         Patch contributed by Corey Minyard.
5405         * decl.c (check_local_named_variable): New function.
5406         (tree check_local_unnamed_variable): Likewise.
5407         (find_local_variable): Splitted. Call check_local_{un}named_variable.
5408
5409 2000-10-07  Anthony Green  <green@redhat.com>
5410
5411         * class.c (layout_class): Handle case where superclass can't be
5412         layed out yet.
5413
5414 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5415
5416         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
5417         gperf.
5418
5419 2000-10-05  Tom Tromey  <tromey@cygnus.com>
5420
5421         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
5422         * jvgenmain.c (class_mangling_prefix): Removed.
5423         (class_mangling_suffix): New global.
5424         (main): Use it.
5425         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
5426         `$'.
5427         (print_method_info): Handle overrides for static and final
5428         methods.
5429         (process_file): Generate declaration for class object field.
5430         * class.c (cxx_keywords): New array.
5431         (utf8_cmp): New function.
5432         (cxx_keyword_p): New function.
5433         (layout_class_method): Mangle C++ keywords by appending `$'.
5434         (mangle_field): New function.
5435         (mangle_class_field): Use mangle_field.  Mangle class name as
5436         `class$'.
5437         (mangle_static_field): Use mangle_field.
5438
5439 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5440
5441         * decl.c (find_local_variable): Removed uncessary type check and
5442         fixed range check typo. From Corey Minyard.
5443
5444 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5445
5446         * decl.c (give_name_to_locals): New local `code_offset'. Call
5447         `maybe_adjust_start_pc'.
5448         * expr.c (note_instructions): New function.
5449         (expand_byte_code): Don't collect insn starts here.
5450         (peek_opcode_at_pc): New function.
5451         (maybe_adjust_start_pc): Likewise.
5452         * java-tree.h (maybe_adjust_start_pc): Declare.
5453         (note_instructions): Likewise.
5454         * jcf-parse.c (parse_class_file): Call `note_instructions'.
5455
5456 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5457
5458         * parse.y (field_access:): Fixed indentation.
5459         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
5460
5461 2000-09-07  Tom Tromey  <tromey@cygnus.com>
5462
5463         Fix for PR gcj/307:
5464         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
5465         JPRIMITIVE_TYPE_P, for arithmetic operators.
5466         (patch_method_invocation): Indentation fix.
5467         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
5468         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
5469         (do_unary_numeric_promotion): Cleaned up code.
5470         (valid_cast_to_p): Handle boolean correctly.
5471
5472 2000-09-27  Tom Tromey  <tromey@cygnus.com>
5473
5474         * lex.c (java_read_unicode): Reset bs_count when finished with
5475         `\u' sequence.
5476
5477 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
5478
5479         Convert to GC.
5480         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
5481         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
5482         (typeck.o): Depend on ggc.h.
5483         * class.c (add_method_1): Use GC functions for allocation.
5484         (init_class_processing): Register roots.
5485         * decl.c (ggc_p): Set to 1.
5486         (pending_local_decls): Make it static.
5487         (push_jvm_slot): Use GC functions for allocation.
5488         (init_decl_processing): Register roots.
5489         (give_name_to_locals): Use GC functions for allocation.
5490         (lang_mark_tree): New function.
5491         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
5492         functions for allocation.
5493         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
5494         * lex.c (java_lex): Use build_string, rather than replicating it
5495         inline.
5496         * parse.y (goal): Add more roots.
5497         (mark_parser_ctxt): New function.
5498         * typeck.c: Include ggc.h.
5499
5500 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5501
5502         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
5503         contains something else than MODIFY_EXPR.
5504
5505 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
5506
5507         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
5508         * Makefile.in (parse.o): Depend on ggc.h.
5509         (class.o): Likewise.
5510         (constants.o): Likewise.
5511         (decl.o): Likewise.
5512         (expr.o): Likewise.
5513         (jcf-parse.o): Likewise.
5514         (jcf-write.o): Likewise.
5515         (mangle.o): Likewise.
5516         * class.c: Include ggc.h.
5517         (build_static_field_ref): Register GC roots.
5518         (layout_class): Likewise.
5519         (init_class_processing): Likewise.
5520         * constants.c: Include ggc.h.
5521         (current_constant_pool_data_ref): Remove.
5522         (tag_nodes): Move it to ...
5523         (get_tag_node): ... here.  Register GC roots.
5524         * decl.c: Include ggc.h.  Remove many global tree definitions.
5525         (throw_node): Define.
5526         (java_global_trees): Likewise.
5527         (predef_filenames): Make the size a constant.
5528         (init_decl_processing): Adjust accordingly.
5529         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
5530         * expr.c: Include ggc.h.
5531         (init_expr_processing): Register GC roots.
5532         (build_invokeinterface): Likewise.
5533         * java-tree.h: Replace extern tree declarations with macros.
5534         (java_global_trees): New variable.
5535         (java_tree_index): New enumeration.
5536         (init_jcf_parse): Declare.
5537         * jcf-parse.c: Include ggc.h.
5538         (current_class): Remove declaration.
5539         (main_class): Likewise.
5540         (all_class_list): Likewise.
5541         (predefined_filename_p): Adjust for constant size of
5542         predef_filenames.
5543         (init_jcf_parse): New function.
5544         * jcf-write.c: Include ggc.h.
5545         (generate_classfile): Register GC roots.
5546         (append_synthetic_attribute): Likewise.
5547         (append_innerclass_attribute_entry): Likewise.
5548         * lang.c: Include ggc.h.
5549         (lang_print_error): Register GC roots.
5550         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
5551         with macros.
5552         * parse.y: Include ggc.h.
5553         (wfl_operator): Remove.
5554         (goal): Register GC roots.
5555         (java_pop_parser_context): Adjust for new field names.
5556         (java_parser_context_save_global): Likewse.
5557         (java_parser_context_restore_global): Likewise.
5558         (java_parser_context_suspend): Likewise.
5559         (java_parser_context_resume): Likewise.
5560         (verify_constructor_circularity): Register GC roots.
5561         (lookup_cl): Likewise.
5562         (java_reorder_fields): Likewise.
5563         (build_current_this): Likewise.
5564         (class_in_current_package): Likewise.
5565         (argument_types_convertible): Likewise.
5566         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
5567
5568 2000-09-14  Tom Tromey  <tromey@cygnus.com>
5569
5570         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
5571
5572 2000-09-13  Tom Tromey  <tromey@cygnus.com>
5573
5574         * jcf-parse.c: Include <locale.h>.
5575         * jv-scan.c: Include <locale.h>.
5576
5577 2000-09-12  Tom Tromey  <tromey@cygnus.com>
5578
5579         * expr.c (pop_type_0): Return `Object' if trying to merge two
5580         interface types.
5581         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
5582         interface types; `Object' is always a valid supertype.
5583
5584 2000-09-12  Tom Tromey  <tromey@cygnus.com>
5585
5586         Fix for PR gcj/33:
5587         * jv-scan.c (help): Document --encoding.
5588         (options): Added `encoding' entry.
5589         (OPT_ENCODING): New define.
5590         (main): Handle --encoding.
5591         Include <langinfo.h> if nl_langinfo exists.
5592         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
5593         --encoding.
5594         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
5595         (parse_source_file): Correctly call java_init_lex.  Added `finput'
5596         argument.  Use nl_langinfo to determine default encoding.
5597         * java-tree.h (current_encoding): Declare.
5598         * parse.y (java_parser_context_restore_global): Don't restore
5599         `finput'.
5600         (java_parser_context_save_global): Don't set `finput' field.
5601         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
5602         if required.
5603         * lang.c (current_encoding): New global.
5604         (lang_decode_option): Recognize `-fencoding='.
5605         (finish_parse): Don't close finput.
5606         * parse.h (struct parser_ctxt): Removed `finput' and
5607         `unget_utf8_value' fields.  Added `lexer' field.
5608         (java_init_lex): Fixed declaration.
5609         * lex.c (java_new_lexer): New function.
5610         (java_destroy_lexer): Likewise.
5611         (java_read_char): Added `lex' argument.  Handle iconv case.
5612         (java_read_unicode): Added `lex' argument.  Count backslashes in
5613         lexer structure.
5614         (java_init_lex): Added `finput' and `encoding' arguments.  Set
5615         `lexer' field in ctxp.
5616         (BAD_UTF8_VALUE): Removed.
5617         (java_lex): Handle seeing UEOF in the middle of a string literal.
5618         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
5619         (java_lexer): New structure.
5620         (UNGETC): Removed.
5621         (GETC): Removed.
5622         (DEFAULT_ENCODING): New define.
5623         (java_destroy_lexer): Declare.
5624
5625 2000-09-12  Tom Tromey  <tromey@cygnus.com>
5626
5627         Fix for PR gcj/343:
5628         * lex.c (java_init_lex): Initialize java_io_serializable.
5629         * parse.y (java_io_serializable): New global.
5630         (valid_ref_assignconv_cast_p): An array can be cast to
5631         serializable.
5632
5633 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
5634
5635         * decl.c, expr.c: Include defaults.h if not already included.
5636         Don't define the *_TYPE_SIZE macros.
5637
5638 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
5639
5640         * typeck.c (build_java_array_type): Correct first parameter
5641         in ADJUST_FIELD_ALIGN invocation.
5642
5643 2000-09-06  Tom Tromey  <tromey@cygnus.com>
5644
5645         * lang-specs.h: Also recognize `-femit-class-files'.
5646
5647 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5648
5649         * verify.c (merge_types): Load the types to merge if necessary.
5650
5651 2000-09-02  Anthony Green  <green@redhat.com>
5652
5653         * jcf-io.c: Include zlib.h.
5654         (open_in_zip): Read compressed class file archives.
5655         * zipfile.h (ZipDirectory): Add uncompressed_size and
5656         compression_method fields.
5657         * zextract.c (read_zip_archive): Collect file compression info.
5658
5659 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
5660
5661         * parse.y (do_resolve_class): Also explore superclasses of
5662         intermediate enclosing contexts when searching for inner classes.
5663
5664 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5665
5666         * parse.y (variable_declarator_id:): Better error message.
5667         (expression_statement:): Use YYNOT_TWICE.
5668         (cast_expression:): Likewise.
5669         (assignment:): Likewise.
5670
5671 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5672
5673         * parse.y (do_merge_string_cste): New locals. Create new
5674         STRING_CSTs each time, use memcpy. Fixes gcj/311.
5675
5676 2000-08-07  Hans Boehm  <boehm@acm.org>
5677
5678         * boehm.c (mark_reference_fields): Set marking bits for all words in
5679         a multiple-word record.
5680         (get_boehm_type_descriptor): Use the procedure marking descriptor for
5681         java.lang.Class.
5682
5683 2000-08-31  Mike Stump  <mrs@wrs.com>
5684
5685         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
5686         jcf-dump$(exeext)): Make parallel safe.
5687
5688 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
5689
5690         * jcf-parse.c (set_source_filename): Constify a char *.
5691         * jcf-write.c (append_innerclasses_attribute,
5692         make_class_file_name): Constify a char *.  Don't recycle a
5693         variable for an unrelated purpose.
5694         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
5695         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
5696
5697 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5698
5699         * expr.c (can_widen_reference_to): Fixed indentation.
5700         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
5701         * parse.y: `finit$' replaces `$finit$' in comments.
5702         (try_builtin_assignconv): Fixed leading comment.
5703
5704 2000-08-25  Greg McGary  <greg@mcgary.org>
5705
5706         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
5707
5708 2000-08-24  Greg McGary  <greg@mcgary.org>
5709
5710         * lang.c (lang_decode_option): Use ARRAY_SIZE.
5711         * parse.y (BINOP_LOOKUP): Likewise.
5712
5713 2000-08-22  Andrew Haley  <aph@cygnus.com>
5714
5715         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
5716         sign extending. Fixes gcj/321.
5717         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
5718         combining to make a jlong. Fixes gcj/321.
5719
5720 2000-08-21  Nix  <nix@esperi.demon.co.uk>
5721
5722         * lang-specs.h: Do not process -o or run the assembler if
5723         -fsyntax-only.
5724
5725 2000-08-16  Andrew Haley  <aph@cygnus.com>
5726
5727         * typeck.c (build_java_array_type): Rewrite code to do array
5728         alignment.  Take into account back-end macros when aligning array
5729         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
5730         user to set alignment. Fixes gcj/252 and 160.
5731
5732 2000-08-09  Tom Tromey  <tromey@cygnus.com>
5733
5734         * parse.y (check_abstract_method_definitions): Now return `int'.
5735         Check implemented interfaces.  Fixes PR gcj/305.
5736
5737         * parse.y (patch_switch_statement): Disallow `long' in switch
5738         expressions.  Fixes PR gcj/310.
5739
5740 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5741
5742         * decl.c (finit_leg_identifier_node): New global.
5743         (init_decl_processing): Use `finit$' to initialize
5744         finit_identifier_node. Use `$finit$' to initialize
5745         finit_leg_identifier_node.
5746         * expr.c (expand_java_field_op): Use ID_FINIT_P.
5747         * java-tree.h (finit_identifier_node): Changed attached comment.
5748         (finit_leg_identifier_node): New declaration.
5749         (ID_FINIT_P): Take finit_identifier_node and
5750         finit_leg_identifier_node into account. This is a backward
5751         compatibility hack.
5752
5753 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5754
5755         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
5756         Jan 6 2000 patch.
5757         (generate_bytecode_insns): Check `nargs' before emitting it.
5758         * verify.c (merge_type_state): Fixed typo.
5759         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
5760         generate_bytecode_{conditional,insns}.
5761
5762 2000-08-13  Anthony Green  <green@redhat.com>
5763
5764         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
5765         for -pg builds).
5766
5767 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5768
5769         * class.c (maybe_layout_super_class): Fixed indentation.
5770         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
5771         (java_check_methods): New function declaration.
5772         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
5773         instead of `str_ptr'.
5774         * jcf-write.c (generate_bytecode_insns): Emit number the of args
5775         of a `invokeinterface' at the right time.
5776         * parse.h (WFL_STRIP_BRACKET): New macro.
5777         (SET_TYPE_FOR_RESOLUTION): Use it.
5778         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
5779         (check_class_interface_creation): Don't check for cross package
5780         innerclass name clashes.
5781         (method_header): Behave properly if MDECL is `error_mark_node'.
5782         (method_declarator): Return `error_mark_node' if bogus current
5783         class.
5784         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
5785         (resolve_and_layout): New local `decl_type', set and used. Call
5786         java_check_methods.
5787         (java_check_methods): New method.
5788         (java_layout_classes): Use it.
5789         (resolve_qualified_expression_name): No EH check necessary in
5790         access$<n>.
5791         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
5792         `case' statement.
5793         (patch_assignment): Set DECL_INITIAL on integral final local.
5794
5795 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5796
5797         * java-tree.h (flag_extraneous_semicolon): New extern.
5798         * lang-options.h: (-Wextraneous-semicolon): New option.
5799         * lang.c (flag_redundant): Fixed typo in leading comment.
5800         (flag_extraneous_semicolon): New global.
5801         (lang_decode_option): Set `flag_extraneous_semicolon' when
5802         -Wall. Decode `-Wextraneous-semicolon'.
5803         * parse.y (type_declaration:): Removed `SC_TK' hack, added
5804         `empty_statement' rule.
5805         (class_body_declaration): Likewise.
5806         (method_body:): Accept `;' as a method body.
5807         (static_initializer:): Removed `SC_TK' hack.
5808         (constructor_block_end:): Likewise.
5809         (empty_statement:): Report deprecated empty declaration. Fixes
5810         gcj/295
5811
5812 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5813
5814         * parse.y (build_dot_class_method_invocation): Changed parameter
5815         name to `type'. Build signature from `type' and convert it to a
5816         STRING_CST if it's an array.
5817         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
5818         to use `ref_type' directly.
5819
5820 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
5821
5822         * lang-options.h: Added a comma after the last element to avoid
5823         syntax errors when other languages define additional options.
5824
5825 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
5826
5827         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
5828         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
5829         (jc1): Link with $(BACKEND).
5830         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
5831
5832 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
5833
5834         * jvspec.c: Adjust type of second argument to
5835         lang_specific_driver, and update code as necessary.
5836
5837         * class.c (build_dtable_decl): Initialize dummy.
5838
5839 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5840
5841         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
5842         method bodies not to rule out discarding `<clinit>'; don't use
5843         <clinit> to initialize static fields with constant initializers.
5844
5845 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5846
5847         * gjavah.c (print_method_info): Added `synth' parameter. Skip
5848         synthetic methods.
5849         (method_synthetic): New global.
5850         (HANDLE_METHOD): Recognize synthetic method and tell
5851         `print_method_info' about it.
5852         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
5853         processing a synthetic method.
5854         * jcf-reader.c (skip_attribute): New function.
5855         ( skip_attribute): Likewise.
5856
5857 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5858
5859         * parse.y (build_outer_field_access): Fixed comments.
5860         (fix_constructors): Emit the initialization of this$<n> before
5861         calling $finit$.
5862         (resolve_qualified_expression_name): Build an access to `decl' if
5863         necessary.
5864
5865 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5866
5867         * parse-scan.y (curent_class): Non longer const.
5868         (inner_qualifier, inner_qualifier_length): Deleted.
5869         (current_class_length): New global.
5870         (bracket_count): Fixed typo in leading comment.
5871         (anonymous_count): New global.
5872         (class_instance_creation_expression:): Handle anonymous classes.
5873         (anonymous_class_creation:): New rule.
5874         (push_class_context): Rewritten.
5875         (pop_class_context): Likewise.
5876         (INNER_QUALIFIER): Macro deleted.
5877         (report_class_declaration): call `push_class_context' when
5878         entering the function. `fprintf' format modified not to use
5879         INNER_QUALIFIER.
5880         (report_class_declaration): Assign `package_name' and
5881         `current_class' to NULL separately.
5882
5883 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5884
5885         * expr.c (build_invokeinterface): Call layout_class_methods on
5886         target interface.
5887
5888 2000-07-27  Tom Tromey  <tromey@cygnus.com>
5889             Anthony Green  <green@cygnus.com>
5890             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5891
5892         * class.c (make_class_data): Create vtable for abstract classes.
5893         (get_dispatch_table): Changed to cope with abstract classes.
5894
5895 2000-07-27  Tom Tromey  <tromey@cygnus.com>
5896
5897         * parse.y (patch_method_invocation): Don't reverse the argument
5898         list when dealing with anonymous class constructors. Fixed typo in
5899         comment.
5900
5901 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5902
5903         * parse.y (build_alias_initializer_parameter_list): Reverse
5904         crafted list when building aliases for anonymous class
5905         constructors.
5906
5907 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5908
5909         * parse.y (jdep_resolve_class): Don't bother checking potential
5910         innerclass access if `decl' is NULL.
5911         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
5912         WFL.
5913
5914 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5915
5916         * parse.c: Remove (again.)
5917
5918 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5919
5920         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
5921         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
5922         outside the `if' statement, alias to innerclass removed, `decl'
5923         used to mark the class complete.
5924
5925 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5926
5927         * parse.y (simple_name:): Fixed typo in error message.
5928
5929 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5930
5931         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
5932         or its first operand can be error marks.
5933
5934 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5935
5936         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
5937         * parse.y (method_header): Likewise.
5938
5939 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5940
5941         * parse.y (process_imports): Consider that one might be trying to
5942         import an innerclass. Fixes gcj/254
5943
5944 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5945
5946         * parse.y (find_as_inner_class): Handle the case where the
5947         enclosing context of an innerclass has been loaded as bytecode.
5948
5949 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5950
5951         * parse.y (simple_name:): Reject `$' in type names.
5952         (resolve_type_during_patch): Use `type' as a second
5953         argument to resolve_no_layout. Fixes gcj/257.
5954
5955 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
5956
5957         * parse.y (find_most_specific_methods_list): Select the only
5958         non-abstract method even if max has been set.
5959         Fixes gcj/285, gcj/298.
5960
5961 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
5962
5963         * lang-specs.h: Added %(jc1) to java compiler options.
5964
5965 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
5966
5967         * .cvsignore: New file.
5968
5969 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5970
5971         * parse.y (not_accessible_p): Access granted to innerclasses
5972         (indirectly) extending the reference type. Fixes gcj/249.
5973
5974 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5975
5976         * parse.y (patch_method_invocation): Fixed comment.
5977         (maybe_use_access_method): Build this$<n>s to the context of the
5978         target method, or a type that extends it. Fixes gcj/242.
5979
5980 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
5981
5982         * parse.c: Remove.
5983
5984 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5985
5986         * parse.y (fold_constant_for_init): Avoid bullish conversion.
5987
5988 2000-07-13  Tom Tromey  <tromey@cygnus.com>
5989
5990         * lang-specs.h: Added %{I*}.
5991
5992 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
5993
5994         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
5995
5996 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
5997
5998         * parse-scan.c: Remove.
5999
6000 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6001
6002         * class.c (set_super_info): Handled protected inner classes.
6003         (common_enclosing_context_p): Bail early if arguments aren't both
6004         inner classes.
6005         (get_access_flags_from_decl): Handle private and protected inner
6006         classes.
6007         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
6008         (CLASS_PROTECTED): Likewise.
6009         (struct lang_type): New bitfield `poic'.
6010         * parse.y (jdep_resolve_class): Call check_inner_class_access on
6011         inner classes only.
6012         (check_inner_class_access): Renamed arguments, added
6013         comments. Handles protected inner classes (fixes gcj/225)
6014         (not_accessible_p): Fixed comments. Avoid handling inner classes.
6015
6016 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6017
6018         * parse.y (resolve_qualified_expression_name): Verify qualified
6019         access to `this'. Fixes gcj/239.
6020
6021 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6022
6023         * jcf-write.c (generate_classfile): Don't install ConstantValue
6024         for null pointers.
6025
6026 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6027
6028         * parse.y (resolve_qualified_expression_name): Handle inner class
6029         access. Fixes gcj/256.
6030
6031 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6032
6033         * jcf-write.c (generate_classfile): Properly install the
6034         ConstantValue attribute and the initial value constant pool index
6035         on string constants.
6036         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
6037         class files.
6038
6039 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6040
6041         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
6042         construct.
6043         * parse.y (find_as_inner_class): Fixed typo.
6044         (do_resolve_class): Explore enclosing contexts when searching for
6045         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
6046         (check_inner_class_access): Check `decl' which can be null in case
6047         of previous errors.
6048
6049 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6050
6051         * java-tree.h (java_debug_context): Declared `extern'.
6052         (safe_layout_class): Likewise.
6053         * parse.y (resolve_field_access): Field must be `static' in order
6054         to be replaced by its initial value. Added comments.
6055         (find_applicable_accessible_methods_list): Fixed typo.
6056         (find_most_specific_methods_list): Methods found in innerclasses
6057         take over methods founds in the enclosing contexts.
6058         (java_complete_tree): Loosen restrictions on the type of DECLs
6059         that can be replaced by their initialization values.
6060         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
6061
6062 2000-07-05  Tom Tromey  <tromey@cygnus.com>
6063
6064         * Make-lang.in (PARSE_DIR): New macro.
6065         (PARSE_RELDIR): Likewise.
6066         (PARSE_C): Likewise.
6067         (PARSE_SCAN_C): Likewise.
6068         ($(PARSE_C)): New target.
6069         ($(PARSE_SCAN_C)): Likewise.
6070         (SET_BISON): New macro.
6071         (BISONFLAGS): Likewise.
6072         (JAVABISONFLAGS): Likewise.
6073
6074 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
6075
6076         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
6077         argument on the first pass for CNI as well as JNI.
6078         (print_method_info): Set up method name on the first pass only.
6079
6080 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6081
6082         * parse.y (parser_qualified_classname): Removed parameter
6083         `is_static'.
6084         (create_interface): Removed first passed parameter to
6085         parser_qualified_classname.
6086         (create_class): Likewise. Don't install alias on static
6087         innerclasses. Fixes gcj/275.
6088
6089 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6090
6091         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
6092         debugable statement with empty_stmt_node. Fixes gcj/272
6093
6094 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6095
6096         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
6097         gcj/271.
6098
6099 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6100
6101         * jcf-write.c (push_long_const): Appropriately cast short negative
6102         constant to jword.
6103
6104 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6105
6106         * parse.y (verify_constructor_super): Use loop variable
6107         `m_arg_type' initialized with `mdecl_arg_type'.
6108
6109 2000-06-29  Tom Tromey  <tromey@cygnus.com>
6110
6111         * parse.y (resolve_field_access): Handle case where `type_found'
6112         is NULL.
6113
6114 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6115
6116         * expr.c (lookup_field): The same field can be found through two
6117         different interface. Don't declare it ambiguous in that case.
6118
6119 2000-06-27  Tom Tromey  <tromey@cygnus.com>
6120
6121         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
6122         follows \r, then unget it at a lower level.
6123
6124 2000-06-26  Tom Tromey  <tromey@cygnus.com>
6125
6126         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
6127         java_complete_tree.
6128
6129 2000-06-25  Tom Tromey  <tromey@cygnus.com>
6130
6131         * parse.y (for_statement): Wrap expression in a WFL if it is a
6132         constant.  For PR gcj/268.
6133
6134 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6135
6136         * parse.y (do_resolve_class): Minor optimiztion in the package
6137         list search. Removed unnecessary test and return statement.
6138         (valid_ref_assignconv_cast_p): Order of arguments to
6139         enclosing_context_p fixed.
6140
6141 2000-06-24  Tom Tromey  <tromey@cygnus.com>
6142
6143         * expr.c (lookup_field): Print error and return error_mark_node if
6144         field reference is ambiguous.
6145
6146         * parse.y (check_abstract_method_definitions): Also check if
6147         `other_method' is abstract.
6148
6149 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6150
6151         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
6152         classes.
6153         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
6154         (struct lang_type): New field `pic'.
6155         (CLASS_PRIVATE): New macro.
6156         * parse.y (check_inner_class_access): New function.
6157         (jdep_resolve_class): Call it.
6158
6159 2000-06-23  Tom Tromey  <tromey@cygnus.com>
6160
6161         * parse.y (patch_incomplete_class_ref): Initialize the returned
6162         class.  For PR gcj/260.
6163
6164 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6165
6166         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
6167
6168 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6169
6170         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
6171         Java specific checks.
6172         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
6173         screened by DECL_P.
6174         * java-tree.def (CASE_EXPR): Marked 'e'.
6175         (DEFAULT_EXPR): Likewise.
6176         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
6177         screened by DECL_P.
6178         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
6179         Java specific checks.
6180         (generate_bytecode_insns): Test try_block for BLOCK before using
6181         BLOCK_EXPR_BODY.
6182         * parse.y (build_wfl_wrap): Added `location' argument. Set
6183         EXPR_WFL_LINECOL accordingly.
6184         (dim_expr:): Wrap constants with WFLs.
6185         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
6186         (resolve_package): Check for `stmt' not being a BLOCK before
6187         building a debuggable statement with it.
6188         (make_qualified_primary): Added extra parameter to build_wfl_wrap
6189         invocation.
6190         (resolve_field_access): Make sure `decl' is a DECL before treating
6191         it as such.
6192         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
6193         IDENTIFIER_NODE before treating it as such.
6194         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
6195         treating it as such.
6196         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
6197         to be applied only on non array types.
6198
6199 2000-06-16  Per Bothner  <per@bothner.com>
6200
6201         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
6202         define in terms of DECL_RESULT, as that fails when --enable-checking.
6203
6204 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6205
6206         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
6207         types the same in comparison.
6208         (CHECK_OP): Add static prototype.
6209
6210 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
6211
6212         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
6213         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
6214         * parse.c: Rebuilt.
6215
6216 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6217
6218         * decl.c (create_primitive_vtable): Prototype.
6219
6220         * jcf-write.c (generate_bytecode_insns): Initialize variable
6221         `saved_context'.
6222
6223         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
6224
6225 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
6226
6227         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
6228         to track searched classes, and do not search the same class more than
6229         once. Call find_applicable_accessible_methods_list on immediate
6230         superclass, instead of search_applicable_method_list on all ancestors.
6231         Fix for PR gcj/238.
6232
6233 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
6234
6235         * parse.y (register_fields): Permit static fields in inner classes
6236         if they are final. Fix for PR gcj/255.
6237
6238 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6239
6240         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
6241         * parse.y (find_in_imports): Returned type changed to void,
6242         leading comment fixed.
6243         (register_package): New function.
6244         (qualify_and_find): Likewise.
6245         (package_declaration:): Use `register_package'.
6246         (single_type_import_declaration:): Removed local variable
6247         `node'. Added missing `;' for consistency.
6248         (type_import_on_demand_declaration:): Use `chainon' to link new
6249         entries.
6250         (lookup_field_wrapper): Lookup local variables defined in outer
6251         contexts first.
6252         (java_complete_class): Don't reverse the list of imported on demand.
6253         (do_resolve_class): Reorganized. Removed local variable
6254         `original_name'. Call `qualify_and_find' with the current package
6255         name, invoke `find_in_imports_on_demand' right after. Call
6256         `qualify_and_find' with the packages we've seen so far. Fixed
6257         operations numbering in comments.
6258         (java_expand_class): Don't reverse `package_list'.
6259         (find_most_specific_methods_list): New local variables `abstract'
6260         and `candidates'. Use them to pick the right method.
6261
6262 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
6263
6264         * parse.y (check_modifiers_consistency): Don't subtract out
6265         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
6266
6267 2000-06-04  Philipp Thomas  <pthomas@suse.de>
6268
6269         * Makefile.in (INTLLIBS): New.
6270         (LIBS): Add above.
6271         (DEPLIBS): Ditto.
6272
6273 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6274
6275         * class.c (get_dispatch_table): Build the vtable dummy entry list
6276         element with a null purpose. Fixed leading comment.
6277         (build_dtable_decl): Build an accurate dtable type when appropriate
6278         and use it.
6279
6280 2000-06-02  Richard Henderson  <rth@cygnus.com>
6281
6282         * lang.c (lang_get_alias_set): New.
6283
6284 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6285
6286         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
6287         before using it as the accessed field.
6288
6289 2000-05-31  Tom Tromey  <tromey@cygnus.com>
6290
6291         * java-tree.h (boolean_array_vtable, byte_array_vtable,
6292         char_array_vtable, short_array_vtable, int_array_vtable,
6293         long_array_vtable, float_array_vtable, double_array_vtable):
6294         Declare.
6295         * expr.c (get_primitive_array_vtable): New function.
6296         (create_primitive_vtable): New function.
6297         (java_lang_expand_expr): Enable code to statically generate
6298         arrays.
6299         * decl.c (init_decl_processing): Create primitive vtables.
6300         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
6301         short_array_vtable, int_array_vtable, long_array_vtable,
6302         float_array_vtable, double_array_vtable): Define.
6303
6304 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
6305
6306         * java/parse.y (find_applicable_accessible_methods_list):
6307         Don't add an uninitialized value to the list.
6308
6309 2000-05-25  Tom Tromey  <tromey@cygnus.com>
6310
6311         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
6312         when trying to see if field's class should be initialized.  Always
6313         initialize field's declaring class, not qualified class.
6314         For PR gcj/162.
6315
6316         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
6317         `wfl_operator', to maybe_build_primttype_type_ref.
6318         Fixes PR gcj/235.
6319
6320 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
6321
6322        * parse.y (patch_method_invocation): Don't try to lookup methods
6323        in primitive types.
6324
6325 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6326
6327         * parse.y (resolve_field_access): Call the appropriate <clinit>
6328         before accessing the length of a static array. Craft a decl for
6329         the field while its time. Fixes PR gcj/129.
6330
6331 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6332
6333         * parse.y (resolve_package): Correctly set `*next' (was off by
6334         one.)
6335         (resolve_qualified_expression_name): Fixed comment.
6336
6337 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6338
6339         * jcf-parse.c (jcf_parse_source): Reset current_class and
6340         current_function_decl to NULL before parsing a new file.
6341
6342 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6343
6344         * parse.y (block_end:): If the collected block doesn't feature a
6345         statement, insert an empty statement.
6346
6347 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6348
6349         * parse.y (maybe_yank_clinit): New function.
6350         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
6351         end of the list of methods belonging to a class.
6352         (java_complete_expand_method): Check whether <clinit> is really
6353         necessary and expand it accordingly.
6354
6355 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6356
6357         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
6358         processed by the method's switch statement.
6359
6360 2000-05-19  Tom Tromey  <tromey@cygnus.com>
6361
6362         * java-tree.h: Added init state enum.
6363         * decl.c (emit_init_test_initialization): Initialize class
6364         initialization check variable by looking at class' state.
6365
6366 2000-05-19  Tom Tromey  <tromey@cygnus.com>
6367
6368         * java-tree.h (build_instanceof): Declare.
6369         (build_get_class): Declare.
6370         * parse.y (patch_binop): Use build_instanceof.
6371         * expr.c (build_instanceof): New function.  If class is final,
6372         don't make a function call.
6373         (expand_java_INSTANCEOF): Use it.
6374         (build_get_class): New function.
6375
6376 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
6377
6378         * jcf-write.c (generate_classfile): Scan the source_file for
6379         slashes with the right pointer variable.
6380
6381 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
6382
6383         * lang.c (lang_decode_option): Update -Wunused flags by calling
6384         set_Wunused.
6385         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
6386
6387 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
6388
6389         * check_init.c (check_init): Constify local char *.
6390         * class.c (push_class): Constify local char *.
6391         * java_tree.h: Update prototypes.
6392         * jcf-io.c (open_class): Constify filename parameter and
6393         return value.
6394         (find_class): Remove redundant string copy.  Cast return from
6395         open_class.
6396         * jcf-parse.c (read_class, parse_class_file, yyparse):
6397         Constify local char *.
6398         * jcf-write.c (generate_bytecode_insns, generate_classfile):
6399         Constify local char *.
6400         * jcf.h (JCF): Constify filename and classname.
6401         (JCF_FINISH): Cast args to FREE to char * when appropriate.
6402         * lang.c (init_parse): Constify parameter and return value.
6403         * lex.c (java_get_line_col): Constify filename parameter.
6404         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
6405         * parse.y (java_parser_context_suspend,
6406         issue_warning_error_from_context, safe_layout_class): Constify
6407         local char *.
6408         * parse.c: Regenerate.
6409
6410 2000-05-08  Tom Tromey  <tromey@cygnus.com>
6411
6412         * expr.c (build_jni_stub): Cache the result of
6413         _Jv_LookupJNIMethod.
6414
6415 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6416
6417         * decl.c (predef_filenames_size): Now 7.
6418         (predef_filenames): New seventh entry.
6419
6420 2000-05-04  Tom Tromey  <tromey@cygnus.com>
6421
6422         * boehm.c (mark_reference_fields): Don't mark RawData fields.
6423         Keep track of when we've seen a reference field after a
6424         non-reference field.
6425         (get_boehm_type_descriptor): Handle case where we see
6426         non-reference fields but no trailing reference field.
6427         * decl.c (rawdata_ptr_type_node): Define.
6428         (init_decl_processing): Initialize rawdata_ptr_type_node.
6429         * java-tree.h (rawdata_ptr_type_node): Declare.
6430
6431 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6432
6433         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
6434         specifiers in calls to fprintf.
6435
6436 2000-05-03  Andrew Haley  <aph@cygnus.com>
6437
6438         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
6439
6440         * javaop.h (WORD_TO_INT): New function.
6441         (IMMEDIATE_s4): Use WORD_TO_INT.
6442         * jcf.h (JPOOL_INT): Ditto.
6443
6444         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
6445         separator.
6446
6447 2000-04-19  Tom Tromey  <tromey@cygnus.com>
6448
6449         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
6450         on native function.
6451         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
6452         JNI methods.
6453         * expr.c (build_jni_stub): New function.
6454         * lang-specs.h: -fjni and -femit-class-file are incompatible.
6455         * parse.c: Rebuilt.
6456         * parse.y (java_complete_expand_methods): Expand a native method
6457         and call build_jni_stub if -fjni given.
6458         * lang-options.h: Document -fjni.
6459         * lang.c (flag_jni): New global.
6460         (lang_f_options): Added `jni' entry.
6461         * java-tree.h (soft_lookupjnimethod_node,
6462         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
6463         Declare.
6464         (flag_jni): Declare.
6465         (build_jni_stub): Declare.
6466         (struct lang_decl): Added `native' flag.
6467         (METHOD_NATIVE): Redefined to use `native' field of lang specific
6468         structure.
6469         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
6470         soft_jnipopsystemframe_node): New globals.
6471         (init_decl_processing): Set them.  _Jv_InitClass only takes one
6472         argument.
6473
6474         * java-tree.def: Put into `C' mode.
6475
6476 2000-04-27  Tom Tromey  <tromey@cygnus.com>
6477
6478         Fix for PR gcj/2:
6479         * expr.c (expand_invoke): Generate check to see if object pointer
6480         is null in nonvirtual invocation case.
6481         * java-tree.h (soft_nullpointer_node): Declare.
6482         * decl.c (soft_nullpointer_node): New global.
6483         (init_decl_processing): Initialize soft_nullpointer_node.
6484         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
6485         or `private' methods.
6486         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
6487
6488 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6489
6490         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
6491         from <clinit>
6492
6493 2000-04-26  Tom Tromey  <tromey@cygnus.com>
6494
6495         * zextract.c (find_zip_file_start): New function.
6496         (read_zip_archive): Use it.
6497
6498 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6499
6500         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
6501
6502 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6503
6504         * class.c (common_enclosing_context_p): New function.
6505         * java-tree.h (common_enclosing_context_p): Added prototype.
6506         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
6507         classes sharing an outer context with the current instance.
6508         * parse.y (build_access_to_thisn): Fixed leading comment.
6509         (verify_constructor_super): New local `supper_inner'. Skip
6510         enclosing context argument in the case of inner class constructors.
6511         (patch_method_invocation): Insert proper context as second
6512         parameter to pure inner class constructor super invocations.
6513
6514 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6515
6516         * parse.y (end_class_declaration): Reset the interface number
6517         counter.
6518
6519 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6520
6521         * parse.y (source_start_java_method): Deleted unnecessary code.
6522         (patch_method_invocation): Fixed comment.
6523
6524 2000-04-24  Robert Lipe <robertlipe@usa.net>
6525
6526         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
6527
6528 2000-04-23  Tom Tromey  <tromey@cygnus.com>
6529
6530         * boehm.c (mark_reference_fields): Use int_byte_position.
6531
6532 2000-04-22  Tom Tromey  <tromey@cygnus.com>
6533
6534         * boehm.c (mark_reference_fields): Only call byte_position on
6535         non-static fields.
6536
6537 2000-04-22  Tom Tromey  <tromey@cygnus.com>
6538
6539         * boehm.c (mark_reference_fields): Added `last_view_index'
6540         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
6541
6542 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
6543
6544         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
6545         * parse.y (check_class_interface_creation): Fixed comments. Select
6546         permitted modifiers for (inner) interfaces. Changed error message
6547         to report rejected modifiers used with local classes.
6548
6549 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6550
6551         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
6552         of directly inherited type considered in scope.
6553         * parse.y (do_resolve_class): Search inherited classes for inner
6554         classes.
6555
6556 2000-04-20  Tom Tromey  <tromey@cygnus.com>
6557
6558         * parse.y (not_accessible_p): Use member's class, not current
6559         class, when doing inheritance check for protected reference.
6560         Fixes PR gcj/124.
6561
6562 2000-04-20  Jason Schroeder  <shrode@subnature.com>
6563
6564         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
6565
6566 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6567
6568         * parse.y (lookup_field_wrapper): Search for final local aliases.
6569         (resolve_expression_name): Let lookup_field_wrapper search for
6570         final local aliases. Force the value of `name' if one is found.
6571         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
6572         an expression name. Fixed comments.
6573
6574 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6575
6576         * parse.y (yyerror): `msg' can be null, don't use it in that case.
6577
6578 2000-04-19  Tom Tromey  <tromey@cygnus.com>
6579
6580         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
6581
6582 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6583
6584         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
6585
6586 2000-04-18  Tom Tromey  <tromey@cygnus.com>
6587
6588         PR gcj/211:
6589         * gjavah.c (utf8_cmp): Changed return value.
6590         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
6591         result.
6592         (cxx_keywords): New global.
6593         (get_field_name): Handle new result of cxx_keyword_subst.
6594         (print_method_info): Likewise.
6595
6596 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
6597
6598         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
6599         with a newline, for CNI.
6600         (print_stub_or_jni): Print a space or newline before method name for
6601         CNI as well as JNI.
6602         (print_cxx_classname): Don't write leading "::" in CNI stub method.
6603         (process_file): Include gcj/cni.h if generating CNI stubs.
6604
6605 2000-04-16  Tom Tromey  <tromey@cygnus.com>
6606
6607         * gjavah.c (decompile_method): Use print_field_name.
6608         Fixes PR gcj/205.
6609
6610 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6611
6612         * parse.y (java_expand_classes): Reverse the package list once.
6613         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
6614         reduction.
6615         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
6616         the `==' and `!=' operators.
6617
6618 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6619
6620         * jcf-write.c (generate_bytecode_insns): At invokation time,
6621         always relate an interface method to the type of its selector.
6622
6623 2000-04-05  Tom Tromey  <tromey@cygnus.com>
6624
6625         Fix for PR gcj/2:
6626         * expr.c (expand_invoke): Generate check to see if object pointer
6627         is null in nonvirtual invocation case.
6628         * java-tree.h (soft_nullpointer_node): Declare.
6629         * decl.c (soft_nullpointer_node): New global.
6630         (init_decl_processing): Initialize soft_nullpointer_node.
6631         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
6632         or `private' methods.
6633         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
6634
6635 2000-04-05  Tom Tromey  <tromey@cygnus.com>
6636
6637         Fix for PR gcj/140:
6638         * parse.y (check_final_assignment): Recognize assignments to the
6639         `length' field of an array when generating class files.
6640
6641 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6642
6643         * class.c (decl_hash): Prototype removed.
6644         (decl_compare): Likewise.
6645
6646 2000-04-05  Tom Tromey  <tromey@cygnus.com>
6647
6648         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
6649         * parse.y (check_modifiers_consistency): Check for final/volatile
6650         clash.  Fixes PR gcj/164.
6651
6652 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6653
6654         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
6655         made global.
6656         (java_hash_compare_tree_node): Renamed from `decl_compare, made
6657         global.
6658         (add_method_1): Use `java_hash_hash_tree_node' and
6659         `java_hash_compare_tree_node'.
6660         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
6661         (java_hash_compare_tree_node): Likewise.
6662         * parse.y (find_applicable_accessible_methods_list): Create,
6663         delete and use a hash table to remember already searched interfaces.
6664
6665 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
6666
6667         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
6668         with latest entry.
6669
6670 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6671
6672         * boehm.c (mark_reference_fields, set_bit): Prototype.
6673         (set_bit): Un-ANSI-fy definition.
6674
6675         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
6676         Prototype.
6677
6678         * decl.c (emit_init_test_initialization): Likewise.
6679
6680         * gjavah.c (jni_print_char): Likewise.
6681
6682         * parse.y (create_new_parser_context): Likewise.
6683
6684 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6685
6686         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
6687         patch missing hunk. Fixed indentation.
6688
6689 2000-03-30  Tom Tromey  <tromey@cygnus.com>
6690
6691         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
6692         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
6693
6694 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6695
6696         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
6697         when negative *before* using it as an array index.
6698         * ChangeLog: Fixed typo.
6699
6700 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6701
6702         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
6703         to 0 when it reaches -1.
6704
6705 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6706
6707         * jcf-parse.c (get_constant): Properly cast `num' during the
6708         invocation of `add_double'.
6709         * jcf-write.c (push_long_const): Properly cast `lo' before
6710         comparing it to short bounds.
6711         * parse-scan.y (interface_declaration:): Rule re-arrange so that
6712         `interface_body:' is reduced after the current interface is
6713         pushed.
6714
6715 2000-03-26  Tom Tromey  <tromey@cygnus.com>
6716
6717         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
6718         Java-specific `-f' option.
6719
6720 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6721
6722         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
6723         Adjust order of making types.
6724         Make bitsize_*_node values.
6725
6726 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6727
6728         * class.c (make_field_value): Use byte_position.
6729         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
6730         (java_array_data_offset): Likewise.
6731         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
6732         bzero call.
6733
6734 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6735
6736         * parse.y (check_abstract_method_definitions): New local
6737         `end_type_reached'. Make sure we also consider `end_type'.
6738         (java_check_abstract_method_definitions): Make sure we eventually
6739         consider `java.lang.Object'.
6740         (maybe_use_access_method): Don't use access method if not in the
6741         context of a pure inner class or if the method's context is right.
6742         (find_applicable_accessible_methods_list): New static flag
6743         `object_done'. Don't search abstract classes as interfaces. Fixed
6744         indentation. Fixed the `java.lang.Object' only search. Search
6745         class interface(s) first, then fully search enclosing contexts.
6746         (find_most_specific_methods_list): Pick the closest candidate when
6747         they're all abstract.
6748
6749 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6750
6751         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
6752         properly initialize `finished_label'. Don't emit gotos for empty
6753         try statements.
6754
6755 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6756
6757         * except.c (emit_handlers): Clear catch_clauses_last.
6758
6759 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6760
6761         * parse.y (check_method_types_complete): New function.
6762         (create_class): Reset anonymous class counter only when seeing an
6763         non inner classe.
6764         (java_complete_class): JDEP_METHOD: Don't recompute signature
6765         if incomplete.
6766
6767 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6768
6769         * class.c (build_static_ref): Fixed indentation in comment.
6770         * java-tree.def (TRY_EXPR): Fixed typo in name.
6771         (CLASS_LITERAL): Likewise.
6772         * java-tree.h: (TYPE_DOT_CLASS): New macro.
6773         (struct lang_type): New field `dot_class'.
6774         * jcf-write.c (generate_bytecode_insns): Fixed error message.
6775         (generate_classfile): Method `class$' is synthetic.
6776         * parse.y (build_do_class_method): New function.
6777         (build_dot_class_method_invocation): Likewise.
6778         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
6779         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
6780         (qualify_ambiguous_name): Likewise.
6781         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
6782         (build_try_statement): Fixed leading comment.
6783
6784 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6785
6786         * class.c (make_field_value): Properly handle sizes.
6787         (get_dispatch_vector): Use tree_low_cst and host_integerp.
6788         (layout_class_method): Count using trees.
6789         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
6790         * expr.c (java_array_data_offset): Use int_bit_position.
6791         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
6792         (build_invokevirtual): Use tree_low_cst and do computations with trees.
6793
6794 2000-03-16  Tom Tromey  <tromey@cygnus.com>
6795
6796         * lang.c (flag_hash_synchronization): New global.
6797         (lang_f_options): Added `hash-synchronization'.
6798         * lang-options.h: Mention -fhash-synchronization.
6799         * java-tree.h (flag_hash_synchronization): Declare.
6800         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
6801         hash table synchronization is disabled.
6802         * decl.c (init_decl_processing): Only push `sync_info' value when
6803         hash table synchronization is disabled.
6804         * class.c (make_class_data): Only push `sync_info' field when hash
6805         table synchronization is disabled.  Removed dead code.
6806
6807 2000-03-16  Tom Tromey  <tromey@cygnus.com>
6808
6809         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
6810
6811 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6812
6813         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
6814         classes.
6815         * parse.y (patch_method_invocation): Handle anonymous classes
6816         creation in static context.
6817
6818 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6819
6820         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
6821         * parse.y (resolve_qualified_expression_name): Use it.
6822         (patch_method_invocation): Likewise.
6823
6824 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6825
6826         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
6827         depending on the type of dependency which dictates what the
6828         current class is.
6829         (unresolved_type_p): Resolved types limited to the current class.
6830
6831 2000-03-15  Tom Tromey  <tromey@cygnus.com>
6832
6833         * decl.c (init_decl_processing): Set type of `sync_info' to be
6834         pointer to Object.
6835
6836         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
6837         Correctly compute bit number for current slot.  Zero `high' and
6838         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
6839         mark_reference_fields.
6840         (mark_reference_fields): New function.
6841
6842 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6843
6844         * parse.y (register_incomplete_type): Fixed initialization of
6845         JDEP_ENCLOSING.
6846
6847 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6848
6849         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
6850         static globals.
6851         (push_class_context, pop_class_context): New function.
6852         (class_body:): Call pop_class_context.
6853         (interface_body:): Likewise.
6854         (INNER_QUALIFIER): New macro.
6855         (report_class_declaration): Changed output format and use
6856         INNER_QUALIFIER. Call push_class_context.
6857
6858 2000-02-14  Andrew Haley  <aph@cygnus.com>
6859
6860         * check-init.c (check_init): Add new cases for unary and binary
6861         tree nodes.
6862
6863 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6864
6865         * parse.y (resolve_package): Set `next' once a type name has been
6866         progressively discovered.
6867         (resolve_qualified_expression_name): Propagate resolution only if
6868         there are remaining qualifiers. Take into account `q' might have
6869         been cleared after re-qualification.
6870         * parse.y (patch_method_invocation): New local `resolved'.
6871         Section dealing with qualified expression rewritten to use
6872         resolve_field_access.
6873
6874 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6875
6876         * parse.h (PUSH_CPC): Fixed indentation.
6877         (DEBUG_CPC): New macro.
6878         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
6879         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
6880         * parse.y (class_body_declaration:): Use
6881         SET_CPC_INSTANCE_INITIALIZER_STMT.
6882         (method_declaration:): Check for null current_function_decl.
6883         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
6884         (java_parser_context_pop_initialized_field): Better handling of
6885         empty lists.
6886         (maybe_make_nested_class_name): Mark nested class name as
6887         qualified when necessary.
6888         (end_class_declaration): Don't call java_parse_context_resume when
6889         one or more error occurred.
6890         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
6891         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
6892         SET_CPC_INITIALIZER_STMT.
6893         (method_header): Check for inner classes declaring static methods.
6894         (resolve_qualified_expression_name): Handle situation where `this'
6895         is implied.
6896
6897 2000-03-13  Hans Boehm <boehm@acm.org>
6898
6899         * typeck.c (build_prim_array_type): Correctly set the high word too.
6900
6901 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6902
6903         * parse.y (java_complete_expand_methods): Leave <clinit> out of
6904         ordinary methods.
6905         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
6906         list of methods for interfaces.
6907
6908 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6909
6910         * parse.y (qualify_ambiguous_name): Properly handle expressions
6911         using `null'.
6912
6913 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6914
6915         * parse.y (check_final_assignment): Extended to process
6916         COMPOUND_EXPR.
6917         (patch_assignment): Have check_final_assignment called only once.
6918
6919 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6920
6921         * java-tree.h (IS_INIT_CHECKED): New flag.
6922         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
6923         * parse.y (patch_string): Call force_evaluation_order on the
6924         completed string concatenation tree.
6925         * expr.c (force_evaluation_order): Call force_evaluation_order on
6926         function's arguments too.
6927
6928 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6929
6930         * decl.c (emit_init_test_initialization): Mark KEY as unused.
6931         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
6932         (build_anewarray): Likewise.
6933         * parse.y (patch_newarray): Likewise.
6934         * parse.c: Regenerated.
6935
6936 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
6937
6938         * decl.c (init_decl_processing): Added new class fields `depth',
6939         `ancestors', and `idt' to class_type_node. Use
6940         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
6941         * class.c (make_class_data): Push initial values for new fields.
6942         * java-tree.h: Updated prototype for `build_invokeinterface'.
6943         * expr.c (build_invokeinterface): Changed parameters to accept
6944         `method' tree. Calculate index of `method' in its declaring
6945         interface. Build call to _Jv_LookupInterfaceMethodIdx.
6946         (expand_invoke): Call `build_invokeinterface' with new parameters.
6947         * parse.y (patch_invoke): Call `build_invokeinterface' with new
6948         parameters.
6949
6950 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
6951
6952         * typeck.c (lookup_do): Search superinterfaces first
6953         when looking up an interface method. From Godmar Back
6954         <gback@cs.utah.edu>
6955
6956 2000-03-06  Tom Tromey  <tromey@cygnus.com>
6957
6958         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
6959
6960 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6961
6962         * java-tree.h (lookup_argument_method2): Declared.
6963         (safe_layout_class): Prototype moved from parse.h.
6964         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
6965         * parse.y (java_check_regular_methods): Local `super_class' gone.
6966         Call lookup_argument_method2 instead of lookup_argument_method.
6967         Perform modifier match for methods found declared in implemented
6968         interfaces. Fixed indentation problem. Overriding/hiding error
6969         report to take place only for methods found in classes.
6970         * typeck.c (lookup_argument_method): Changed leading
6971         comment. Re-written by calling lookup_do.
6972         (lookup_argument_method2): New function.
6973         (lookup_java_method): Re-written by calling lookup_do.
6974         (lookup_do): New function.
6975
6976 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6977
6978         * check-init.c (check_init): Removed dead code. Handle (blank)
6979         final variables.
6980         * parse.y (declare_local_variables): New local `final_p', set it
6981         and use it to initialize LOCAL_FINAL.
6982         (check_final_assignment): Only check FIELD_DECLs.
6983
6984 2000-02-17  Tom Tromey  <tromey@cygnus.com>
6985
6986         * Makefile.in (JAVA_OBJS): Added boehm.o.
6987         (boehm.o): New target.
6988         * Make-lang.in (JAVA_SRCS): Added boehm.c.
6989         * java-tree.h (flag_use_boehm_gc): Declare.
6990         (get_boehm_type_descriptor): Declare.
6991         * lang.c (lang_f_options): Added `use-boehm-gc'.
6992         (flag_use_boehm_gc): New global.
6993         * lang-options.h: Added -fuse-boehm-gc.
6994         * boehm.c: New file.
6995         * class.c (get_dispatch_table): If class uses a Boehm type
6996         descriptor, put it in the vtable.
6997         (make_class_data): Removed dead code.
6998
6999 2000-03-03  Per Bothner  <per@bothner.com>
7000
7001         * decl.c (init_decl_processing):  Initialize sizetype properly.
7002
7003 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7004
7005         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
7006         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
7007         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7008         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
7009         (jcf_parse): New local `current'. Load innerclasses seen in outer
7010         context being processed.
7011         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7012         * jcf-write.c (append_innerclasses_attribute): New function.
7013         (append_innerclasses_attribute_entry): Likewise.
7014         (get_access_flags): Handle static classes. Set anonymous and local
7015         classes to be private.
7016         (generate_classfile): Attribute count adjusted. Call
7017         append_innerclasses_attribute.
7018         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
7019         PURE_INNER_CLASS_TYPE_P.
7020         * parse.y (parser_qualified_classname): New parameter `is_static',
7021         produce non qualified name accordingly.
7022         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
7023         (create_interface): Added argument to parser_qualified_classname.
7024         (create_class): Added argument to parser_qualified_classname. Setup
7025         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
7026         (add_inner_class_fields): Fixed indentation.
7027         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
7028         (method_declarator): Fixed typo in comment.
7029         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
7030         (build_current_thisn): Likewise.
7031         (patch_method_invocation): Likewise.
7032
7033 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7034
7035         * decl.c (current_function_decl): Move to toplev.c.
7036
7037 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7038
7039         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
7040         (DECL_BIT_INDEX): Use underlying representation.
7041         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
7042
7043 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7044
7045         * expr.c (build_java_ret): Pass proper type to size_binop.
7046
7047 2000-02-25  Anthony Green  <green@cygnus.com>
7048
7049         * expr.c (build_class_init): Mark the decl to be ignored by
7050         check_init.
7051         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
7052         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
7053         * class.c (init_test_hash_newfunc): New function.
7054         (decl_hash): New function.
7055         (decl_compare): New function.
7056         * decl.c (emit_init_test_initialization): New function.
7057         (complete_start_java_method): Traverse the init test hashtable,
7058         calling emit_init_test_initialization.
7059         (always_initialize_class_p): Define.
7060         * expr.c (build_class_init): Use initialization tests when
7061         emitting class initialization code.
7062         (always_initialize_class_p): Declare.
7063         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
7064         1.
7065         * java-tree.h: Include hash.h.
7066         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
7067         (struct lang_decl): Add init_test_table field.
7068         (init_test_hash_entry): Define.
7069
7070 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7071
7072         * gjavah.c (main): Avoid using `argi' to report unimplemented
7073         options.
7074
7075 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7076
7077         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
7078         initialize locals to avoid warnings. Local `exception_type' moved
7079         into if statement.
7080
7081 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7082
7083         * parse.y (resolve_expression_name): Use `orig' as a second
7084         argument to resolve_field_access.
7085         (resolve_field_access): Removed unnecessary code when dealing with
7086         static fields.
7087
7088 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7089
7090         * class.c (push_super_field): Don't push the field twice.
7091         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
7092         * parse.h (java_reorder_fields): Prototyped.
7093         * parse.y (java_reorder_fields): New function.
7094         (java_layout_class): Simplified not to worry about re-ordering.
7095
7096 2000-02-23  Tom Tromey  <tromey@cygnus.com>
7097
7098         * gjavah.c (print_name): In JNI case, correctly quote string.
7099         (print_method_info): Don't handle overrides in JNI mode.
7100
7101 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7102
7103         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
7104         value type set to `boolean_type_node'.
7105
7106 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
7107
7108         * jcf-dump.c (main): Test for correct condition after
7109         output file creation.
7110
7111 2000-02-19  Anthony Green  <green@cygnus.com>
7112
7113         * jcf-depend.c (add_entry): Fix test for first list entry.
7114
7115 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7116
7117         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
7118         * constants.c (build_constants_constructor): Likewise.
7119
7120 2000-02-19  Anthony Green  <green@cygnus.com>
7121
7122         * jcf-depend.c (add_entry): Add entries to the end of the list.
7123
7124 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
7125
7126         * decl.c (INT_TYPE_SIZE): Define if necessary.
7127         (expand_java_return): Handle the case of a native integer smaller
7128         than a JVM integer.
7129
7130 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7131
7132         * gjavah.c (help): Use GCCBUGURL.
7133         * jv-scan.c (help): Likewise.
7134         * jcf-dump.c (help): Likewise.
7135
7136 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7137
7138         * jcf-write.c (generate_bytecode_insns): Don't generate empty
7139         `finally' clauses.
7140
7141 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7142
7143         * jcf-parse.c (load_class): Call `fatal' if no file containing
7144         the target class are found.
7145
7146 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
7147
7148         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
7149         lex.c, lex.h, and PARSE_H to...
7150         (parse.o, parse-scan.o): ...here, respectively.
7151
7152         * lex.c: Split out code that may trigger SIGFPE from yylex()
7153         to its own function.
7154         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
7155
7156 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7157
7158         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
7159
7160 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7161
7162         * parse.y (outer_field_access_p): Stop in time when outer contexts
7163         are exhausted.
7164         (resolve_qualified_expression_name): Properly qualify *everything*
7165         after a package.type to be resoled as expression names.
7166         (find_applicable_accessible_methods_list): Save/restore `class' to
7167         isolate it from a possible outer context search.
7168
7169 2000-02-15  Tom Tromey  <tromey@cygnus.com>
7170
7171         * gjavah.c (jni_print_char): New function.
7172         (print_full_cxx_name): Use it.
7173         (decode_signature_piece): Likewise.
7174         (print_cxx_classname): Likewise.
7175
7176 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7177
7178         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
7179         version.o.
7180         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
7181
7182         * gjavah.c: Include version.h.
7183
7184         * jcf-dump.c: Likewise.
7185
7186         * jv-scan.c: Likewise.
7187
7188 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7189
7190         * parse.y (outer_field_access_fix): First parameter now a tree
7191         node. Check for assignement to final. First argument to
7192         build_outer_field_access_fix modified to accommodate prototype.
7193         (build_outer_field_access): Don't check for assignment to final
7194         here.
7195         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
7196         possibly returned by outer_field_access_fix. Changed
7197         outer_field_access_fix's first argument.
7198         (check_final_assignment): $finit$'s context is OK.
7199         (patch_unaryop): Use node instead of its line/column value when
7200         calling outer_field_access_fix.
7201
7202 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7203
7204         * parse.y (interface_declaration:): No longer tagged
7205         <node>. Re-installed default action.
7206         (class_member_declaration:): Handle inner interfaces.
7207         (interface_member_declaration): Handle inner interfaces and
7208         classes.
7209         (create_interface): Push error if one seen. Suspend parsing
7210         context when processing an inner interface.
7211         (register_fields): Inner class static field limitations not to
7212         apply to inner interfaces.
7213
7214 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7215
7216         * jcf-parse.c (load_class): Update `java_error_count' when a
7217         class' file can't be found.
7218         (parse.y): Avoid (byte)code generation when errors seen.
7219
7220 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7221
7222         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
7223         decodes a valid node.
7224         (patch_binop): Handle TRUNC_DIV_EXPR.
7225
7226 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7227
7228         * parse.y (resolve_package): New local `acc'. Try to progressively
7229         build and guess a package and type name.
7230
7231 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7232
7233         * parse.y (find_applicable_accessible_methods_list): Load and
7234         layout the search class if necessary.
7235         (java_complete_tree): Keep to original type of the folded initial
7236         value.
7237
7238 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7239
7240         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
7241         Generate error message if circularity is detected. New static
7242         local `list'.
7243         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
7244         * jcf-write.c (generate_bytecode_insns): Very simply handle
7245         SAVE_EXPR.
7246         * parse.y (java_check_circular_reference): Use
7247         `cyclic_inheritance_report' during report, if necessary.
7248         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
7249         walking NEW_ARRAY_INIT twice.
7250
7251 2000-02-09  Tom Tromey  <tromey@cygnus.com>
7252
7253         * parse.y (check_class_interface_creation): Allow inner classes to
7254         be `private' or `protected', check modifiers' consistency. Prevent
7255         block local classes from bearing any modifiers.
7256
7257 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7258
7259         * except.c (check_start_handlers): Re-add prototype lost in last
7260         patch.
7261         (maybe_start_try): Remove excess argument to `check_start_handlers'.
7262
7263 2000-02-09  Andrew Haley  <aph@cygnus.com>
7264
7265         * decl.c (clear_binding_level): Remove excess initializer.
7266         (maybe_poplevels): Remove unused variable.
7267         (force_poplevels): Ditto.
7268         (struct binding_level): Add comment.
7269
7270 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7271
7272         * jcf-write.c (generate_classfile): Don't consider
7273         pre-initialization with reference value (use <clinit> instead.)
7274         * parse.y (java_fix_constructors): No generated constructor for
7275         interfaces.
7276         (build_outer_field_access): Removed debug message.
7277         (outer_field_expanded_access_p): Adapted to bytecode generation.
7278         (build_outer_field_access_method): Use fix_method_argument_names.
7279         (build_outer_method_access_method): Fixed indentation. Added
7280         comment. Handle access method generation for static and also void
7281         methods.
7282         (build_access_to_thisn): Inserted debug message.
7283         (maybe_build_thisn_access_method): Use fix_method_argument_names.
7284         (resolve_qualified_expression_name): Fixed comment.
7285         (not_accessible_p): Adapted to bytecode generation. Added comment.
7286         (patch_method_invocation): Added comment.
7287         (maybe_use_access_method): Fixed leading comment. Handle static
7288         methods.
7289         (java_complete_lhs): Don't shortcut handling of initialized upon
7290         declaration String type static fields when generating bytecode.
7291         (patch_unaryop): Handle outer field access when generating
7292         bytecode.
7293
7294 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7295
7296         * java-tree.h (FIELD_THISN): New macro.
7297         * jcf-write.c (append_synthetic_attribute): New function.
7298         (generate_classfile): Set "Synthetic" attribute on this$<n>,
7299         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
7300         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
7301         this$<n> fields.
7302         (build_outer_field_access): Turned on access functions usage and
7303         generation when compiling to bytecode.
7304         (maybe_use_access_method): Likewise.
7305
7306 2000-01-25  Andrew Haley  <aph@cygnus.com>
7307
7308         * java-except.h (struct eh_range): Add `expanded' field.
7309         (maybe_start_try): Add end_pc arg.
7310         (maybe_end_try): Ditto.
7311         * java-tree.h (force_poplevels): new function.
7312         * expr.c (expand_byte_code): Don't call maybe_start_try or
7313         maybe_end_try.
7314         * except.c (add_handler): Reset expanded.
7315         (expand_start_java_handler): Set expanded.
7316         (check_start_handlers): Don't expand a start handler that's
7317         already been expanded.
7318         (maybe_start_try): Add end_pc arg.  Only expand a handler which
7319         ends after end_pc.
7320         (expand_end_java_handler): call force_poplevels.
7321         (force_poplevels): new function.
7322         * decl.c (binding_level): Add start_pc of binding level.
7323         (maybe_pushlevels): Call maybe_start_try when pushing binding
7324         levels.
7325         (maybe_poplevels): Call maybe_end_try when popping binding levels.
7326         (LARGEST_PC): Define.
7327         (clear_binding_level): Use LARGEST_PC.
7328
7329         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
7330         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
7331         (binding_depth, is_class_level, current_pc): new variables.
7332         (struct binding_level): ditto.
7333         (indent): new function.
7334         (push_jvm_slot): add debugging info.
7335         (maybe_pushlevels): ditto.
7336         (maybe_poplevels): ditto.
7337         (pushlevel): ditto.
7338         (poplevel): ditto.
7339         (start_java_method): ditto.
7340         (give_name_to_locals): comment only.
7341         * except.c (binding_depth, is_class_level, current_pc):
7342         new variables.
7343         (expand_start_java_handler): add debugging info.
7344         (expand_end_java_handler): ditto.
7345
7346 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7347
7348         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
7349         (print_name_for_stub_or_jni, process_file): Constify a char*.
7350
7351 2000-02-03  Tom Tromey  <tromey@cygnus.com>
7352
7353         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
7354
7355 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
7356
7357         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
7358         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
7359         defined to be 1.
7360
7361 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7362
7363         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
7364         * java-tree.h (TYPE_II_STMT_LIST): New macro.
7365         (struct lang_type): New field `ii_block'.
7366         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
7367         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
7368         * parse.h (struct parser_ctxt): New field `instance_initializers'.
7369         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
7370         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
7371         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
7372         macros.
7373         * parse.y (add_instance_initializer): New function.
7374         (in_instance_initializer): New static global.
7375         (class_body_declaration:): Link instance initializer block.
7376         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
7377         (array_creation_expression:): Remove unused local.
7378         (java_parser_context_push_initialized_field): Fixed leading
7379         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
7380         CPC_INSTANCE_INITIALIZER_LIST.
7381         (java_parser_context_pop_initialized_field): Likewise.
7382         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
7383         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
7384         CPC_INITIALIZER_STMT.
7385         (fix_constructors): New local `class_type'. Use it. Call
7386         add_instance_initializer.
7387         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
7388         (patch_return): Forbid return in instance initializers.
7389         (patch_throw_statement): Enforce exception handling in the context
7390         of instance initializers.
7391
7392 2000-02-03  Tom Tromey  <tromey@cygnus.com>
7393
7394         * Make-lang.in (java.mostlyclean): Remove executables in
7395         `mostlyclean'.
7396
7397 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
7398
7399         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
7400         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
7401         (java_float_finite): Convert to use union Word from javaop.h.
7402         (java_double_finite): Convert to use union DWord from javaop.h.
7403
7404 2000-02-02  Tom Tromey  <tromey@cygnus.com>
7405
7406         * gjavah.c (options): Added `jni' entry.
7407         (help): Document -jni.
7408         (flag_jni): New global.
7409         (process_file): Handle JNI output.  Don't print text from
7410         -prepend, -add, etc, when generating stubs.  Only remove `.class'
7411         suffix if it actually exists.
7412         (main): Create a `.c' file when run with `--jni --stubs'.  Create
7413         correct output file name with `--jni'.
7414         (print_include): Mangle header name differently in JNI case.
7415         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
7416         method list.
7417         (print_method_info): Handle JNI case.  Put signature info into
7418         method name.  Handle case when STREAM is NULL.
7419         (print_name_for_stub_or_jni): New function.
7420         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
7421         (print_cxx_classname): Handle JNI.
7422         (print_full_cxx_name): Likewise.
7423         (decode_signature_piece): Likewise.
7424         (overloaded_jni_method_exists_p): New function.
7425         (struct method_name): Added `signature' and `sig_length' fields.
7426         (HANDLE_END_FIELD): Do nothing in JNI mode.
7427
7428 2000-02-02  Tom Tromey  <tromey@cygnus.com>
7429
7430         * jv-scan.c: Include version.c, <getopt.h>.
7431         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
7432         (options): New array.
7433         (usage): New function.
7434         (version): New function.
7435         (main): Use getopt_long to parse command line.
7436         * jcf-dump.c: Include version.c, <getopt.h>.
7437         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
7438         OPT_JAVAP): New macros.
7439         (options): New array.
7440         (usage): Return `void'.  Changed message.
7441         (help): New function.
7442         (version): New function.
7443         (main): Use getopt_long_only to parse command line.
7444         * gjavah.c: Include <getopt.h>.
7445         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
7446         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
7447         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
7448         (options): New array.
7449         (java_no_argument): Removed.
7450         (help): Updated with missing options.
7451         (main): Use getopt_long_only to parse command line.
7452         (usage): Changed message.
7453
7454 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7455
7456         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
7457         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
7458         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
7459         * parse.y (array_creation_expression:): Handle anonymous arrays.
7460         (build_array_from_name): Don't set `ret_name' if null.
7461         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
7462         (qualify_ambiguous_name): Likewise.
7463         (java_complete_expand_class): Likewise.
7464
7465 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7466
7467         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
7468         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
7469         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
7470         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
7471         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
7472         AIPL_FUNCTION_COMPLETED_INVOCATION.
7473         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
7474         AIPL_FUNCTION_INVOCATION_READY.
7475         (AIPL_FUNCTION_DECLARATION): New enum entry.
7476         * parse.y (reorder_static_initialized): New function.
7477         (java_parser_context_pop_initialized_field): Use it.
7478         (add_inner_class_fields): Use
7479         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
7480         augmented. Install marker after last alias initializer, if any.
7481         (generate_finit): Fixed typo. Don't try to retain only the used
7482         fields.
7483         (method_header): Compute and set DECL_FUNCTION_NAP.
7484         (method_declarator): Fixed comment. Insert alias initializer in
7485         parameter list.
7486         (build_alias_initializer_parameter_list): Fixed leading
7487         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
7488         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
7489         (java_complete_expand_class): Code to retain only used aliases
7490         removed.
7491         (java_complete_expand_methods): New local `first_decl'. Generate
7492         $finit$ first, then expand the constructors, regular methods and
7493         <clinit>.
7494         (java_complete_expand_method): Don't report error on missing
7495         return statement if previously detected bogus.
7496         (fix_constructors): Don't patch constructor parameters list.
7497         (patch_method_invocation): Use new AIPL enum values. Reverse
7498         alias initializer list for anonymous classes.
7499
7500 2000-01-30  Anthony Green  <green@redhat.com>
7501
7502         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
7503         determine how many stack slots to pop.
7504
7505 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7506
7507         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
7508         error handling/recovery.
7509         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
7510
7511 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7512
7513         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
7514         FIELD_LOCAL_ALIAS_USED): New macros.
7515         (DECL_FUNCTION_NAP): New macro.
7516         (struct lang_decl): New field `nap'.
7517         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
7518         (struct lang_type): New fields `finit_stmt_list' and
7519         `clinit_stmt_list'.
7520         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
7521         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
7522         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
7523         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
7524         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
7525         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
7526         (BUILD_THROW): Macro line separator re-indented.
7527         * parse.y (end_class_declaration): New function.
7528         (maybe_generate_pre_expand_clinit): New name for
7529         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
7530         pre-expand static fields.
7531         (maybe_generate_clinit): Function deleted.
7532         (check_for_static_method_reference): Prototype's parameter list
7533         indented.
7534         (generate_finit): New name for maybe_generate_finit. Changed
7535         leading comment. Function rewritten to use
7536         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
7537         (build_alias_initializer_parameter_list): New function.
7538         (java_parser_context_pop_initialized_field): Likewise.
7539         (add_inner_class_fields): Likewise.
7540         (type_declaration:): Call end_class_declaration.
7541         (class_member_declaration:): Likewise.
7542         (formal_parameter_list:): Fixed typos.
7543         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
7544         element. Improved error handling.
7545         (block_statement:): Call end_class_declaration.
7546         (anonymous_class_creation:): Likewise.
7547         (create_anonymous_class): Fixed comments.
7548         (create_class): Call add_inner_class_fields.
7549         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
7550         (method_header): Use MARK_FINAL_PARMS.
7551         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
7552         (method_declarator): Propagate final argument flag.
7553         (craft_constructor): New local `artificial'. Call
7554         build_alias_initializer_parameter_list. Use
7555         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
7556         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
7557         necessary.
7558         (complete_expand_class): Get rid of unused outer context local
7559         alias fields.
7560         (java_complete_expand_methods): Fixed leading
7561         comment. Generate/pre-expand <clinit> first. Changed method
7562         expansion order to regular, $finit$, constructors, <clinit>.
7563         (java_complete_expand_method): Set current_function_decl.
7564         (fix_constructors): Fix constructor parameter list to account for
7565         outer context local alias initializers.
7566         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
7567         (resolve_expression_name): Lookup outer context local aliases. New
7568         local `access', use it.
7569         (patch_method_invocation): Patch inner class ctor invocation with
7570         outer context local aliases initialization values. $finit$
7571         invocation patching now includes things generated with
7572         build_alias_initializer_parameter_list.
7573         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
7574         (build_super_invocation): Likewise.
7575         (patch_assignment): Changed comment.
7576
7577 2000-01-27  Andrew Haley  <aph@cygnus.com>
7578
7579         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
7580         (emit_if): Ditto.
7581         (emit_jsr): Ditto.
7582
7583 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7584
7585         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
7586         concatenation.
7587         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
7588
7589         * parse.y (register_fields): Don't pass a format specifier to
7590         OBSOLETE_MODIFIER_WARNING.
7591         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
7592         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
7593         specifier.
7594         (check_modifiers): Change function into a macro.
7595         (check_class_interface_creation): Pass a literal format string.
7596
7597 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7598
7599         * buffer.h: PROTO -> PARAMS.
7600         * check-init.c: Likewise.
7601         * class.c: Likewise.
7602         * constants.c: Likewise.
7603         * convert.h: Likewise.
7604         * decl.c: Likewise.
7605         * except.c: Likewise.
7606         * expr.c: Likewise.
7607         * gjavah.c: Likewise.
7608         * java-except.h: Likewise.
7609         * java-tree.h: Likewise.
7610         * jcf-depend.c: Likewise.
7611         * jcf-dump.c: Likewise.
7612         * jcf-parse.c: Likewise.
7613         * jcf-path.c: Likewise.
7614         * jcf-reader.c: Likewise.
7615         * jcf-write.c: Likewise.
7616         * jcf.h: Likewise.
7617         * jv-scan.c: Likewise.
7618         * jvgenmain.c: Likewise.
7619         * jvspec.c: Likewise.
7620         * lang.c: Likewise.
7621         * lex.c: Likewise.
7622         * lex.h: Likewise.
7623         * parse-scan.y: Likewise.
7624         * parse.h: Likewise.
7625         * parse.y: Likewise.
7626         * typeck.c: Likewise.
7627         * verify.c: Likewise.
7628         * xref.c: Likewise.
7629         * xref.h: Likewise.
7630         * zextract.c: Likewise.
7631         * zipfile.h: Likewise.
7632
7633 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7634
7635         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
7636         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
7637         * constants.c (build_constant_data_ref): Check for cached
7638         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
7639         in TYPE_CPOOL_DATE_REF.
7640         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
7641         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
7642         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
7643         (LOCAL_FINAL): New macro.
7644         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
7645         constant pool -- don't try to reuse.
7646         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
7647         TYPE_LANG_SPECIFIC.
7648         (find_in_current_zip): Use TYPE_JCF.
7649         * parse.h (java_check_final): Prototype removed.
7650         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
7651         (maybe_create_class_interface_decl,
7652         check_class_interface_creation): Likewise.
7653         (java_expand_finals): Function removed.
7654         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
7655         (block_statement:): Fixed comment.
7656         (anonymous_class_creation:): Likewise.
7657         (check_class_interface_creation): Reversed Jan 12, 2000 extra
7658         argument patch.
7659         (check_class_interface_creation): Loosened error report on (inner)
7660         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
7661         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
7662         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
7663         argument patch.
7664         (create_interface): Likewise.
7665         (anonymous_class_counter): New static global.
7666         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
7667         patch. Fixed comments.
7668         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
7669         anonymous_class_counter when declaring a toplevel class.
7670         (craft_constructor): Fixed constructor name when handling
7671         anonymous classes. Anonymous class constructors to feature hidden
7672         this$<n> parameter.
7673         (java_fix_constructors): Added comment.
7674         (java_check_final): Function removed.
7675         (java_complete_expand_methods): Fixed comment. Don't generate
7676         class data, save its outgoing constant pool instead.
7677         (verify_constructor_super): Skip anonymous class constructor
7678         hidden this$<n> parameter.
7679         (java_expand_classes): New local `saved_ctxp'. Removed call to
7680         java_expand_finals and java_check_final. Expand anonymous class
7681         constructors. Generate class data.
7682         (build_super_invocation): Skip anonymous class hidden this$<n>
7683         parameter.
7684         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
7685         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
7686         (set_java_signature): Likewise.
7687
7688 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
7689
7690         * gjavah.c: Delete ACC_VISIBILITY define.
7691         * jcf.h: Add ACC_VISIBILITY define.
7692         * parse.y: final: rule tagged <value>.
7693         (java_check_regular_methods): Use ACC_VISIBILITY define for
7694         default package access check.
7695         (local_variable_declaration_statement): Use final: rule.
7696
7697 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
7698
7699         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
7700         (final:): New rule.
7701
7702 2000-01-17  Tom Tromey  <tromey@cygnus.com>
7703
7704         * gjavah.c (print_field_info): Allow non-static final fields.
7705
7706 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7707
7708         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
7709         * parse.y (patch_anonymous_class): New function.
7710         (create_anonymous_class): Register incomplete type when the
7711         class/interface to extends/implement isn't known yet.
7712         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
7713         (verify_constructor_super): Tuned error message.
7714
7715 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7716
7717         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
7718         (ANONYMOUS_CLASS_P): New macro.
7719         (TYPE_SIGNATURE, TYPE_JCF): New macros.
7720         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
7721         * parse.y (create_class): Added leading argument.
7722         (maybe_create_class_interface_decl,
7723         check_class_interface_creation): Likewise.
7724         (craft_constructor): New function.
7725         (verify_constructor_super): Added argument in prototype.
7726         (class_declaration:): Inserted leading argument.
7727         (for_begin:): Use FOR_LOOP_P.
7728         (anonymous_class_creation): Create WFL of the anonymous class to
7729         instantiate. Call build_new_invocation. Added comments.
7730         (check_class_interface_creation): Handle parameter `anonymous' in
7731         verbose mode class creation announce.
7732         (link_nested_class_to_enclosing): Exclude anonymous classes.
7733         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
7734         anonymous class, even though they appear to have an enclosing
7735         context.
7736         (create_interface): Pass extra argument to
7737         check_class_interface_creation.
7738         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
7739         (create_class): Call check_class_interface_creation and
7740         maybe_create_class_interface_decl with extra new argument. Don't
7741         add private this$<n> to anonymous classes.
7742         (method_declarator): Insert hidden this$<n> to anonymous class
7743         constructors.
7744         (java_fix_constructors): Deleted code creating default
7745         constructor. Call craft_constructor instead.
7746         (java_check_regular_methods): Set `saw_constructor' to 1 for
7747         anonymous classes.
7748         (fix_constructors): Pass extra argument to verify_constructor_super.
7749         (verify_constructor_super): New local `sdecl', use it. Search for
7750         matching constructor (possibly featuring arguments) in super
7751         class.
7752         (lookup_method_invoke): Craft constructor according to arguments
7753         list when dealing with anonymous class constructors.
7754         (build_super_invocation): Pass arguments to anonymous class super
7755         constructors.
7756         (search_loop): Use FOR_LOOP_P.
7757         (labeled_block_contains_loop_p): Likewise.
7758
7759 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7760
7761         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
7762         (enclosing_context_p): New function.
7763         (get_access_flags_from_decl): Handle CLASS_STATIC.
7764         (maybe_layout_super_class): Extra first argument passed to
7765         do_resolve_class.
7766         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
7767         ID_INIT_P.
7768         * decl.c (access0_identifier_node): New global.
7769         (init_decl_processing): access0_identifier_node initialized.
7770         (pushdecl): Set DECL_CONTEXT only on non type decls.
7771         * expr.c (lookup_field): Lookup inner class fields in enclosing
7772         contexts.
7773         (expand_invoke): Use ID_INIT_P.
7774         (expand_java_field_op): Use DECL_CLINIT_P.
7775         * java-tree.def (CLASS_LITERAL): New tree code.
7776         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
7777         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
7778         (struct lang_decl): New field `inner_access'.
7779         (enclosing_context_p): Prototyped.
7780         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
7781         ID_CLINIT_P): New macros.
7782         (CLASS_STATIC): New macro.
7783         (CLASS_ACCESS0_GENERATED_P): New macro.
7784         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
7785         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
7786         INNER_CLASS_P): New macros.
7787         (DECL_INNER_CLASS_LIST): New macro.
7788         * jcf-parse.c (yyparse): Avoid the use of ANSI string
7789         concatenation.
7790         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
7791         the shift value to int. Fixed typo in comment.
7792         * lex.c (inst_id, wpv_id): Initialize.
7793         * mangle.c (unicode_mangling_length): Take `$' into account.
7794         * parse.h (DRECOVER, RECOVER): Terminate properly.
7795         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
7796         (typedef struct _jdep): New field `enclosing'.
7797         (JDEP_ENCLOSING): New macro.
7798         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
7799         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
7800         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
7801         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
7802         GET_ENCLOSING_CPC_CONTEXT): New macros.
7803         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
7804         (do_resolve_class): Added extra argument in prototype.
7805         * parse.y (resolve_class): Added extra argument in prototype.
7806         (maybe_create_class_interface_decl): Likewise.
7807         (maybe_use_access_method, build_wfl_wrap): New functions.
7808         (java_complete_expand_classes, java_complete_expand_class):
7809         Likewise.
7810         (java_parser_context_push_initialized_field,
7811         java_parser_context_suspend, java_parser_context_resume):
7812         Likewise.
7813         (maybe_make_nested_class_name, make_nested_class_name,
7814         set_nested_class_simple_name_value,
7815         link_nested_class_to_enclosing, find_as_inner_class,
7816         find_as_inner_class_do, check_inner_class_redefinition,
7817         build_thisn_assign, build_current_thisn, build_access_to_thisn,
7818         maybe_build_thisn_access_method, build_outer_field_access,
7819         build_outer_field_access_methods, build_outer_field_access_expr,
7820         build_outer_method_access_method, build_new_access_id,
7821         build_outer_field_access_method, outer_field_access_p,
7822         outer_field_expanded_access_p, outer_field_access_fix,
7823         build_incomplete_class_ref, patch_incomplete_class_ref,
7824         create_anonymous_class): Likewise.
7825         (inst_id, wpv_id): New static global variables.
7826         (synchronized:): New rule, tagged <node>.
7827         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
7828         rules.
7829         (anonymous_class_creation:): New rule, tagged <node>.
7830         (NEW_TK): Tagged <node>.
7831         (type_literals, array_type_literal): New rules, tagged <node>.
7832         (class_declaration:): Removed action when reducing by class_body:
7833         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
7834         using GET_CPC in sub-rules.
7835         (class_member_declaration): Handle inner classes.
7836         (method_declaration): When reducing method_header:, reset
7837         current_function_decl when appropriate.
7838         (method_declarator:): Set the number of formal parameter to 0 for
7839         method declared without arguments.
7840         (constructor_declarator:): Likewise.
7841         (static_initializer:): List of elements kept in a list.
7842         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
7843         use of the keyword `static' for type declarations.
7844         (block_statement:): Handle inner class declarations.
7845         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
7846         type qualified `this'.
7847         (class_instance_creation_expression): Use anonymous_class_creation:
7848         to handle inner class instances creation. Handle qualified `new'.
7849         (something_dot_new): Added appropriate actions.
7850         (create_new_parser_context): New function.
7851         (java_push_parser_context, java_parser_context_save_global,
7852         java_parser_context_suspend): Use create_new_parser_context.
7853         (check_modifiers): Changed leading comment.
7854         (check_class_interface_creation): Handle interclasses.
7855         (add_superinterfaces): Fixed comment.
7856         (create_interface): Build qualified name from the raw_name instead
7857         of its matching WFL. Push the initialized fields list. raw_name added
7858         as an extra argument to maybe_create_class_interface_decl.
7859         (create_class): Build qualified name from the raw_name instead of
7860         its matching WFL. Removed assignment to current_parsed_class_un.
7861         Call PUSH_ERROR before returning an error. Suspend the current
7862         parser context when processing an inner class. Push the
7863         initialized fields list. raw_name added as an extra argument to
7864         maybe_create_class_interface_decl. Add the private this$<n>
7865         field.
7866         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
7867         (register_fields): Get the class type from GET_CPC and handle
7868         previous errors.  Added code to handle the creation of static
7869         fields in inner classes. Initialized fields initialization
7870         statements kept in a list of lists.
7871         (maybe_generate_finit): Initialized fields initialization
7872         statements kept in a list of lists. Use GET_CPC.
7873         (maybe_generate_clinit): Likewise.
7874         (method_header): Use GET_CPC and GET_CPC_UN.
7875         (parser_qualified_classname): Handle inner classes.
7876         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
7877         (java_fix_constructors): Hide pointer to enclosing context
7878         instance in constructor list when dealing with inner classes.
7879         (jdep_resolve_class): Call resolve_class with extra first argument
7880         JDEP_ENCLOSING.
7881         (resolve_class): Add enclosing context as a first extra argument
7882         to do_resolve_class.
7883         (do_resolve_class): Call find_as_inner_class. Handle WFLs
7884         properly.
7885         (resolve_no_layout): Extra argument added to resolve_class
7886         invocation.
7887         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
7888         (java_get_real_method_name): Use GET_CPC_UN.
7889         (check_abstract_method_definitions): Use DECL_CLINIT_P.
7890         (java_check_abstract_methods): Handle static method declared in
7891         inner classes by an error.
7892         (java_check_regular_methods): Use DECL_CLINIT_P.
7893         (source_start_java_method): Also set DECL_MAX_LOCALS.
7894         (create_artificial_method): Call java_parser_context_save_global
7895         and java_parser_context_restore_global instead of saving/restoring
7896         the context by hand.
7897         (expand_start_java_method): Improved verbose mode message.
7898         (java_complete_expand_methods): Fixed leading comment. Use
7899         DECL_CLINIT_P.
7900         (fix_constructors): Added assignment to this$<n> if necessary.
7901         (java_expand_classes): Call java_complete_expand_classes instead
7902         of java_complete_expand_methods.
7903         (make_qualified_primary): Simplified.
7904         (merge_qualified_name): Optimized for missing left or right parts.
7905         (resolve_expression_name): Handle access to outer class fields from
7906         interclasses.
7907         (resolve_qualified_expression_name): New macro
7908         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
7909         classes. Report error on non appropriate qualification of
7910         `new'. Handle qualified `this'.
7911         (not_accessible_p): Allow access to outer class private fields from
7912         inner classes.
7913         (patch_method_invocation): Handle method invocations through
7914         access methods and inner class constructor invocations.
7915         (find_applicable_accessible_methods_list): Search enclosing
7916         contexts of an inner class.
7917         (search_applicable_methods_list): Fixed typo.
7918         (argument_types_convertible): Handle inner class constructors'
7919         hidden outer context reference argument.
7920         (qualify_ambiguous_name): Handle qualified `this'.
7921         (java_complete_lhs): Handle use of field accessed through
7922         artificial access methods in various cases of assignments. Handle
7923         CLASS_LITERAL node.
7924         (check_final_assignment): Use DECL_CLINIT_P.
7925         (valid_ref_assignconv_cast_p): Handle the destination being an
7926         enclosing context of the source.
7927         (patch_unaryop): Handle use of field accessed through artificial
7928         access methods.
7929         (patch_return): Use DECL_CLINIT_P.
7930         (patch_throw_statement): Use DECL_CLINIT_P.
7931         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
7932         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
7933         ID_INIT_P.
7934
7935 2000-01-16  Anthony Green  <green@cygnus.com>
7936
7937         * parse.y (build_string_concatenation): Only use
7938         StringBuffer(String) shortcut if String arg is constant.
7939
7940 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7941
7942         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
7943         the shift value to int. Fixed typo in comment.
7944
7945 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
7946
7947         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
7948         * jcf-write.c: Likewise.
7949         * parse.y: Likewise.
7950         * parse.c: Regenerate.
7951
7952 2000-01-09  Anthony Green  <green@cygnus.com>
7953
7954         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
7955         bytecodes in the correct order.
7956
7957 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7958
7959         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
7960
7961 2000-01-06  Anthony Green  <green@cygnus.com>
7962
7963         * expr.c (java_lang_expand_expr): Switch to permanent obstack
7964         before building constant array decl.
7965
7966 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7967
7968         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
7969         method invocation and typo in conditional expression.
7970         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
7971         the appropriate NOTE_POP.
7972         * parse.y (patch_binop): Shift value mask to feature the right
7973         type.
7974
7975 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7976
7977         * class.c (assume_compiled, assume_compiled_node): Add static
7978         prototype.
7979         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
7980
7981         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
7982
7983         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
7984
7985         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
7986         to `__modifier' to avoid stringifying it.
7987
7988         * parse.y (verify_constructor_circularity): Don't call a variadic
7989         function with a non-literal format string.
7990         (java_check_abstract_methods): Move unreachable code inside
7991         `continue' statement.
7992         (lookup_method_invoke): Call xstrdup, not strdup.
7993
7994         * expr.c (expand_java_field_op): Avoid the use of ANSI string
7995         concatenation.
7996
7997         * jcf-parse.c (yyparse): Likewise.
7998
7999         * jv-scan.c (main): Likewise.
8000
8001 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8002
8003         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
8004         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
8005         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
8006         concatenation.
8007
8008         * parse.y (synchronized, variable_redefinition_error,
8009         check_class_interface_creation, create_interface, create_class,
8010         method_header, finish_method_declaration,
8011         check_modifiers_consistency, method_declarator,
8012         complete_class_report_errors, check_abstract_method_definitions,
8013         java_check_regular_methods, check_throws_clauses,
8014         java_check_abstract_methods, read_import_dir,
8015         check_pkg_class_access, declare_local_variables, fix_constructors,
8016         cut_identifier_in_qualified, resolve_expression_name,
8017         resolve_qualified_expression_name, patch_method_invocation,
8018         java_complete_lhs, patch_assignment, try_builtin_assignconv,
8019         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
8020         patch_exit_expr, patch_exit_expr, patch_switch_statement,
8021         patch_try_statement, patch_synchronized_statement,
8022         patch_throw_statement, check_thrown_exceptions,
8023         patch_conditional_expr): Likewise.
8024
8025 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8026
8027         * Makefile.in (LIBDEPS): Added gcc's errors.o
8028         (../jcf-dump$(exeext):): Link with gcc's errors.o
8029         (../gcjh$(exeext):): Likewise.
8030         * expr.c (expand_java_NEW): Layout the entire target type instead of
8031         laying out its methods only.
8032         (lookup_field): Layout the class after having loaded it.
8033         * java-tree.h (java_debug_context): Declared.
8034         * jcf-io.c (toplev.h): Included.
8035         (find_class): Removed assignment to jcf's outofsynch
8036         field. Force source file to be read if newer than its matching
8037         class file. Tweaked debug messages.
8038         * jcf-parse.c (jcf_out_of_synch): Deleted.
8039         (read_class): Call to jcf_out_of_synch removed.
8040         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
8041         (jcf_out_of_synch): Prototype deleted.
8042         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
8043         `deprecated' and `class_err': integer turned into bit-fields.
8044         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
8045         * parse.y (package_list): New global.
8046         (package_declaration:): Record newly parsed package name.
8047         (extra_ctxp_pushed_p): Static global deleted.
8048         (java_parser_context_save_global): Create buffer context for the
8049         purpose of saving globals, if necessary.
8050         (java_parser_context_restore_global): Pop context pushed for the
8051         purpose of saving globals, if necessary.
8052         (java_debug_context_do): New prototype and function.
8053         (java_debug_context): Likewise.
8054         (do_resolve_class): Use already parsed package names to qualify
8055         and lookup class candidate.
8056         (java_pre_expand_clinit): Removed unnecessary local variable.
8057
8058 1999-12-17  Tom Tromey  <tromey@cygnus.com>
8059
8060         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
8061         fixes PR gcj/119.
8062         (process_file): Use `\n\' at end of each line in string.
8063
8064 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8065
8066         * expr.c (expand_invoke): Layout the loaded class before
8067         attempting to use it.
8068         (expand_java_field_op): Allow final field assignments to take
8069         place in $finit$.
8070         * typeck.c (convert): Return error_mark_node if expr is null.
8071
8072 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8073
8074         * class.c (class_depth): Return -1 if the class doesn't load
8075         properly.
8076         * expr.c (can_widen_reference_to): Check for errors during depth
8077         computation and return 0 accordingly.
8078         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
8079         create default constructors and add an other error check.
8080         * parse.h (java_fix_constructors): Prototyped.
8081         * parse.y (java_pre_expand_clinit): Likewise.
8082         (build_super_invocation): Re-prototyped to feature one argument.
8083         (java_check_circular_reference): Directly use `current'.
8084         (java_fix_constructors): New function.
8085         (java_check_regular_methods): Don't create default constructors
8086         here, but abort if none were found.
8087         (java_complete_expand_methods): Pre-process <clinit> calling
8088         java_pre_expand_clinit.
8089         (java_pre_expand_clinit): New function.
8090         (fix_constructors): build_super_invocation invoked with the
8091         current method declaration as an argument.
8092         (build_super_invocation): Use the context of the processed method
8093         decl argument instead of current_class.
8094         * typeck.c (lookup_java_method): Take WFLs in method names into
8095         account.
8096
8097 1999-12-14  Per Bothner  <per@bothner.com>
8098
8099         * class.c (make_class_data): flag_keep_inline_functions to keep
8100         private methods in the method array.
8101
8102 1999-12-15  Anthony Green  <green@cygnus.com>
8103
8104         * check-init.c (check_init): Take into account both types of
8105         `throw's when checking for uninitialized variables.
8106
8107 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8108
8109         * parse.y (java_complete_lhs): Force convertion of array
8110         dimensions to int_type_node, that's what runtime's ABI expects.
8111
8112 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8113
8114         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
8115         operand of a WFL, until the Java front-end gets fixed with regard
8116         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
8117
8118 1999-12-10  Andrew Haley  <aph@cygnus.com>
8119
8120         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
8121         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
8122         expr.c (build_java_athrow): Add support for sjlj-exceptions.
8123         java-tree.h: Ditto.
8124         jcf-write.c: Ditto.
8125
8126 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8127
8128         * expr.c (java_lang_expand_expr): Switch to permanent obstack
8129         before calling expand_eh_region_start and expand_start_all_catch.
8130         * except.c (expand_start_java_handler): Switch to permanent
8131         obstack before calling expand_eh_region_start.
8132         (expand_end_java_handler): Switch to permanent obstack before
8133         calling expand_start_all_catch.
8134
8135 1999-12-5  Anthony Green  <green@cygnus.com>
8136
8137         * decl.c (init_decl_processing): Mark throw_node as a noreturn
8138         function with side effects.
8139         (init_decl_processing): Mark all memory allocating DECLs with
8140         DECL_IS_MALLOC.
8141
8142 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8143
8144         * except.c (expand_end_java_handler): Call
8145         expand_resume_after_catch and end_catch_handler.
8146
8147 1999-11-30  Anthony Green  <green@cygnus.com>
8148
8149         * verify.c (verify_jvm_instructions): Create new return label
8150         chain if non existent (don't rely on the verified state of the jsr
8151         target.)
8152
8153 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8154
8155         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
8156         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
8157
8158         * parse.y (patch_assignment): Removed bogus final class test on
8159         lhs when checking on whether to emit an ArrayStoreException runtime
8160         check.
8161         * expr.c (expand_java_arraystore): Likewise.
8162
8163 1999-11-28 Anthony Green <green@cygnus.com>
8164
8165         * decl.c (find_local_variable): Reuse single slot decls when
8166           appropriate.
8167
8168 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8169
8170         * jcf-parse.c (saw_java_source): Global variable removed.
8171         (read_class): Don't use `saw_java_source'. Added extra braces.
8172         (yyparse): Code setting `saw_java_source' removed.
8173
8174 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
8175
8176         * except.c (emit_handlers): Zero catch_clauses after emitting them.
8177
8178 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8179
8180         * verify.c (merge_type_state): Non verified subroutines being
8181         considered more than once to trigger passive type merge.
8182
8183 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8184
8185         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
8186         in case of error. Error message tuned.
8187
8188 1999-11-21  Anthony Green  <green@cygnus.com>
8189
8190         * constants.c (find_methodref_index): Unwrap method names before
8191         inserting them in the constant pool.
8192
8193         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
8194
8195         * class.c (assume_compiled_node): New typedef.
8196         (assume_compiled_tree): New static data.
8197         (find_assume_compiled_node): New function.
8198         (add_assume_compiled): New function.
8199         (assume_compiled): New function.
8200         * class.c (make_class_data): Use assume_compiled.
8201         (is_compiled_class): Use assume_compiled.
8202
8203         * java-tree.h (add_assume_compiled): Declare.
8204
8205         * lang.c (lang_decode_option): Parse new options.
8206
8207 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8208
8209         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
8210         int_type_node: that's what `_Jv_AllocObject' expects.
8211
8212 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8213
8214         * parse.y (lookup_method_invoke): Use lang_printable_name to
8215         reliably build the type name during error report. Fixes PR gcj/97.
8216
8217 1999-11-09  Tom Tromey  <tromey@cygnus.com>
8218
8219         * jcf-path.c: Include <sys/stat.h>.
8220         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
8221         (DIR_UP): New macro.
8222
8223 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8224
8225         * parse.y (source_end_java_method): Resume permanent allocation,
8226         reversing Apr 27 1998 patch.
8227         (patch_string_cst): Pop obstacks after having pushed the permanent
8228         ones.
8229
8230 1999-11-05  Tom Tromey  <tromey@cygnus.com>
8231
8232         * class.c (finish_class): Emit inlined methods if any native
8233         methods exist in the class.  Fixes PR gcj/85.
8234
8235 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8236
8237         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
8238         (qualify_ambiguous_name): Likewise.
8239
8240 1999-11-03  Godmar Back <gback@cs.utah.edu>
8241
8242         * typeck.c: (lookup_java_method):  search all inherited
8243         interfaces when looking up interface method.
8244
8245 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8246
8247         * parse.y (method_header:): Issue error message for rule `type
8248         error'.
8249         (synchronized:): Error report when not using synchronized.
8250
8251 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8252
8253         * parse.y (resolve_qualified_expression_name): Prevent `this' from
8254         being used before the superclass constructor has been called.
8255         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
8256         instead of `CALL_THIS_CONSTRUCTOR_P'.
8257
8258 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
8259
8260         * check-init.c: Fix typo in comment.
8261
8262 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8263
8264         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
8265         and final method.
8266
8267 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8268
8269         * parse.y (expression_statement:): Call function to report
8270         improper invocation of a constructor.
8271         (parse_ctor_invocation_error): New function.
8272
8273 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
8274
8275         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
8276         remember_end_note.
8277
8278 1999-10-21  Tom Tromey  <tromey@cygnus.com>
8279
8280         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
8281         in generated `main'.
8282
8283 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8284
8285         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
8286         (qualify_ambiguous_name): Likewise.
8287
8288 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8289
8290         * parse.y (java_complete_tree): fold_constant_for_init to work on
8291         permanent_obstack.
8292         (java_complete_lhs): Likewise.
8293         (array_constructor_check_entry): Complete an initializer element
8294         on permanent_obstack.
8295
8296 1999-10-19  Tom Tromey  <tromey@cygnus.com>
8297
8298         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
8299         From Mike Moreton <mike@pillim.demon.co.uk>.
8300
8301 1999-10-15  Greg McGary  <gkm@gnu.org>
8302
8303         * java-tree.h (flag_bounds_check): Remove extern decl.
8304         * lang.c (flag_bounds_check): Remove global variable.
8305         (lang_f_options): Remove "bounds-check" entry.
8306         (lang_init_options): Default flag_bounds_check to "on".
8307
8308 1999-10-14  Tom Tromey  <tromey@cygnus.com>
8309
8310         * jvgenmain.c (usage): New function.
8311         (main): Use it.  Also, handle `-D' options.
8312         * jvspec.c (lang_specific_driver): Recognize -D.
8313         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
8314
8315         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
8316
8317 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8318
8319         * jcf-dump.c (print_constant, disassemble_method): Don't call a
8320         variadic function with a non-literal format string.
8321
8322         * parse-scan.y (report_main_declaration): Likewise.
8323
8324         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
8325
8326         * parse.y (read_import_dir, patch_assignment, patch_binop,
8327         patch_array_ref): Likewise.
8328
8329         * typeck.c (build_java_array_type): Likewise.
8330
8331         * verify.c (verify_jvm_instructions): Likewise.
8332
8333 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8334
8335         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
8336
8337 1999-10-07  Anthony Green  <green@cygnus.com>
8338
8339         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
8340         where CHECK_PUT may fail for valid reasons.
8341
8342         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
8343         UNSAFE_PUTN): New macros.
8344
8345 1999-10-04  Tom Tromey  <tromey@cygnus.com>
8346
8347         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
8348         well.  Fixes Java PR gcj/59.
8349         * parse-scan.y (yyerror): Report errors.
8350
8351 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
8352
8353         * decl.c (insert_block): Remove unconditional `abort'.
8354
8355 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
8356
8357         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
8358         FUNCTION_CODE now of type int.  All callers changed.
8359         Set the builtin's DECL_BUILT_IN_CLASS.
8360
8361 1999-09-23  Tom Tromey  <tromey@cygnus.com>
8362
8363         * jvspec.c (lang_specific_driver): Don't read spec file if
8364         -fsyntax-only given.
8365
8366 1999-09-22  Tom Tromey  <tromey@cygnus.com>
8367
8368         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
8369
8370         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
8371         (WORDS_TO_LONG): Likewise.
8372         (WORDS_TO_DOUBLE): Likewise.
8373
8374 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8375
8376         * jcf-write.c (RELOCATION_VALUE_0): New macro.
8377         (RELOCATION_VALUE_1): Likewise.
8378         (emit_iinc, emit_reloc, push_constant1, push_constant2,
8379         push_in_const, push_long_const): Prototyped.
8380         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
8381         (push_constant2): Likewise.
8382         (push_int_const): Cast find_constant1's integer arguments to `jword'.
8383         (find_constant_wide): Cast find_constant2's integer arguments to
8384         `jword'.
8385         (find_constant_index): Cast find_constant2's and find_constant2's
8386         integer arguments to `jword'.
8387         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
8388         (emit_switch_reloc): Use RELOCATION_VALUE_0.
8389         (emit_if): Use RELOCATION_VALUE_1.
8390         (emit_goto): Likewise.
8391         (emit_jsr): Likewise.
8392         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
8393         argument to push_long_const to HOST_WIDE_INT.
8394
8395 1999-09-15  Andreas Schwab  <schwab@suse.de>
8396
8397         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
8398
8399 1999-09-20  Nick Clifton  <nickc@cygnus.com>
8400
8401         * lang.c (lang_decode_option): Extend comment.
8402
8403 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8404
8405         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
8406         instead of fndecl.
8407
8408 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8409
8410         * gjavah.c (get_field_name, print_method_info, print_include,
8411         add_namelet): Use xmalloc, not malloc.
8412
8413         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
8414         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
8415         NULL pointer.
8416
8417         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
8418
8419         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
8420
8421         * jcf-path.c (add_entry): Likewise.
8422
8423         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
8424
8425         * jv-scan.c (xmalloc): Remove definition.
8426
8427         * jvgenmain.c (xmalloc): Likewise.
8428
8429         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
8430
8431         * lex.c (java_store_unicode): Use xrealloc, not realloc.
8432
8433         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
8434         concat, not xmalloc/sprintf.
8435         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
8436         (xstrdup): Remove definition.
8437
8438         * parse.y (duplicate_declaration_error_p,
8439         constructor_circularity_msg, verify_constructor_circularity,
8440         check_abstract_method_definitions, java_check_regular_methods,
8441         java_check_abstract_methods, patch_method_invocation,
8442         check_for_static_method_reference, patch_assignment, patch_binop,
8443         patch_cast, array_constructor_check_entry, patch_return,
8444         patch_conditional_expr): Use xstrdup, not strdup.
8445
8446         * zextract.c (ALLOC): Use xmalloc, not malloc.
8447
8448 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8449
8450         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
8451
8452         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
8453         (do_spec, lang_specific_pre_link, lang_specific_driver,
8454         input_filename, input_filename_length): Don't declare.
8455         (main_class_name, jvgenmain_spec, lang_specific_driver):
8456         Constify a char*.
8457         (lang_specific_driver): All calls to the function pointer
8458         parameter now explicitly call `fatal'.
8459
8460 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8461
8462         * parse.y (find_applicable_accessible_methods_list): Search
8463         abstract classes as interfaces.
8464
8465 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8466
8467         * class.c (finish_class): We're now outside a valid method
8468         declaration. Tell the rest of gcc so.
8469
8470 1999-09-08  Bruce Korb  autogen@linuxbox.com
8471
8472         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
8473
8474 1999-09-07  Tom Tromey  <tromey@cygnus.com>
8475
8476         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
8477         java-array.h.
8478         (decode_signature_piece): Don't emit "::" in JArray<>.
8479         (print_namelet): Only print trailing `;' when printing a class.
8480
8481 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
8482
8483         * java-tree.h: Delete declarations for all tree nodes now moved to
8484         global_trees.
8485         * decl.c: Delete their definitions.
8486
8487 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
8488
8489         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
8490         * Makefile.in (OBJS): Add ggc-callbacks.o.
8491         (OBJDEPS): Likewise.
8492
8493 1999-09-03  Tom Tromey  <tromey@cygnus.com>
8494
8495         * parse.y (strip_out_static_field_access_decl): Return operand if
8496         it satisfies JDECL_P.
8497
8498 1999-09-02  Tom Tromey  <tromey@cygnus.com>
8499
8500         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
8501         Handle nested arrays, like `[[I'.
8502
8503 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8504
8505         * class.c (finish_class): Remove unused parameter, all callers
8506         changed.
8507
8508         * expr.c (build_java_athrow): Change return type to void.
8509         (java_lang_expand_expr): Make sure each case in switch returns a
8510         value.
8511
8512         * java-tree.h (finish_class): Fix prototype to take void args.
8513
8514         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
8515         (main): Issue return from main, not exit.
8516
8517         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
8518
8519         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
8520
8521         * jv-scan.c (main): Issue return from main, not exit.
8522
8523         * parse.y (check_abstract_method_definitions,
8524         java_check_abstract_method_definitions): Add static prototypes.
8525         (java_complete_expand_methods): Fix call to `finish_class'.
8526
8527         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
8528         and `prevpc'.
8529
8530 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8531
8532         * lang.c (language_string): Constify.
8533
8534 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8535
8536         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
8537         Remove hacks for stuff which comes from libiberty.
8538
8539         * Make-lang.in: Likewise.
8540
8541 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
8542
8543         * Makefile.in (xref.o): Depend on xref.c explicitly.
8544
8545 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8546
8547         * java-tree.h (lang_printable_name): Constify a char*.
8548
8549         * lang.c (lang_printable_name): Likewise.
8550
8551 1999-08-27  Jeffrey A Law  (law@cygnus.com)
8552
8553         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
8554         comments in C code.
8555
8556 1999-08-26  Tom Tromey  <tromey@cygnus.com>
8557
8558         * gjavah.c (print_cxx_classname): Print "::" before qualified
8559         name.
8560
8561 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8562
8563         * parse.y (lookup_cl): Changed leading comment. Now does its best
8564         to set the column number.
8565         (qualify_ambiguous_name): Take WFL wrappers into account.
8566
8567 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
8568
8569         * verify.c (verify_jvm_instructions): Don't check instruction
8570         validity beyond end of method.
8571
8572 1999-08-25  Tom Tromey  <tromey@cygnus.com>
8573
8574         * jvspec.c (lang_specific_driver): Correctly handle --help again.
8575
8576 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8577
8578         * gjavah.c (print_name, print_base_classname, utf8_cmp,
8579         cxx_keyword_subst, generate_access, name_is_method_p,
8580         get_field_name, print_field_name, super_class_name, print_include,
8581         decode_signature_piece, print_class_decls, usage, help,
8582         java_no_argument, version, add_namelet, print_namelet): Add static
8583         prototype.
8584         (print_base_classname, utf8_cmp, cxx_keyword_subst,
8585         name_is_method_p): Constify a char*.
8586         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
8587         Provide a final else clause in an if-else-if.
8588         (print_field_info): Add missing final arg in function call to
8589         `print_field_name'.
8590         (print_method_info, decompile_method, decode_signature_piece,
8591         print_c_decl, print_full_cxx_name, print_stub,
8592         print_mangled_classname, super_class_name, print_include,
8593         add_namelet, add_class_decl, print_class_decls, process_file,
8594         help): Constify a char*.
8595
8596         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
8597         push_int_const, find_constant_wide, find_constant_index,
8598         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
8599         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
8600         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
8601         emit_if, emit_goto, emit_jsr, call_cleanups,
8602         make_class_file_name): Add static prototypes.
8603         (generate_bytecode_return, generate_bytecode_insns): Pass a
8604         NULL_PTR, not a NULL_TREE.
8605
8606         * jv-scan.c: Include "jcf.h".
8607         (main): Declare using DEFUN macro.
8608
8609         * jvspec.c (find_spec_file, lang_specific_pre_link,
8610         lang_specific_driver): Add prototypes.
8611         (find_spec_file): Constify a char*.
8612
8613         * keyword.gperf (hash, java_keyword): Add prototypes.
8614
8615         * lang.c (lang_print_error): Add static prototype.
8616         (lang_init): Prefer memcpy over bcopy to avoid casts.
8617
8618         * lex.c (yylex): Add static prototype.
8619
8620         * parse-scan.y: Include "lex.c" earlier.
8621
8622         * parse.h: Remove redundant declaration for `yylex'.
8623
8624         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
8625         labeled_block_contains_loop_p): Add static prototypes.
8626         (not_accessible_p): Make static to match prototype.
8627
8628         * verify.c (start_pc_cmp): Don't needlessly cast away const.
8629
8630 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8631
8632         * parse.y (check_method_redefinition): Changed leading comment.
8633         (check_abstract_method_definitions): New function.
8634         (java_check_abstract_method_definitions): New function.
8635         (java_check_regular_methods): Call it.
8636         (verify_constructor_super): Fixed indentation.
8637         (lookup_method_invoke): Likewise.
8638
8639 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8640
8641         * parse.y (method_header): Return a null pointer if the current
8642         class node is null.
8643         (finish_method_declaration): Return if the current function decl
8644         is null.
8645         (source_start_java_method): Likewise.
8646         (java_method_add_stmt): Likewise.
8647
8648 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8649
8650         * class.c (emit_register_class): Removed unnecessary call to
8651         start_sequence.
8652         * parse.y (labeled_block_contains_loop_p): Removed unused local
8653         variable.
8654
8655 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8656
8657         * parse.y (java_refold): Added prototype.
8658
8659 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8660
8661         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
8662         (java_stabilize_reference): Removed unnecessary `else'.
8663         (java_complete_lhs): Set flag to remember boolean. Call
8664         java_refold. Added comments.
8665         (java_decl_equiv): New function.
8666         (binop_compound_p): Likewise.
8667         (java_refold): Likewise.
8668         (patch_unaryop): Striped static field access assigned to decl and
8669         op. Changed promotion scheme for ++/-- operators.
8670         (search_loop): New function.
8671         (labeled_block_contains_loop_p): Likewise.
8672         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
8673         comment.
8674         (patch_bc_statement): Call search_loop. Fixed comment.
8675
8676 1999-08-14  Anthony Green  <green@cygnus.com>
8677
8678         * expr.c (java_lang_expand_expr): Mark static array data as
8679         referenced.
8680
8681 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8682
8683         * jvgenmain.c (main): NUL-terminate name_obstack.
8684
8685 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8686
8687         * check-init.c (check_bool2_init, done_alternative): Add static
8688         prototypes.
8689
8690         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
8691         (add_method, build_utf8_ref, build_class_ref,
8692         append_gpp_mangled_type, layout_class_method): Constify a char*.
8693
8694         * decl.c (push_promoted_type, make_binding_level): Add static
8695         prototypes.
8696         (push_promoted_type, pushdecl): Constify a char*.
8697
8698         * except.c (find_handler_in_range, link_handler,
8699         check_start_handlers): Add static prototypes.
8700
8701         * expr.c (process_jvm_instruction): Constify a char*.
8702
8703         * gjavah.c (main): Constify a char*.
8704
8705         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
8706         Constify a char*.
8707
8708         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
8709         static prototypes.
8710         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
8711         munge, print_ents): Constify a char*.
8712
8713         * jcf-dump.c (disassemble_method): Constify a char*.
8714         (print_constant_pool, print_exception_table): Add static prototypes.
8715         (print_constant, print_exception_table, main, disassemble_method):
8716         Constify a char*.
8717
8718         * jcf-io.c (find_classfile, find_class): Likewise.
8719
8720         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
8721         (set_source_filename, predefined_filename_p): Add static prototypes.
8722         (set_source_filename, get_constant, get_class_constant,
8723         find_in_current_zip): Constify a char*.
8724
8725         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
8726         static prototypes.
8727         (add_entry, add_path, jcf_path_classpath_arg,
8728         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
8729
8730         * jcf-reader.c (get_attribute, jcf_parse_preamble,
8731         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
8732         jcf_parse_one_method, jcf_parse_methods,
8733         jcf_parse_final_attributes): Add static prototypes.
8734         (get_attribute): Constify a char*.
8735
8736         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
8737         jcf_dependency_add_target, jcf_path_classpath_arg,
8738         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
8739
8740         * jv-scan.c (main): Constify a char*.
8741         (gcc_obstack_init): Add prototype arguments.
8742
8743         * jvgenmain.c (gcc_obstack_init): Likewise.
8744         (main): Constify a char*.
8745
8746         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
8747         static prototypes.
8748         (put_decl_string, lang_print_error): Constify a char*.
8749         (lang_init): Remove redundant extern prototype.
8750
8751         * mangle.c (emit_unicode_mangled_name): Constify a char*.
8752
8753         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
8754         Add static prototypes.
8755         (get_type_from_signature): Constify a char*.
8756
8757         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
8758         Add static prototypes.
8759         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
8760         (verify_jvm_instructions): Constify a char*.
8761
8762         * xref.c (xref_flag_value): Likewise.
8763
8764         * xref.h (xref_flag_value): Likewise.
8765
8766         * zextract.c (makeword, makelong): Add static prototypes.
8767         (makeword, makelong): Constify a uch*.
8768
8769 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8770
8771         * lang.c (java_dummy_print): Constify a char*.
8772         (lang_print_error): Likewise.
8773         (lang_init): Remove redundant prototype for `print_error_function'.
8774         (lang_init_source): Likewise.
8775         (lang_identify): Constify a char*.
8776
8777 1999-08-09  Tom Tromey  <tromey@cygnus.com>
8778
8779         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
8780         (WORDS_TO_LONG): Likewise.
8781         (WORDS_TO_DOUBLE): Likewise.
8782
8783 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8784
8785         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
8786
8787         * expr.c (java_stack_pop, java_array_data_offset,
8788         build_java_throw_out_of_bounds_exception, case_identity,
8789         build_java_check_indexed_type): Add static prototypes.
8790         (linenumber_table, expand_invoke, expand_java_field_op,
8791         build_primtype_type_ref, expand_byte_code): Constify a char*.
8792
8793         * java-tree.h (build_primtype_type_ref, linenumber_table):
8794         Constify a char*.
8795         (java_lang_expand_expr): Add prototype.
8796
8797         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
8798         `java_lang_expand_expr'.
8799
8800         * lex.c (java_lex_error): Constify a char*.
8801         (java_get_unicode, java_read_char, java_allocate_new_line,
8802         java_unget_unicode, java_sneak_unicode): Prototype.
8803
8804         * parse-scan.y (current_class, package_name, method_declarator,
8805         report_class_declaration, yyerror): Constify a char*.
8806
8807         * parse.h (java_report_errors): Prototype.
8808         (yyerror): Constify a char*.
8809
8810         * parse.y (classitf_redefinition_error, check_modifiers,
8811         parse_jdk1_1_error, lookup_package_type,
8812         lookup_package_type_and_set_next, get_printable_method_name,
8813         purify_type_name): Constify a char*.
8814         (build_super_invocation, maybe_generate_finit,
8815         verify_constructor_super, parser_add_interface,
8816         add_superinterfaces, jdep_resolve_class, note_possible_classname,
8817         java_complete_expand_methods, java_expand_finals,
8818         cut_identifier_in_qualified, java_stabilize_reference,
8819         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
8820         merge_string_cste): Prototype.
8821         (single_type_import_declaration, yyerror,
8822         variable_redefinition_error, build_array_from_name,
8823         build_unresolved_array_type, check_class_interface_creation,
8824         resolve_class, complete_class_report_errors,
8825         note_possible_classname, read_import_dir,
8826         find_in_imports_on_demand, resolve_package, fix_constructors,
8827         check_deprecation, lookup_method_invoke,
8828         maybe_build_primttype_type_ref, array_constructor_check_entry):
8829         Constify a char*.
8830         (java_complete_expand_methods, java_expand_finals): Make static.
8831         (convert_narrow): Remove static prototype.
8832
8833 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
8834
8835         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
8836
8837 1999-08-02  Richard Henderson  <rth@cygnus.com>
8838
8839         * decl.c: Include defaults.h instead of expr.h.
8840         * parse.y: Likewise.
8841
8842 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
8843
8844         * java/decl.c (start_java_method): Change all uses of
8845         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8846         Ensure expr.h is included.
8847         * java/expr.c (pop_arguments): Ditto.
8848         * java/parse.y (expand_start_java_method): Ditto.
8849
8850 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8851
8852         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
8853
8854 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
8855
8856         * decl.c: Include "function.h".
8857         * except.c: Likewise.
8858         * parse.y: Likewise.
8859         * Makefile.in: Update dependencies.
8860
8861 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8862
8863         * expr.c (build_java_soft_divmod): Provide a default case in switch.
8864         (java_lang_expand_expr): Mark parameters `target', `tmode' and
8865         `modifier' with ATTRIBUTE_UNUSED.
8866
8867         * gjavah.c (process_file): Add braces around ambiguous `else'.
8868
8869         * jcf-dump.c (print_access_flags, localvar_free): Change return
8870         type to void.
8871
8872         * parse.y (java_complete_expand_method): Initialize variable
8873         `exception_copy'.
8874         (resolve_qualified_expression_name): Likewise for `field_decl'.
8875         (patch_method_invocation): Likewise for `class_to_search'.
8876         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
8877         (patch_assignment): Likewise for `lhs_type'.
8878
8879         * verify.c (verify_jvm_instructions): Remove unused variable
8880         `caller'.
8881
8882 1999-07-25  Richard Henderson  <rth@cygnus.com>
8883
8884         * decl.c (va_list_type_node): New.
8885
8886 1999-07-25  Anthony Green  <green@cygnus.com>
8887
8888         * gjavah.c (print_stub): New function.
8889         (METHOD_IS_NATIVE): New macro.
8890         (print_mangled_classname): Make static.
8891         (HANDLE_END_FIELD): Don't emit fields during stub generation.
8892         (process_file): Perform stub generation.
8893         (HANDLE_METHOD): Don't emit class decls during stub
8894         generation.
8895         (HANDLE_END_METHOD): Take into account stub generation.
8896         (print_method_info): Handle stub generation.
8897         (print_stub): New function.
8898         (print_cxx_classname): Make signature consistant with others.
8899         (help): Describe -stubs option.
8900         (main): Create stub file.
8901         (version): Use version.c.
8902         (print_full_cxx_name): New function.
8903         (print_c_decl): Use print_full_cxx_name.
8904
8905 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8906
8907         * check-init.c (check_init): Handle MAX_EXPR.
8908
8909 1999-07-15  Andrew Haley  <aph@cygnus.com>
8910
8911         * lang.c (flag_use_divide_subroutine): New variable.
8912         * typeck.c: (convert_ieee_real_to_integer): Bounds check
8913         fp-to-integer conversion.
8914         (convert): Call convert_ieee_real_to_integer when flag_fast_math
8915         is not set.
8916
8917         * expr.c (build_java_soft_divmod): New function.
8918         (build_java_binop): Call build_java_soft_divmod if
8919         flag_use_divide_subroutine is set.
8920         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
8921         soft_lrem_node: new builtin functions.
8922         (init_decl_processing) Initialize the new builtins.
8923         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
8924         soft_lrem_node: new builtin functions.
8925         (build_java_soft_divmod): New function.
8926         * parse.y: Call build_java_soft_divmod if
8927         flag_use_divide_subroutine is set.
8928         * parse.c: Rebuilt.
8929
8930         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
8931         a --specs= arg) even if not linking.
8932         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
8933         -fuse-divide-subroutine
8934
8935 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8936
8937         * parse.y (resolve_and_layout): Check methods only once.
8938         (resolve_qualified_expression_name): Verify thrown exceptions
8939         compatibility.
8940         (check_thrown_exceptions): Reject exceptions thrown in
8941         initializer. Error message tuned.
8942
8943 1999-07-14  Andrew Haley  <aph@cygnus.com>
8944
8945         * expr.c (expand_expr): Do not return the last statement in a
8946         block as the block's value.
8947
8948 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8949
8950         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
8951         CALL_EXPR, to avoid order of evaluation changes.
8952
8953 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8954
8955         * parse.y (qualify_ambiguous_name): Do not use
8956         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
8957
8958 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8959
8960         * check-init.c (check_init): Handle MAX_EXPR.
8961         * expr.c (force_evaluation_order): Force method call arguments to
8962         be evaluated in left-to-right order.
8963         * parse.y (qualify_ambiguous_name): Loop again to qualify
8964         NEW_ARRAY_EXPR properly.
8965
8966 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8967
8968         * parse.y (patch_invoke): Resolve unresolved invoked method
8969         returned type.
8970         (qualify_ambiguous_name): STRING_CST to qualify expression for
8971         type name resolution.
8972
8973 1999-06-24  Andrew Haley  <aph@cygnus.com>
8974
8975         * class.c (finish_class): Whenever a deferred method is
8976         output, rescan the list of methods to see if a new candidate for
8977         output can be found.
8978
8979 1999-06-28  Tom Tromey  <tromey@cygnus.com>
8980
8981         * jvspec.c (lang_specific_driver): Recognize --help.
8982
8983 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8984
8985         * parse.y (resolve_package): Fixed bogus return statement.
8986         (patch_method_invocation): Resolve method invocation beginning with
8987         a package name qualifier.
8988
8989 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8990
8991         * Make-lang.in (java.stage1): Depend on stage1-start.
8992         (java.stage2): Likewise for stage2-start.
8993         (java.stage3): Likewise for stage3-start.
8994         (java.stage4): Likewise for stage4-start.
8995
8996 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8997
8998         * parse.y (java_complete_lhs): When doing cross referencing, don't
8999         try to keep file location on a WFL expanded as a CALL_EXPR.
9000
9001 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9002
9003         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
9004         compiling to class file a void method with an empty method body.
9005         As a side effect, the bytecode backend will generate the
9006         appropriate `return' instruction.
9007
9008 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9009
9010         * parse.y (lookup_package_type_and_set_next): New function prototype.
9011         (resolve_package): Search current and imported packages.
9012         (lookup_package_type_and_set_next): New function.
9013
9014 1999-06-22  Andrew Haley  <aph@cygnus.com>
9015
9016         * verify.c (verify_jvm_instructions): Check for pending blocks
9017         before invalid PC test and opcode switch, not after.
9018
9019 1999-06-21  Andrew Haley  <aph@cygnus.com>
9020
9021         * except.c (find_handler_in_range): The upper limit for exception
9022         ranges is exclusive, not inclusive: (start <= pc < end).
9023         (link_handler): find child pointer which points to outer by
9024         searching sibling list: previous code incorrectly assumed that
9025         outer->outer->first_child must point to outer.
9026         * verify.c (verify_jvm_instructions): FIXME added to code for
9027         `athrow'.
9028         (verify_jvm_instructions): Do not assume that the last block
9029         processed in a subroutine is a block which ends with a `ret'
9030         instruction.  With some control flows it is possible that the last
9031         block ends with an `athrow'.
9032
9033 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9034
9035         * parse.y (qualify_ambiguous_name): Reorganized the post
9036         evaluation of non WFL leading expression nodes.
9037
9038 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9039
9040         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
9041         CONVERT_EXPR.
9042
9043 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9044
9045         * parse.y (qualify_ambiguous_name): Handle qualified expression
9046         beginning with a STRING_CST.
9047
9048 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9049
9050         * parse.y (register_fields): Set DECL_INITIAL on both
9051         pre-initialized static and public fields.
9052         (resolve_field_access): Static field access expressions to always
9053         use pointer types.
9054         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
9055         qualification. CONVERT_EXPR to be resolved as an expression name.
9056         (java_complete_lhs): Identify and access qualified final
9057         initialized field in switch statement case expression.
9058         (fold_constant_for_init): Pre-initialized field decl constant to
9059         be folded.
9060
9061 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9062
9063         * parse.y (note_possible_classname): Mark returned node with
9064         QUALIFIED_P only if the original class name contained a '/'.
9065
9066 1999-06-05  Anthony Green  <green@cygnus.com>
9067
9068         * Make-lang.in (gcjh): More parallel build fixes.
9069
9070 1999-06-03  Mike Stump  <mrs@wrs.com>
9071
9072         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
9073
9074 1999-06-02  Anthony Green  <green@cygnus.com>
9075
9076         * except.c (link_handler): Chain exception handlers in order.
9077
9078 1999-06-02  Anthony Green  <green@cygnus.com>
9079
9080         * expr.c (expand_byte_code): Fill unreachable bytecode regions
9081         with nops and process as usual in order to always set correct EH
9082         ranges.  Emit detailed warnings about unreachable bytecodes.
9083
9084 1999-06-02  Anthony Green  <green@cygnus.com>
9085
9086         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
9087         constant.
9088
9089 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9090
9091         * parse.y (lookup_field_wrapper): Unified returned value to NULL
9092           or the searched field decl.
9093
9094 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9095
9096         * parse.y (fold_constant_for_init): Convert numerical constant
9097         values to the type of the assigned field.
9098
9099 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9100
9101         * expr.c (lookup_field): Relaxed the test on class loading error
9102         detection.
9103         * parse.y (fold_constant_for_init): Enabeled old code.
9104
9105 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9106
9107         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
9108         decide the validity of the cast of a java.lang.Cloneable reference
9109         to an array.
9110         (patch_conditional_expr): Fixed first argument passed to
9111         binary_numeric_promotion.
9112
9113 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9114
9115         * parse.y (qualify_ambiguous_name): Take into account that a
9116         CONVERT_EXPR might specify a type as a WFL.
9117
9118 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9119
9120         * parse.y (patch_assignment): Save the rhs before using it as an
9121         argument to _Jv_CheckArrayStore.
9122
9123 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9124
9125         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
9126
9127 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9128
9129         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
9130         floating point litteral only when the exponent indicator has been
9131         parsed.
9132
9133 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9134
9135         * parse.y (formal_parameter:): Construct argument tree list
9136         element even if a yet unsupported final parameter was encountered.
9137
9138 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9139
9140         * parse.y (finish_method_declaration): Issue errors for native or
9141         abstract methods declared with a method body, as well as for non
9142         native or non abstract methods with no method body.
9143
9144 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9145
9146         * class.c (build_utf8_ref): Initialize variable `field'.
9147
9148         * decl.c (init_decl_processing): Initialize variable `field'.
9149
9150         * expr.c (build_known_method_ref): Mark parameters `method_type',
9151         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
9152         (process_jvm_instruction): Likewise for parameter `length'.
9153
9154         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
9155         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
9156         ATTRIBUTE_UNUSED.
9157
9158         * parse.y (maybe_generate_clinit): Remove unused variable
9159         `has_non_primitive_fields'.
9160         (find_in_imports_on_demand): Initialize variables `node_to_use'
9161         and `cl'.
9162         (patch_binop): Likewise for variable `prom_type'.
9163         (patch_unaryop): Likewise for variable `prom_type'.
9164
9165         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
9166
9167         * xref.c (xref_table): Add missing initializer.
9168
9169 1999-05-14  Tom Tromey  <tromey@cygnus.com>
9170
9171         * java-except.h (struct eh_range): Removed unused `next' member.
9172         * verify.c (verify_jvm_instructions): Call check_nested_ranges
9173         after adding all exception handlers.  Sort exception ranges in
9174         order of start PC.
9175         (struct pc_index): New structure.
9176         (start_pc_cmp): New function.
9177         * except.c (add_handler): Return `void'.  Don't call link_handler;
9178         instead construct an ordinary linked list and do range
9179         coalescing.
9180         (check_nested_ranges): New function.
9181         (link_handler): Changed interface to allow merging of eh_ranges.
9182         Split overlapping ranges.  Return `void'.
9183
9184 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9185
9186         * parse.y (constructor_block_end:): New rule, tagged <node>.
9187         (constructor_body:): Use `constructor_block_end' instead of
9188         `block_end'.
9189
9190 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9191
9192         * parse.y (statement_nsi:): Pop `for' statement block.
9193         (java_complete_lhs): Labeled blocks containing no statement are
9194         marked as completing normally.
9195
9196 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9197
9198         * xref.c (xref_set_current_fp): New function, defined.
9199         * xref.h (xref_set_current_fp): New function, prototyped.
9200
9201 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9202
9203         * check-init.c (check_init): Take into account that
9204         LABELED_BLOCK_STMT can be empty.
9205
9206 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9207
9208         * parse.y (java_check_regular_methods): Warning check on not
9209         overriding methods with default access in other packages does not
9210         apply to `<clinit>'.
9211         (java_complete_lhs): If block body is an empty_stmt_node, replace
9212         it by NULL_TREE. This prevents gcc from generating an irrelevant
9213         warning.
9214
9215 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9216
9217         * check-init.c (check_init): Removed code accepting to see things
9218         falling through default:, when doing xrefs.
9219         * java-tree.h (do_not_fold): New global variable, declared.
9220         * parse.y (do_not_fold): New global variable, defined.
9221         (java_complete_expand_method): Set `do_not_fold' to the value of
9222         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
9223         and reinstall them after them have been purged; do not check for
9224         initializations; do not issue missing return errors.
9225         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
9226         when doing xrefs.
9227         (patch_binop): Skip the fold part when doing xrefs.
9228         (build_string_concatenation): Skip the concatenation part when
9229         doing xrefs.
9230         (patch_synchronized_statement): Do not generate a try-finally when
9231         doing xrefs.
9232         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
9233         and keep the location where the throw was seen.
9234         * typeck.c (convert): When `do_not_fold' is set, do not attempt
9235         any treatment on the converted node an simply return a NOP_EXPR of
9236         the targeted type.
9237         * xref.c (xref_get_data): New function, defined.
9238         * xref.h (xref_get_data): New function, declared.
9239         (XREF_GET_DATA): Use xref_get_data.
9240
9241 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9242
9243         * gjavah.c (print_include): Cast the result of `strlen' to int
9244         when comparing against a signed value.
9245         (add_namelet): Likewise.
9246
9247 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9248
9249         * expr.c (expand_invoke): Mark parameter `nargs' with
9250         ATTRIBUTE_UNUSED.
9251         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
9252
9253         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
9254         ATTRIBUTE_UNUSED.
9255
9256         * jcf-reader.c (get_attribute): Cast a value to long
9257         when comparing against a signed expression.  Likewise.
9258
9259         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
9260         HOST_BITS_PER_CHAR.
9261
9262 1999-05-11  Andrew Haley  <aph@cygnus.com>
9263
9264         * parse.y (source_end_java_method): If the current method contains
9265         any exception handlers, force asynchronous_exceptions: this is
9266         necessary because signal handlers in libjava may throw exceptions.
9267         * decl.c (end_java_method): Ditto.
9268
9269 1999-05-11  Tom Tromey  <tromey@cygnus.com>
9270
9271         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
9272         flags.
9273         * jvspec.c (THREAD_NAME): Removed.
9274         (GC_NAME): Likewise.
9275         (MATHLIB): Likewise.
9276         (WITHLIBC): Likewise.
9277         (GCLIB): Likewise.
9278         (THREADLIB): Likewise.
9279         (MATH_LIBRARY): Likewise.
9280         (lang_specific_driver): Don't add `-l' options to command line.
9281         Instead, add a single --specs option.  Recognize `-L' options and
9282         use them to search for spec file.
9283         (find_spec_file): New function.
9284         (SPEC_FILE): New define.
9285
9286 1999-05-11  Dave Brolley  <brolley@cygnus.com>
9287
9288         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
9289         cpplib-enabled build.
9290
9291 1999-05-05  Per Bothner  <bothner@cygnus.com>
9292
9293         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
9294         temporarily zero it while calling rest_of_decl_compilation.
9295
9296         * java-tree.h (string_ptr_type_node):  Add declaration.
9297         * decl.c:  Define and initialize string_ptr_type_node.
9298         * parse.y (patch_string_cst):  Use string_ptr_type_node.
9299
9300         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
9301         * parse.y (for_statement):  Now unconditionally exit_block.
9302         (finish_labeled_statement):  No longer exit_block if for-loop.
9303         (patch_loop_statement):  Check harder if the loop is already labeled.
9304
9305         * parse.y (patch_initialized_static_field):  Removed function.
9306         (maybe_generate_clinit):  Removed special handling for interfaces.
9307         (java_complete_expand_methods):  Do a preliminary java_complete_tree
9308         on <clinit> to determine if it can be removed.
9309         (java_complete_expand_method):  Remove special handling for <clinit>.
9310         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
9311         optimize if we get back empty_stmt_node.
9312         For MODIFY_EXPR, re-do checking of static initializers.
9313         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
9314         For VAR_DECL, pass correct context.
9315
9316         * verify.c (verify_jvm_instructions):  Better error messages.
9317
9318 1999-05-03  Tom Tromey  <tromey@cygnus.com>
9319
9320         * parse-scan.y (interface_declaration): Call
9321         report_class_declaration for interfaces.
9322
9323 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
9324
9325         * Makefile.in: Remove -v from bison command lines.
9326
9327 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9328
9329         * check-init.c (check_init): Exclude a case of error when doing
9330         xrefs.
9331         * class.c (layout_class_method): Don't generate the error message
9332         twice when compiling from source.
9333         * lang-options.h: Added `-Wredundant-modifers' and
9334         `-Wunusupported-jdk11' flags and help text.
9335         * lang.c (lang_decode_option): Added support for
9336         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
9337         flag_static_local_jdk11 and flag_redundant set accordingly.
9338         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
9339         * parse.h (EXPR_WFL_ADD_COL): New macro.
9340         (DECL_END_SOURCE_LINE): Likewise.
9341         (DECL_INHERITED_SOURCE_LINE): Likewise.
9342         * parse.y (static_ref_err): New function, prototyped.
9343         (CCB_TK): Now tagged <operator>.
9344         (class_body:): Remember the location of the closing '}' of a class
9345         definition when doing xrefs.
9346         (block:): Likewise.
9347         (block_end:): Likewise.
9348         (create_class): Remember the location of the inherited class
9349         identifier when doing xrefs.
9350         (register_fields): Added test on first operand of `init' before
9351         testing it TREE_CODE.
9352         (method_header): Store the location of the class identifier in the
9353         class decl when doing xrefs.
9354         (finish_method_declaration): Don't combine first/last method line
9355         when doing xref.
9356         (java_check_regular_methods): Warning check on not overriding
9357         methods with default access on other packages move before check on
9358         static methods. Initialization of `aflags' also moved up.
9359         (resolve_expression_name): Call static_ref_err to report the error.
9360         (static_ref_err): New function, implemented.
9361         (resolve_field_access): Returned simplified static field access
9362         when doing xrefs.
9363         (resolve_qualified_expression_name): Check for illegal use of
9364         static fields in a non static context. Call static_ref_err to
9365         report error in various places.
9366         (java_complete_tree): Do not fold initialized static fields when
9367         doing xrefs.
9368         (java_complete_lhs): Likewise.
9369
9370 1999-04-29  Anthony Green  <green@cygnus.com>
9371
9372         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
9373         create internal labels.
9374         (lookup_label): Ditto.
9375
9376 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9377
9378         * class.c (layout_class_method): Generate <clinit>'s rtl for
9379         interfaces.
9380         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
9381         for interfaces' <clinit>.
9382         * expr.c (lookup_field): Search for fields in interfaces.
9383         (expand_invoke): Fixed indentation.
9384         (expand_java_field_op): Likewise. Use IS_CLINIT.
9385         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
9386         (IS_CLINIT): New macro.
9387         * parse.y (type_declaration:): Call maybe_generate_clinit after an
9388         interface was parsed.
9389         (maybe_generate_clinit): Don't generate if the current class is an
9390         interface with only fields of primitive types.
9391         (reset_method_name): Use IS_CLINIT.
9392         (java_complete_expand_method): Expand <clinit> when it exists for
9393         interfaces. Use IS_CLINIT.
9394         (resolve_expression_name): Use DECL_CONTEXT instead of
9395         current_class to build static field references.
9396         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
9397         ARRAY_REF when doing xreferencing.
9398         (check_final_assignment): Fixed typo in leading comment. Use
9399         IS_CLINIT.
9400         (patch_array_ref): Don't fully expand array references when
9401         xreferencing.
9402         (patch_return): Use IS_CLINIT.
9403         (patch_throw_statement): Likewise.
9404
9405 1999-04-22  Tom Tromey  <tromey@cygnus.com>
9406
9407         * Make-lang.in (JAVA_SRCS): Added check-init.c.
9408
9409 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9410
9411         * decl.c (predef_filenames, predef_filenames_size): New globals
9412         (init_decl_processing): predef_filenames and predef_filenames_size
9413         initialized.
9414         * java-tree.h (predef_filenames, predef_filenames_size): Declared
9415         extern.
9416         * jcf-parse.c (predefined_filename_p): New function.
9417         (yyparse): Check that files on the command line are specified only
9418         once and issue a warning otherwise.
9419         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
9420         * parse.y (source_end_java_method): Nullify NOP method bodies, to
9421         avoid a gcc warning with -W -Wall turned on.
9422         (java_expand_classes): Abort if errors were encountered.
9423         (java_complete_lhs): If the cross reference flag is set, wrap
9424         field DECL node around a WFL when resolving expression name.
9425
9426 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9427
9428         * lang.c (lang_decode_option): Fixed returned value when parsing
9429         `-fxref=...' and `-Wall'.
9430         * parse.y (source_end_java_method): Do not generate code when
9431         flag_emit_xref is set.
9432         (resolve_expression_name): Do not build static field access when
9433         flag_emit_xref is set.
9434         (resolve_field_access): No special treatment on `length' when
9435         flag_emit_xref is set. Do not build qualified static field access
9436         when flag_emit_xref is set.
9437         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
9438         when flag_emit_xref is set.
9439         (patch_assignment): Do not generate array store runtime check when
9440         flag_emit_xref is set.
9441         * xref.c (xref_flag_value): Fixed function declaration
9442         indentation.
9443         (xset_set_data): New function.
9444         * xref.h (xref_set_data): Added prototype for new function.
9445         (typedef struct xref_flag_table): New field data.
9446         (XREF_GET_DATA): New macro.
9447
9448 1999-04-19  Tom Tromey  <tromey@cygnus.com>
9449
9450         * xref.h (enum): Removed trailing comma.
9451
9452         * parse.y (resolve_qualified_expression_name): Added missing
9453         `break'.
9454
9455 1999-04-15  Anthony Green  <green@cygnus.com>
9456
9457         * gjavah.c: New prototypes for java_float_finite and
9458         java_double_finite.
9459
9460 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9461
9462         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
9463         references.
9464
9465 1999-04-06  Jeffrey A Law  (law@cygnus.com)
9466
9467         * Makefile.in (TREE_H): Add tree-check.h.
9468         (RTL_H): Add genrtl.h.
9469
9470 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9471
9472         * parse.y (patch_assignment): Added ArrayStoreException runtime
9473         check.
9474
9475 1999-04-06  Per Bothner  <bothner@cygnus.com>
9476
9477         * expr.c (pop_type_0):  New function.
9478         (pop_type):  Use pop_type_0.
9479         * java-tree.h (pop_type_0):  New declaration.
9480         * verify.c (verify_jvm_instructions):  Check return instructions.
9481
9482         * parse.y (patch_binop):  Don't fold if non-constant and emiting
9483         class files.
9484
9485 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9486
9487         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
9488
9489         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
9490         (main_jcf): Don't define.
9491         (process_file): Don't set `main_jcf'.
9492
9493         * java-tree.h (main_jcf): Don't declare.
9494
9495         * jcf-parse.c (main_jcf): Add static definition.
9496
9497         * lang.c (main_jcf): Don't define.
9498
9499 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9500
9501         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
9502
9503         * decl.c (copy_lang_decl): Likewise for `bcopy'.
9504
9505         * jcf-depend.c: Include "config.h", not <config.h>.
9506
9507         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
9508         `bcopy' to PTR.
9509
9510         * jcf-path.c: Include "config.h", not <config.h>.
9511
9512         * lex.c: Don't include various system header files.
9513         (java_init_lex): Cast the argument of `bzero' to PTR
9514
9515         * parse-scan.y (java_push_parser_context): Likewise.
9516
9517         * parse.y (java_push_parser_context): Likewise.
9518         (patch_bc_statement): Match format specifier to variable argument.
9519
9520         * xref.c: Don't include <stdio.h>.
9521
9522 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9523
9524         * parse.y (struct parser_ctxt *ctxp): Now global.
9525         (declare_local_variables): Use WFL compound value for the
9526         declaration source line value, when doing cross-referencing.
9527
9528 1999-03-31  Tom Tromey  <tromey@cygnus.com>
9529
9530         * gjavah.c (print_field_info): Allow constants of other types.
9531         (print_include): Generate include when new name is proper prefix
9532         of already printed name.
9533         (add_namelet): Likewise.
9534         (cxx_keyword_subst): New function.
9535         (print_method_info): Use it.
9536         (print_field_name): New function.
9537         (get_field_name): New function.
9538         (print_field_info): Use get_field_name and print_field_name.
9539
9540 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9541
9542         * Makefile.in (keyword.h): Generate using gperf language 'C', not
9543         'KR-C', so gperf uses the `const' keyword on strings.
9544
9545         * keyword.gperf (java_keyword): Const-ify a char*.
9546
9547 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9548
9549         * parse.y (patch_bc_statement): Fixed identation and a bogus
9550         `printf' format.
9551
9552 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9553
9554         * parse.y (patch_assignment): Allow static variables in other
9555         classes to be assigned.
9556
9557 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9558
9559         * class.c (maybe_add_interface): Remove unused variable
9560         `interface_binfo'.
9561         (make_class_data): Use = for assignment, not ==.  Likewise.
9562         (emit_register_classes): Remove unused variable `decl'.
9563
9564         * lex.c: Fix comment so as not to contain an embedded `/*'.
9565
9566         * verify.c (verify_jvm_instructions): Remove unused variable
9567         `self_type'.
9568
9569 1999-03-27  Per Bothner  <bothner@cygnus.com>
9570
9571         * parse.y (complete_loop_body):  Rename to finish_loop_body.
9572         (complete_labeled_statement):  Rename to finish_labeled_statement.
9573         (complete_for_loop):  Rename to finish_for_loop.
9574         (complete_method_declaration):  Rename to finish_method_declaration.
9575
9576         * java-tree.h (continue_identifier_node):  New global node.
9577         * decl.c:  Define and initialize continue_identifier_node.
9578         * parse.y (generate_labeled_block):  Remove - no longer needed.
9579         (build_loop_body):  Use continue_identifier_node for continue block.
9580         (finish_labeled_statement):  Also do pop_labeled_block actions.
9581         (java_complete_lhs):  POP_LOOP even if error.
9582         (build_labeled_block):  Special handling for continue_identifier_node.
9583         (patch_loop_statement):  Re-organize.
9584         (patch_bc_statement):  Re-write.
9585
9586 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9587
9588         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
9589         using a WFL compound value.
9590         * parse.y (xref.h): Include.
9591         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
9592         WFL compound value.
9593         (register_fields): Set WFL compound value to lineno if doing
9594         xrefs.
9595         (java_complete_expand_method): Call expand_xref if flag_emit_xref
9596         is set.
9597         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
9598         * xref.h (expand_xref): Prototype renamed from xref_generate.
9599
9600 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9601
9602         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
9603         (GET_CURRENT_BLOCK): New macro.
9604         * parse.y (current_static_block): New global variable.
9605         (method_body:): Define action.
9606         (complete_method_declaration): Set current_function_decl to NULL
9607         when work on the current method is done.
9608         (declare_local_variables): Use GET_CURRENT_BLOCK.
9609         (java_method_add_stmt): Likewise.
9610         (java_complete_expand_method): Disable the use of `this' when
9611         expanding <clinit>.
9612         (enter_a_block): If no current method exist, use
9613         current_static_block to link static initializer blocks.
9614         (exit_block): Rewritten to use current_static_block when no current
9615         method decl exists.
9616         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
9617         (patch_return): Forbid the use of `return' in static initializers.
9618         (patch_throw_statement): Fixed indentation. Issue specific error
9619         for uncaught thrown checked exception in static initializer
9620         blocks. Removed FIXME.
9621
9622 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
9623
9624         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
9625         Link gcj from gcc.o.
9626
9627 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9628
9629         * parse.y (find_applicable_accessible_methods_list): When dealing
9630         with interface: ensure that a given interface or java.lang.Object
9631         are searched only once.
9632
9633 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9634
9635         * gjavah.c (print_c_decl): Remove unused argument `flags'.
9636
9637         * jcf-dump.c (print_access_flags): Add braces around if-else.
9638
9639         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
9640         COMBINE_INPUTS.
9641
9642         * lex.c (build_wfl_node): Add static prototype.
9643
9644         * lex.h (build_wfl_node): Remove static prototype.
9645
9646         * parse.y: Include lex.c early enough to declare everything needed.
9647         Ensure calls to `build_wfl_node' pass the proper arguments.
9648         (create_class): Remove unused variable `super_decl'.
9649         (get_printable_method_name): Initialize variable `name'.
9650
9651 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9652
9653         * Changelog: Fixed 1999-03-22 typos.
9654         * lang.c (lang_decode_option): Fixed typo in error string in the
9655         XARG section.
9656
9657 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9658
9659         * Makefile.in (JAVA_OBJS): Added entry xref.o.
9660         (xref.o): New rule.
9661         * java-tree.h (flag_emit_xref): Declared extern.
9662         * lang.c (xref.h): Included.
9663         (flag_emit_xref): New global variable.
9664         (lang_decode_option): Added support for -fxref.
9665         * xref.c: Created.
9666         * xref.h: Likewise.
9667
9668 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
9669
9670         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
9671         linked with.
9672
9673 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9674
9675         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
9676         $(srcdir)/../system.h and $(JAVA_TREE_H).
9677         (jcf-io.o): Depend on $(JAVA_TREE_H).
9678         (mangle.o): Likewise.
9679
9680         * check-init.c (check_cond_init): Add static prototype.
9681
9682         * class.c (build_java_method_type, hashUtf8String,
9683         make_field_value, get_dispatch_vector, get_dispatch_table,
9684         append_gpp_mangled_type, mangle_static_field): Likewise.
9685         (strLengthUtf8): Hide unused definition.
9686         (hashUtf8String): Const-ify.
9687         (make_field_value): Un-ANSI-fy.
9688
9689         * constants.c: Move inclusion of jcf.h above java-tree.h.
9690         (set_constant_entry, find_class_or_string_constant,
9691         find_name_and_type_constant, get_tag_node,
9692         build_constant_data_ref): Add static prototype.
9693
9694         * decl.c (push_jvm_slot, builtin_function,
9695         lookup_name_current_level): Likewise.
9696         (builtin_function): Const-ify.
9697
9698         * except.c (expand_start_java_handler, expand_end_java_handler):
9699         Add static prototype.
9700
9701         * expr.c (flush_quick_stack, push_value, pop_value,
9702         java_stack_swap, java_stack_dup, build_java_athrow,
9703         build_java_jsr, build_java_ret, expand_java_multianewarray,
9704         expand_java_arraystore, expand_java_arrayload,
9705         expand_java_array_length, build_java_monitor, expand_java_pushc,
9706         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
9707         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
9708         expand_compare, expand_test, expand_cond, expand_java_goto,
9709         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
9710         expand_java_field_op, java_push_constant_from_pool): Likewise.
9711
9712         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
9713         (build_java_arraynull_check): Mark parameters `node' and `type'
9714         with ATTRIBUTE_UNUSED.
9715         (note_label): Likewise for parameter `current_pc'.
9716         (expand_java_call, expand_java_ret): Hide unused definition.
9717
9718         * java-tree.h (make_class, build_constants_constructor,
9719         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
9720         init_outgoing_cpool, register_class, emit_register_classes,
9721         java_layout_seen_class_methods): Prototype.
9722         (unicode_mangling_length): Const-ify.
9723         (append_gpp_mangled_name, append_gpp_mangled_classtype,
9724         emit_unicode_mangled_name, format_int, format_uint,
9725         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
9726         jcf_print_utf8_replace, open_class): Prototype.
9727
9728         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
9729         <stdio.h>.  Include tree.h/java-tree.h.
9730         (utf8_equal_string usage, process_class): Add static prototype.
9731         (open_class): Don't prototype this here.
9732         (utf8_equal_string): Match arguments to format specifiers.
9733         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
9734         TABLE_SWITCH, disassemble_method): Likewise.
9735
9736         * jcf-io.c: Include tree.h/java-tree.h.
9737         (open_class, find_classfile, jcf_print_utf8,
9738         jcf_print_utf8_replace): Const-ify.
9739
9740         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
9741         parse_class_file): Add static prototype.
9742         (find_in_current_zip): Match definition to existing static
9743         prototype.
9744
9745         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
9746         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
9747         finish_jcf_block, define_jcf_label, get_jcf_label_here,
9748         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
9749         write_chunks, adjust_typed_op, generate_bytecode_conditional,
9750         generate_bytecode_return, perform_relocations, init_jcf_state,
9751         init_jcf_method, release_jcf_state, generate_classfile):
9752         Add static prototype.
9753         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
9754         (make_class_file_name): Const-ify.
9755
9756         * jcf.h (find_classfile): Const-ify.
9757
9758         * jv-scan.c (reset_report): Remove prototype.
9759
9760         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
9761         (error): Rewrite to allow varargs.
9762
9763         * lang.c (lang_f_options): Const-ify.
9764
9765         * lex.c (java_parse_escape_sequence): Add static prototype.
9766         (java_allocate_new_line): Match definition to existing static
9767         prototype.
9768
9769         * mangle.c Include tree.h/java-tree.h.
9770         (unicode_mangling_length, emit_unicode_mangled_name,
9771         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
9772
9773         * parse.h (jdep_code): Remove trailing comma in enumeration.
9774         (java_get_line_col): Move prototype outside of !JC1_LITE test.
9775         (reset_report): Add prototype.
9776
9777         * verify.c (push_pending_label, merge_types): Add static
9778         prototypes.
9779
9780         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
9781
9782 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9783
9784         * parse.y (find_applicable_accessible_methods_list): Extend the
9785         search to superinterfaces when relevant.
9786         (search_applicable_methods_list): New function.
9787
9788 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9789
9790         * class.c (unmangle_classname): Implemented stricter testing
9791         before setting the QUALIFIED_P flag on an identifier.
9792
9793 1999-03-16  Per Bothner  <bothner@cygnus.com>
9794
9795         * parse.y (java_complete_lhs):  Call force_evaluation_order
9796         after patch_newarray.
9797         (patch_binop):  Don't call fold if there are side effects.
9798
9799 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9800
9801         * parse.y (java_stabilize_reference): Use save_expr instead of
9802         building a SAVE_EXPR node.
9803         (java_complete_lhs): Patch the resulting string of the `+='
9804         operator (if necessary) and complete the RHS after having built
9805         the cast.
9806
9807 1999-03-15  Per Bothner  <bothner@cygnus.com>
9808
9809         * class.c (make_class):  Don't set CLASS_P here (because
9810         this function is also called by build_java_array_type).
9811         (push_class):  Set CLASS_P here instead.
9812         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
9813
9814         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
9815         context.  If the context is class, perfer "super" over "synchronized".
9816         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
9817
9818         * parse.y (create_class):  Don't call parser_check_super here;
9819         it is not robust.  Always wait until later.
9820
9821         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
9822         match what JDK 1.2 does), but don't set ACC_PUBLIC.
9823
9824 1999-03-13  Per Bothner  <bothner@cygnus.com>
9825
9826         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
9827         * lex.h (UNGETC):  Change misleading macro.
9828
9829 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9830
9831         * parse.y (java_stabilize_reference): Return NODE when patching a
9832         COMPOUND_EXPR.
9833         (java_complete_lhs): Put parenthesis around truth values.
9834
9835 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9836
9837         * class.c (layout_class_method): Don't make rtl for interface
9838         methods.
9839         * parse.h (GET_TYPE_NAME): New macro.
9840         * parse.y (if_then_statement:): Fixed indentation.
9841         (if_then_else_statement:): Likewise.
9842         (for_statement:): Fixed spacing.
9843         (try_statement:): Fixed indentation.
9844         (create_interface): Don't force interfaces to be abstract.
9845         (method_header): Abstract methods are OK in interfaces.
9846         (declare_local_variables): Fixed typo in comment.
9847         (java_complete_expand_method): Fixed indentation.
9848         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
9849         non accessible fields.
9850         (java_stabilize_reference): New function.
9851         (java_complete_lhs): Fixed indentation. Use
9852         java_stabilize_reference in compound assignement. Insert the
9853         cast. If not processing `+' fix string constants before processing
9854         binop.
9855
9856 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9857
9858         * constants.c (find_class_or_string_constant): Cast variable `j'
9859         to a `jword' when comparing against one.
9860
9861         * expr.c (java_lang_expand_expr): Remove unused variables
9862         `has_finally_p' and `op0'.
9863
9864         * gjavah.c (print_field_info): Cast a value to jint when comparing
9865         against one.  Likewise for a jlong.
9866         (add_namelet): Likewise cast a `sizeof' to an int when comparing
9867         against a signed quantity.
9868
9869         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
9870         (print_signature): Don't needlessly dereference variable `str'
9871
9872         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
9873         `max_locals' with ATTRIBUTE_UNUSED.
9874         (jcf_parse_class): Likewise for variable `index'.
9875
9876         * parse.h (reverse_jdep_list): Remove static prototype.
9877
9878         * parse.y (build_jump_to_finally): Remove prototype and definition.
9879         (reverse_jdep_list): Add static prototype.
9880
9881         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
9882         `assignment' and `expr_decl'.
9883
9884         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
9885
9886 1999-03-12  Andrew Haley  <aph@cygnus.com>
9887
9888         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
9889         we'll need a directory separator and a null character.
9890
9891 1999-03-10  Per Bothner  <bothner@cygnus.com>
9892
9893         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
9894
9895   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9896
9897         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
9898         interfaces.
9899
9900 1999-03-05  Per Bothner  <bothner@cygnus.com>
9901
9902         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
9903
9904         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
9905
9906         * class.c (layout_class_method):  A static method in a base class
9907         is never overridden, so treat it like it doesn't exist.
9908         However, do complain about private non-static method overriding
9909         public static method.
9910
9911         * parse.y:  Don't set unused INITIALIZED_P flag.
9912         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
9913
9914         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
9915         (build_array_from_name):  Re-order &index[string] to &string[index].
9916
9917         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
9918         error_mark (it might catch more errors, but it is more likely to lose).
9919
9920 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9921
9922         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
9923         (parse-scan.o): Depend on toplev.h.
9924
9925         * class.c (make_method_value): Add prototype.  Make it static.
9926         Remove unused second argument, caller changed.
9927
9928         * expr.c (java_lang_expand_expr): Remove unused variable
9929         `return_label'.
9930
9931         * java-tree.h: Don't prototype find_in_current_zip.
9932         Add prototypes for verify_constant_pool, start_java_method,
9933         end_java_method, give_name_to_locals, expand_byte_code,
9934         open_in_zip, set_constant_value, find_constant1, find_constant2,
9935         find_utf8_constant, find_string_constant, find_class_constant,
9936         find_fieldref_index, find_methodref_index, write_constant_pool,
9937         count_constant_pool_bytes and encode_newarray_type.
9938
9939         * jcf-dump.c: Remove unused variable `LONG_temp'.
9940
9941         * jcf-parse.c: Include parse.h.
9942         (jcf_parse_source): Remove unused parameter, all callers changed.
9943         (jcf_figure_file_type): Add static prototype.
9944         (find_in_current_zip): Likewise.  Also remove unused parameter,
9945         all callers changed.
9946         (read_class): Initialize variable `saved_pos'.
9947
9948         * jcf-reader.c (jcf_parse_preamble): Mark variables
9949         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
9950
9951         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
9952         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
9953         (java_parse_doc_section): Initialize variable `seen_star'.
9954         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
9955         (java_lex_error): Mark parameters `msg' and `forward' with
9956         ATTRIBUTE_UNUSED.
9957         (java_get_line_col): Mark parameters `filename' and `line' with
9958         ATTRIBUTE_UNUSED.
9959
9960         * parse-scan.y: Include toplev.h.
9961         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
9962
9963         * parse.h: use `struct JCF', not plain `JCF'.
9964         (java_parser_context_save_global, java_expand_classes
9965         java_parser_context_restore_global, java_parse): Add prototypes.
9966
9967         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
9968         `node'.
9969
9970 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
9971
9972         *  check-init.c (check_init):  COPYN takes word count, not bit count.
9973
9974 1999-02-26  Per Bothner  <bothner@cygnus.com>
9975
9976         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
9977         explicit build_decl.  (Avoids crash in reload when optimizing.)
9978
9979 1999-02-25  Per Bothner  <bothner@cygnus.com>
9980
9981         * decl.c (complete_start_java_method):  Handle synchronized method
9982         even when compiling from bytecode.
9983
9984 1999-02-26  Tom Tromey  <tromey@cygnus.com>
9985
9986         * gjavah.c (add_class_decl): Only generate `#include' if outer
9987         class is not the name of the class we are processing.  Correctly
9988         append `.h' in #include.
9989         (process_file): Clean up newlines around generated `#include's.
9990         (decode_signature_piece): Correctly handle inner classes.
9991         (struct include): New structure.
9992         (all_includes): New global.
9993         (print_include): New function.
9994         (add_class_decl): Use it.
9995         (process_file): Likewise.
9996         (add_class_decl): Generate include for java-array.h if array
9997         seen.
9998         (process_file): Don't generate java-array.h include.
9999
10000         * gjavah.c (add_namelet): Check for standard package names here.
10001         (add_class_decl): Don't check for standard package names here.
10002
10003 1999-02-25  Tom Tromey  <tromey@cygnus.com>
10004
10005         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
10006         When reading a zip file, only use strncmp if both strings are
10007         bigger than the buffer length.  Initialize `k' when looping
10008         through zip file.
10009
10010 1999-02-24  Tom Tromey  <tromey@cygnus.com>
10011
10012         * gjavah.c (struct namelet): New structure.
10013         (add_namelet): New function.
10014         (print_namelet): New function.
10015         (print_class_decls): Use add_namelet and print_namelet to generate
10016         namespaces and not classes.
10017         (method_printed): New global.
10018         (HANDLE_END_METHOD): Examine method_printed.
10019         (print_method_info): Set method_printed when required.  Print
10020         error if function to be ignored is marked virtual.  Handle $finit$
10021         method.
10022         (METHOD_IS_FINAL): New macro.
10023         (print_field_info): Use it.
10024         (HANDLE_METHOD): Clear method_printed.
10025         (method_pass): New global.
10026         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
10027         (process_file): Do two passes over both fields and methods.
10028         (HANDLE_METHOD): Examine method_pass.
10029         (root): New global.
10030         (add_class_decl): New function.
10031         (print_class_decls): Don't scan over entire constant pool.
10032
10033 1999-02-23  Tom Tromey  <tromey@cygnus.com>
10034
10035         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
10036         disable linking in that case.
10037
10038 1999-02-20  Tom Tromey  <tromey@cygnus.com>
10039
10040         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
10041         not 0x1f.
10042
10043 1999-02-21  Per Bothner  <bothner@cygnus.com>
10044
10045         * decl.c (build_result_decl), java-tree.h:  New method.
10046         (complete_start_java_method):  Handle synchronized methods.
10047         Don't build DECL_RESULT here.  (Ordering dependency problem.)
10048         (start_java_method):  Call build_result_decl here instead  ...
10049         * parse.y (java_complete_expand_method):  ... and here.
10050         (expand_start_java_method): Don't call complete_start_java_method here.
10051         (java_complete_expand_method):  Call it here instead.
10052         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
10053         * java-tree.h:  ... here.
10054
10055         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
10056         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
10057         for ARRAY_REF - it doesn't work when array bounds are checked.
10058         (patch_array_ref):  Handle it here instead.
10059
10060         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
10061
10062 1999-02-19  Per Bothner  <bothner@cygnus.com>
10063
10064         Force left-to-right evaluation of binary operations etc.
10065         * expr.c (force_evaluation_order), java-tree.h:  New function.
10066         * parse.y (java_complete_lhs):  Pass binary operations, procedure
10067         calls, and ARRAY_REFs to force_evaluation_order.
10068         (various):  Set TREE_SIDE_EFFECTS more carefully.
10069
10070         Tolerate random (non-UTF8) encoding in comments without complaining.
10071         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
10072         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
10073
10074         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
10075         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
10076
10077         * parse.y (java_complete_lhs):  Ignore an empty statement in a
10078         COMPOUND_EXPR.  Don't complain about empty statement after return.
10079
10080 1999-02-19  Per Bothner  <bothner@cygnus.com>
10081
10082         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
10083         in TREE_LIST - just chain the POINTER_TYPEs together.
10084         (resolve_class):  If type already resolved, return decl.
10085         After resolving, update TREE_TYPE(class_type), and name (if array).
10086         * parse.h (do_resolve_class), parse.y:  Make non-static.
10087         * class.c (maybe_layout_super_class):  Take this_class argument.
10088         Do do_resolve_class if necessary.
10089         (layout_class, layout_class_methods): Adjust calls appropriately.
10090         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
10091         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
10092         * typeck.c (build_java_array_type):  Don't call layout_class.
10093
10094 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10095
10096         * parse.y (check_pkg_class_access): Allow private class access
10097         within the same package.
10098         (strip_out_static_field_access_decl): New function.
10099         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
10100         operator argument before testing its nature.
10101
10102 1999-02-03  Per Bothner  <bothner@cygnus.com>
10103
10104         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
10105         (TRY_EXPR):  Simplify - it no longer has a finally clause.
10106         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
10107         Simpler handling of TRY_EXPR, which no longer has a finally clause.
10108         * expr.c (java_lang_expand_expr):  Likewise.
10109         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
10110         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
10111         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
10112         (build_try_statement):  Remove finally parameter and handling.
10113         (build_try_finally_statement):  New function.
10114         (patch_try_statement):   No longer need to support finally clause.
10115         (try_statement):  Update grammar action rules.
10116         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
10117         Simpler handling of TRY_EXPR, which no longer has a finally clause.
10118
10119 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
10120
10121         * jcf-parse.c (get_constant): Add braces around computation of 'd'
10122         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
10123
10124 1999-02-17  Andrew Haley  <aph@cygnus.com>
10125
10126         * class.c (build_utf8_ref): Back out broken patch which was
10127         intended to to output signatures using '.' as a separator.
10128
10129         * class.c (make_class_data): Output signatures using '.' as a
10130         separator, rather than '/'.
10131         (mangled_classname): Likewise.
10132         (make_field_value): Likewise.
10133         (make_method_value): Likewise.
10134         * constants.c (alloc_class_constant): Likewise.
10135         * expr.c (build_invokeinterface): Likewise.
10136
10137 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10138
10139         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
10140         of an ancient workaround.
10141
10142 1999-02-10  Jeffrey A Law  (law@cygnus.com)
10143
10144         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
10145         here anymore.
10146
10147 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10148
10149         * lex.c (yylex): Encode \0 as UTF8.
10150
10151 1999-02-10  Tom Tromey  <tromey@cygnus.com>
10152
10153         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
10154         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
10155         (libgcj_zip): Renamed.
10156         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
10157         LIBJAVA_ZIP_FILE.
10158         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
10159
10160         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
10161         (GC_NAME): Renamed -lgc to -lgcjgc.
10162
10163 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10164
10165         * lex.c (java_lang_cloneable): Initialize.
10166         * parse.y (java_lang_cloneable): New static variable.
10167         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
10168         doing one more qualification round.
10169         (valid_ref_assignconv_cast_p): Reject null source or
10170         destination. Allow an array to be cast into java.lang.Cloneable.
10171         (patch_cast): Swapped two first arguments to first call to
10172         valid_ref_assignconv_cast_p.
10173
10174 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10175
10176         * parse.h: DECL_P renamed JDECL_P.
10177         * parse.y: DECL_P replaced by JDECL_P.
10178         (build_array_from_name): Always use pointer's type.
10179         (patch_bc_statement): Extra code to search continue target in a
10180         for loop. Fixed comments. Continue target is current loop when
10181         unlabeled.
10182
10183 1999-02-05  Andrew Haley  <aph@cygnus.com>
10184
10185         * class.c (make_class_data): The superclass of an interface should
10186         be null, not class Object.
10187
10188         * lex.c (java_lex): Sign extend hex literals.
10189
10190 1999-02-04  Andrew Haley  <aph@cygnus.com>
10191
10192         * class.c (build_utf8_ref): Output signatures using '.' as a
10193         separator, rather than '/'.
10194         (make_class_data): Likewise.
10195
10196 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
10197
10198         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
10199         mkstemp.o.  Get them from libiberty now.
10200
10201 1999-02-02  Jeffrey A Law  (law@cygnus.com)
10202
10203         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
10204
10205 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10206
10207         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
10208         from libiberty.h
10209
10210 1999-02-02  Per Bothner  <bothner@cygnus.com>
10211
10212         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
10213         * jcf-write.c (generate_bytecode_return):  New function.
10214         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
10215
10216         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
10217         generate special [fd]const_[01] instructions.
10218
10219         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
10220
10221         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
10222         handling OPCODE_lookupswitch or OPCODE_tableswitch.
10223
10224 1999-02-01  Per Bothner  <bothner@cygnus.com>
10225
10226         * parse.y (patch_method_invocation):  Handle calling static methods,
10227         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
10228
10229         * parse.y (java_complete_lhs):  Don't complain about unreachable
10230         exit condition in a do-while statement.
10231
10232 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10233
10234         * lex.c (java_read_char): Fixed utf8 decoding.
10235         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
10236         range.
10237         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
10238         comments. Local variable `all_primitive' is gone. Broadened
10239         acceptance of `0' to floating point targets. `long' can now be
10240         widened to `double' or `float'.
10241         (valid_method_invocation_conversion_p): Added leading
10242         comment. Fixed tabulation.
10243         (build_string_concatenation): Optimize out left or right empty
10244         string constants.
10245
10246 1999-01-28  Per Bothner  <bothner@cygnus.com>
10247
10248         * jcf-write.c (localvar_alloc):  Only emit entry for
10249         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
10250         (generate_bytecode_insns):  Only call put_linenumber if
10251         debug_info_level > DINFO_LEVEL_NONE.
10252         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
10253         is specified, add -g1 (for compatibility wih javac).
10254
10255 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
10256
10257         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
10258         gjavah.o, check-init.o, jv-scan.o
10259
10260 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10261
10262         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
10263
10264         * gjavah.c: Include config.h and system.h.
10265
10266         * javaop.h (inline): Don't define, its handled by system.h.
10267         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
10268         from `inline' to `static inline'.
10269
10270         * jcf.h (inline): Don't define, its handled by system.h.
10271
10272         * lex.c (inline): Likewise.
10273
10274 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
10275
10276         * lang-specs.h: Map -Qn to -fno-ident.
10277
10278 1999-01-29  Richard Henderson  <rth@cygnus.com>
10279
10280         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
10281
10282 1999-01-29  Tom Tromey  <tromey@cygnus.com>
10283
10284         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
10285         then cast it to Object before calling `append' method.
10286
10287 1999-01-28  Per Bothner  <bothner@cygnus.com>
10288
10289         * check-init.c (check_bool2_init, check_bool_init, check_init):
10290         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
10291         * jcf-write.c (generate_bytecode_insns):  Likewise.
10292
10293 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10294
10295         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
10296         * parse.y (patch_cast): Allow a boolean to be cast into a
10297         boolean.
10298
10299 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10300
10301         * parse.y: (class_declaration:): Fixed indentation.
10302         (class_member_declaration:): Extra `;' after field declaration now
10303         accepted.
10304         (interface_declaration:): Removed debug messages in error reports.
10305         (patch_binop): Nodes created and returned inherit the orignal
10306         node's COMPOUND_ASSIGN_P flag value.
10307         (patch_cast): Fix cast from char to floating point.
10308
10309 1999-01-25  Andrew Haley  <aph@cygnus.com>
10310
10311         * except.c, java-except.h (expand_resume_after_catch): new
10312         function.
10313         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
10314         to branch back to main flow of control after a catch block.
10315
10316 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10317
10318         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
10319         $(srcdir)/../system.h.
10320         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
10321         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
10322         (jcf-write.o): Likewise.
10323         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10324         (mangle.o): Depend on $(srcdir)/../toplev.h.
10325         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10326         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10327
10328         * class.c: Include output.h and parse.h.
10329         (mangled_classname): Add the `const' keyword to a char*.
10330         (find_named_method): Hide unused function definition.
10331         (build_utf8_ref): Change type of variable `c' to unsigned char.
10332         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
10333         (build_class_ref): Add the `const' keyword to a char*.
10334         (layout_class_method): Remove unused variable `buf'.
10335
10336         * decl.c (find_local_variable): Remove unused variable `rtl'.
10337         (pushdecl): Likewise for variables `different_binding_level' and
10338         `oldglobal'.
10339         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
10340         (maybe_build_cleanup): Likewise for parameter `decl'.
10341
10342         * except.c (expand_start_java_handler): Mark parameter `range'
10343         with ATTRIBUTE_UNUSED.
10344
10345         * expr.c: Include except.h.
10346         (pop_type): Remove unused variable `i'.
10347         (pop_value): Likewise for variables `n_words' and `i'.
10348         (expand_java_arrayload): Likewise for variable `convert'.
10349         (java_lang_expand_expr): Likewise for variables `op0', `type',
10350         `mode', `unsignedp', `node' and `elements'.
10351         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
10352         `eh_ranges'.
10353         (process_jvm_instruction): Add a `const' qualifier to a char*.
10354
10355         * gjavah.c (output_directory): Add the `const' keyword to a char*.
10356         (temp_directory): Likewise.
10357         (print_c_decl): Likewise.
10358         (print_method_info): Likewise.
10359         (decode_signature_piece): Likewise.
10360         (print_mangled_classname): Likewise.
10361
10362         * java-except.h: Provide prototypes for maybe_start_try,
10363         maybe_end_try and add_handler.
10364
10365         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
10366         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
10367         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
10368         init_expr_processing, push_super_field, init_class_processing,
10369         can_widen_reference_to, class_depth, verify_jvm_instructions,
10370         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
10371         set_local_type, merge_type_state, push_type, load_type_state,
10372         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
10373         emit_unicode_mangled_name): Add prototypes.
10374
10375         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
10376         (print_signature_type): Use ISDIGIT, not isdigit.
10377         (print_signature): Remove unused variable `j'.
10378
10379         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
10380         int when comparing against one.
10381
10382         * jcf-parse.c: Include toplev.h.
10383
10384         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
10385         (localvar_free): Remove unused variable `i'.
10386         (generate_bytecode_conditional): Likewise for variable `kind'.
10387
10388         * jv-scan.c: Include config.h and system.h.  Remove redundant
10389         OS header and gansidecl.h includes.
10390         (warning): Add the `const' keyword to a char*.  Also add
10391         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
10392         __STDC__, when determining whether to use ANSI-isms.
10393         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
10394         (xmalloc): Don't redundantly prototype here.
10395         (main): Remove unused parameter `envp'.  Also fix the arguments
10396         passed to function `fatal' to match the format specifier.
10397
10398         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
10399
10400         * mangle.c: Include toplev.h.
10401         (emit_unicode_mangled_name): Declare parameter `len'.
10402
10403         * parse.y (parse_warning_context): Add the `const' keyword to a
10404         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
10405         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
10406         (issue_warning_error_from_context): Add the `const' keyword to
10407         a char*.
10408         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
10409         not `__STDC__' for whether to use ANSI-isms.
10410
10411         * typeck.c (incomplete_type_error): Mark parameters `value' and
10412         `type' with ATTRIBUTE_UNUSED.
10413         (parse_signature_type): Use ISDIGIT, not isdigit.
10414
10415         * verify.c (check_pending_block): Add the `const' keyword to a char*.
10416         (verify_jvm_instructions): Likewise.  Remove unused variables
10417         `field_name' and `default_val'.
10418
10419         * zextract.c: Include config.h and system.h.  Remove redundant
10420         OS header includes.
10421
10422         * zipfile.h: Prototype `read_zip_archive'.
10423
10424 1999-01-21  Andrew Haley  <aph@cygnus.com>
10425
10426         * typeck.c (convert): Allow conversions to void type: some
10427         optimizations in gcc do this.
10428
10429 1999-01-21  Andrew Haley  <aph@cygnus.com>
10430
10431         * typeck.c (convert_ieee_real_to_integer): New function.
10432         (convert): When not using fast-math and using hardware fp, convert
10433         an IEEE NaN to zero.
10434
10435 1999-01-18  Andrew Haley  <aph@cygnus.com>
10436
10437         * parse.y (patch_binop): Do a type conversion from signed to
10438         unsigned and then back to signed when a ">>>" is found.
10439
10440 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10441
10442         * java-tree.h: (check_for_initialization): Added prototype.
10443         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
10444         * parse.y (do_resolve_class): Removed unused locals.
10445         (read_import_dir): Likewise.
10446         (resolve_qualified_expression_name): Array creation
10447         expressions are valid primary expressions.
10448         (qualify_ambiguous_name): Likewise.
10449         (patch_synchronized_statement): Removed unused local.
10450
10451 1999-01-17  Jeffrey A Law  (law@cygnus.com)
10452
10453         * Makefile.in (zextract.o): Add dependencies.
10454
10455         * Makefile.in: Do not put ^Ls at the start of a line.
10456
10457 1999-01-15  Per Bothner  <bothner@cygnus.com>
10458
10459         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
10460         sub-type the result of the call that gets the exception value.
10461
10462         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
10463         don't call finish_class.
10464
10465         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
10466         clear found before continuing.
10467
10468         * verify.c (verify_jvm_instructions):  On an array load, allow
10469         and handle top of stack to be TYPE_NULL.
10470
10471         * gjavah.c (generate_access):  Translate Java package private or
10472         protected access to C++ public, but with a comment.
10473
10474 1999-01-13  Andrew Haley  <aph@cygnus.com>
10475
10476         * expr.c (generate_name): Name prefix changed to avoid clashes
10477         with assembler temp labels.
10478
10479         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
10480         MODIFY_EXPR.  Without this, code for the assignement may not be
10481         generated at all and the synchronized statement will read an
10482         uninitialized variable.
10483
10484 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10485
10486         * class.c (maybe_layout_super_class): Fixed returned value.
10487         * lex.c: Added 1999 to the copyright.
10488         (java_init_lex): Initialize java_lang_imported.
10489         * lex.h: Added 1999 to the copyright.
10490         * parse.h: Added 1999 to the copyright.
10491         (REGISTER_IMPORT): Fixed typo in trailing macro.
10492         (CURRENT_OSB): New macro.
10493         (struct parser_ctxt): New fields osb_depth, osb_limit.
10494         * parse.y (java_lang_id): New global variable.
10495         (type_import_on_demand_declaration): Don't import java.lang.* twice.
10496         (array_creation_expression:): Use CURRENT_OSB.
10497         (dims:): Uses a stack to keep track of array dimensions.
10498         (cast_expression:): Use CURRENT_OSB.
10499         (find_expr_with_wfl): Return NULL if node found doesn't meet the
10500         conditions.
10501         (register_fields): Fixed typos in comment.
10502         (check_method_redefinition): Fixed comment indentation.
10503         (java_check_regular_methods): Set saved found wfl to NULL after
10504         having reinstalled it in the previously found DECL_NAME.
10505
10506 1999-01-10  Richard Henderson  <rth@cygnus.com>
10507
10508         * gjavah.c (java_float_finite): Use a union to do type punning.
10509         (java_double_finite): Likewise.
10510
10511 1999-01-09  Per Bothner  <bothner@cygnus.com>
10512
10513         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
10514         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
10515         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
10516         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
10517         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
10518         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
10519
10520 1999-01-08  Per Bothner  <bothner@cygnus.com>
10521
10522         * check-init.c (check_init):  If compiling to native, we don't
10523         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
10524
10525 1999-01-08  Tom Tromey  <tromey@cygnus.com>
10526
10527         * parse-scan.y (variable_declarator_id): Set or increment
10528         bracket_count.
10529         (bracket_count): New global.
10530         (formal_parameter): Handle case where bracket pairs trail variable
10531         declarator id.
10532
10533 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
10534
10535         * jcf-parse.c (yyparse): variable len changed from a char to an
10536         int to prevent overflow.
10537
10538 1999-01-06  Per Bothner  <bothner@cygnus.com>
10539
10540         * java-tree.h:  Declare read_class.
10541         * jcf-parse.c (read_class):  New function.
10542         (load_class):  Now just call read_class.
10543
10544         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
10545         * jcf-parse.c (parse_source_file):  Declare save_error_count,
10546         which is needed by java_parse_abort_on_error macro,
10547         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
10548
10549         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
10550         constructor, if initializing a static field.
10551         (patch_new_array_init):  Set TREE_CONSTANT if it is.
10552         * expr.c (java_lang_expand_expr):  For a static array constructor
10553         of primitive elements, allocate the array itself statically.
10554         Disabled until we can set the vtable field statically.
10555
10556         * check-init.c:  New file.  Checks for definite assignment.
10557         * Makefile.in (JAVA_OBJS):  Add check-init.o.
10558         * parse.y (java_complete_expand_method): Call check_for_initialization.
10559         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
10560
10561 1999-01-06  Graham <grahams@rcp.co.uk>
10562
10563         * parse.y : include system.h instead of including
10564         standard headers directly with the exception of <dirent.h>.
10565
10566 1999-01-06  Per Bothner  <bothner@cygnus.com>
10567
10568         * lex.h:  Moved static function declarations to lex.c,
10569         to shut up some -Wall warnings.
10570         * lex.c:  Static function declarations moved here.
10571         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
10572
10573 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10574
10575         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
10576
10577 1998-12-22  Per Bothner  <bothner@cygnus.com>
10578
10579         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
10580         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
10581
10582         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
10583         (localvar_alloc):  Change return type to void,
10584         (emit_unop):  Remove unused variable size.
10585
10586         * jcf-write.c (struct jcf_block):  Add new union.
10587         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
10588         (call_cleanups):  New functions.
10589         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
10590         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
10591         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
10592         * lang.c (lang_init):  Call using_eh_for_cleanups.
10593         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
10594         completing operands to patch_synchronized_statement.
10595         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
10596         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
10597         WITH_CLEANUP_EXPR instead of TRY_EXPR.
10598
10599 1998-12-20  John F. Carr  <jfc@mit.edu>
10600
10601         * Make-lang.in: Comment out control-Ls; they upset some makes.
10602
10603 1998-12-18  Tom Tromey  <tromey@cygnus.com>
10604
10605         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
10606         consistently.
10607
10608 1998-12-17  Tom Tromey  <tromey@cygnus.com>
10609
10610         * parse.y (DIR_SEPARATOR): New define.
10611         (check_class_interface_creation): Use it.
10612
10613         * parse-scan.y (report_main_declaration): Recognize
10614         `java.lang.String' in argument to main.
10615
10616 1998-12-16  Per Bothner  <bothner@cygnus.com>
10617
10618         * parse.y (create_interface):  Remove bogus test.
10619
10620 1998-12-16  Per Bothner  <bothner@cygnus.com>
10621
10622         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
10623         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
10624
10625 1998-12-16  Tom Tromey  <tromey@cygnus.com>
10626
10627         * parse-scan.y (qualified_name): Use correct sprintf format.
10628
10629 1998-12-15  Tom Tromey  <tromey@cygnus.com>
10630
10631         * gjavah.c (print_field_info): Changed how most negative number is
10632         printed.
10633
10634 1998-12-14  Per Bothner  <bothner@cygnus.com>
10635
10636         * parse.y (fold_constant_for_init):  New function.
10637         (resolve_expression_name):  Don't replace static final
10638         constant-initialized fields by its value.
10639         (java_complete_lhs):  New.  Same as java_complete_tree, except does
10640         not replace static final constant-initialized fields by their values.
10641         (register_fields):  If there is an initializer, set DECL_INITIAL and
10642         MODIFY_EXPR_FROM_INITIALIZATION_P.
10643         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
10644         Only call patch_initialized_static_field if
10645         MODIFY_EXPR_FROM_INITIALIZATION_P.
10646         (patch_initialized_static_field):  If not valid constant, clear
10647         DECL_INITIAL.
10648
10649         * parse.y (lookup_field_wrapper):  Fix thinko.
10650
10651         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
10652         set and restore global lineno.
10653
10654 1998-12-14  Tom Tromey  <tromey@cygnus.com>
10655
10656         * gjavah.c (print_field_info): If value to print is the smallest
10657         value of its size, then print as hex to avoid later warnings from
10658         C++ compiler.
10659
10660 1998-12-14  Tom Tromey  <tromey@cygnus.com>
10661
10662         * gjavah.c (decompile_method): Decompile `return null'.
10663         (process_file): Generate `#pragma interface'.
10664         (method_declared): New global.
10665         (print_method_info): Set it.
10666         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
10667         (print_method_info): Handle abstract methods.
10668
10669 1998-12-13  Per Bothner  <bothner@cygnus.com>
10670
10671         * parse.y (patch_method_invocation):  If class_decl is null
10672         (e.g. an array type), use original type.
10673
10674         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
10675         errors about uncaught exception from clone (of array, specifically).
10676
10677 1998-12-13  Tom Tromey  <tromey@cygnus.com>
10678
10679         * gjavah.c (decompile_method): Handle all types of `return'
10680         opcode.  Decompile `return this' and `return'.
10681         (method_access): New global.
10682         (print_method_info): Set it.
10683         (decompile_method): Don't decompile a synchronized method.
10684
10685 1998-12-13  Tom Tromey  <tromey@cygnus.com>
10686
10687         * jcf-reader.c (jcf_parse_one_method): Recognize
10688         HANDLE_END_METHOD.
10689         * gjavah.c (HANDLE_END_METHOD): New macro.
10690         (HANDLE_CODE_ATTRIBUTE): New macro.
10691         (decompile_method): New function.
10692         (print_method_info): Don't print `;\n' at end of function decl.
10693         Include java-opcodes.h.
10694         (decompiled): New global.
10695
10696 1998-12-12  Per Bothner  <bothner@cygnus.com>
10697
10698         * class.c (build_class_ref):  Handle PRIMTYPE.class if
10699         flag_emit_class_files.
10700         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
10701         if flag_emit_class_files.
10702         * parse.y (java_complete_tree):  Pre-liminary support for
10703         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
10704
10705         * parse.y (patch_synchronized_statement):   Don't call monitorexit
10706         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
10707
10708         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
10709
10710         * zipfile.h (opendir_in_zip):  New declaration.
10711         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
10712         (opendir_in_zip):  New function, using code from open_in_zip.
10713         (open_in_zip):  Call opendir_in_zip.
10714         (find_class):  Remove no-longer-used do_class_file parameter,
10715         but add source_ok parameter.  Change logic so if we find a .java file,
10716         we don't look for .class in later classpath emtries.
10717         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
10718         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
10719         * gjavah.c: Update call to find_class.
10720         * jcf-dump.c:  Likewise.
10721
10722         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
10723         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
10724         nothing if body is empty_stmt_node.
10725         Various little fixes so SP gets correctly adjusted.
10726         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
10727         For CALL_EXPR, test if static first.
10728         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
10729         such as the ones we create for Object and Class.
10730         Set and restore current_function_decl.
10731         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
10732         (note_possible_classname):  New function.
10733         (read_import_entry):  Removed.  Merged with read_import_dir.
10734         (read_import_dir):  Don't call find_class - that only gives us
10735         the first classpath entry having the needed package.
10736         Use the struct buffer data structure from buffer.h.
10737         (read_import_dir, find_in_imports_on_demand):  The remembered
10738         class names now use '.' (not '/') as package separator.
10739
10740         * parse.y (java_complete_expand_methods):  Call write_classfile
10741         here, and not in java_expand_classes (which only gets first class).
10742
10743 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10744
10745         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
10746         (register_fields):  If a static fields has an initializer, just
10747         chain it on ctxp->static_initialized, and handle later.
10748         (java_complete_expand_methods):  Force <clinit> first.
10749         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
10750         - it's already been completed.
10751         (patch_initialized_static_field):  New function.
10752         (java_complete_field):  Call it.
10753
10754 1998-12-12  Per Bothner  <bothner@cygnus.com>
10755
10756         * expr.c (encode_newarray_type, build_new_array):  New functions.
10757         * java-tree.h:  Declare build_new_array.
10758         * jcf-write.c (patch_newarray):  Use build_new_array.
10759
10760         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
10761         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
10762
10763         * parse.y (patch_new_array_init):  Re-organize.
10764         Now is passed the actual array (pointer) type of the value.
10765         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
10766         (patch_array_constructor):  Removed - merged into patch_new_array_init.
10767         (java_complete_tree):  Update patch_new_array_init.
10768
10769         * jcf-write.c (find_constant_index):  New function.
10770         (generate_bytecode_insns):  Use find_constant_index.
10771         (generate_classfile):  Use find_constant_index for ConstantValue.
10772
10773 1998-12-11  Tom Tromey  <tromey@cygnus.com>
10774
10775         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
10776         * decl.c (init_decl_processing): Renamed dtable -> vtable.
10777         * class.c (make_class_data): Renamed dtable -> vtable, and
10778         dtable_method_count -> vtable_method_count.
10779
10780 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10781
10782         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
10783         global variables, initialized.
10784         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
10785         Declared new global variables.
10786         * lex.c (java_lex): Return long_zero_node, float_zero_node,
10787         double_zero_node, integer_zero_node upon direct matching.
10788         * parse.y (purify_type_name): Added function prototype.
10789         (duplicate_declaration_error_p): Consider new_type as potentially
10790         being a incomplete type. Use purify_type_name on type string.
10791         (method_header): saved_type: unused variable removed. Don't figure
10792         return type if method name is invalid.
10793         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
10794         processed by patch_unaryop.
10795         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
10796         increment/decrement node into its original type after binary
10797         numeric promotion on its operands.
10798
10799 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10800
10801         * parse.y (array_initializer:): Array init operand is NULL_TREE
10802         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
10803         now an error. Fixed indentation problems.
10804         (patch_string): Handle error_mark_node as an argument.
10805         (patch_new_array_init): Fixed indentation problems.
10806         (array_constructor_check_entry): Removed check on null wfl_value.
10807         Return an error if wfl_value's walk returns an error.
10808
10809 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10810
10811         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
10812         * lex.c (java_lex): Remember column position before advancing one
10813         token. Retain location information on OCB_TK.
10814         * lex.h (typedef struct java_lc): Added new field.
10815         * parse.h (GET_SKIP_TYPE): New macro.
10816         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
10817         * parse.y (build_new_array_init, patch_new_array_init,
10818         patch_array_constructor, maybe_build_array_element_wfl,
10819         array_constructor_check_entry): New function prototypes.
10820         (switch_block:): Tagged <node>.
10821         (OCB_TK): Tagged <operator>.
10822         (array_initializer:): Installed actions.
10823         (variable_initializer): Build location information on element if
10824         necessary.
10825         (switch_statement:): Fixed indentation typo.
10826         (switch_block:): Redefined default action.
10827         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
10828         (patch_assignment): Removed duplicate code.
10829         (maybe_build_array_element_wfl, build_new_array_init,
10830         patch_new_array_init, patch_array_constructor,
10831         array_constructor_check_entry): New functions.
10832
10833 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10834
10835         * parse.y (array_initializer): Tagged <node>.
10836         (variable_initializer:): Use default rule.
10837         (array_initializer:): Defined actions.
10838         (variable_initializers:): Likewise.
10839         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
10840         non-static field accesses.
10841         (patch_invoke): Fixed indentation typo.
10842         (java_complete_tree): Likewise.
10843         (build_labeled_block): Changed leading comment. Generate an error
10844         in case of duplicate loop labels.
10845         (patch_conditional_expr): Patch results of string concatenation
10846         operations.
10847
10848 1998-12-06  Per Bothner  <bothner@cygnus.com>
10849
10850         * constants.c (find_methodref_index):  When the class is an interface,
10851         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
10852
10853         * decl.c (finit_identifier_node):  Use "$finit$", rather than
10854         "<finit>" (which Sun's verifier rejects).
10855         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
10856         (generate_field_initialization_code):  Removed.
10857         (fix_constructors)  Don't add call to $finit$ here (wrong order).
10858         (patch_method_invocation):  Add $finit$ call here.
10859
10860         * java-tree.h (CALL_USING_SUPER):  New macro.
10861         * parse.y (patch_invoke):  Remove im local variable.
10862         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
10863         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
10864         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
10865
10866         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
10867
10868         * parse.y (java_complete_tree):  Don't complain about unreachable
10869         statement if it is empty_stmt_node.
10870
10871         * jcf-write.c (find_constant_wide):  New function.
10872         (push_long_const):  Use find_constant_wide.
10873
10874         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
10875         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
10876         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
10877         Emit invokeinterface when calling an interface method.
10878         Emit invokespecial also when calling super or private methods.
10879
10880         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
10881
10882 1998-12-06  Per Bothner  <bothner@cygnus.com>
10883
10884         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
10885
10886 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10887
10888         * java-tree.h (java_layout_seen_class_methods): New function
10889         prototype.
10890         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
10891         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
10892         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
10893         * parse.y (method_declarator:): Defined action.
10894         (issue_warning_error_from_context): input_filename saved, set to
10895         the appropriate value and restored after java_error is called.
10896         (build_unresolved_array_type): Fixed comment.
10897         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
10898         (method_header): Deal with return type the same way type are
10899         handled for fields and method's parameters and local variables
10900         types are handled.
10901         (check_method_redefinition): Removed extra CR.
10902         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
10903         (java_layout_seen_class_methods): New function.
10904         (java_layout_classes): Call java_layout_seen_class_methods.
10905
10906 1998-12-03  Per Bothner  <bothner@cygnus.com>
10907
10908         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
10909
10910 1998-12-03  Per Bothner  <bothner@cygnus.com>
10911
10912         * jcf-dump.c (main):  Fix error message.
10913         * jcf-path.c (add_entry):  Style fix.
10914
10915 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10916
10917         * class.c (layout_class_method): Call build_java_argument_signature
10918         on constructors too.
10919         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
10920         (patch_method_invocation): Define a primary when resolving an
10921         expression name. Augmented comment on code checking illegal `this'
10922         usage. Loosened it test by accepting NEW_CLASS_EXPR.
10923
10924 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10925
10926         * class.c (layout_class_method): Don't report error on non-static
10927         overriding static if the method is private.
10928         * java-tree.h (finish_class): Prototype added.
10929         * lex.c (java_get_line_col): Handle col argument -2 value.
10930         * parse.h: All static method declarations moved to parse.y.
10931         * parse.y: Now contains all static method declarations previously
10932         found in parse.h.
10933         (find_expr_with_wfl, missing_return_error,
10934         unreachable_stmt_error): New functions.
10935         (java_get_real_method_name): Identify constructors bearing class
10936         names in source code compiled classes only.
10937         (java_complete_expand_methods): Call missing_return_error.
10938         (invocation_mode): Private methods invoked as static methods.
10939         (java_complete_tree): Call unreachable_stmt_error.
10940
10941 1998-12-01  Tom Tromey  <tromey@cygnus.com>
10942
10943         * Makefile.in (+target): Removed.
10944         (+xmake_file): Likewise.
10945         (+tmake_file): Likewise.
10946         (.NOEXPORT): Removed duplicate.
10947
10948 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10949
10950         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
10951
10952         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
10953
10954         * jvgenmain.c: Remove the xmalloc prototype, we get it from
10955         libiberty.h.  Provide an xmalloc definition.
10956
10957         * jvspec.c: Remove the xmalloc prototype.
10958
10959         * parse-scan.y: Include config.h and system.h.  Don't include
10960         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
10961         Provide an xstrdup definition.
10962
10963 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
10964
10965         * jcf-path.c (add_entry): Recognize ".jar" too.
10966         * lang-specs.h: Likewise.
10967
10968 1998-11-26  Per Bothner  <bothner@cygnus.com>
10969
10970         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
10971         soft_monitorenter_node, soft_monitorexit_node, throw_node.
10972
10973         * jcf-write.c (generate_bytecode_insns):
10974         Handle pre/post-increment/decrement of long.
10975
10976         * jcf-write.c (generate_bytecode_insns):
10977         Handle missing exception handler (finally for synchronized).
10978
10979 1998-11-25  Per Bothner  <bothner@cygnus.com>
10980
10981         * java-tree.h (end_params_node):  Declare global.
10982         * decl.c (end_params_node):  New global.
10983         (init_decl_processing, start_java_method):  Use end_params_node for
10984         end of list of parameter types.  Follows correct gcc conventions.
10985         * expr.c (pop_argument_types, pop_arguments):  Likewise.
10986         * lang.c (put_decl_node):  Likewise.
10987         * typeck.c (various places):  Likewise.
10988         * class.y (various places):  Likewise.
10989         * parse.y (various places):  Likewise.
10990
10991         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
10992         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
10993
10994         * class.c:  Add #include flags.h, remove no-longer needed declaration.
10995
10996         * class.c (layout_class_method):  Remove commented-out code, re-format.
10997         Don't add vtable entry (or index) for private methods.
10998         * expr.c (expand_invoke):  A private method is implicitly final.
10999         * class.c (make_class_data):  If inlining or optimizing,
11000         skip private methods.
11001
11002         * class.c (finish_class):  New function.  Calls existing methods,
11003         but alls emits deferred inline functions.
11004         * jcf-parse.c (parse_class_file):  Call finish_class.
11005         * parse.y (java_complete_expand_methods):  Likewise.
11006
11007         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
11008
11009         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
11010
11011 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
11012
11013         * jcf-write.c (generate_bytecode_conditional): Fix typo.
11014
11015 1998-11-24  Per Bothner  <bothner@cygnus.com>
11016
11017         * (generate_classfile): Always write class access flag with
11018         ACC_SUPER set.
11019
11020 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11021
11022         * class.c (maybe_layout_super_class): New function.
11023         (layout_class): Reorganized. Loop on class methods dispatched into
11024         a new function. Call maybe_layout_super_class.
11025         (layout_class_methods, layout_class_method): New functions.
11026         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
11027         class.
11028         (expand_invoke): Likewise.
11029         * java-tree.h (all_class_list): New global variable declared.
11030         (layout_class_methods, layout_class_method): New function
11031         prototypes.
11032         (LAYOUT_SEEN_CLASS_METHODS): New macro.
11033         * jcf-parse.c (all_class_list): New global variable.
11034         (load_class): Extended what class_or_name can be. Use parser
11035         context mechanism to save globals before calling jcf_parse.
11036         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
11037         is set on the file name.
11038         (jcf_parse): Layout class methods when Object is loaded, otherwise
11039         record class in all_class_list for delayed method layout.
11040         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
11041         * lang.c (put_decl_node): Decode <init> into the decl context
11042         class name.
11043         * lex.c (java_allocate_new_line): Use xmalloc.
11044         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
11045         pointers, not TREE_LIST elements.
11046         (struct parser_ctxt): Fixed comment indentations, added comments
11047         and reordered some fields.
11048         (java_check_methods): Function prototype removed.
11049         * parse.y (java_push_parser_context): Use xmalloc.
11050         (java_parser_context_restore_global): Pop extra pushed ctxp only
11051         when there's nothing next.
11052         (maybe_create_class_interface_decl): Fixed comment, add new
11053         created class decl to all_class_list.
11054         (method_header): Use GET_REAL_TYPE on argument's types.
11055         (method_declarator): Use GET_REAL_TYPE, change type to the real
11056         type in TREE_LIST dependency node. Build argument list with the
11057         real type.
11058         (create_jdep_list): Use xmalloc. Removed allocation error message.
11059         (obtain_incomplete_type): Fixed leading comment. Broadened
11060         incoming argument meaning.
11061         (register_incomplete_type): Use xmalloc. Removed allocation error
11062         message.
11063         (safe_layout_class): Fixed leading comment.
11064         (jdep_resolve_class): Reversed if statement condition and switch
11065         if and else bodies.
11066         (resolve_and_layout): Fixed leading comment. Broadened incoming
11067         argument meaning.
11068         (complete_class_report_errors): New local variable name, for
11069         clarity. purify_type_name used for all error cases.
11070         (java_get_real_method_name): Stricter check on constructors.
11071         (java_check_regular_methods): Reverse methods list only if not
11072         already laid out. Layout artificial constructor.
11073         (java_check_methods): Deleted.
11074         (source_start_java_method): Obtain incomplete type for patchable
11075         method arguments.
11076         (java_layout_classes): Fixed leading comment. Use
11077         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
11078         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
11079         before returning. Fixed comments.
11080         (java_expand_classes): Check for errors up front.
11081         (patch_method_invocation): Class to search is resolved and laid
11082         out.
11083
11084 1998-11-24  Per Bothner  <bothner@cygnus.com>
11085
11086         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
11087
11088         * javaop.h (int8):  Removed - not used.
11089         (jbyte):  Redefine portably with correct signedness.
11090
11091         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
11092
11093         * jcf-write.c (generate_bytecode_insns):  Fix typo
11094         OPCODE_getstatic to OPCODE_getfield.
11095
11096         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
11097         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
11098         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
11099
11100 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11101
11102         * jcf-parse.c (jcf_parse_source): Function returned type is
11103         void. Added prototype.
11104         (jcf_parse): Function returned type is void.
11105         (yyparse): Remove call to fclose on the last parsed file.
11106
11107         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
11108
11109 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11110
11111         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
11112         (layout_class): Cope with methods featuring WFL in decl names.
11113         * decl.c (unqualified_object_id_node): New global variable,
11114         initialized.
11115         (build_decl_no_layout): Removed.
11116         * expr.c (build_primtype_type_ref): Handle Double.
11117         (java_lang_expand_expr): Fixed indentations.
11118         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
11119         (flag_wall, flag_redundant, flag_not_overriding,
11120         flag_static_local_jdk1_1, unqualified_object_id_node): Global
11121         variable declarations.
11122         (build_decl_no_layout): Removed prototype.
11123         (java_get_real_method_name): Added prototype.
11124         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
11125         (java_parse_abort_on_error): Macro now just returns.
11126         * jcf-parse.c (jcf_parse_source): Check fclose returned
11127         value. Call emit_register_classes if java_report_errors returns
11128         zero.
11129         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
11130         flag_static_local_jdk1_1): New integer flags.
11131         (lang_decode_option): New flags set here.
11132         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
11133         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
11134         the flag_redundant variable.
11135         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
11136         when parsing java.lang.Object class.
11137         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
11138         NULL_TREE to build.
11139         (resolve_qualified_expression_name): Fixed indentation.
11140         (patch_array_ref): Changed prototype.
11141         (not_initialized_as_it_should_p): Prototype removed.
11142         (java_report_errors): Added function prototype.
11143         * parse.y (formal_parameter:): Changed error message for not yet
11144         supported final parameters.
11145         (class_type_list:): Set both PURPOSE and VALUE of created
11146         TREE_LIST to be class_type.
11147         (primary_no_new_array:): Handle class literals on primitive types.
11148         (parse_warning_context): Reinstalled correct force_error and
11149         do_warning flags setups.
11150         (java_report_errors): Changed prototype. Return java_error_count
11151         value.
11152         (variable_redefinition_error): Consider treating variable type as
11153         a fake pointer.
11154         (create_interface): Warn about redundant abstract modifier if
11155         flag_redundant is set. Changed error message.
11156         (lookup_field_wrapper): Save/restore globals before/after looking
11157         up field.
11158         (duplicate_declaration_error_p): Consider treating declaration
11159         type as a fake pointer.
11160         (register_fields): Extract real type from dependency node. Check
11161         for duplicate field declaration after type adjustment. Use
11162         DECL_INITIAL to store static final initialized values.
11163         (method_header): Extract real function type from dependency node.
11164         (check_abstract_method_header): Use GET_METHOD_NAME.
11165         (obtain_incomplete_type): Layout fake pointer type.
11166         (safe_layout_class): Don't try to check for methods before layout.
11167         (java_complete_class): Don't check for correct throws clause
11168         elements inheritance here.
11169         (resolve_and_layout): Broadened name parameter meaning.
11170         (reset_method_name): Use GET_METHOD_NAME.
11171         (java_get_real_method_name): New function.
11172         (java_check_regular_methods): Don't check methods in
11173         java.lang.Object.  Verify lineage of throws clause elements. Use
11174         flag_no_overriding in warning report.
11175         (check_throws_clauses): Don't check if class was from
11176         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
11177         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
11178         (declare_local_variables): Use flag_static_local_jdk1_1 to report
11179         warning on unsupported final local variables. Use build_decl
11180         instead of build_decl_no_layout. Get real local variable type from
11181         dependency node.
11182         (source_start_java_method): Get real parameter type from
11183         dependency node. Call build_decl instead of build_decl_no_layout.
11184         (java_layout_classes): Reverse tree and layout type and class as
11185         required. Mark class as loaded when done.
11186         (resolve_field_access): Fixed indentation. Restricted condition
11187         leading to static field access code generation. Set field_type
11188         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
11189         (resolve_qualified_expression_name): Initialize type_found to
11190         null. Handle static field resolved during qualification. Fixed
11191         layout on non primitive field decl types.
11192         (not_accessible_p): Fixed typo in comment.
11193         (patch_method_invocation): Resolve and layout class to search from
11194         type.
11195         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
11196         layout non primitive type, if necessary. Make method node only to
11197         report errors.
11198         (find_applicable_accessible_methods_list): Consider WFL'ed method
11199         decl names. Fixed indentation.
11200         (argument_types_convertible): Resolve and layout target type if
11201         necessary.
11202         (java_complete_tree): Fixed indentation problems. Rewrote
11203         CALL_EXPR thrown exceptions check. Re-installed further processing
11204         of the assignment in certain cases.
11205         (patch_assignment): Call maybe_build_primttype_type_ref to perform
11206         inlining on class literals.
11207         (valid_builtin_assignconv_identity_widening_p): Cope with constant
11208         0 literal.
11209         (valid_method_invocation_conversion_p): Likewise.
11210         (patch_string): Temporary disable forbidden use of `this' in
11211         explicit constructor invocations when doing string concatenation
11212         within their scope.
11213         (patch_unaryop): Added comment. Reinstalled code to disable
11214         further check on assignment operation with cast expression RHS.
11215         (patch_switch_statement): Fixed indentation.
11216         (build_try_statement): Call build_decl instead of
11217         build_decl_no_layout.
11218         (patch_synchronized_statement): Likewise.
11219         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
11220         IS_UNCHECKED_EXPRESSION_P.
11221         (check_thrown_exceptions_do): Changed leading comment. Resolve and
11222         layout argument exception type.
11223         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
11224         of IS_UNCHECKED_EXPRESSION_P.
11225
11226 1998-11-18  Anthony Green  <green@cygnus.com>
11227
11228         * jcf-parse.c (yyparse): Open class file in binary mode.
11229
11230 1998-11-15  Per Bothner  <bothner@cygnus.com>
11231
11232         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
11233
11234         * jcf-write.c (perform_relocations):  Move check out one loop.
11235
11236 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
11237
11238         * Make-lang.in: Fix reference to srcdir.
11239         * jv-scan.c: Add missing xmalloc prototype.
11240         * jvgenmain.c: Ditto.
11241
11242 1998-11-15  Per Bothner  <bothner@cygnus.com>
11243
11244         * decl.c (error_mark_node), java-tree.h:  New global.
11245         * parse.y:  Use empty_stmt_node instead of size_zero_node.
11246         (build_if_else_statement):  If missing else, use empty_stmt_node.
11247
11248         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
11249         (java_complete_expand_method):  Complain if return is missing.
11250         (java_check_regular_methods):  Comment out incorrect error check.
11251         (not_accessible_p):  Fix incorrect handling of protected methods.
11252         (patch_method_invocation):  Pass correct context to not_accessible_p.
11253         (find_applicable_accessible_methods_list):  Likewise.
11254         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
11255         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
11256         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
11257         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
11258
11259         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
11260         (push_int_const):  Remove reundant NOTE_PUSH.
11261         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
11262         (- case SWITCH_EXPR):  Fix code generation bug.
11263         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
11264         (generate_classfile):  More robust for abstract methods.
11265
11266 1998-11-15  Anthony Green  <green@cygnus.com>
11267
11268         * Makefile.in: jv-scan and jvgenmain all require libiberty.
11269         * Make-lang.in: Ditto.
11270
11271         * jv-scan.c: Remove xmalloc and xstrdup definitions.
11272         * jvgenmain: Ditto.
11273
11274 1998-11-15  Per Bothner  <bothner@cygnus.com>
11275
11276         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
11277
11278         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
11279
11280 1998-11-14  Per Bothner  <bothner@cygnus.com>
11281
11282         Allow uses of interface types to verify.  This is not really
11283         type-safe, but it matches what Sun does, and is OK as long as
11284         there are appropriate run-time checks.
11285         * verify.c (merge_types):  If merging two interface types,
11286         just set the result to java.lang.Object.
11287         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
11288
11289 1998-11-13  Tom Tromey  <tromey@cygnus.com>
11290
11291         * gjavah.c (main): Handle --output-class-directory argument.
11292         * jvspec.c (lang_specific_driver): Translate `-d' into
11293         -foutput-class-dir.
11294         * jcf.h (jcf_write_base_directory): Declare.
11295         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
11296         * lang-options.h: Mention -foutput-class-dir.
11297         * jcf-write.c (jcf_write_base_directory): New global.
11298         (make_class_file_name): Put generated .class file into `-d'
11299         directory, or into source directory if -d not given.  Function now
11300         static.
11301         (write_classfile): Free class file name.  Handle case where class
11302         file name is NULL.
11303         (DIR_SEPARATOR): New macro.
11304         Include <sys/stat.h>
11305
11306         * Makefile.in (prefix): New macro.
11307
11308 1998-11-12  Per Bothner  <bothner@cygnus.com>
11309
11310         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
11311         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
11312         here (done in patch_invoke instead).
11313         (case_identity):  Moved here from parse.y.
11314
11315         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
11316         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
11317         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
11318         so they can be efficiently scanned without recursion.
11319         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
11320         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
11321         in BLOCK iteratively, rather than recursively.
11322
11323         * parse.y (do_unary_numeric_promotion):  New function.
11324         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
11325
11326         * parse.y (patch_newarray):  Various fixes.
11327
11328         Re-do handling of switch statements (for proper block scoping).
11329         * parse.y:  Add just a single block for the enture switch block,
11330         but don't create any "case blocks".
11331         (group_of_labels):  Rmeoved unneeded non-terminal.
11332         CASE_EXPR and DEFAULT_EXPR are added to current block.
11333         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
11334         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
11335         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
11336         * parse.y (wfl_operator, print_int_node): Make non-static.
11337         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
11338         as part of recursive scan of block.
11339         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
11340         (patch_switch_statement):  Most tests move dinto java_complete_tree.
11341
11342         * parse.y:  Make various production be non-typed (void).
11343         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
11344         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
11345         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
11346
11347         * jcf-write.c (struct jcf_handler):  New type.
11348         (struct jcf_switch_state):  New type.
11349         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
11350         (alloc_handler, emit_unop, emit_reloc):  New functions.
11351         (adjust_typed_op):  Add extra parameter ("max type" offset).
11352         (emit_switch_reloc, emit_case-reloc):  New function.
11353         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
11354         (generate_bytecode_insns):  Support REAL_CST, switch statements,
11355         exception handling, method calls, object/array creation, and more.
11356
11357         * class.c:  Remove some unused variables.
11358         * constants.c (find_string_constant):  New function.
11359         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
11360         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
11361         if flag_emit_class_files.
11362
11363 1998-11-12  Tom Tromey  <tromey@cygnus.com>
11364
11365         * jcf-io.c (find_class): Added explanatory comment.
11366
11367         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
11368         trailing slash to `.zip' entries.
11369
11370         * jvspec.c (lang_specific_driver): Correctly handle case where
11371         GC_NAME not defined.
11372
11373 1998-11-11  Tom Tromey  <tromey@cygnus.com>
11374
11375         * jvspec.c (GC_NAME): New define.
11376         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
11377         if required.
11378         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
11379
11380 1998-11-11  Per Bothner  <bothner@cygnus.com>
11381
11382         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
11383
11384 1998-11-11  Tom Tromey  <tromey@cygnus.com>
11385
11386         * jcf-dump.c (main): Correctly recognize `--'-style long options.
11387
11388 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11389
11390         * class.c (is_compiled_class): Call safe_layout_class for class
11391         compiled from source.
11392         * conver.h (convert_to_integer, convert_to_real,
11393         convert_to_pointer): Added prototypes.
11394         * decl.c (init_decl_processing): Non longer push the decls of
11395         `methodtable', `constants', `Class', `Field', `dispatchTable'
11396         `jexception' and `Method'.
11397         * expr.c (build_invokeinterface): New function.
11398         (expand_invoke): static variable CLASS_IDENT now in
11399         build_invokeinterface. Use build_invokeinterface.
11400         (expand_java_field_op): Moved code to inline
11401         java.lang.PRIMTYPE.TYPE into a function.
11402         (build_primtype_type_ref): New function.
11403         * java-tree.def (INSTANCEOF_EXPR): New tree code.
11404         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
11405         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
11406         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
11407         (DECL_LOCAL_STATIC_VALUE): New macro.
11408         (build_invokeinterface, build_primtype_type_ref): New function
11409         prototypes.
11410         (java_parse_abort_on_error): Macro rewritten.
11411         * jcf-parse.c (current_method): Add comment to declaration.
11412         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
11413         Function prototypes fixed.
11414         (jcf_parse_source): push/pop parser context. save/restore global.
11415         (parse_source_file): Fixed leading comment. Now take a
11416         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
11417         classes and pop the parser context anymore.
11418         (yyparse): Push parser context, save globals, parse the source
11419         file, restore globals and pop the parser context when processing a
11420         source file.
11421         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
11422         * lex.c (java_parse_doc_section): New function.
11423         (java_lex): Call java_parse_doc_section when appropriate. Build an
11424         operator around INSTANCEOF_TK.
11425         * lex.h (java_lineterminator, java_sprint_unicode,
11426         java_unicode_2_utf8, java_lex_error, java_store_unicode):
11427         Prototypes rewritten.
11428         (java_parse_escape_sequence, java_letter_or_digit_p,
11429         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
11430         java_read_unicode, java_store_unicode, java_read_char,
11431         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
11432         Added function prototypes.
11433         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
11434         define.
11435         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
11436         New macros
11437         (struct parser_ctxt): New fields: deprecated,
11438         current_parsed_class_un, gclass_list.
11439         (fix_method_argument_names, issue_warning_error_from_context,
11440         resolve_package, lookup_package_type): New function prototypes.
11441         (resolve_expression_name): Fixed function prototype.
11442         (find_applicable_accessible_methods_list): Fixed indentation, added
11443         extra argument in prototype.
11444         (check_final_assignment, build_null_of_type, check_deprecation,
11445         check_method_redefinition, reset_method_name,
11446         java_check_regular_methods, java_check_abstract_methods,
11447         maybe_build_primttype_type_ref): New function prototype.
11448         * parse.y (conver.h): Include.
11449         (INSTANCEOF_TK): Tagged <operator>.
11450         (single_type_import_declaration): Use REGISTER_IMPORT macro.
11451         (relational_expression:): Build binop for instanceof.
11452         (java_push_parser_context): Remember ctxp->gclass_list across
11453         contexts.
11454         (java_pop_parser_context): Simply return if no context
11455         exists. Remember gclass_list across contexts.
11456         (issue_warning_error_from_context): New function.
11457         (parse_error_context): Don't setup ctxp->elc here. Call
11458         issue_warning_error_from_context instead.
11459         (parse_warning_context): Likewise.
11460         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
11461         setup. Link new class/interface to ctxp->gclass_list.
11462         (add_superinterfaces): Register interface as incomplete if not
11463         loaded.
11464         (create_class): Remember class unqualified name in
11465         ctxp->current_parsed_class_un. Check class deprecation.
11466         (register_fields): Check field deprecation. Remember static final
11467         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
11468         processing INIT.
11469         (method_header): New local variable ORIG_ARG. Use unqualified
11470         current class name for check on constructor errors. Promote return
11471         type if of record type. Argument list fix moved in
11472         fix_method_argument_names, called here. Check method deprecation.
11473         (fix_method_argument_names): New function.
11474         (method_declarator): Promote record typed arguments.
11475         (safe_layout_class): Check class methods before layout.
11476         (java_complete_class): Compute field layout when patched.
11477         (do_resolve_class): Try to load class after having it renamed
11478         after the package name.
11479         (get_printable_method_name): Use DECL_CONTEXT.
11480         (reset_method_name): New function.
11481         (check_method_redefinition): Use reset_method_name.
11482         (java_check_regular_methods): New local variable
11483         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
11484         names for error report. Check for compile-time error when method
11485         found has default (package) access.
11486         (java_check_abstract_methods): Now takes an interface DECL node as
11487         an argument. Also reinstall real name on unchecked
11488         overriding/hiding methods for error report.
11489         (java_check_methods): Fixed leading comment. Get classes to verify
11490         from ctxp->gclass_list. Use CHECK_METHODS macro and set
11491         CLASS_METHOD_CHECKED_P on class verification.
11492         (lookup_java_method2): Get real method name if necessary.
11493         (find_in_imports): Don't check package class access here.
11494         (resolve_package, lookup_package_type): New functions.
11495         (java_layout_classes): Fixed leading comment. Take classes to be
11496         laid out from ctxp->gclass_list.
11497         (java_complete_expand_methods): Don't expand native and abstract
11498         methods.
11499         (java_expand_classes): New function.
11500         (resolve_expression_name): Use additional argument ORIG.  Retrieve
11501         values of static final field of primitive types.
11502         (resolve_field_access): Handles static final field of promotive
11503         type.
11504         (resolve_qualified_expression_name): Handle STRING_CST as
11505         primaries and package name resolution. Check deprecation on found
11506         decls. Set where_found and type_found on non static field resolved
11507         during qualification. Layout non primitive field decl types.
11508         (check_deprecation): New function.
11509         (maybe_access_field): Simplified.
11510         (patch_method_invocation_stmt): Local variable CLASS_TYPE
11511         removed. Reverse method's argument when primary is a type. Don't
11512         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
11513         instead. Include abstract class in the list of class searchable
11514         for constructors. Use DECL_CONTEXT of found method for access
11515         checks. Check method deprecation.
11516         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
11517         converting arguments. Handle INVOKE_INTERFACE.
11518         (lookup_method_invoke): Search constructor using existing
11519         infrastructure (don't rely on lookup_java_constructor anymore).
11520         (find_applicable_accessible_methods_list): Extra argument flag
11521         LC. Now include constructor in the search.
11522         (qualify_ambiguous_name): Conditional expression are primaries.
11523         (not_initialized_as_it_should_p): static final are always
11524         initialized.
11525         (java_complete_tree): Pass extra NULL argument to
11526         resolve_expression_name. Stricter test to carry on patching
11527         assignments. New case for INSTANCEOF_EXPR.
11528         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
11529         (check_final_assignment, maybe_build_primttype_type_ref): New
11530         functions.
11531         (patch_assignment): Detect resolved static finals and carry normal
11532         assignment error check on them. Inline PRIMTYPE.TYPE read access.
11533         (try_builtin_assignconv): Access constant 0 on all primitive
11534         types.
11535         (valid_builtin_assignconv_identity_widening_p): Accept identical
11536         types. Accept all promoted type on int type.
11537         (valid_ref_assignconv_cast_p): Accept a null pointer to be
11538         assigned to a reference.
11539         (valid_method_invocation_conversion_p): Accept to check null
11540         pointers.
11541         (build_binop): Merge declaration and initialization of local
11542         variable BINOP.
11543         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
11544         numeric types. Improved validity test for qualify operators on
11545         references.
11546         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
11547         and PREINCREMENT_EXPR. Also detect resolved static finals of a
11548         primitive type and issue the appropriate error message.
11549         (resolve_type_during_patch): Mark class loaded when resolved.
11550         (patch_cast): Allow null to be cased to reference types.
11551         (build_null_of_type): New function.
11552         (patch_array_ref): Handle array on references correctly.
11553         (patch_return): Removed unused local variable MODIFY. Force
11554         boolean to be returned as integers. Allows null to be returned by
11555         a function returning a reference.
11556         * typeck.c (convert_to_integer, convert_to_real,
11557         convert_to_pointer): Prototypes moved to convert.h
11558         (lookup_argument_method): Use method real name, if necessary.
11559
11560 1998-10-30  Tom Tromey  <tromey@cygnus.com>
11561
11562         * class.c (build_class_ref): Changed name of primitive classes to
11563         start with `_Jv_'.
11564
11565         * class.c (make_class_data): Renamed fields: nmethods to
11566         method_count, method_count to dtable_method_count.  Always set
11567         `state' field to 0.
11568         * decl.c (init_decl_processing): Likewise.
11569
11570 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11571
11572         * class.c (layout_class): Don't mangle <finit>, produce
11573         __finit<class> instead. Don't verify artificial methods.
11574         * decl.c (finit_identifier_node): New declared global.
11575         (init_decl_processing): finit_identifier_node initialized.
11576         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
11577         * java-tree.h (finit_identifier_node): Declared as extern.
11578         (struct lang_decl): New field called_constructor.
11579         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
11580         (CLASS_HAS_FINIT_P): New macro.
11581         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
11582         explicit constructor invocation.
11583         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
11584         CALL_SUPER_CONSTRUCTOR_P): New macros.
11585         (write_classfile): Added prototype.
11586         * jcf-parse.c (jcf_parse_source): Parse and remember for
11587         generation if the file was seen on the command line.
11588         (parse_source_file): Don't write the class file here.
11589         (yyparse): Loop on files rewritten. Set current_jcf.
11590         (parse_zip_file_entries): Parse class file only if it was found.
11591         * lang.c (init_parse): Don't open command line provided filename
11592         here.
11593         (lang_parse): Don't set main_jcf anymore.
11594         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
11595         (JCONSTRUCTOR_CHECK): New macro.
11596         (JBSC_TYPE_P): New macro.
11597         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
11598         (COMPLETE_CHECK_OP_2): New macro.
11599         (struct parse_ctxt): New field explicit_constructor_p.
11600         (check_class_interface_creation): Fixed prototype indentation.
11601         (patch_method_invocation_stmt): Prototype reflects added argument.
11602         (patch_invoke): Likewise.
11603         (complete_method_declaration, build_super_invocation,
11604         verify_constructor_circularity,
11605         build_this_super_qualified_invocation, get_printable_method_name,
11606         patch_conditional_expr, maybe_generate_finit, fix_constructors,
11607         verify_constructor_super, create_artificial_method,
11608         start_artificial_method_body, end_artificial_method_body,
11609         generate_field_initialization_code): New function prototypes.
11610         * parse.y: Fixed leading comment
11611         (constructor_header:, constructor_body:, block_end:): Rules tagged
11612         <node>.
11613         (type_declaration:): Call maybe_generate_finit.
11614         (method_declaration:): Action for method_body: placed in new
11615         function complete_method_declaration, called here.
11616         (constructor_declaration:): Defined actions. Removed leading
11617         FIXME.
11618         (constructor_header:): New rule with action.
11619         (constructor_body:): Rule rewritten using block_begin: and
11620         block_end:. Defined actions.
11621         (constructor_declarator:, explicit_constructor_invocation:):
11622         Defined actions.
11623         (block:): Use new rules block_begin: block_end:.
11624         (block_begin:, block_end:): New rules and actions.
11625         (block_statements:): Fixed error message for explicit
11626         constructors.
11627         (method_invocation:): Call build_this_super_qualified_invocation
11628         if primary is `this' or `super' was seen.
11629         (conditional_expression:): Action defined.
11630         (extra_ctxp_pushed_p): New static global flag.
11631         (java_parser_context_save_global): Create parser context if
11632         necessary. Use extra_ctxp_pushed_p to remember it.
11633         (java_parser_context_restore_global): Pop extra parser context if
11634         one exists.
11635         (build_array_from_name): Array on primitive types are marked
11636         loaded.
11637         (register_fields): Restore new name in field initializer
11638         expression if type was altered. Non static fields initialized upon
11639         declaration marked initialized.
11640         (maybe_generate_finit): New function.
11641         (maybe_generate_clinit): Use create_artificial_method,
11642         start_artificial_method_body, end_artificial_method_body. Generate
11643         debug info for enclosed initialization statements.
11644         (method_header): Fixed leading comment. Check constructor
11645         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
11646         accordingly.
11647         (complete_method_declaration, constructor_circularity_msg,
11648         verify_constructor_circularity): New functions.
11649         (get_printable_method_name): New function.
11650         (check_method_redefinition): Don't rename <finit> methods. Fix
11651         declared constructor names. Error message for
11652         constructors modified.
11653         (java_check_regular_methods): Local variable seen_constructor
11654         renamed saw_constructor. Skip verification on constructors. Create
11655         default constructor with create_artificial_method.
11656         (java_check_methods): Removed unnecessary empty line.
11657         (create_artificial_method, start_artificial_method_body,
11658         end_artificial_method_body): New functions.
11659         (java_layout_classes): Changed leading comment. Reverse fields
11660         list if necessary. Always layout java.lang.Object if being
11661         defined.
11662         (java_complete_expand_methods): Verify constructor circularity.
11663         (java_complete_expand_method): Call fix_constructor on
11664         constructors.  Local variable no_ac_found removed. Restore
11665         bindings if method body expansion failed.
11666         (fix_constructors, verify_constructor_super,
11667         generate_field_initialization_code): New function.
11668         (java_expand_classes): Fixed leading comment. Write class file
11669         here.
11670         (resolve_expression_name): Check for illegal instance variable
11671         usage within the argument scope of an explicit constructor
11672         invocation.
11673         (resolve_qualified_expression_name): Pass extra from_super flag
11674         when invoking patch_method_invocation_stmt. New case for
11675         conditional expression when used as a primary. Check for error
11676         when acquiring super.
11677         (patch_method_invocation_stmt): Added extra argument super. New
11678         local variable is_static_flag. Set class_to_search according to
11679         the nature of the constructor invocation. Don't add `this'
11680         argument when expanding NEW_CLASS_EXPR. Check for illegal method
11681         invocation within the argument scope of explicit constructor
11682         invocation. Set is_static according to is_static_flag. Provide
11683         extra `super' argument to patch_invoke invocation.
11684         (patch_invoke): New argument from_super. Loop on arguments
11685         indentation fixed. Pass from_super to invocation_mode. New switch
11686         case INVOKE_SUPER. Fixed error message in switch default case.
11687         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
11688         value.
11689         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
11690         (lookup_method_invoke): Fixed prototypes in candidates list. Error
11691         message takes constructors into account.
11692         (find_applicable_accessible_methods_list): Fixed indentation.
11693         (qualify_ambiguous_name): Take explicit constructor invocation
11694         into account. Deal with a conditional expression as a primary to
11695         a method call.
11696         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
11697         case. Added extra argument to patch_method_invocation_stmt.
11698         Register calls made to explicit constructor `this'. Don't call
11699         save_expr in ARRAY_REF case when emitting class files. Check for
11700         illegal use of this when expanding explicit constructor invocation
11701         arguments.
11702         (complete_function_arguments): Set and reset parser context
11703         explicit_constructor_p field value when appropriate.
11704         (build_super_invocation, build_this_super_qualified_invocation):
11705         New functions.
11706         (patch_assignment): Fixed typo.
11707         (patch_unaryop): Check on final fields occurs only when a decl
11708         exits.
11709         (patch_return): Take constructors into account.
11710         (patch_conditional_expr): New function.
11711         * typeck.c (build_java_signature): Removed unnecessary empty line.
11712
11713 1998-10-28  Jeffrey A Law  (law@cygnus.com)
11714
11715         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
11716
11717 1998-10-28  Tom Tromey  <tromey@cygnus.com>
11718
11719         * decl.c (init_decl_processing): Renamed fields.
11720         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
11721         interface_len, msize fields.
11722
11723         * class.c (make_class_data): Removed subclass_head and
11724         subclass_next fields.
11725         * decl.c (init_decl_processing): Removed subclass_head and
11726         subclass_next fields.
11727
11728 1998-10-28  Jeffrey A Law  (law@cygnus.com)
11729
11730         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
11731         * mangle.c (emit_unicode_mangled_name): Similarly.
11732
11733 1998-10-26  Nick Clifton  <nickc@cygnus.com>
11734
11735         * jcf-parse.c (get_constant): Place braces around code to compute
11736         'd' when REAL_ARITHMETIC is not defined.
11737
11738 1998-10-25  H.J. Lu  (hjl@gnu.org)
11739
11740         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
11741         dependency.
11742
11743 1998-10-23  Tom Tromey  <tromey@cygnus.com>
11744
11745         * lang-specs.h: `.zip' files are input to jc1.
11746
11747 1998-10-22  Per Bothner  <bothner@cygnus.com>
11748
11749         * jvspecs.c:  Add (but don't enable) support for combining multiple
11750         .class and .java input filenames to a single jc1 invocation.
11751         Add support for -C flag (copile to .class files).
11752         Translate -classpath and -CLASSPATH arguments.
11753         * lang-specs.h:  Don't set %2 spec.
11754
11755 1998-10-22  Tom Tromey  <tromey@cygnus.com>
11756
11757         * jcf-path.c (add_entry): Don't add trailing separator if entry is
11758         a .zip file.
11759         (add_path): Don't add trailing separator to non-empty path
11760         elements.
11761
11762         * lang.c (lang_decode_option): Check for -fclasspath and
11763         -fCLASSPATH before examining other `-f' options.
11764
11765         * java-tree.h (finalize_identifier_node): Don't declare.
11766         * class.c (make_class_data): Don't push "final" field.
11767         * decl.c (init_decl_processing): Don't push "final" field.
11768         (finalize_identifier_node): Removed.
11769         (init_decl_processing): Don't set finalize_identifier_node.
11770
11771         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
11772
11773 1998-10-11  Anthony Green  <green@cygnus.com>
11774
11775         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
11776         (JV_SCAN_SOURCES): New macro.
11777         (JCF_DUMP_SOURCES): Likewise.
11778         (jcf-dump$(exeext)): New target.
11779         (jv-scan$(exeext)): New target.
11780
11781 1998-10-22  Tom Tromey  <tromey@cygnus.com>
11782
11783         * Makefile.in (LEX): Removed.
11784         (LEXFLAGS): Likewise.
11785         (SET_BISON): New macro.
11786         (BISON): Removed.
11787         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
11788         spurious diffs in parse.c.
11789         ($(PARSE_SCAN_C)): Likewise.
11790         (PARSE_DIR): New macro.
11791         (PARSE_C): Use it.
11792         (PARSE_SCAN_C): Likewise.
11793         (PARSE_RELDIR): New macro.
11794
11795         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
11796
11797         * jcf-io.c (find_class): Use saw_java_source to determine when to
11798         look for `.java' file.
11799         * jcf-parse.c (saw_java_source): New global.
11800         (yyparse): Set it if `.java' file seen.
11801
11802         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
11803         (GCJH_SOURCES): Likewise.
11804         * Makefile.in (datadir): New macro.
11805         (libjava_zip): Likewise.
11806         (JAVA_OBJS): Added jcf-path.o.
11807         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
11808         (../gcjh$(exeext)): Likewise.
11809         (jcf-path.o): New target.
11810         * java-tree.h (fix_classpath): Removed decl.
11811         * jcf-parse.c (fix_classpath): Removed.
11812         (load_class): Don't call fix_classpath.
11813         * parse.y (read_import_dir): Don't call fix_classpath.
11814         * lex.h: Don't mention classpath.
11815         * lex.c (java_init_lex): Don't initialize classpath.
11816         * jcf-io.c (classpath): Removed global.
11817         (find_class): Use jcf_path iteration functions.  Correctly search
11818         class path for .java file.
11819         (open_in_zip): New argument `is_system'.
11820         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
11821         classpath-related options.
11822         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
11823         and -I.
11824         (lang_init): Call jcf_path_init.
11825         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
11826         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
11827         Correctly put braces around second string in each entry.
11828         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
11829         classpath-related options.
11830         (help): Updated for new options.
11831         * jcf.h: Declare functions from jcf-path.c.  Don't mention
11832         `classpath' global.
11833         * jcf-path.c: New file.
11834
11835         * jcf-depend.c: Include jcf.h.
11836
11837         * jcf-write.c (localvar_alloc): Returns `void'.
11838         (localvar_free): Removed unused variable.
11839
11840         * lang.c (OBJECT_SUFFIX): Define if not already defined.
11841         (init_parse): Use OBJECT_SUFFIX, not ".o".
11842
11843 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11844
11845         * class.c (emit_register_classes): Renamed from
11846         emit_register_class.
11847         * java-tree.h (emit_register_classes): Prototype renamed from
11848         emit_register_class.
11849         * jcf-parse.c (yyparse): Call emit_register_classes once before
11850         returning.
11851         * parse.y (java_expand_classes): No longer register classes.
11852
11853 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11854
11855         * class.c (is_compiled_class): New local variable
11856         seen_in_zip. Identify classes found in currently compiled source
11857         file(s).
11858         * decl.c (complete_start_java_method): Fixed typo.
11859         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
11860         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
11861         (CLASS_P): Moved around.
11862         (java_parse_abort_on_error): Macro moved from jcf-parse.c
11863         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
11864         java-parse.h
11865         (jcf_parse_source): Changed leading comment. Removed unnecessary
11866         fclose and CLASS_FROM_SOURCE_P marking.
11867         (parse_source_file): New local variables remember_for_generation
11868         and filename. Mark parsed file name identifier node. Removed block
11869         executed when parse_only was null. Set remember_for_generation.
11870         Use it as an argument to java_pop_parser_context.
11871         (yyparse): New local variables several_files, list, next node and
11872         current_file_list. Split ampersand separated file names into
11873         current_file_list. Iterate through the list and parse accordingly.
11874         * parse.h (java_pop_parser_context): New function prototype.
11875         * parse.y (ctxp_for_generation): New static global variable.
11876         (java_pop_parser_context): New argument generate. Link popped ctxp
11877         to ctxp_for_generation list accordingly.
11878         (java_complete_expand_methods): Fixed indentation.
11879         (java_expand_classes): New function.
11880
11881 1998-10-17  Per Bothner  <bothner@cygnus.com>
11882
11883         * Makefile.in:  Link with libiberty.a instead of memmove.o.
11884
11885 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11886
11887         * lex.c (setjmp.h): No longer included.
11888         * lex.h (setjmp.h): Included.
11889         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
11890         (duplicate_declaration_error_p): Renamed from
11891         duplicate_declaration_error.
11892         (build_array_from_name): New function prototype.
11893         * parse.y (setjmp.h): No longer included.
11894         (variable_declarator_id): Define action.
11895         (build_array_from_name): New function.
11896         (duplicate_declaration_error_p): Renamed from
11897         duplicate_declaration_error.  Fixed leading comment.
11898         (register_fields): Main `for' loop reorganized. Uses
11899         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
11900         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
11901         build_array_from_name.
11902         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
11903         types.
11904         (read_import_dir): Don't try to skip `.' and `..'.
11905         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
11906         build_array_from_name. Main `for' loop reorganized.
11907         (resolve_qualified_expression_name): When building access to a
11908         field, use the type where the field was found, not its own type.
11909         (maybe_access_field): Use field DECL_CONTEXT if the type where the
11910         field was found is null.
11911         (qualify_ambiguous_name): Sweep through all successive array
11912         dimensions.
11913
11914 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11915
11916         * java-tree.h (pop_labeled_block, lang_printable_name,
11917         maybe_add_interface, set_super_info, get_access_flags_from_decl,
11918         interface_of_p, inherits_from_p, fix_classpath,
11919         complete_start_java_method, emit_handlers, init_outgoing_cpool,
11920         make_class_data, register_class, alloc_name_constant): New
11921         function prototypes.
11922         * lang.c (lang_decode_option): Set argc argument unused. Fixed
11923         indentation. Added cast to remove warning.
11924         (lang_printable_name): Set v argument unused.
11925         (lang_print_error): Added argument to lang_printable_name call.
11926         (java_dummy_print, print_lang_decl, print_lang_type,
11927         print_lang_identifier, lang_print_xnode): All argument marked
11928         unused.
11929         * lex.c (java_unget_unicode): Removed unnecessary argument.
11930         (java_allocate_new_line): Unused local variable is gone.
11931         (java_read_char): Added parenthesis in expressions to remove
11932         warnings.  Added final return statement.
11933         (java_read_unicode): Added parenthesis in expression to remove
11934         warning.
11935         (java_parse_end_comment): Fixed java_unget_unicode invocation.
11936         (java_parse_escape_sequence): Likewise.
11937         (java_lex): Unused local variables are gone. Fixed
11938         java_unget_unicode invocation.
11939         * lex.h (set_float_handler): Prototype added when JC1_LITE not
11940         defined.
11941         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
11942         lang_printable_name invocation in macro.
11943         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
11944         Likewise.
11945         (duplicate_declaration_error): Suppressed unused argument in
11946         prototype.
11947         (identical_subpath_p): Function declaration is gone.
11948         (patch_invoke): Suppressed unused argument in prototype.
11949         (patch_cast, build_labeled_block, check_thrown_exceptions):
11950         Likewise.
11951         * parse.y (setjmp.h): Included
11952         (toplev.h): Likewise.
11953         (field_declaration:): Suppressed unused local
11954         (label_decl:): Fixed build_labeled_block invocation.
11955         (java_pop_parser_context): Put extra parenthesis around assignment
11956         in if.
11957         (yyerror): Suppressed unused local variables.
11958         (variable_redefinition_error): Fixed lang_printable_name
11959         invocation.
11960         (create_interface): Suppressed unused local variables.
11961         (create_class): Likewise.
11962         (duplicate_declaration_error): Suppressed unused argument. Fixed
11963         lang_printable_name invocation.
11964         (register_fields): Suppressed unused local variable. Fixed
11965         duplicate_declaration_error invocation.
11966         (method_header): Suppressed unused local variable.
11967         (method_declarator, parser_check_super): Likewise.
11968         (java_complete_class): Suppressed unused local variable. Fixed
11969         fatal error message.
11970         (complete_class_report_errors): Added default: in switch.
11971         (java_check_regular_methods): Fixed lang_printable_name
11972         invocations.
11973         (check_throws_clauses): Likewise.
11974         (java_check_abstract_methods): Suppressed unused local
11975         variable. Fixed lang_printable_name invocation.
11976         (read_import_entry): Added supplemental return statement.
11977         (read_import_dir): Suppressed unused local variables.
11978         (check_pkg_class_access, declare_local_variables): Likewise.
11979         (source_start_java_method): Suppressed unused extern variable
11980         declarations
11981         (expand_start_java_method): Suppressed unused extern and local
11982         variable declarations.
11983         (java_complete_expand_methods): Likewise.
11984         (java_complete_expand_method): Suppressed unused local variables.
11985         (make_qualified_name): Likewise.
11986         (resolve_qualified_expression_name): Added default: in
11987         switch. Fixed lang_printable_name invocation.
11988         (class_instance_creation_expression): Added parenthesis around
11989         expressions.
11990         (patch_method_invocation_stmt): Fixed lang_printable_name and
11991         patch_invoke invocations.
11992         (check_for_static_method_reference): Fixed lang_printable_name
11993         invocation.
11994         (patch_invoke): Suppressed unused arguments and local variables.
11995         (lookup_method_invoke): Suppressed unused local variables.
11996         (qualify_ambiguous_name): Added default: in switch.
11997         (identical_subpath_p): Function removed.
11998         (patch_assignment): Suppressed unused local variables. Suppressed
11999         unnecessary if statement. Fixed lang_printable_name invocations.
12000         (try_builtin_assignconv): Fixed lang_printable_name invocations.
12001         (valid_ref_assignconv_cast_p): Parenthesis around
12002         expression. Suppressed unused local variables.
12003         (build_binop): Suppressed unused local variables. fixed
12004         lang_printable_name invocations.
12005         (string_constant_concatenation): Suppressed unused local
12006         variables.
12007         (patch_unaryop): Fixed lang_printable_name invocation.
12008         (patch_cast): Suppressed unnecessary argument. Fixed
12009         lang_printable_name invocation.
12010         (patch_array_ref): Fixed lang_printable_name invocation.
12011         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
12012         (build_labeled_block): Suppressed unused argument.
12013         (generate_labeled_block): Fixed build_labeled_block invocation.
12014         (build_loop_body): Suppressed unused local variables.
12015         (patch_loop_statement): Likewise.
12016         (patch_exit): Fixed lang_printable_name invocation.
12017         (patch_switch_statement): Likewise.
12018         (case_identity): First argument marked unused.
12019         (patch_try_statement): Fixed lang_printable_name invocations.
12020         (patch_synchronized_statement, patch_throw_statement): Likewise.
12021         (check_thrown_exceptions): Fixed check_thrown_exceptions and
12022         lang_printable_name invocations.
12023         (check_thrown_exceptions_do): Suppressed unused argument.
12024
12025 1998-10-14  Tom Tromey  <tromey@cygnus.com>
12026
12027         * jcf-write.c (write_classfile): Add output class file as target.
12028         * lang-options.h: Added -MD, -MMD, -M, and -MM.
12029         * jcf.h: Added declarations for dependency-tracking functions.
12030         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
12031         * lang.c (lang_decode_option): Recognize -MD and -MMD.
12032         (finish_parse): Call jcf_dependency_write.
12033         (dependency_tracking): New global.
12034         (DEPEND_SET_FILE): New define.
12035         (DEPEND_ENABLE): New define.
12036         (init_parse): Enable dependency tracking if required.
12037         Include "flags.h".
12038         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
12039         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
12040         (../gcjh$(exeext)): Likewise.
12041         (jcf-depend.o): New target.
12042         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
12043         (GCJH_SOURCES): Likewise.
12044         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
12045         dep_name argument.
12046         (find_classfile): Added dep_name argument.
12047         (find_class): Compute name of dependency.
12048         (open_in_zip): Call jcf_dependency_add_file.
12049         * gjavah.c (output_file): No longer global.
12050         (usage): Don't mention "gjavah".
12051         (help): Likewise.
12052         (java_no_argument): Likewise.
12053         (version): Likewise.
12054         (main): Recognize and handle -M family of options.
12055         (print_mangled_classname): Return is void.
12056         (process_file): Handle case where output is suppressed.
12057         (HANDLE_END_FIELD): Likewise.
12058         (HANDLE_METHOD): Likewise.
12059         * jcf-depend.c: New file.
12060
12061 1998-10-13  Jeffrey A Law  (law@cygnus.com)
12062
12063         * java-tree.def: Add missing newline at EOF.
12064
12065 1998-10-13  Tom Tromey  <tromey@cygnus.com>
12066
12067         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
12068         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
12069         function.
12070         Include <config.h> and "system.h".
12071         (disassemble_method): Undefine RET to avoid clash with
12072         config/i386/i386.h.
12073
12074 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12075
12076         * decl.c (runtime_exception_type_node, error_exception_type_node):
12077         New global variables.
12078         (init_decl_processing): Initialized.
12079         * expr.c (java_lang_expand_expr): Set caught exception type to
12080         null if catch handler argument doesn't exit.
12081         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
12082         tree codes.
12083         * java-tree.h (runtime_exception_type_node,
12084         error_exception_type_node): Global variables declared.
12085         (DECL_FUNCTION_THROWS): New macro.
12086         (DECL_FUNCTION_BODY): Modified comment.
12087         (DECL_SPECIFIC_COUNT): Likewise.
12088         (struct lang_decl): New field throws_list.
12089         (IS_UNCHECKED_EXPRESSION_P): New macro.
12090         * lex.c (java_lex): Generate location information for THROW_TK.
12091         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
12092         EXCEPTIONS_P): New macros.
12093         (enum jdep_code): New value JDEP_EXCEPTION.
12094         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
12095         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
12096         PATCH_METHOD_RETURN_ERROR): New macros.
12097         (patch_method_invocation_stmt): Added new argument to prototype.
12098         (patch_synchronized_statement, patch_throw_statement,
12099         check_thrown_exceptions, check_thrown_exceptions_do,
12100         purge_unchecked_exceptions, check_throws_clauses): New function
12101         prototypes.
12102         * parse.y Fixed typo in keyword section.
12103         (throw:): Rule tagged <node>.
12104         (THROW_TK): Keyword tagged <operator>.
12105         (method_header:): Last argument to call to method_header passed
12106         from throws: rule.
12107         (throws:, class_type_list:, throw_statement:,
12108         synchronized_statement:, synchronized:): Defined actions.
12109         (method_header): New local variable current. Register exceptions
12110         from throws clause.
12111         (java_complete_tree): Complete and verify exceptions from throws
12112         clause.
12113         (complete_class_report_errors): Error message on exceptions not
12114         found
12115         (java_check_regular_methods): Fixed typo. Shortcut on private
12116         overriding methods. Changed error message on method
12117         redefinition. Check for throws clause compatibility.
12118         (check_throws_clauses): New function.
12119         (java_check_abstract_methods): Use DECL_NAME for wfl or current
12120         method. Changed error message on method redefinition.
12121         (currently_caught_type_list): New static variable.
12122         (java_complete_expand_methods): Purge unchecked exceptions from
12123         throws clause list. Call PUSH_EXCEPTIONS before walk and
12124         POP_EXCEPTIONS after.
12125         (resolve_qualified_expression_name): Pass new argument as NULL to
12126         patch_method_invocation_stmt.
12127         (patch_method_invocation_stmt): New argument ref_decl. Invoke
12128         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
12129         argument list when appropriate. Use new argument if non null to
12130         store selected method decl.
12131         (patch_invoke): Convert if necessary args of builtin types before
12132         forming CALL_EXPR. Argument list no longer reversed here.
12133         (invocation_mode): Treat final methods as static methods.
12134         (java_complete_tree): New cases for THROW_EXPR: and
12135         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
12136         function call.
12137         (complete_function_arguments): No more RECORD_TYPE
12138         conversion. Function parameter nodes no longer saved.
12139         (valid_ref_assignconv_cast_p): Avoid handling null type.
12140         (patch_binop): Fixed null constant reference handling.
12141         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
12142         BUILD_THROW macros.
12143         (patch_try_statement): Fixed comments. Record caught types in
12144         list, push the list, expand try block and pop the list.
12145         (patch_synchronized_statement, patch_throw_statement,
12146         check_thrown_exceptions, check_thrown_exceptions_do,
12147         purge_unchecked_exceptions): New functions.
12148         * typeck.c (lookup_argument_method): Allow WFL in place of method
12149         DECL_NAME during method definition check
12150
12151 1998-10-09  Tom Tromey  <tromey@cygnus.com>
12152
12153         * gjavah.c (decode_signature_piece): New function.
12154         (print_c_decl): Use it.  Added `name_override' argument.
12155         (print_method_info): Use name_override argument to print_c_decl.
12156         (seen_fields): Removed.
12157         (print_field_info): Don't update seen_fields.
12158         (struct method_name): New structure.
12159         (method_name_list): New global.
12160         (print_method_info): Add new method to list of methods.
12161         (name_is_method_p): New function.
12162         (print_field_info): If field name has same name as method, then
12163         change field name.
12164         (process_file): Parse methods before fields.
12165         (field_pass): New global.
12166         (HANDLE_END_FIELD): Take field_pass into account.
12167
12168 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12169
12170         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
12171         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12172
12173 1998-10-03  Anthony Green  <green@cygnus.com>
12174
12175         * jvspec.c: Fix bug in jvgenmain_spec patch.
12176
12177 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12178
12179         * Makefile.in (lang.o:): Install dependency on java-tree.def.
12180         * decl.c (soft_exceptioninfo_call_node): New global variable.
12181         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
12182         takes extra integer argument. soft_exceptioninfo_call_node
12183         initialized.
12184         * except.c (java_set_exception_lang_code): New function
12185         (method_init_exceptions): Called here.
12186         (prepare_eh_table_type): New function.
12187         (expand_end_java_handler): Called here.
12188         * expr.c (build_java_throw_out_of_bounds_exception): Now features
12189         one argument. Modified generation of call to
12190         soft_badarrayindex_node to use new argument.
12191         (build_java_arrayaccess): Pass faulty index value to
12192         build_java_throw_out_of_bounds_exception.
12193         (generate_name): New function.
12194         (java_lang_expand_expr): New local variables node, current,
12195         has_finally_p. Expand TRY_EXPR node.
12196         (process_jvm_instruction): Replace top of the stack with thrown
12197         object reference when entering exception handler.
12198         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
12199         specific tree codes.
12200         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
12201         global.
12202         (DECL_SPECIFIC_COUNT): New macro.
12203         (prepare_eh_table_type, java_set_exception_lang_code,
12204         generate_name): New function declarations.
12205         (match_java_method): Declaration deleted.
12206         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
12207         macros.
12208         * lex.c (TRY_TK, CATCH_TK): Generate location information.
12209         * parse.h (redefinition_error, refine_accessible_methods_list,
12210         can_cast_to_p): Function declaration removed.
12211         (classitf_redefinition_error, variable_redefinition_error,
12212         parse_jdk1_1_error, find_applicable_accessible_methods_list,
12213         find_most_specific_methods_list, argument_types_convertible,
12214         enter_a_block, valid_builtin_assignconv_identity_widening_p,
12215         valid_cast_to_p, valid_method_invocation_conversion_p,
12216         try_reference_assignconv, add_stmt_to_compound,
12217         build_jump_to_finally, build_tree_list, patch_try_statement,
12218         java_get_catch_block): New function declarations.
12219         * parse.y (string_buffer_type): Global variable deleted.
12220         (group_of_labels, catches, catch_clause, catch_clause_parameter,
12221         finally): Rules tagged <node>.
12222         (TRY_TK, CATCH_TK): Token tagged <operator>.
12223         (class_body_declaration:, class_member_declaration:,
12224         formal_parameter:, explicit_constructor_invocation:,
12225         interface_member_declaration:, constant_declaration:,
12226         primary_no_new_array:, class_instance_creation_expression:,
12227         array_creation_expression:): Issue error on unsuported JDK1.1
12228         features.
12229         (try_statement:, catches:, finally:): Define actions.
12230         (catch_clause_parameter): New rule.
12231         (catch_clause:): Use new rule catch_clause_parameter.
12232         (parse_jdk1_1_error): New function.
12233         (redefinition_error): Renamed classitf_redefinition_error.
12234         (variable_redefinition_error): New function.
12235         (check_class_interface_creation): Call
12236         classitf_redefinition_error.
12237         (java_complete_tree): Added error message on JDEP_TYPE: case.
12238         (complete_class_report_errors): Fixed indentation.
12239         (declare_local_variables): Call variable_redefinition_error.
12240         (source_end_java_method): Call java_set_exception_lang_code and
12241         emit_handlers where appropriate.
12242         (java_method_add_stmt): Call add_stmt_to_block.
12243         (add_stmt_to_block): New function.
12244         (lookup_method_invoke): Fixed outside comment. new local variable
12245         candicates.  Call find_applicable_accessible_methods_list and
12246         find_most_specific_methods_list when searching for a
12247         method. Modified error report to list possible candidates when
12248         applicable.
12249         (find_applicable_accessible_methods_list,
12250         find_most_specific_methods_list, argument_types_convertible): New
12251         function.
12252         (refine_accessible_methods_list): Function deleted.
12253         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
12254         expr (if applicable) before calling patch_array_ref.
12255         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
12256         (enter_block): Fixed comment.
12257         (enter_a_block): New function.
12258         (patch_assignment): Reorganized. Call try_reference_assignconv for
12259         references. Call valid_cast_to_p instead of can_cast_to_p.
12260         (try_reference_assignconv,
12261         valid_builtin_assignconv_identity_widening_p): New functions.
12262         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
12263         (valid_cast_to_p, valid_method_invocation_conversion_p): New
12264         functions.
12265         (build_string_concatenation): Don't resolve StringBuffer.
12266         (patch_cast): Fixed inverted arguments.
12267         (patch_array_ref): Code to save array expr deleted. Call
12268         valid_cast_to_p instead of can_cast_to_p.
12269         (generate_labeled_block): Call generate_name.
12270         (build_jump_to_finally, build_try_statement, java_get_catch_block,
12271         patch_try_statement): New functions.
12272         * typeck.c (match_java_method): Function deleted.
12273
12274 1998-10-02  Anthony Green  <green@cygnus.com>
12275
12276         * jvspec.c: jvgenmain_spec uses different temporary file names.
12277
12278 1998-10-02  Anthony Green  <green@cygnus.com>
12279
12280         * jvspec.c (lang_specific_driver): Fail if user specifies
12281         --main= when not linking.
12282
12283 1998-09-28  Tom Tromey  <tromey@cygnus.com>
12284
12285         * class.c (make_class_data): Push value for `thread' field.
12286         * decl.c (init_decl_processing): Added `thread' field to class.
12287
12288         * class.c (add_field): Always make static fields externally
12289         visible.
12290
12291 1998-09-26  Anthony Green  <green@cygnus.com>
12292
12293         * expr.c (build_java_athrow,
12294         build_java_throw_out_of_bounds_exception, expand_invoke,
12295         build_newarray, expand_java_multianewarray, build_java_monitor):
12296         Update comments to reflect _Jv_* function names.
12297
12298 1998-09-25  Per Bothner  <bothner@cygnus.com>
12299
12300         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
12301         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
12302         * parse.y (expand_start_java_method):  Likewise.
12303
12304 1998-09-24  Per Bothner  <bothner@cygnus.com>
12305
12306         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
12307
12308         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
12309         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
12310         * expr.c:  Remove no-longer-needed calls to promote_type.
12311         * decl.c (give_name_to_locals):  Liekwise.
12312         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
12313         * parse.y:  Add/remove promote_type calls as appropriate.
12314         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
12315         (parse_signature_string):  Likewise.
12316         (build_java_array_type):  Fix for now signature convenions.
12317
12318         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
12319
12320 1998-09-23  Tom Tromey  <tromey@cygnus.com>
12321
12322         * class.c (init_class_processing): libjava function renamed to
12323         _Jv_RegisterClass.
12324
12325 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12326
12327         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
12328         * java-tree.def: Fixed DEFTREECODE third argument.
12329         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
12330         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
12331         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
12332         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12333         JAVA_THIS_EXPR): Now replaced by tree code definitions.
12334         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
12335         * lang.c (java_tree_code_type, java_tree_code_length,
12336         java_tree_code_name): New arrays.
12337         (lang_init): Append Java tree node definitions to Gcc ones.
12338         * lex.c (expression_obstack): Declared as extern when JC1_LITE
12339         defined.
12340         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
12341         wfl_to_string.
12342         (java_lex): Allow declaration of empty string constants. Retain
12343         location information on CASE_TK and DEFAULT_TK.
12344         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
12345         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
12346         Modified to be more robust.
12347         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
12348         (build_new_invocation, try_builtin_assignconv,
12349         patch_switch_statement, string_constant_concatenation,
12350         build_string_concatenation, patch_string_cst, patch_string,
12351         java_expand_switch): New function declarations.
12352         * parse.y: Rules related to switch and EH tagged <node>.
12353         (label_id): Set to NULL_TREE
12354         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
12355         tree nodes.
12356         (this_or_super:): Fixed indentation.
12357         (statement:, statement_nsi:, statement_without_trailing_substatement:,
12358         statement_expression:): Removed call to RULE on all sub-rules.
12359         (switch_expression:, switch_labels:): New rules.
12360         (switch_statement:, switch_block:, switch_block_statement_groups:,
12361         switch_block_statement_group:, switch_labels:, switch_label:):
12362         Defined actions.
12363         (throw_statement:, synchronized_statement:, try_statement:):
12364         Defined temporary actions.
12365         (class_instance_creation_expression:): Call
12366         build_new_invocation. Fixed indentation.
12367         (field_access): Fixed indentation.
12368         (method_invocation): Likewise.
12369         (make_qualified_primary): Use THIS_EXPR.
12370         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
12371         resolving from SUPER, set *type_found.
12372         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
12373         (java_complete_tree): Removed unused local variable `location'. Case
12374         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
12375         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
12376         on MODIFY_EXPR: and all binary operator tree code cases. Removed
12377         STRING_CST: case. default: checks for patchable strings.
12378         (complete_function_arguments): Transform string constant or
12379         crafted StringBuffer if necessary.
12380         (build_method_invocation): Fixed comments.
12381         (build_new_invocation): New function.
12382         (patch_assignment): Call try_builtin_assignconv to figure a valid
12383         assignment conversion between builtin types.
12384         (try_builtin_assignconv): New function.
12385         (build_binop): Use URSHIFT_EXPR directly to call build.
12386         (operator_string): Use UNARY_PLUS_EXPR.
12387         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
12388         operator.
12389         (do_merge_string_cste, merge_string_cste,
12390         string_constant_concatenation, build_string_concatenation,
12391         patch_string, patch_string_cst): New function.
12392         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
12393         (patch_unaryop): Likewise. New test of valid ++/-- operands.
12394         (build_newarray_node): Use NEW_ARRAY_EXPR.
12395         (build_this): Use THIS_EXPR.
12396         (build_return): Enable debug information on return statement.
12397         (build_if_else_statement): Likewise.
12398         (complete_labeled_statement): Fixed related comment.
12399         (build_loop_body): Fixed comment.
12400         (build_bc_statement): Enable debug information on break/continue
12401         statements.
12402         (patch_bc_statement): Fixed typos. Handle SWITCH statement
12403         context.
12404         (patch_switch_statement, case_identity, java_expand_switch): New
12405         functions.
12406
12407 1998-09-21  Per Bothner  <bothner@cygnus.com>
12408
12409         * buffer.h (BUFFER_INIT):  New macro.
12410         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
12411         Pass (struct jcf_partial *state) to most functions.
12412         (jcf_block, jcf_relocation):  New types.
12413         Support labels, branches, conditionals, loops.
12414
12415 1998-09-21  Tom Tromey  <tromey@cygnus.com>
12416
12417         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
12418
12419 1998-09-21  Per Bothner  <bothner@cygnus.com>
12420
12421         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
12422         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
12423         not integer_type_node (INT_TYPE_SIZ bits).
12424
12425         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
12426
12427         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
12428         * jcf-dump.c (print_exception_table):  New function.
12429         (disassemble_method):  Better handling of wide instructions.
12430         Make more robust for bad input.
12431
12432 1998-09-30  Jeffrey A Law  (law@cygnus.com)
12433
12434         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
12435         FreeBSD.
12436
12437 1998-09-17  Jeffrey A Law  (law@cygnus.com)
12438
12439         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
12440
12441 1998-09-17  Tom Tromey  <tromey@cygnus.com>
12442
12443         * Makefile.in ($(PARSE_H)): Removed target.
12444
12445 1998-09-17  Jeffrey A Law  (law@cygnus.com)
12446
12447         * Makefile.in (JAVA_OBJS): Add memmove.o
12448         (memmove.o): New target & rules.
12449
12450 1998-09-15  Tom Tromey  <tromey@cygnus.com>
12451
12452         * expr.c (expand_invoke): Don't generate a call to the class init
12453         code.
12454
12455 1998-09-14  Jeffrey A Law  (law@cygnus.com)
12456
12457         * Makefile.in: Add many missing dependencies.
12458         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
12459         as appropriate.
12460         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
12461         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
12462
12463 1998-09-11  Per Bothner  <bothner@cygnus.com>
12464
12465         * decl.c (complete_start_java_method):  If method is static (and
12466         not private) call _Jv_InitClass.
12467         * expr.c (expand_invoke):  Don't call build_class_init.
12468
12469         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
12470
12471 1998-09-10  Jeffrey A Law  (law@cygnus.com)
12472
12473         * Make-lang.in (GCJ): Define before using.
12474
12475 1998-09-09  Jeffrey A Law  (law@cygnus.com)
12476
12477         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
12478         losing due to namespace pollution in GNU getopt.h
12479
12480 1998-09-09  Tom Tromey  <tromey@cygnus.com>
12481
12482         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
12483         (java.all.cross): Likewise.
12484         (java.rest.encap): Likewise.
12485
12486 1998-09-08  Jeffrey A Law  (law@cygnus.com)
12487
12488         * gjavah.c (print_class_decls): Fix thinko in arglist
12489         * jcv-io.c (find_classfile): Similarly.
12490
12491 1998-09-07  Jeffrey A Law  (law@cygnus.com)
12492
12493         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
12494
12495 1998-09-05  Tom Tromey  <tromey@cygnus.com>
12496
12497         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
12498         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
12499         * Makefile.in (PARSE_C): New macro.
12500         (PARSE_H): Likewise.
12501         (PARSE_SCAN_C): Likewise.
12502         ($(PARSE_C)): Target renamed from parse.c.
12503         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
12504         (clean): Remove parse-scan.c as well.
12505         (parse.o): Depend on $(PARSE_C).
12506
12507 1998-09-05  Anthony Green  <green@cygnus.com>
12508
12509         * README, license.terms: Removed.
12510
12511         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
12512         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
12513         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
12514         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
12515         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
12516         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
12517         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
12518         and Java trademark attribution.
12519
12520 1998-09-04  Tom Tromey  <tromey@cygnus.com>
12521
12522         * Makefile.in: Use gcjh, not gjavah.
12523         * config-lang.in (stagestuff): Use gcjh, not gjavah.
12524         * Make-lang.in: Changed gjavah to gcjh everywhere.
12525
12526 1998-09-03  Per Bothner  <bothner@cygnus.com>
12527
12528         * gjavah.c:  Support new -prepend -add -append flags.
12529         (print_method_info):  Method is not virtual if class is final.
12530
12531 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12532
12533         * jv-scan.c: Fixed copyright assignment.
12534         * keyword.gperf: Likewise.
12535         * keyword.h: Likewise.
12536         * lex.c: Fixed copyright assignment.
12537         (java_lex): Push unicode back when parsing '<'.
12538         * lex.h: Fixed copyright assignment.
12539         * parse-scan.y: Likewise.
12540         * parse.h: Fixed copyright assignment.
12541         (build_debugable_stmt, complete_for_loop): New function prototypes.
12542         * parse.y: Fixed copyright assignment.
12543         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
12544         size_zero_node when completing a loop with no exit condition.
12545         (for_statement_nsi:): Define action.
12546         (for_init:, for_update:): Return size_zero_node when empty.
12547         (declare_local_variables): Call build_debugable_stmt.
12548         (build_debugable_stmt): New function.
12549         (build_loop_body): Build debugable statement around loop
12550         condition part.
12551         (complete_loop_body): Take into account the debugable statement
12552         around the EXIT_EXPR.
12553         (complete_loop_body): New function.
12554         (patch_exit_expr): Fixed condition inversion.
12555
12556 1998-09-02  Tom Tromey  <tromey@cygnus.com>
12557
12558         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
12559         name of thread define.
12560         * jvspec.c (THREAD_NAME): New macro.
12561         (GCLIB): Likewise.
12562         (THREADLIB): Likewise.
12563         (lang_specific_driver): Recognize attempt to link with thread
12564         library or gc library.  Recognize -ljava on command line so it
12565         isn't linked against more than once.
12566
12567 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12568
12569         * parse-scan.y (report_main_declaration): Name of the class
12570         containing `main' can be a qualified name.
12571
12572 1998-08-31  Tom Tromey  <tromey@cygnus.com>
12573
12574         * config-lang.in: Changed gjavac to gjc everywhere.
12575         * Make-lang.in: Changed gjavac to gjc everywhere.
12576
12577 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12578
12579         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
12580         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
12581         and install the files.
12582         * Makefile.in (JAVA_OBJS_LITE): New variable.
12583         (compiler:): Now include jv-scan as a dependency.
12584         (../jv-scan$(exeext), parse-scan.c): New targets.
12585         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
12586         * config-lang.in (compilers): Removed gcj, gjavah from the list.
12587         * jcf-parse.c (parse_source_file): Call java_layout_classes and
12588         check for errors even if parse_only.
12589         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
12590         defined.
12591         (yylex): New function. Uses java_lex body.
12592         (java_lex): Removed commented out statement. Remove local variable
12593         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
12594         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
12595         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
12596         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
12597         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
12598         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
12599         where appropriate.
12600         (java_lex_error): Empty if JC1_LITE is defined.
12601         (java_get_line_col): Return 0 if JC1_LITE is defined.
12602         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
12603         SET_MODIFIER_CTX): Moved into the section containing the macros
12604         conditionally defined by JC1_LITE.
12605         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
12606         argument if JC1_LITE is defined.
12607         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
12608         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
12609         is defined.
12610         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
12611         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
12612         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
12613         to different values according to JC1_LITE.
12614         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
12615         declared if JC1_LITE set.
12616         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
12617         defined if JC1_LITE not set.
12618         (struct parser_ctx): Reorganized and skip the jc1 front end part
12619         if JC1_LITE set.
12620         (java_layout_classes): New function definition.
12621         (java_push_parser_context, java_init_lex, yyparse, yylex,
12622         yyerror): Prototype always declared. All other static function
12623         prototypes declared only if JC1_LITE is not set.
12624         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
12625         declared in parse.h.
12626         (java_layout_classes): New function.
12627         (java_complete_expand_methods): No longer layout the class here.
12628         * parse-scan.y: New file.
12629         * jv-scan.c: New file.
12630
12631 1998-08-25  Tom Tromey  <tromey@cygnus.com>
12632
12633         * gjavah.c (main): Handle -friend option.
12634         (friend_specs): New global.
12635         (generate_access): Handle friend_specs.
12636         (process_file): Likewise.
12637         (MAX_FRIENDS): New macro.
12638         (friend_count): New global.
12639         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
12640         Changed all callers.
12641
12642 1998-08-24  Per Bothner  <bothner@cygnus.com>
12643
12644         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
12645         (main):  Handle processing all the entries of a named .zip archive.
12646         * jcf-io.c (jcf_trim_old_input):  New function.
12647         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
12648
12649 1998-08-24  Per Bothner  <bothner@cygnus.com>
12650
12651         * lang.c (flag_assume_compiled):  Make default be on.
12652
12653 1998-08-21  Per Bothner  <bothner@cygnus.com>
12654
12655         * jcf-dump.c:  Add bunches of flags to control output more.
12656         (process_class):  New function;  support printing more than one class.
12657         (main): Support new --print-main and --javap flags.
12658         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
12659         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
12660
12661 1998-08-20  Per Bothner  <bothner@cygnus.com>
12662
12663         Change mangling of dispatch table to match C++ vtable (w/thunks).
12664         * class.c (build_dtable_decl), java-tree.h:  New function.
12665         (make_class_data):  Call it.
12666         * decl.c (init_decl_processing):  Likewise.
12667
12668 1998-08-19  Warren Levy  <warrenl@cygnus.com>
12669
12670         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
12671         soft_anewarray; adjust args passed.
12672         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
12673         match _Jv_NewObjectArray.
12674
12675 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12676
12677         * decl.c (push_labeled_block, pop_labeled_block): New functions.
12678         * expr.c (loopup_label): Call create_label_decl.
12679         (create_label_decl): New function.
12680         (java_lang_expand_expr): Call expand_start_bindings with argument
12681         set to zero.
12682         * java-tree.h Added space after PROTO in function declarations
12683         when necessary.
12684         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
12685         (create_label_decl, push_labeled_block): New function
12686         declarations.
12687         * lex.c (label_id): Initialize.
12688         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
12689         switch.
12690         * parse.h Added space after PROTO in function declarations when
12691         necessary.
12692         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
12693         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
12694         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
12695         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
12696         macros.
12697         (struct parser_ctxt): New fields current_loop,
12698         current_labeled_block.
12699         (build_if_else_statement, patch_if_else_statement,
12700         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
12701         generate_labeled_block, complete_labeled_statement,
12702         build_bc_statement, patch_bc_statement, patch_loop_statement,
12703         build_new_loop, build_loop_body, complete_loop_body): New function
12704         declarations.
12705         * parse.y (java_warning_count): New global variable.
12706         (label_id): New static variable.
12707         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
12708         (block:): Return size_zero_node when block is empty.
12709         (empty_statement:): Return size_zero_node.
12710         (statement:): Implement supplemental action when for_statement: is
12711         reduced.
12712         (label_decl:): New rule.
12713         (labeled_statement:): Rewritten using label_decl. Actions
12714         implemented.
12715         (labeled_statement_nsi:): Likewise.
12716         (if_then_statement): Actions implemented.
12717         (while_expression): New rule.
12718         (while_statement:): Rewritten using while_expression. Actions
12719         implemented.
12720         (while_statement_nsi:): Likewise.
12721         (do_statement_begin:): New rule.
12722         (do_statement:): Rewritten using do_statement_begin. Actions
12723         implemented.
12724         (for_statement:): Rewritten using for_begin. Actions implemented.
12725         (for_statement_nsi:): Likewise.
12726         (for_header:, for_begin:): New rules.
12727         (for_init:): Actions implemented.
12728         (statement_expression_list:, break_statement:,
12729         continue_statement:): Likewise.
12730         (yyerror): Count number of issued warning(s).
12731         (java_report_errors): Report error(s) and/or warning(s).
12732         (java_complete_class): Use build_java_argument_signature to
12733         recompute completed method signature.
12734         (java_check_regular_methods): New locals method_wfl and aflags.
12735         Use method_wfl instead of lookup_cl during error reports. Fixed
12736         indentation and modified some error messages. Use
12737         lang_printable_name in method instead of the DECL_NAME. New code
12738         to issue warnings on methods not overriding corresponding methods
12739         private to a different package.
12740         (java_method_add_stmt): Call add_stmt_to_compound.
12741         (add_stmt_to_compound): New function.
12742         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
12743         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
12744         (build_if_else_statement, patch_if_else_statement,
12745         build_labeled_block, generate_labeled_block,
12746         complete_labeled_statement, build_new_loop, build_loop_body,
12747         complete_loop_body, patch_loop_statement, build_bc_statement,
12748         patch_bc_statement, patch_exit_expr): New functions.
12749         * typeck.c (build_java_signature): Build argument signature before
12750         enclosing it in between parenthesis.
12751
12752 1998-08-17  Warren Levy  <warrenl@cygnus.com>
12753
12754         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
12755         (JAVA_OBJS): Added reminder comment
12756
12757 1998-08-13  Nick Clifton  <nickc@cygnus.com>
12758
12759         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
12760         be interpreted as a long long.
12761
12762 1998-08-13  Warren Levy  <warrenl@cygnus.com>
12763
12764         * decl.c (init_decl_processing): Use _Jv_InitClass, not
12765         soft_initialise_class.  Use _Jv_NewMultiArray, not
12766         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
12767         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
12768         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
12769         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
12770
12771 1998-08-12  Per Bothner  <bothner@cygnus.com>
12772
12773         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
12774         length_identifier_node):  New global tree node constants.
12775         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
12776         Replace uses by super_identifier_node etc.
12777         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
12778
12779         * parse.y (resolve_field_access):  Don't special-case ".length" if
12780         flag_emit_class_files.
12781         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
12782         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
12783         and ARRAY.length.
12784
12785 1998-08-11  Per Bothner  <bothner@cygnus.com>
12786
12787         * decl.c (init_decl_processing): Remove unused method_type_node fields.
12788         * class.c (make_method_value):  Remove init for removed fields.
12789
12790         * class.c (layout_class):  Use build_java_argument_signature.
12791         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
12792
12793         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
12794         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
12795         (build_java_signature):  Don't use push_java_argument_signature.
12796
12797         * typeck.c (lookup_argument_method):  New function.
12798         * parse.y (java_check_regular_methods):  Use lookup_argument_method
12799         instead of lookup_java_method2 followed by lookup_java_method.
12800
12801         * parse.y (check_method_redefinition):  Minor optimization.
12802
12803         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
12804         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
12805
12806 1998-08-10  Tom Tromey  <tromey@cygnus.com>
12807
12808         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
12809         c-pragma.o.
12810
12811         * gjavah.c (java_float_finite): Use K&R-style definition.
12812         (java_double_finite): Likewise.
12813         (generate_access): Now returns void.  Changed all callers.
12814         (last_access_generated): Removed.
12815         (process_file): Only make a single pass over the .class file.
12816
12817 1998-07-29  Per Bothner  <bothner@cygnus.com>
12818
12819         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
12820         for compatibility for G++ (with -fvtable-thunks).
12821         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
12822
12823         * gjavah.c (process_file):  Use public inheritance for super-class.
12824
12825 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12826
12827         * lex.c (java_init_lex): Initialize ctxp->package.
12828         * parse.h (struct parser_ctxt): package and package_len replaced
12829         by tree package, an identifier node. Field method_decl_list is
12830         gone. Fixed comments.
12831         (lookup_field_wrapper, merge_qualified_name, not_accessible,
12832         class_in_current_package): New function prototypes.
12833         * parse.y (array_type:): Set class loaded flag on primitive type
12834         arrays.
12835         (package_declaration:): Assign ctxp->package to the
12836         identifier node.
12837         (method_invocation:): Handle invocation of method qualified by
12838         `super'.
12839         (single_type_import_declaration:): Removed ambiguity check.
12840         (java_pop_parser_context): New local variable `next'. Reset and
12841         set IMPORT_CLASSFILE_NAME flags on current and previous import
12842         list.
12843         (java_accstring_lookup): Use new local macro COPY_RETURN.
12844         (lookup_field_wrapper): New function.
12845         (parser_qualified_classname): Use merge_qualified_name.
12846         (parser_check_super_interface): Broaden error message.
12847         (do_resolve_class): Check for qualified class name in the current
12848         compilation unit if appropriate.
12849         (process_imports): Check for already defined classes.
12850         (check_pkg_class_access): Got rid of call to
12851         get_access_flags_from_decl.
12852         (java_complete_expand_methods): Call safe_layout_class based on
12853         the current class size.
12854         (make_qualified_primary): Build a WFL qualification on primary if
12855         none exists.
12856         (merge_qualified_name): New function.
12857         (make_qualified_name): Use merge_qualified_name.
12858         (resolve_expression_name): Use safe_lookup_field.
12859         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
12860         (resolve_qualified_expression_name): Likewise. Check on resolved
12861         element accessibility.
12862         (not_accessible_p, class_in_current_package): New functions.
12863         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
12864         (patch_method_invocation_stmt): Merged common pieces. Check
12865         accessibility of invoked method.
12866         (check_for_static_method_reference): Add returned type in error
12867         message.
12868         (invocation_mode): Get rid of bogus check on PRIVATE methods.
12869         (refine_accessible_methods_list): Merged two conditions in test.
12870         (java_complete_class): Sanity check on stabilize_ref gone.
12871         * zextract.c (read_zip_archive): Cast lseek second argument to long.
12872
12873 1998-07-28  Per Bothner  <bothner@cygnus.com>
12874
12875         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
12876
12877 1998-07-24  Tom Tromey  <tromey@cygnus.com>
12878
12879         * gjavah.c (F_NAN): Removed.
12880         (F_NAN_MASK): New macro.
12881         (F_POSITIVE_INFINITY): Removed.
12882         (F_NEGATIVE_INFINITY): Likewise.
12883         (java_float_finite): Rewrote.
12884         (D_NAN_MASK): Renamed.
12885         (java_double_finite): Rewrote.
12886         (D_POSITIVE_INFINITY): Removed.
12887         (D_NEGATIVE_INFINITY): Likewise.
12888
12889         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
12890         If verbose, print underlying representation of value in hex.
12891
12892 1998-07-24  Per Bothner  <bothner@cygnus.com>
12893
12894         * buffer.h, buffer.c:  New files.
12895         * Makefile.in (JAVA_OBJS):  Add buffer.o.
12896
12897         Support locals variables and writing their debug entries to .class.
12898         * jcf-write.c:  Simplify some by user new buffer type.
12899         (vode_buffer_grow):  Removed.
12900         (struct localvar_info):  New type.
12901         (localsvars, localvartable):  New buffers.
12902         (localvar_alloc, localvar_free):  New functions.
12903         (generate_bytecode_insns):  Handle local variables.
12904         (generate_classfile):  Write LocalVariableTable attribute.
12905
12906 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12907
12908         * jcf-io.c (open_in_zip): Check the zipfile magic number.
12909         * zipfile.h (ZIPMAGIC): New macro.
12910
12911 1998-07-24  Tom Tromey  <tromey@cygnus.com>
12912
12913         * Makefile.in (gjavah.o): Updated dependencies.
12914         (jcf-dump.o): Likewise.
12915         (all.indirect): Use ../gjavah.
12916         (../gjavah$(exeext)): Likewise.
12917         (clean): Don't remove gjavah.
12918         (clean): Remove parse.c, not java/parse.c.
12919         * Make-lang.in (java): Added gjavah.
12920         (gjavah$(exeext)): New target.
12921         (GJAVAH_SOURCES): New macro.
12922         (java.all.build): Added gjavah.
12923         (java.all.cross): Likewise.
12924         (java.rest.encap): Likewise.
12925         * config-lang.in (compilers, stagestuff): Added gjavah.
12926
12927 1998-07-23  Tom Tromey  <tromey@cygnus.com>
12928
12929         * gjavah.c (java_float_finite): New function.
12930         (java_double_finite): Likewise.
12931         (F_POSITIVE_INFINITY): New macro.
12932         (F_NEGATIVE_INFINITY): Likewise.
12933         (F_NAN): Likewise.
12934         (D_POSITIVE_INFINITY): Likewise.
12935         (D_NEGATIVE_INFINITY): Likewise.
12936         (D_NAN): Likewise.
12937         (print_field_info): Use java_float_finite and java_double_finite.
12938
12939 1998-07-23  Per Bothner  <bothner@cygnus.com>
12940
12941         * parse.y (method_header):  Name "this" implicit argument.
12942
12943 1998-07-22  Per Bothner  <bothner@cygnus.com>
12944
12945         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
12946         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
12947         (put_linenumber):  New function.
12948         (generate_bytecode_insns, generate_classfile):  Write line numbers.
12949
12950 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12951
12952         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
12953         (lookup_name, build_known_method_ref, build_class_init,
12954         build_invokevirtual, invoke_build_dtable, match_java_method,
12955         build_field_ref, pushdecl_force_head, build_java_binop,
12956         binary_numeric_promotion, build_decl_no_layout,
12957         build_java_arrayaccess, build_newarray, build_anewarray,
12958         build_java_array_length_access, build_java_arraynull_check): New
12959         extern function prototypes.
12960         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12961         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
12962         java-tree.h.
12963         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
12964         to NULL
12965         * jcf.h (jcf_out_of_synch): New extern function prototype.
12966         * parse.h: Static/global function implemented in parse.y
12967         prototyped and declarations moved at the end of the file.
12968         (DECL_P): Check that the argument isn't null.
12969         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12970         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
12971         (QUAL_DECL_TYPE): New macro.
12972         (PARAMS): Macro definition removed.
12973         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
12974         (return_statement:): Call build_return.
12975         (field_access:): Call make_qualified_primary in sub rule.
12976         (method_invocation:): Build method invocation and call
12977         make_qualified_primary when processing primaries.
12978         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
12979         get_type_from_signature.
12980         (java_check_regular_method): Extra integer 0 argument when calling
12981         lookup_java_method2.
12982         (lookup_java_interface_method2): Extra method DECL argument when
12983         calling lookup_java_interface_method2.
12984         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
12985         COMPOUND_EXPR node.
12986         (java_complete_expand_method): Layout current class iff not
12987         already done. Don't process interface's methods.
12988         (java_complete_expand_method): Use super class only if it
12989         exists. Use current class otherwise.
12990         (make_qualified_primary): New function.
12991         (resolve_expression_name): Process qualified expression or
12992         expression from primary the same way.
12993         (resolve_expression_name): Two last arguments to
12994         resolve_field_access are now NULL_TREEs.
12995         (resolve_field_access): New variable is_static. Local field must
12996         be DECLs. is_static computed on field DECLs only. Append code in
12997         where_found to the field access if necessary. Use QUAL_DECL_TYPE
12998         to initialize field_type.
12999         (resolve_qualified_expression_name): New local variable,
13000         previous_call_static and is_static. Handle primaries with function
13001         calls, casts, array references and `this'. `super' now handled as
13002         `(super_class)this'. Use is_static to clarify boolean expressions.
13003         Added code to handle case where a proper handle is required to
13004         access a field. Use QUAL_DECL_TYPE where applicable.
13005         (maybe_access_field): New function.
13006         (patch_method_invocation_stmt): New arguments primary, where,
13007         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
13008         deleted. Use `where' as a type to search from if specified. Check
13009         for static method reference where forbidden. Append primary or
13010         current_this to the argument list if not calling constructor nor
13011         static methods.
13012         (check_for_static_method_reference): New function.
13013         (patch_invoke): Layout the class on which new is done if
13014         necessary.
13015         (lookup_method_invoke): Changed format to report errors on
13016         methods.
13017         (qualify_ambiguous_name): New local variable this_found. Now
13018         handle things from primaries. Method call are considered
13019         expression names.
13020         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
13021         changed into NULLs.
13022         (not_initialized_as_it_should_p): Comply with the new DECL_P.
13023         (java_complete_tree): New case fo RETURN_EXPR. Process function
13024         call arguments in separate function.
13025         (complete_function_arguments): New function.
13026         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
13027         anymore.
13028         (patch_assignment): Take the return function slot into account as
13029         a RHS. Distinguish assignment from a return.
13030         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
13031         when checking methods in interfaces.
13032         (resolve_type_during_patch): NULL argument to unresolve_type_p
13033         instead of NULL_TREE.
13034         (patch_newarray): Fixed typo in comment.
13035         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
13036         (build_return, patch_return): New functions.
13037         * typeck.c (lookup_java_constructor): Fixed typo in comment.
13038
13039 1998-07-21  Per Bothner  <bothner@cygnus.com>
13040
13041         * constants.c (find_name_and_type_constant, find_fieldref_index,
13042         find_methodref_index):  New methods.
13043         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
13044         just return given method.  Also, rename to build_known_method_ref.
13045         (expand_invoke):  Rename call to build_invoke_non_interface.
13046         * java-tree.h, parse.h:  Update prototype.
13047         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
13048         (such as expand_expr_stmt) if flag_emit_class_files.
13049         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
13050         STACK_TARGET, IGNORE_TARGET):  New macros.
13051         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
13052         (generate_bytecode_insn):  New function to generate method's bytecode.
13053         (generate_classfile):  Node generate Code attribute for a method.
13054         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
13055         push_long_const, field_op, adjust_typed_op, maybe_wide):
13056         New functions used by generate_bytecode_insn.
13057
13058         * typeck.c (signature_include_return):  Remove variable.
13059         (push_java_argument_signature, build_java_argument_signature):  New.
13060         (build_java_signature):  Use push_java_argument_signature.
13061         * parse.y:  Use build_java_argument_signature instead of fiddling
13062         with signature_include_return.
13063
13064 1998-07-17  Tom Tromey  <tromey@cygnus.com>
13065
13066         * gjavah.c (print_c_decl): Always generate JArray<>* for array
13067         types.
13068
13069         * Makefile.in (all.indirect): Added gjavah$(exeext).
13070         (gjavah$(exeext)): Added $(exeext).
13071         (clean): Likewise.
13072
13073 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13074
13075         * class.c (layout_class): Call to java_layout_parsed_class replace
13076         by safe_layout_class.
13077         * expr.c (build_java_array_length_access): Removed static storage
13078         class in the function definition.
13079         (build_java_arraynull_check): Likewise.
13080         Also fixed typos in two comments.
13081         * lex.c (java_init_lex): Initialize static global kw_length.
13082         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
13083         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
13084         java_lex_error.
13085         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
13086         * parse.h (resolve_no_layout): New static function declaration.
13087         (get_identifier_in_static): Declaration removed.
13088         (java_layout_parsed_class): Function name declaration changed to
13089         safe_layout_class.
13090         (build_newarray_node, patch_newarray, resolve_type_during_patch,
13091         not_initialized_as_it_should_p, build_this): New static function
13092         declarations.
13093         (pushdecl_force_head, build_java_binop, int_fits_type_p,
13094         binary_numeric_promotion, stabilize_reference,
13095         build_decl_no_layout, build_java_arrayaccess): Extern function
13096         declarations moved into their own section.
13097         (build_newarray, build_anewarray, build_java_array_length_access,
13098         build_java_arraynull_check): New extern function declarations.
13099         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
13100         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
13101         fake tree codes.
13102         (CALL_CONSTRUCTOR_P): New macro.
13103         * parse.y (kw_length): New static global tree node.
13104         (return_statement): Tagged <node>.
13105         (RETURN_TK): Tagged <operator>.
13106         (variable_declarator_id:): Build variable declaration with an
13107         empty initialization value if a syntax error was found in the
13108         initialization part of the variable declaration.
13109         (statement_without_trailing_substatement:): return_statement: now
13110         uses the default rule.
13111         (return_statement:): Temporarily fixed to return NULL_TREE.
13112         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
13113         (class_instance_creation_expression:): Class creation rules now
13114         call build_method_invocation upon reduction.
13115         (array_creation_expression:): Rules call build_newarray_node upon
13116         reduction.
13117         (dim_exprs:): Build a list of dimension expressions.
13118         (dim_expr:): Store location of the OSB_TK in the dimension
13119         expression node.
13120         (method_invocation:): Added a new error rule.
13121         (build_unresolved_array_type): WFL argument may also be an array
13122         on a primitive type. Name of the argument changed to reflect this.
13123         (method_declarator): Insert argument type at the beginning of the
13124         argument type list and later reverse the list.
13125         (unresolved_type_p): Argument 'returned' may be optionally
13126         NULL_TREE.
13127         (java_layout_class_from_source): Function renamed
13128         safe_layout_class.
13129         (resolve_and_layout): Now call resolve_no_layout and
13130         safe_layout_class.
13131         (resolve_no_layout): New function.
13132         (purify_type_name): New function.
13133         (complete_class_report_errors): Call purify_type_name during error
13134         report on a type not found.
13135         (process_imports): error_found local variable doesn't need to be
13136         initialized to zero.
13137         (declare_local_variables): New local type_wfl. Fixed typo in error
13138         message. type_wfl assigned to unresolved type and used to register
13139         incomplete type. Build a WFL around the variable initialization
13140         statement so that debug info can be generated on it.
13141         (source_start_java_method): Reverse argument list after they've
13142         been processed.
13143         (current_this): New static global variable.
13144         (java_complete_expand_methods): Set current_this when appropriate.
13145         (resolve_expression_name): Build correct static and non static
13146         field access bearing a simple name.
13147         (resolve_field_access): Resolve the length field of arrays. Handle
13148         f.m() cases.
13149         (patch_method_invocation_stmt): Set the type of the method
13150         invocation to error_mark_node. This value is later overridden by a
13151         valid type, if any. Don't handle qualified constructor invocation
13152         as qualified method invocation. Call lookup_method_invoke with its
13153         new flag. It's no longer necessary to access the selected method
13154         as the value of a tree list. Handle constructor invocation.
13155         (patch_invoke): Reverse argument list when invoking non interface
13156         methods. Insert call to new as the first argument of the
13157         constructor.
13158         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
13159         defined within a final class. Return INVOKE_STATIC if the invoked
13160         method is a constructor.
13161         (lookup_method_invoke): New lc argument is a flag to indicate a
13162         constructor lookup. Now handle constructor lookup. Choose the most
13163         specific method in case several were matching the invocation
13164         requirements. Return a method decl instead of a tree list featuring
13165         one single method decl element.
13166         (refine_accessible_methods_list): New lc flag argument to
13167         indicate that a constructor is being looked up.
13168         (not_initialized_as_it_should_p): New function.
13169         (java_complete_tree): Now process fake tree codes
13170         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
13171         save_expr on resolved function call arguments. Case on
13172         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
13173         (patch_assignment): LHS can be a field access expression. When
13174         dealing with reference, lhs_type is the promoted type of the
13175         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
13176         applicable.
13177         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
13178         (patch_binop): Use not_initialized_as_it_should_p where
13179         applicable.
13180         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
13181         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
13182         where applicable.
13183         (resolve_type_during_patch): New function.
13184         (patch_cast): Call resolve_type_during_patch to resolve type and
13185         report error accordingly.
13186         (patch_array_ref): Use not_initialized_as_it_should_p where
13187         applicable. Array base expression is saved before being
13188         used. Promote the type of an array elements if it contains non
13189         builtin types.
13190         (build_newarray_node, patch_newarray, build_this): New functions.
13191
13192 1998-07-16  Tom Tromey  <tromey@cygnus.com>
13193
13194         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
13195         increment it in `for' statement.
13196         (print_field_info): If number is inf or nan, don't print it.
13197         (print_method_info): If method name is `delete', just ignore it.
13198         (print_c_decl): Special-case jstringArray.
13199
13200         * gjavah.c (help): New function.
13201         (no_argument): New function.
13202         (usage): Changed text.
13203         (main): Rewrote argument handling.  Now handles -v, --help,
13204         --version.
13205         (version): New function.
13206         (found_error): New global.
13207         (main): Return found_error.
13208         (generate_access): Set found_error.
13209         (print_c_decl): Likewise.
13210
13211 1998-07-15  Tom Tromey  <tromey@cygnus.com>
13212
13213         * gjavah.c (print_c_decl): Don't print "," when examining field.
13214         Skip type name when looking at "[L" types.
13215         (process_file): Now static.
13216         (generate_access): Now returns int.
13217         (last_access_generated): New global.
13218         (process_file): Clear last_access_generated; make multiple passes
13219         over the class.
13220         (print_field_info): Just return if generate_access returns true.
13221         (print_method_info): Likewise.  Also, allow <init> functions to
13222         pass through.
13223         (print_c_decl): Added is_init argument.  Print constructors
13224         properly.
13225         (print_cxx_classname): Use UTF8_GET to extract characters from
13226         string.
13227         (print_base_classname): New function.
13228         (print_class_decls): New function.
13229         (process_file): Use it.
13230         (utf8_cmp): New function.
13231
13232 1998-07-13  Nick Clifton  <nickc@cygnus.com>
13233
13234         * lang-options.h: Format changed to match changes in gcc/toplev.c
13235         to implement a --help option.
13236
13237 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
13238
13239         * decl.c (init_decl_processing): Revert change to dtable_type.
13240
13241 1998-07-09  Per Bothner  <bothner@cygnus.com>
13242
13243         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
13244
13245 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
13246
13247         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
13248
13249         * lang.c (lang_init): Default flag_exceptions to 1, without
13250         checking to see if it's 2 first.
13251
13252 1998-07-08  Jeffrey A Law  (law@cygnus.com)
13253
13254         * constants.c: Include "system.h".
13255         * decl.c: Likewise.
13256         * lang.c (flag_new_exceptions): Get via extern now.
13257         (lang_init_options): New functions.  Turn on flag_new_exceptions.
13258
13259 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13260
13261         * lex.c (java_lex): Return 0 when we see an invalid character in
13262         the input.
13263
13264         * lex.c (java_read_char): Specify extra argument when calling
13265         java_lex_error.
13266         (java_read_unicode, java_parse_end_comment,
13267         java_parse_escape_sequence): Likewise,
13268         (java_lex): Specify extra argument when calling
13269         java_lex_error. Test that IDs are beginning with a legal character
13270         for IDs. Handle invalid characters with an error message and a
13271         call to java_lex_error.
13272         (java_lex_error): Adjust column position by new argument
13273         `forward'. Issue an error even if in the middle of reporting an
13274         other error.
13275
13276 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
13277
13278         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
13279         we don't explicitly put a null pointer when we're copying it.
13280
13281 1998-07-07  Tom Tromey  <tromey@cygnus.com>
13282
13283         * gjavah.c (print_cxx_classname): New function.
13284         (super_class_name): Likewise.
13285         (print_super_fields): Removed.
13286         (in_super): Removed.
13287         (print_field_info): Never generate #defines.
13288         (print_c_decl): Changed generated types to match JNI.  No longer
13289         print class name before method name.
13290         (print_method_info): Print "static" before static methods.
13291         Print "virtual" before non-final methods.
13292         (usage): Use exit(1), not exit(-1).
13293         (main): Likewise.
13294         (print_field_info): Use %.17g to print a double.
13295         (last_access): New globals.
13296         (process_file): Initialize last_access.
13297         (usage): Now static.
13298         (ACC_VISIBILITY): New define.
13299         (generate_access): New function.
13300         (print_field_info): Call it.
13301         (print_method_info): Likewise.  Also, generate information for all
13302         methods, not just native methods.  Return void.
13303         (print_c_decl): Return void.
13304         (print_field_info): Return void.
13305
13306 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13307
13308         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
13309         processing the jc1 grammar file. Prefix bison functions and
13310         variables with java_.
13311         (parse.c): Dependencies on parse.h and lex.h
13312         * expr.c (build_java_arrayaccess): Function now global.
13313         * java-tree.h: Comment reorganized to carry on previous
13314         classification effort.
13315         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
13316         RESOLVE_TYPE_NAME_P): New flags on WFLs.
13317         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
13318         java_parse (new prefix java_ generated by bison).
13319         (java_layout_parsed_class, java_register_parsed_class): Function
13320         call removed.
13321         (yyparse): Removed unnecessary call to init_outgoing_cpool.
13322         * lex.c (static tree wfl_op): Variable deleted.
13323         (java_init_lex): Initialize kw_super and kw_this. Initialize more
13324         ctxp fields to NULL_TREE.
13325         (java_lex): No longer create WFL for operators. Filename caching
13326         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
13327         created as STRING_CST and later expanded. Removed extra argument
13328         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
13329         and SUPER.
13330         (build_wfl_node): Removed code in comments.
13331         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
13332         store token and location data in the current bison token.
13333         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
13334         static/extern function declaration at the beginning of the file.
13335         (struct qualification): Data structure definition deleted.
13336         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
13337         (qualify_ambiguous_name): Function declaration modified. Function
13338         now returns nothing.
13339         (build_array_ref, patch_array_ref, make_qualified_name,
13340         resolve_qualified_expression_name, maybe_generate_clinit,
13341         resolve_field_access): New static function declarations.
13342         (build_java_arrayaccess): New extern function declaration.
13343         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
13344         (CALL_EXPR_PRIMARY): Macro deleted.
13345         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
13346         (struct parser_ctxt): Field initialized_final
13347         removed. non_static_initialized, static_initialized: New fields.
13348         * parse.y (static tree kw_super, static tree kw_this): New global
13349         static.
13350         (%union): tree wfl field of operator member replaced by int
13351         location. WFLs are non longer created for operators.
13352         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
13353         (qualified_name:): Now calls make_qualified_name to build the
13354         identifier.
13355         (type_declaration:): Consider generating <clinit> when class
13356         parsing completed.
13357         (variable_declarator:): Directly build an assignment node when the
13358         variable is initialized when declared.
13359         (this_or_super:): Build a WFL and set current location when THIS
13360         or SUPER are parsed.
13361         (expression_statement:): Wrap statement around a WFL.
13362         (primary_no_new_array:): Fixed typo. Changed value returned by
13363         THIS_TK because of its new type (temporary).
13364         (dim_exprs:): Temporary fix because of OSB_TK's new type.
13365         (field_access:): Build qualified name with SUPER.
13366         (method_invocation:): Fixed returned value because of SUPER's new
13367         type.
13368         (array_access:): Use OSB_TK location information.
13369         (post_increment_expression:, post_decrement_expression:,
13370         unary_expression:, pre_increment_expression:,
13371         pre_decrement_expression:, unary_expression_not_plus_minus:,
13372         cast_expression:, multiplicative_expression:,
13373         additive_expression:, shift_expression:, relational_expression:,
13374         equality_expression:, and_expression:, exclusive_or_expression:,
13375         inclusive_or_expression:, conditional_and_expression:,
13376         conditional_or_expression:, assignment:): Use new location/token
13377         information available on operators.
13378         (create_class): Set super_decl_type to NULL_TREE when processing
13379         java.lang.Object.
13380         (register_fields): Field initialization is now a MODIFY_EXPR
13381         node. Chain initialization code to the matching lists (according
13382         the the field declaration modifiers).
13383         (maybe_generate_clinit): New function.
13384         (method_header): Don't set method's DECL_NAME to a WFL when adding
13385         methods to java.lang.Object.
13386         (resolve_and_layout): Now can return NULL_TREE if the type
13387         resolution fails. Otherwise, return the class DECL instead of its
13388         TYPE.
13389         (check_method_redefinition): Don't patch method DECL_NAME if it
13390         belongs to java.lang.Object.
13391         (process_imports): Simply assign error_found to the value returned
13392         by check_pkg_class_access.
13393         (declare_local_variables): Don't use their init statements (if
13394         any) when parsing error were previously found. Reuse MODIFY_EXPR
13395         build during parsing as an init statement.
13396         (java_method_add_stmt): Now return the current method body.
13397         (java_layout_parsed_class, java_register_parsed_class): Functions
13398         removed.
13399         (java_complete_expand_methods): Initialize the constant pool on a
13400         per class basis. Layout the classes before expanding their method
13401         bodies. Don't try expand artificial constructor code if error were
13402         found. Make the classes data and register them if no error were
13403         found.
13404         (java_complete_expand_method): Retrieve an artificial constructor
13405         argument list before entering its body. Assign the top block to
13406         the artificial constructor function body and set types of declared
13407         blocks and compound statements to void. Walk method body if not an
13408         artificial constructor.
13409         (make_qualified_name, cut_identifier_in_qualified): New functions.
13410         (resolve_expression_name): Fixed comments. Save/restore the
13411         current class CLASS_LOADED_P flag value. Build non qualified
13412         static field access and handle qualified expression names.
13413         (resolve_field_access, resolve_qualified_expression_name): New
13414         functions.
13415         (patch_method_invocation_stmt): Use the new expression resolution
13416         scheme, calling resolve_field_access when the function call is
13417         resolved as an expression.
13418         (qualify_ambiguous_name): Function rewritten to work on qualified
13419         expression produced by make_qualified_name.
13420         (java_complete_tree): Promote type when function's argument are
13421         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
13422         the assignment to discover further errors if RHS is a expression
13423         name that fails to evaluate. Declare LHS initialized even though
13424         the assignment failed. Don't use the location variable and removed
13425         extra argument in patch function calls. Now handle the ARRAY_REF
13426         case and build internal string representation when STRING_CSTs are
13427         walked.
13428         (build_method_invocation): Don't wrap function call around a WFL.
13429         (build_assignment): Likewise. Use the operator location
13430         information.
13431         (patch_assignment): Handle array access LHSs. Handle error
13432         provenance, resulting in a better error report.
13433         (build_binop): Use op_location from operator as binop location
13434         information.
13435         (build_unaryop, build_incdec, build_cast): Likewise.
13436         (patch_binop): Extract location information from the node. Fixed
13437         typo in error message.
13438         (patch_unary_op): Extract location information from the node.
13439         (build_array_ref, patch_array_ref): New functions.
13440
13441 1998-07-01  Tom Tromey  <tromey@cygnus.com>
13442
13443         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
13444         match _Jv_IsInstanceOf.
13445         * decl.c (init_decl_processing): Use _Jv_NewArray, not
13446         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
13447
13448 1998-06-30  Tom Tromey  <tromey@cygnus.com>
13449
13450         * decl.c (init_decl_processing): Functions are now named
13451         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
13452
13453 1998-06-29  Per Bothner  <bothner@cygnus.com>
13454
13455         * java-tree.h (load_class):  Add prototype.
13456         * class.c (is_compiled_class):  Add missing arg to load_class.
13457         * expr.c (expand_java_NEW):  Call load_class.
13458         * parse.y (process_import):  Removed bogus use of void return value.
13459
13460 1998-06-25  Per Bothner  <bothner@cygnus.com>
13461
13462         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
13463         Function name is "_Jv_Throw" instead of "soft_athrow".
13464         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
13465         Function name is "_Jv_AllocObject" instead of "soft_new".
13466         Takes an extra parameter (object size).
13467         * expr.c:  Update calls.
13468
13469 1998-06-24  Per Bothner  <bothner@cygnus.com>
13470
13471         * lex.c (java_get_line_col):  Handle end-of-file.
13472         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
13473
13474 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
13475
13476         * lang.c (lang_init): Make -fexceptions the default.
13477         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
13478         exception handling is not turned on.
13479
13480 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
13481
13482         * lang.c (flag_new_exceptions): Make this this default.
13483         * decl.c (end_java_method): Call emit_handlers.
13484         * except.c (method_init_exceptions): Set language code and version.
13485         (expand_start_java_handler): Enable exception, and call
13486         expand_eh_region_start.
13487         (expand_end_java_handler): Enable exception, and set up catch blocks.
13488         (emit_handlers): New routine to generate the saved handlers.
13489         * java-except.h (emit_handlers): Add prototype.
13490
13491 1998-06-12  Per Bothner  <bothner@cygnus.com>
13492
13493         We used to have three different representations of the constant pool:
13494         the CPool structure, the tree_constant_pool, and the constructures
13495         used to build the Class object (which may need class and string
13496         constants) in compiled code.  None were appropriate for compiling
13497         to .class files, so I did a major overhaul.
13498
13499         First, the tree_constant_pool array was removed.  Things were
13500         modified to the CPool structure in the JCF could be used.
13501         Second, a "capacity" field was added to the CPool, and functions
13502         written to search for a matching constant, adding one if not found.
13503         The code that generated the Class object was changed to use a CPool.
13504         The actual TREE_LISTs used to build the CONSTRUCTORs used for
13505         the static Class object are now only in build_constants_constructor.
13506         Finally, I wrote code which can generate a .class file (including its
13507         constant pool) from the RECORD_TYPE of a class.  This is a big step
13508         on the way to compiling Java source into .class files.
13509
13510         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
13511         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
13512
13513         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
13514         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
13515         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
13516         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
13517         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
13518         (lang_type):  Removed constant_pool field.
13519         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
13520         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
13521         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
13522         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
13523
13524         * constants.c (current_constant_pool_tags, current_constant_pool_data,
13525         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
13526         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
13527         (set_constant_entry, find_constant1, find_constant2,
13528         find_class_constant, count_constant_pool_bytes, write_constant_pool,
13529         find_utf8_constant, find_class_or_string_constant):  New functions.
13530
13531         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
13532         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
13533         (give_name_to_class, get_class_constant):  Likewise.
13534         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
13535         (get_name_and_type_constant, get_ref_constant):  Removed.
13536         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
13537         * parse.y:  Don't save/restore tree_constant_pool.
13538         * verify.c (verify_jvm_instructions):  Update for new approach.
13539         * expr.c (expand_invoke, expand_java_field_op): Likewise.
13540
13541         * lang-options.h:  Added -femit-class-file, -femit-class-files.
13542         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
13543         (lang_f_options):  Added "emit-class-file(s)".
13544
13545         * expr.c (build_java_arrayaccess):  Generate more efficient array
13546         bounds checking, by using unsigned compare.
13547
13548         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
13549
13550 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13551
13552         * parse.h: New comment on the handling of unresolved type
13553         identifiers. JDEPs are now part of the jdep_code enum.
13554         (typedef struct jdep): Now use enum jdep_code or int, depending on
13555         availability. Both are narrowed down to an 8 bits bitfield.
13556         (CALL_EXPR_PRIMARY): Fixed comment.
13557
13558 1998-06-10  Tom Tromey  <tromey@cygnus.com>
13559
13560         * Make-lang.in (java): Added gjavac and jvgenmain.
13561         (java.start.encap): Depend on gjavac.
13562         (java.rest.encap): Depend on jvgenmain.
13563
13564         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
13565         (JAVA_CROSS_NAME): Likewise.
13566         (java.all.build): Depend on jvgenmain and gjavac.
13567         (java.all.cross): Depend on jvgenmain and gjavac-cross.
13568         (jvgenmain$(exeext)): New target.
13569         (java.install-common): Wrote.
13570         * config-lang.in (compilers, stagestuff): Added gjavac and
13571         jvgenmain.
13572
13573 1998-06-10  Dave Brolley  <brolley@cygnus.com>
13574
13575         * lang.c (lang_decode_option): New argc/argv interface.
13576
13577 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13578
13579         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
13580         * decl.c (build_decl_no_layout): New function.
13581         * expr.c (java_lang_expand_expr): Layout declarations found in
13582         blocks before they're pushed.
13583         * jcf-parse.c (load_class): Save current line when parsing class
13584         file.
13585         (parse_source_file): Register class before expanding their
13586         methods.
13587         * lang.c (put_decl_node): Produce `null' when `void *' is
13588         processed.
13589         * lex.c (static tree wfl_op): New static global, for error report
13590         on casts.
13591         (java_init_lex): wfl_operator and wfl_op initialized
13592         here. Filename caching added for wfl_op. Return wfl_op when `(' is
13593         parsed.
13594         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
13595         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
13596         build_unresolved_array_type): New static function definitions.
13597         (build_decl_no_layout): New extern function declared.
13598         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
13599         faulty modifier exists.
13600         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
13601         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
13602         (UNARY_PLUS_EXPR): New fake operator.
13603         (struct parser_ctxt): New field osb_number.
13604         * parse.y (static tree wfl_operator): New static WFL for operator
13605         bound error messages.
13606         (DECR_TK, INCR_TK): Moved.
13607         (OP_TK): Tagged <operator>.
13608         (array_type:): Now call build_unresolved_array_type.
13609         (dim_expr:): Count the number of '[' seen.
13610         (post_increment_expression, post_decrement_expression,
13611         pre_increment_expression, pre_decrement_expression,
13612         unary_expression_not_plus_minus, unary_expression:): Actions are
13613         now building the corresponding unary expressions.
13614         (cast_expression:): Actions are now building cast expressions.
13615         (build_unresolved_array_type): New function.
13616         (create_interface): Reset the number of declared interfaces.
13617         (create_class): Likewise.
13618         (method_header): Methods declared within the scope of an interface
13619         are now implicitly set public and abstract.
13620         (java_complete_class): Variable's and parameter's type are patched
13621         with a promoted type.
13622         (declare_local_variables): Resolved non builtin types are promoted
13623         before being used to build a variable decl. Removed type patch
13624         posted on variable initialization statement.
13625         (source_start_java_method): Use build_decl_no_layout to build the
13626         decl of a parameter of incomplete type.
13627         (java_register_parsed_class): Process interfaces too. Call
13628         rest_of_decl_compilation on each processed class declarations.
13629         (java_complete_expand_methods): Don't attempt to expand things in
13630         interfaces.
13631         (java_complete_tree): Process CONVERT_EXPR, even though it always
13632         has a type. Propagate error_mark_node to node's type too. Promote
13633         method's call argument type and return error_mark_node if
13634         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
13635         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
13636         handle unary operator nodes.
13637         (build_assignment): Added comment.
13638         (print_int_node): New function.
13639         (patch_assignment): New second argument. New error handling. Use
13640         print_int_node. Handle references. Use can_cast_to_p to issue
13641         different error message according to the context and check upon
13642         the initialization of the RHS.
13643         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
13644         (operator_string): Handle more operators.
13645         (patch_binop): No longer use a function static
13646         wfl_operator. Improved error message on shift distance.
13647         (build_unaryop, build_incdec, build_cast, patch_unaryop,
13648         patch_cast): New functions.
13649
13650 1998-06-05  Per Bothner  <bothner@cygnus.com>
13651
13652         * jvspec.c:  New file.
13653         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
13654
13655         * java-tree.h (identifier_subst):  Add declaration.
13656
13657 1998-06-04  Tom Tromey  <tromey@cygnus.com>
13658
13659         * jvgenmain.c (main): Generate call to JvRunMain.
13660
13661         * class.c (make_class_data): Push value for "sync_info" field.
13662         * decl.c (init_decl_processing): Push "sync_info" field.
13663
13664 1998-06-03  Per Bothner  <bothner@cygnus.com>
13665
13666         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
13667         Java (source) name, not signature.
13668         Set TYPE_ALIGN to (at least) that of element_type.
13669
13670 1998-06-02  Per Bothner  <bothner@cygnus.com>
13671
13672         * class.c:  Moved classname-mangling-rekated code to ...
13673         * mangle.c:  ... this new file.
13674         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
13675         * Makefile.in:  Update for above changes.
13676
13677 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13678
13679         * expr.c (truthvalue_conversion): Convert integer and floating
13680         point value to their truth value.
13681         * lex.c (java_lex): Handle the `null' literal.
13682         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
13683         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13684         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
13685         New macros.
13686
13687         * parse.y: Reorganization/documentation on token declaration.
13688         (binop_lookup[]): New added new tree codes.
13689         (relational_expression): Build corresponding binary operators.
13690         (equality_expression, conditional_and_expression,
13691         conditional_or_expression): Likewise.
13692         (java_complete_class): Fix crash in debug message.
13693         (java_complete_tree): Check initialization of method call
13694         arguments. Further bogus node evaluation to detect more error
13695         during assignments. Handles more binary operators.
13696         (patch_assignment): Use DECL_P.
13697         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
13698         code.
13699         (operator_string): Handle more case. Compacted source.
13700         (patch_binop): Changed function comment. Checking for
13701         uninitialized first operand takes the compound assignment into
13702         account and uses DECL_P. Checking for uninitialized second operand
13703         delayed to routine's end. Use macros to issue type bound error
13704         messages and issue messages on both operands if their types are
13705         different. Force fixed type into node. Handle all binary
13706         operators.
13707
13708 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13709
13710         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
13711         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
13712         build operator node and return tokens.
13713         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
13714         * parse.h (java_complete_tree): Changed returned type in prototype.
13715         (build_method_invocation, build_assignment, patch_assignment,
13716         patch_binop): New static function declarations.
13717         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
13718         BUILD_EXPR_WFL): New macros.
13719         * parse.y (enum tree_code binop_lookup[]): New static for token to
13720         TREE_CODE lookup.
13721         (%union): Parser union has new sub-structure `operator'.
13722         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
13723         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
13724         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
13725         ASSIGN_ANY_TK): Tokens tagged `operator'.
13726         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
13727         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
13728         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
13729         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
13730         (assignment_operator:): Rule tagged `operator'.
13731         (expression_statement:): Re-installed default rule.
13732         (method_invocation:): Sub rules call build_method_invocation.
13733         (postfix_expression:): Don't attempt to resolve name here. Just
13734         return an ID.
13735         (multiplicative_expression:): Sub-rules build corresponding binop
13736         expression node.
13737         (additive_expression:, shift_expression:, and_expression:,
13738         exclusive_or_expression:, inclusive_or_expression:): Likewise.
13739         (assignment:): Sub rule invoke build_assignment.
13740         (assignment_operator:): Default rules on sub rules.
13741         (force_error): Added documentation on this variable.
13742         (declare_local_variables): Build initialization calling
13743         build_assignment.
13744         (expand_start_java_method): Removed unused rtx declaration. Mark
13745         arguments as already initialized.
13746         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
13747         (java_complete_expand_methods): Don't process next method if
13748         completion of the previous one triggered errors.
13749         (java_complete_expand_method): Call source_end_java_method if no
13750         error were found during completion.
13751         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
13752         locals declaratilon. Handle names found within a class. Return
13753         error_mark_node when things aren't found.
13754         (patch_method_invocation_stmt): Return error_mark_node on failures.
13755         (patch_invoke): Removed unused local. Return the correct node.
13756         (java_complete_tree): Now returns a value. The BLOCK section binds
13757         local identifiers and the type of a BLOCK is now void. Assign the
13758         result of operand completion on COMPOUND_EXPR. Assign the
13759         encapsulated node of a WFL to the result of its completion, except
13760         when the node is an identifier. Now handle MODIFY_EXPR and several
13761         binary operators. Return error_mark_node on errors.
13762         (build_method_invocation, build_assignment, patch_assignment,
13763         build_binop, operator_string, patch_binop): New functions.
13764         * typeck.c (binary_numeric_promotion): New function.
13765
13766 1998-05-21  Per Bothner  <bothner@cygnus.com>
13767
13768         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
13769         Replace most uses of ident_subst by identifier_subst.
13770
13771         * class.c (push_class_static_dummy_field):  Removed function.
13772         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
13773         instead of looking got "class" static field.  Create that decl here.
13774         (class_identifier_node):  Removed;  no longer needed.
13775         (init_class_processing):  Don't init class_identifier_node.
13776         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
13777         Do nreverse 0 times (instead of twice) for Object and Class.
13778         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
13779
13780 1998-05-20  Per Bothner  <bothner@cygnus.com>
13781
13782         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
13783         while initializing linenumber_count and linenumber_table.
13784         Do it before init_function_start (which calls emit_line_note).
13785         * expr.c (expand_byte_code):  Don't need to clear lineno here.
13786
13787 1998-05-18  Tom Tromey  <tromey@cygnus.com>
13788
13789         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
13790         then mangle number as _N_.
13791
13792         * class.c (mangle_class_field): New function.
13793         (build_class_ref): Set assembler name of class reference using
13794         mangle_class_field.
13795         (push_class_static_dummy_field): Likewise.
13796
13797 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
13798
13799         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
13800         of assigning to TREE_CODE.  The latter method exploits a feature
13801         of GCC that is not ANSI compliant.
13802
13803 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13804
13805         * decl.c (pushdecl_force_head): New function.
13806         (pushlevel): Removed conditional printf.
13807         (complete_start_java_method): Don't enter local variable scope if
13808         function is compiled from source code.
13809         * expr.c: parse.h now included
13810         (java_lang_expand_expr): New function.
13811         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
13812         printf. Terminate buffer when doing directories.
13813         * jcf-parse.c (parse_source_file): Call lang_init_source before
13814         parsing and before code generation.
13815         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
13816         use printf if the macro is defined.
13817         * lang.c (lang_init): Install lang_expand_expr hook on
13818         java_lang_expand_expr.
13819         (java_dummy_print): New function.
13820         (lang_init_source): New function.
13821         * lex.c (java_lex): Remember location of an opening brace at the
13822         second nesting level.
13823         (java_is_eol): Unget character seen after a CR if it is EOF.
13824         * parse.h: Now includes lex.h
13825         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
13826         printf if the macro is defined.
13827         (expand_start_java_method, build_expr_block, enter_block,
13828         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
13829         New static function declarations.
13830         (pushdecl_force_head): New extern function declaration.
13831         (INCOMPLETE_TYPE_P): New macro.
13832         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
13833         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
13834         BLOCK_EXPR_ORIGIN): New macros.
13835         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
13836         DECL_SOURCE_LINE_LAST): New macros.
13837         (struct parser_ctxt): Removed field current_method_decl, redundant
13838         with the field current_function_decl. Added fields
13839         first_ccb_indent1 and pending_block.
13840         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
13841         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
13842         tagged <node>
13843         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
13844         (compilation_unit:): Cosmetic on sub rule.
13845         (type_declaration:): Cosmetic on sub rules. Added an error rule.
13846         (variable_initializer:): Installed default rule on expression:.
13847         (method_declaration:): method_header: starts a new
13848         method. method_body: installs the function body, absorbs blocks
13849         emitted for temporary variable scopings, pops function's body block
13850         and merges function's last statement lineno in DECL_SOURCE_LINE.
13851         (method_body:): Installed default rules.
13852         (block:): Call enter_block when an opening brace is seen.  Absorb
13853         scoping blocks and call exit_block when a closing brace is seen.
13854         (block_statement:): Cosmetic changes.
13855         (method_invocation:): Create WFL around CALL_EXPR node.
13856         (patch_stage): Added comment around definition.
13857         (method_header): Try to use first_ccb_indent1 as the first line of
13858         the method, so BP debug info are emitted at the first opening
13859         brace of the function. If the function has no body, use the
13860         location of the function's name. Override currently defined method
13861         name with the matching WFL so we can point redefinition errors
13862         using the location where the function's name was declared.
13863         (check_abstract_method_header): Interprets DECL_NAME as an
13864         identifier or as a WFL, accordingly.
13865         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
13866         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
13867         location and name information out of it and reinstall DECL_NAME to
13868         its original identifier node value.
13869         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
13870         function's source code).
13871         (read_import_dir): Test the value returned by find_class and issue
13872         a fatal accordingly.
13873         (declare_local_variables): Push a new block for the scope of the
13874         new variable(s) if code has been already generated at that nesting
13875         level. Pinpoint redefinition errors using the variable id
13876         WFLs. Generate initialization code if necessary. If the variable
13877         type is incomplete, register a patch on its decl.
13878         (source_start_java_method): Rewritten. Define a new block for the
13879         function's parameters. Build parameter decl out of function's
13880         arguments and register them for a patch if their types are
13881         incomplete.
13882         (expand_start_java_method): Includes the part of
13883         source_start_java_method that was pushing the parameter decls and
13884         completing the method start code.
13885         (source_end_java_method): Removed call the expand_end_bindings and
13886         poplevel (already taken care of). Reinstall function's arguments
13887         and get function's last line of code before calling
13888         expand_function_end.
13889         (java_method_add_stmt): New comment before the function's
13890         code. Complement the second operand of the current COMPOUND_EXPR
13891         if necessary.
13892         (java_complete_expand_methods): Don't generate debug info on line
13893         zero when expanding a generated constructor.
13894         (java_complete_expand_method): Set start and end line numbers for
13895         a artificially generated constructor to one and manually call
13896         enter_block and exit_block when defining it. For all methods:
13897         expand function's start calling the new expand_start_java_method
13898         and invoke java_complete_tree on the effective method's body, if
13899         any.
13900         (resolve_expression_name): Now use lookup_name_in_blocks to search
13901         local variable decls and print out an error when variables are
13902         undefined.
13903         (patch_method_invocation_stmt): Inserted comment before the
13904         function's code.
13905         (lookup_method_invoke): Chain method's arguments using chainon
13906         with the current arg list as a second argument. Inserted missing
13907         IDENTIFIER_POINTER when reporting an error on methods not found.
13908         (refine_accessible_methods_list): Don't retain constructors.
13909         (patch_arguments): Function removed.
13910         (java_complete_tree): Inserted comment before the function's
13911         code. New case for BLOCKs. Moved the WFL case a bit
13912         further. Complete function's arguments.
13913         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
13914         maybe_absorb_scoping_blocks): New functions.
13915
13916 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13917
13918         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
13919         previously set.
13920         * jcf-parse.c (parse_source_file, java_error_count): New forward
13921         and extern declarations.
13922         (java_parse_abort_on_error): Macro moved.
13923         (jcf_parse_source): fatal called if fopen fails. Now calls
13924         parse_source_file.
13925         (parse_source_file): New parse_only parameter. Reflects the
13926         elimination of the second pass.
13927         (yyparse): parse_source_file called with argument set to 0.
13928         * jcf.h (JCF_ZERO): Sets java_source to zero.
13929         * lex.c (java_init_lex): pass argument is gone. Function modified
13930         to be called once during the analysis of a file.
13931         (java_unget_unicode): Fixed typo in fatal message.
13932         (java_get_line_col): Likewise.
13933         (java_lval): Likewise. String literals no longer built during
13934         second pass.
13935         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
13936         account.
13937         * parse.h (MODIFIER_WFL): New macro.
13938         (parse_check_super, parser_check_super_interface): Now return int.
13939         (parser_chain_incomplete_item, not_builtin_p,
13940         complete_method_decl): Declarations removed.
13941         (build_method_invocation_stmt, build_invoke): Renamed using the
13942         `patch' instead of `build'
13943         (register-incomplete_type, obtain_incomplete_type,
13944         java_complete_tree, java_complete_expand_method,
13945         unresolved_type_p, create_jdep_list): New function declarations.
13946         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
13947         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
13948         (jdep): New typedef on new struct _jdep.
13949         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
13950         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
13951         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13952         JDEP_RESOLVED_P): New macros.
13953         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
13954         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
13955         JDEP_VARIABLE): New enum values and jdep kinds.
13956         (jdeplist): New typedef on struct _jdeplist.
13957         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
13958         macros.
13959         (CALL_EXPR_PRIMARY): New macro.
13960         (struct parser_ctxt): Fields java_pass, current_method_decl,
13961         method_decl_list deleted. New field jdeplist.
13962         (INCOMPLETE_P): Macro deleted.
13963         * parse.y (single_type_import_declaration:): Removed pass switch.
13964         (type_import_on_demand_declaration): Likewise.
13965         (field_declaration:): Removed pass switch on all sub rules.
13966         (class_declaration:): Call the complete_class_decl removed on
13967         class_body rules.
13968         (method_declaration:): Removed second pass switch. No longer chain
13969         methods decl when method_header reduced.
13970         (method_header:): Sub rules no longer depend on pass switch.
13971         (method_declarator:): Likewise.
13972         (method_body:): Likewise.
13973         (abstract_method_declaration:): Likewise.
13974         (block_statement:): Likewise.
13975         (local_variable_declaration:): Likewise.
13976         (argument_list:): Likewise.
13977         (method_invocation:): Likewise. Call to build_method_invocation_stmt
13978         removed. Partial CLASS_EXPR tree node built instead.
13979         (postfix_expression:): Removed pass switch on all sub rules.
13980         (java_pop_parser_context): Free classd_list content.
13981         (yyerror): Call obstrack_grow0 to finalize error message.
13982         (check_class_interface_creation): Comment modified to reflect new
13983         returned value meaning. Removed second pass switch. Return 1 if an
13984         error was found, 0 otherwise. Adjust pointer on filename if a
13985         leading path separator was found.
13986         (maybe_create_class_interface_decl): Removed first pass switch
13987         when linking the class decl to the class_list. Install a new
13988         jdep_list for the class.
13989         (add_superinterfaces): List of unresolved interfaces is
13990         gone. Unresolved interfaces are directly added to the current
13991         dependencies list.
13992         (create_interface): Second pass shortcut removed.
13993         ctpx->modifier_ctx access through MODIFIER_WFL.
13994         (create_class): Second pass shortcut removed. Call to
13995         register_incomplete_type replaces the call to
13996         parser_chain_incomplete_item.
13997         (complete_class_decl): Function removed.
13998         (duplicate_declaration_error): New way of retrieving redeclared
13999         item type.
14000         (register_fields): Call to lookup_modifier_cl replaced by
14001         MODIFIER_WFL. New way of handling unresolved type, using
14002         unresolved_type_p and obtain_incomplete_type.
14003         register_incomplete_type replaces call to parser_chain_incomplete_item.
14004         (patch_stage): New static global variable.
14005         (method_header): New way of handling unresolved type, using
14006         unresolved_type_p and obtain_incomplete_type. patch_stage used to
14007         indicates that the method decl needs to be patched.
14008         (check_abstract_method_header): Call to lookup_modifier_cl
14009         replaced by MODIFIER_WFL.
14010         (method_declarator): Incomplete argument type are registered
14011         calling register_incomplete_type. Patch on the declared method is
14012         issued in that case.
14013         (unresolved_type_p): New function.
14014         (parser_check_super_interface): New comment to reflect function's
14015         modified returned type (int). Function and has a new argument
14016         this_wfl. Call to parse_error_context uses this_wfl instead of
14017         relying on lookup_cl.
14018         (parser_check_super): Comment reflects function's new returned
14019         type (int). Function returns nonzero value on error.
14020         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
14021         register_incomplete_type, jdep_resolve_class): New functions to
14022         handle incomplete types in declarations.
14023         (java_complete_class): Rewritten to work with the new incomplete
14024         type handling scheme.
14025         (complete_class_report_errors): Likewise.
14026         (complete_method_decl): Removed: it jobs is now handled by
14027         java_complete_class.
14028         (do_resolve_class): Class loaded in not already loaded and not
14029         found in Java source code.
14030         (java_check_regular_methods, java_check_abstract_methods): Don't
14031         call complete_method_decl anymore.
14032         (lookup_modifier_cl, not_builtin_p): Functions deleted.
14033         (read_import_dir): Got rid of the pass number dependency.
14034         (declare_local_variables): New handling of unresolved types (patch
14035         issued).
14036         (source_start_java_method): New parameter level. Function called
14037         with level set to 1 when argument types are potentially
14038         unresolved.  Called to complete the job with level set to 2 once
14039         types are complete.
14040         (source_end_java_method): Call to permanent_allocation
14041         removed. Waiting to be replaced by a more suitable obstack
14042         management.
14043         (java_complete_expand_methods, java_complete_expand_method,
14044         java_expand_finals): New functions.
14045         (build_method_invocation_stmt): Renamed
14046         patch_method_invocation_stmt. Extracts function call expression
14047         (wfl) and arguments (args) from CALL_EXPR tree operands.
14048         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
14049         call. Patch the function and argument operand of the CALL_EXPR
14050         tree argument.
14051         (patch_argument, java_complete_tree): New functions.
14052
14053 1998-04-20  Per Bothner  <bothner@cygnus.com>
14054
14055         Recover from missing fields and methods (i.e. error instead of fatal).
14056         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
14057         * expr.c (expand_invoke):  Recover from missing method.
14058         (expand_java_field_op):  Recover from missing field.
14059         Inline references to java.lang.{Integer,Char,...}.TYPE.
14060         * typeck.c (get_type_from_signature), java-tree.h:  New function.
14061         * class.c (add_method):  Use get_type_from_signature.
14062         (build_class_ref):  Handle a class that was not found.
14063         * typeck.c (convert):  Handle conversion to pointers (for convenience).
14064         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
14065         instead of lookup_field to handle missing fields.
14066
14067         * jcf-parse.c (process_zip_dir):  Set java_source.
14068
14069 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
14070
14071         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
14072
14073 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14074
14075         * jcf-parse.c (load_class): Don't change input_filename before
14076         calling jcf_parse_source (but still do it before calling
14077         jcf_parse).
14078         (jcf_parse_source): Assign input_filename after having saved the
14079         parser context.
14080         * lex.c (java_init_lex): Chain a WFL node to the import on demand
14081         list. ctxp->modifier_ctx zeroed according to its new
14082         definition. ctxp->filename initialized. Removed
14083         JAVA_MODIFIER_CTX_UNMARK.
14084         (java_unget_unicode): Update the character based column position.
14085         (java_allocate_new_line): ref_count not used anymore. Always free
14086         ctxp->p_line. Initialize c_line->char_col to 0.
14087         (java_get_unicode): Update the character based column position.
14088         (java_lex): Use ctxp->elc to store current position in source
14089         file, at the beginning of the parsed token. Set modifier_ctx entry
14090         corresponding to the parse modifier to a WFL node. Return a WFL
14091         node when an identifier is parsed.
14092         (java_lex_error): Now uses ctxp->elc to store current position in
14093         source.
14094         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
14095         * lex.h (build_wfl_node): New function definitions.
14096         (struct java_line): ref_count and next fields are gone. New field
14097         char_col.
14098         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
14099         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
14100         (JAVA_COLUMN_DELTA): New macro.
14101         (java_lc): New typedef on new struct _java_lc.
14102         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
14103         (parse_error_context, parse_warning_context): Changed prototypes.
14104         (java_get_line_col): Added as an available global function.
14105         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
14106         (IC_DECL): Replaced by macro IC_TYPE
14107         (DEPEND_WFL): New macro.
14108         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
14109         wrong modifier.
14110         (exit_java_complete_class): Removed a commented out statement.
14111         (struct parser_ctxt): Added comments on fields. modifier_ctx is
14112         now an array of tree nodes. Deleted fields line_list and
14113         e_line. New field elc, to replace e_line.
14114         * parse.y (array_type:): Build WFL node.
14115         (qualified_name:): Build a single WFL node out of two. Retain
14116         the location information of the first node in the resulting node.
14117         (package_declaration:): Use package name as a WFL node
14118         (single_type_import_declaration:): Use imported name as a WFL node.
14119         (type_import_on_demand_declaration:): Use root of the imported
14120         packages as a WFL node.
14121         (field_declaration:): Removed unused local variable cl.
14122         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
14123         (yyerror): New static elc. Removed static error_line, error_pos.
14124         New local code_from_source. Save ctxp->elc into elc at the first
14125         pass. Call java_get_line_col to get a string of the line where
14126         the error occurred.
14127         (debug_line): Removed static function.
14128         (parse_error_context, parse_warning_context): Parameter cl is now
14129         a WFL node. Use its value to initialize ctxp->elc.
14130         (redefinition_error): Parameter cl is now a WFL node.
14131         (parse_add_interface): New parameter wfl. No longer call
14132         lookup_cl, use wfl instead.
14133         (check_class_interface_creation): Parameter cl is now a WFL node.
14134         (maybe_create_class_interface_decl): Likewise.
14135         (add_superinterfaces): New function.
14136         (create_interface): Removed local cl, node, super_decl,
14137         super_decl_type.  Function now uses id as a WFL node. Better
14138         warning/error report on obsolete or forbidden mix of
14139         modifiers. Now calls add_superinterfaces to register interfaces.
14140         (create_class): Removed local cl, node. Local variable id is used
14141         as a WFL node. Better error report on forbidden modifier
14142         mix. Uses add_superinterfaces to register interfaces.
14143         (find_field): Argument cl is now a WFL node. Now store the WFL
14144         node of a fields that needs to be checked for their
14145         initialization.
14146         (method_header): Local variable node non longer used. Local
14147         variable id replaces cl.
14148         (check_modifiers_consistency): Local variable cl is now a WFL
14149         node.
14150         (method_declarator): Local variable cl replaced by parameter id.
14151         (parser_qualified_name): Now uses parameter name as a WFL node.
14152         (parser_check_super_interface): New parameter wfl, for achieve
14153         greater accuracy during error reports.
14154         (parser_chain_incomplete_item): New parameter named location. Used,
14155         along the decl, to construct the incomplete item node.
14156         (java_complete_class): resolve_class now uses WFL node extracted
14157         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
14158         where appropriate.
14159         (complete_method_decl): Unresolved function's argument types are WFL.
14160         (resolve_class): Parameter cl is now a WFL node.
14161         (resolve_and_layout): Likewise.
14162         (do_resolve_class): Likewise. Try first to use cl and then do the
14163         lookup on the decl when calling check_pkg_class_access.
14164         (complete_class_report_errors): Use IC_TYPE in place of
14165         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
14166         instead of doing a lookup over the decl.
14167         (java_check_final): Use WFL info from field tree list.
14168         (lookup_cl): Rewritten and returns a statically defined WFL node.
14169         (lookup_modifier_cl): Now uses information from WFL nodes.
14170         (process_imports): Likewise.
14171         (read_import_dir): name and cl arguments replaced by a single WFL
14172         node. Function modified accordingly.
14173         (find_in_imports_on_demand): Now uses WFL node.
14174         (check_pkg_class_access): cl argument is now a WFL node.
14175         (declare_local_variables): Fixed to use WFL nodes.
14176         (resolve_expression_name): Likewise.
14177         (build_method_invocation_stmt): name_combo argument renamed
14178         wfl. Function modified to use WFL nodes.
14179         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
14180         (lookup_method_invoke): cl is now a WFL node. Added missing
14181         IDENTIFIER_POINTER to class type decl name.
14182
14183 1998-04-14  Dave Brolley  <brolley@cygnus.com>
14184
14185         * lang.c (init_parse): Now returns char* containing the filename.
14186
14187 1998-04-10  Per Bothner  <bothner@cygnus.com>
14188
14189         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
14190
14191         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
14192         * class.c (make_class_data):  If flag_assume_compiled, initial class
14193         state is CSTATE_PREPARED; make superclass and interfaces direct
14194         references, rather than constant pool indexes.
14195
14196 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14197
14198         * parser.y: Include flags.h. Removed debug variable pl.
14199         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
14200         (block:): Likewise.
14201         (labeled_statement_nsi:): Generate debug info when reducing
14202         expression_statement:.
14203         (check_pkg_class_access): get_access_flags_from_decl invokation
14204         fixed for new CLASS_* flags location.
14205         (source_end_java_method): Save/restore parser context when
14206         entering/leaving this routine. Restore lineno to its right value
14207         before calling expand_end_bindings.
14208         (build_method_invocation_stmt): build_invoke called with the
14209         current line information.
14210         (build_invoke): New argument cl. Wrap the function call around a
14211         wfl node.
14212         (refine_accessible_methods_list): Changed comment, removed
14213         unnecessary code.
14214         * parse.h: Fixed typo in comments.
14215         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
14216         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
14217         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
14218         parser_ccb_indent.
14219         * lex.c (java_lex): Record the last closing curly bracket of a
14220         function.
14221         * jcf-parse.c (jcf_parse_source): Now calls
14222         java_check_methods. Clarified comment, fixed typo.
14223
14224 1998-04-09  Dave Brolley  <brolley@cygnus.com>
14225
14226         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
14227         (finish_parse): Expose for non USE_CPPLIB builds.
14228
14229 1998-04-08  Jeffrey A Law  (law@cygnus.com)
14230
14231         * lang.c (lang_print_xnode): New function.
14232
14233 1998-04-03  Per Bothner  <bothner@cygnus.com>
14234
14235         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
14236         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
14237         used to build a class's dispatch table.
14238         (make_class_data):  Generate dispatch table if flag_assume_compiled.
14239         Set dtable of class object to address of class_dtable_decl.
14240
14241         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
14242         be volatile and have side effects - generates better code.
14243
14244         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
14245         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
14246
14247         * expr.c (expand_invoke):  If class is final, method is
14248         effectively final, so can call it directly.
14249
14250         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
14251
14252         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
14253
14254 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14255
14256         * parse.y (build_method_invocation_stmt): Removed extra argument
14257         to build_invoke.
14258
14259 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14260
14261         * expr.c (dtable_indent): Now static global.
14262         (expand_invoke): Now call invoke_build_dtable and
14263         build_invokevirtual.
14264         (invoke_build_dtable, build_invokevirtual): New functions.
14265         * jcf-io.c (find_class): Defer issuing a warning by setting
14266         jcf->outofsynch to 1.
14267         * jcf-parse.c (jcf_out_of_synch): New function.
14268         (load_class): Test this_jcf.outofsynch flag and call
14269         jcf_out_of_synch accordingly.
14270         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
14271         comment indentation.
14272         * lex.c (java_get_unicode): Fixed code indentation.
14273         (java_lex): Create string literal. Fixed typo. Removed several
14274         premature obstack_free.
14275         * parse.h: New enums for name resolution and invocation mode.
14276         (struct qualification): New data structure.
14277         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
14278         (do_resolve_class, build_method_invocation_stmt,
14279         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
14280         debug_line, identical_subpath_p, invocation_mode,
14281         refine_accessible_methods_list, build_invoke,
14282         lookup_method_invoke): New functions declared.
14283         (build_invokevirtual, invoke_build_dtable, match_java_method,
14284         build_field_ref, jcf_out_of_synch): New references to external
14285         functions.
14286         (struct parse_ctxt): Removed artificial_constructor field.
14287         * parse.y: (array_type:): Type defined for this rule.
14288         (class_type:): Installed default rule for interface_type:.
14289         (array_type:): Now build Java array type.
14290         (qualified_name:): Now use obstack_grow0.
14291         (method_declaration:): Skip the artificial constructor added to
14292         the list, if any.
14293         (abstract_method_declaration:): Execute the code only during pass 1.
14294         (block:): Installed default rule in block_statements:.
14295         (block_statement:): Add the statement to the method during pass 2.
14296         (statement_expression): Installed default rule for
14297         method_invocation:.
14298         (argument_list:): Added code to build the argument list.
14299         (method_invocation:): Added call to create the method invocation
14300         node.
14301         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
14302         (debug_line): New function for debug.
14303         (complete_class_decl): No longer do something during pass 1.
14304         (method_header): Use BUILD_PTR_FROM_NAME.
14305         (parser_qualified_classname): Use obstack_grow0. Removed bogus
14306         obstack_free.
14307         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
14308         function's main comment.
14309         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
14310         classes.
14311         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
14312         (resolve_class): Now works with arrays.
14313         (do_resolve_class, resolve_and_layout): New functions.
14314         (java_check_regular_methods): Reverse method list before and after
14315         having processed it. No longer set ctxp->artificial_constructor.
14316         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
14317         accordingly. Fixed typo in issued error message. Now use
14318         obstack_grow0.
14319         (find_in_imports_on_demand): Now use obstack_grow0.
14320         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
14321         (source_end_java_method): Call expand_expr_stmt instead of
14322         expand_expr. Calls it before calling expand_function_end.
14323         (java_method_add_stmt): Do nothing if errors were found during
14324         parsing.
14325         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
14326         (build_method_invocation_stmt, build_invoke, invocation_mode,
14327         lookup_method_invoke, refine_accessible_methods_list,
14328         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
14329         New functions.
14330         * typeck.c (build_java_signature): Properly end method signature
14331         if return type skipped.
14332         (match_java_method): New function.
14333
14334 1998-03-16  Per Bothner  <bothner@cygnus.com>
14335
14336         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
14337
14338 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14339
14340         * expr.c (build_invoke_non_interface): New function.
14341         (methods_ident, ncode_ident): Now static globals.
14342         (expand_invoke): Use build_invoke_non_interface.
14343         * java-tree.h (struct lang_decl): New field function_decl_body.
14344         (DECL_FUNCTION_BODY): New macro.
14345         * jcf-parse.c (jcf_parse_source): Deeper check before setting
14346         CLASS_FROM_SOURCE_P.
14347         (parse_source_file): Fixed typos. Call java_layout_parsed_class
14348         before starting pass 2. Call to java_generate_parsed_class replaced
14349         by java_register_parsed_class.
14350         * lex.c: Fixed typo in header. Some line width related formating.
14351         * lex.h: Some line width related formating.
14352         * parse.h (source_end_java_method, resolve_expression_name,
14353         complete_class_decl, maybe_create_class_interface_decl,
14354         check_class_interface_creation): New static function declarations.
14355         (java_layout_parsed_class, java_method_add_stmt): New function
14356         declarations.
14357         (struct parser_ctxt): Field mark_class_generate removed. New
14358         fields class_list and artificial_constructor.
14359         * parse.y: Fixed typo in header.
14360         (class_declaration:): Call complete_class_decl when class body
14361         parsed.
14362         (method_declaration:): Call source_end_java_method in pass 2 when
14363         the method body is defined.
14364         (postfix_expression:): Do expression name resolution on sub-rule
14365         name during pass 2.
14366         (create_class, create_interface): Merged common pieces.
14367         (check_class_interface_creation, maybe_create_class_interface_decl):
14368         New functions.
14369         (complete_class_decl): New function.
14370         (register_fields): Fixed line width related typo.
14371         (method_header): Correctly skip first argument when fixing
14372         argument line. Changed the loop.
14373         (java_check_circular_reference): Now use ctxp->class_list.
14374         (java_complete_class): Removed start/stop marking.
14375         (java_check_regular_methods): Now takes a class decl as an
14376         argument.  Add default constructor if none were encountered.
14377         (java_check_methods): Now use ctxp->class_list. Changed call to
14378         java_check_regular_methods.
14379         (source_start_java_method): Set DECL_ARG_TYPE for each function
14380         arguments.
14381         (source_end_java_method, java_method_add_stmt): New functions.
14382         (java_generate_parsed_class): No longer exists.
14383         (java_layout_parsed_class, java_register_parsed_class): New functions.
14384         (resolve_expression_name): New function.
14385
14386 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14387
14388         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
14389         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
14390         until pass initializations are done. Call read_import_dir with
14391         pass set to 0.
14392         * parse.h: (lookup_modifier_cl): New function declared.
14393         (INTERFACE_FIELD_MODIFIERS): New macro.
14394         (OBSOLETE_MODIFIER_WARNING): New macro.
14395         * parse.y: (register_fields): Class type and current field name in
14396         local variables. Check modifier(s) if adding field(s) to an interface.
14397         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
14398         and report errors using the faulty modifier line context.
14399         (lookup_modifier_cl): New function.
14400         (read_import_dir): Detect and report default import processing
14401         failure.
14402
14403 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
14404
14405         Add a pair of -fassume-compiled/-fno-assume-compiled options.
14406         * class.c (is_compiled_class): Return 1 after making sure it
14407         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
14408         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
14409         * java-tree.h (flag_assume_compiled): Add decl.
14410         * lang.c (lang_f_options): Add the flag.
14411         (flag_assume_compiled): Add decl, default to 0.
14412
14413 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14414
14415         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
14416         (is_compiled_class): Likewise.
14417         (layout_class): Likewise.
14418         (layout_class): Detect and lay out classes defined in source code.
14419         (interface_of_p, add_interface_do, may_add_interface): New
14420         function.
14421         (add_interface): Now use add_interface_do.
14422         (add_method_1): New function.
14423         (add_method): Now use add_method_1.
14424         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
14425         (complete_start_java_method): New function.
14426         (start_java_mehod): Now call complete_start_java_method.
14427         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
14428         (expand_invoke): Likewise and fixed typo.
14429         *gjava.c: (print_super_field): Use new argument to find_class
14430         DO_CLASS_FILE.
14431         (main): Likewise.
14432         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
14433         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
14434         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
14435         IDENTIFIER_NODE.
14436         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
14437         (add_method_1, push_class): New prototypes.
14438         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
14439         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
14440         directory where the class was found.
14441         (find_class): New argument DO_CLASS_FILE. Function find_class
14442         modified accordingly.
14443         *jcf-parse.c: (fix_class_path): New function.
14444         (load_class): Use new VERBOSE argument. load_class now finds and
14445         loads/parses .class/.java files. Save read_state of current_jcf
14446         if necessary.
14447         (java_parser_abort_on_error): New macro.
14448         (jcf_parse_source, parse_source_file): New function.
14449         (jcf_parse): Fixed typo.
14450         (yyparse): Call parse_source_file () only.
14451         (process_zip_dir): Fixed typo, fix zdir->filename_length when
14452         writing the real class name back in the zip directory entry.
14453         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
14454         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
14455         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
14456         (find_class): Prototype fixed.
14457         *lex.c: Added 1998 time stamp.
14458         Removed all static global variables, moved into the parser
14459         context data structure.. Now include unistd.h if SEEK_SET not
14460         defined.
14461         (java_init_lex): Rewritten.
14462         (java_sneak_unicode): Modified current unicode access in current line.
14463         (java_unget_unicode): Likewise.
14464         (java_allocate_new_line): New allocation management.
14465         (java_read_char): Modified access and storage of unget_utf8_value.
14466         New way of processing current unicode.
14467         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
14468         (java_get_unicode): Now use the parser context.
14469         (java_lineterminator): Likewise.
14470         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
14471         of the reentrant parser implementation. Function now use the
14472         parser context data structure and java_lval. Fixed production of
14473         the float and double constant "out of range" error message. Fixed
14474         obstack use. Return integer value when hitting a modifier. Now
14475         return type for TRUE, FALSE and other predefined types. Return
14476         identifier as a TREE_LIST list containing the current line context
14477         as the TREE_VALUE sub-node.
14478         (java_unicode_2_utf8): Fixed typo in declaration.
14479         (java_lex_error): Now use the parser context data structure.
14480         *lex.h: Added 1998 time stamp.
14481         (struct java_line): New fields ref_count and next.
14482         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
14483         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
14484         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
14485         *parse.h: Added 1998 time stamp.
14486         (java_parse_source_file): Renamed from parse_source_file.
14487         (YYERROR_NOW, YYNOT_TWICE): Fixed.
14488         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
14489         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
14490         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
14491         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
14492         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
14493         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
14494         (struct parser_ctxt): New data structure to keep the parser context.
14495         *parse.y: Added 1998 time stamp, got rid of static global variables.
14496         (java_error_count, ctxp): New global variables.
14497         (%union): New value field.
14498         (numeric_type, integral_type): Rules removed.
14499         (primitive_type): Rule defined to handle integral, float, double and
14500         boolean types.
14501         (qualified_name, package_declaration,
14502         single_type_import_declaration, type_import_on_demand_declaration,
14503         modifiers, class_declaration, super, interfaces,
14504         interface_type_list, class_body, field_declaration,
14505         field_declaration, variable_declarators, variable_declarator,
14506         variable_declarator_id, method_declaration, method_header,
14507         formal_parameter_list, formal_parameter, method_body, block,
14508         static, interface_declaration, extends_interfaces,
14509         abstract_method_declaration, local_variable_declarators): Rules now
14510         define actions.
14511         (force_error, do_warning): New global statics.
14512         (push_parser_context, parser_context_save_global,
14513         parser_context_restore_global, pop_parser_context): New functions.
14514         (yyerror): Now uses the global parser context. Fixed use of obstack.
14515         (parse_error, parse_error_context, parse_warning_context,
14516         java_accstring_lookup, redefinition_error, check_modifiers,
14517         parser_add_interface, create_interface, create_class, find_field,
14518         duplicate_declaration_error, register_fields, method_header,
14519         check_modifiers_consistency, check_abstract_method_header,
14520         method_declarator, parser_qualified_classname,
14521         parser_check_super_interface, parser_check_super,
14522         parser_chain_incomplete_item, java_check_circular_reference,
14523         layout_class_from_source, java_complete_class,
14524         complete_method_decl, resolve_class, complete_class_report_errors,
14525         java_check_final, check_method_redefinition,
14526         java_check_regular_methods, java_check_abstract_methods,
14527         java_check_methods, lookup_java_interface_method2,
14528         lookup_java_method2, lookup_cl, find_name_in_single_imports,
14529         process_imports, find_in_imports, read_import_entry,
14530         read_import_dir, find_in_imports_on_demand,
14531         check_pkg_class_access, not_builtin_p, declare_local_variables,
14532         source_start_java_method, java_generate_parsed_class): New
14533         functions.
14534         *typeck.c: (signature_include_return): New global variable.
14535         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
14536         to add the function returned type in the signature.
14537
14538 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
14539
14540         * jcf-io.c (open_in_zip): Use strncmp and LEN.
14541
14542 1998-01-29  Dave Brolley  <brolley@cygnus.com>
14543
14544         * Make-lang.in (java.info): Added.
14545         (java.install-info): Added
14546
14547 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
14548
14549         * Makefile.in (clean): Also remove java/parse.c.
14550
14551 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
14552
14553         Add a pair of -fbounds-check/-fno-bounds-check options.
14554         * lang.c (lang_decode_option): Add code to grok arguments.
14555         (flag_bounds_check): Add decl.
14556         (lang_f_options): New array w/ the option in it.
14557         * java-tree.h (flag_bounds_check): Add decl.
14558         * lang-options.h: New file.
14559         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
14560         of a static macro value.
14561         (JAVA_ARRAY_EXCEPTION): Delete macro.
14562
14563 1998-01-23  Per Bothner  <bothner@cygnus.com>
14564
14565         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
14566         * expr.c (build_anewarray):  Add missing promote_type.
14567
14568 1998-01-22  Per Bothner  <bothner@cygnus.com>
14569
14570         Add array types with known length to optimize bounds checking.
14571         * typeck.c (build_java_array_type):  Take length parameter.
14572         (java_array_type_length, build_prim_array_type):  New functions.
14573         * java-tree.h:  Update for new functions.
14574         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
14575         * class.c:  Use build_prim_array_type.
14576         * expr.c (can_widen_reference_to):  Handle known-length array types.
14577         (verify_jvm_instructions):  Keep track of integer push instructions
14578         followed by newarray/anewarray, so we can build known-length arrays.
14579         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
14580         (java_array_data_offset):  New function.
14581         (build_java_array_length_access):  New function.  Optimize if constant.
14582         (build_java_arrayaccess):  Constant fold bounds check.
14583         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
14584         (build_newarray, build_anewarray):  New functions.
14585         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
14586         * verify.c (merge_types):  Handle known-lengh array types.
14587
14588 1998-01-19  Per Bothner  <bothner@cygnus.com>
14589
14590         * expr.c (expand_byte_code):  Fix performace bug, which caused
14591         searching linenumber_table to be linear rather than constant.
14592
14593 1997-12-12  Per Bothner  <bothner@cygnus.com>
14594
14595         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
14596
14597         * decl.c, java-tree.h (soft_fmod_node):  New global.
14598         * decl.c (init_decl_processing):  Define __builtin_fmod.
14599         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
14600         using __builtin_fmod.
14601
14602 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14603
14604         * keyword.h: New file, output of keyword.gperf as processed by
14605         gperf.
14606         * lex.c (java_lex_init): Initialize java_error_flag.
14607         * parse.c (YYERROR_NOW): Uses java_error_flag.
14608         * parse.y: New static java_error_flag. Useless definition of
14609         buffer_error gone.
14610         * parse.y (java_error): Portable error recovery using
14611         java_error_flag (not yet completely tuned).
14612
14613 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
14614
14615         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
14616
14617 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14618
14619         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
14620         (parse.c, lex.c, keyword.h): New rules for Java source code
14621         front-end.
14622         * parse.c: Renamed into jcf-parse.c.
14623         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
14624         * keyword.gperf: New file, Java keywords.
14625         * parse.y: New file, Java language grammar.
14626         * parse.h: New file, Java language grammar definitions.
14627         * lex.c: New file, Java language lexer.
14628         * lex.h: New file, Java language lexer definitions.
14629
14630 1997-12-03  Per Bothner  <bothner@cygnus.com>
14631
14632         * decl.c (clinit_identifier_node), java-tree.h:  New global.
14633         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
14634         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
14635         * expr.c (expand_java_field_op):  Check for invalid assignment
14636         to final field.
14637
14638         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
14639
14640 1997-10-27  Per Bothner  <bothner@cygnus.com>
14641
14642         * verify.c (verify_jvm_instructions):  When processing a handler,
14643         attempt to set the current_subr to the right value.
14644         (More complicated code combines Sep 17 and Oct 22 versions.)
14645
14646 1997-10-24  Per Bothner  <bothner@cygnus.com>
14647
14648         * class.c (push_class):  Figure out (guess) name of source file.
14649         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
14650         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
14651         (parse_class_file):  Change return type from int to void.
14652         Call debug_start_source_file/debug_end_source_file.
14653
14654         * expr.c (build_java_binop):  Fix masking 2nd operand.
14655         * decl.c (init_decl_processing):  Set sizetype first.
14656
14657 1997-10-22  Per Bothner  <bothner@cygnus.com>
14658
14659         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
14660         (Revert Sep 17 change.)
14661
14662 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14663
14664         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
14665         .class extension in their name and fix thing so we don't process
14666         them parse_zip_file_entries().
14667         (parse_zip_file_entries): Cleaned unused local variables.
14668
14669 1997-10-20  Per Bothner  <bothner@cygnus.com>
14670
14671         * expr.c (can_widen_reference_to):  Allows equal array element types.
14672         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
14673         * jcf-dump.c (RET):  Get (and print) index.
14674
14675         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
14676         Promote element type to POINTER_TYPE.
14677
14678 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14679
14680         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
14681         find_in_current_zip, jcf_figure_file_type): Moved from
14682         jcf-reader.c to parse.c.
14683         * zextract.c: (read_zip_archive): takes file_comment_length possible
14684         field into account.
14685
14686 1997-10-20  Per Bothner  <bothner@cygnus.com>
14687
14688         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
14689
14690         * verify.c (merge_types):  Handle array types even better ...
14691
14692 1997-10-17  Per Bothner  <bothner@cygnus.com>
14693
14694         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
14695
14696         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
14697         * class.c (make_class_data):  Don't build fields_decl if no fields.
14698         When building fields_decl, skip if DECL_ARTIFICIAL.
14699
14700         * expr.c (java_stack_swap):  Update stack_type_map.
14701         * verify.c (merge_types):  Handle array types better.
14702
14703 1997-10-15  Per Bothner  <bothner@cygnus.com>
14704
14705         * class.c (add_field):  Don't promote short integral fields to
14706         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
14707         * expr.c (push_value):  Promote and convert short integral values.
14708
14709         * decl.c, java-tree.h (integer_two_node):  New constant node.
14710         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
14711
14712 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14713
14714         * class.c (append_gpp_mangled_type): Use function argument
14715         unpromoted type to generate mangled name.
14716
14717 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14718
14719         * constants.c (build_constant_data_ref): Now uses current_class
14720         instead of main_class.
14721         (build_constants_constructor): Now uses current_class instead of
14722         main_class.
14723         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
14724         of the global variable SeepZipFiles done here.
14725         * zextract.c (read_zip_archive): extra_field optional field taken
14726         into account while computing the position of the class file in the
14727         archive.
14728         * verify.c (verify_jvm_instructions): Use current_jcf to search
14729         the constant pool.
14730         * parse.c (load_class): First search for the class to load in the
14731         current zip file. Saves current_jcf (restored before returning
14732         from that function). Don't call JCF_FINISH in the class was found
14733         in the current ZIP file.
14734         (jcf_parse): If the class was found in the current ZIP file, save
14735         its tree_constant_pool (for later reuse).
14736         (parse_class_file): New function. Process each method defined in
14737         the current class and record the class as to be later registered.
14738         (yyparse): Rewritten. Figure the type of the current file and switch
14739         accordingly.
14740         * lang.c: New global variable current_jcf.
14741         (lang_init): Removed compiling_from_source test (done later, in
14742         yyparse). Removed call the jcf_parse ().
14743         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
14744         (typedef struct JCF): New fields seen_in_zip (to mark a class found
14745         in the current ZIP file) and zip_offset (offset to the class data in
14746         the current zip file).
14747         * jcf-reader.c: zipfile.h included.
14748         localToFile: New ZipFileCache static global variable
14749         (parse_zip_file_entries): New function. Browse the current ZIP
14750         file directory and process each class found.
14751         (process_zip_dir): New function. Register each class found in the
14752         ZIP file directory. The class aren't parsed but a valid JCF is
14753         link to each of them.
14754         (find_in_current_zip): New function. Search for a class in the
14755         current ZIP file directory. If found, prepare the class so that it
14756         can be loaded.
14757         (jcf_figure_file_type): New function. Examine the file structure
14758         to figure a class file, a ZIP file. If none of these categories are
14759         matched, a source file is assumed.
14760         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
14761         SeenZipFile: New global variable.
14762         (open_in_zip): Use zipmember's length to accelerate the search for
14763         a member. If zipmember was NULL and zip file successfully read,
14764         return 0.
14765         * java-tree.h: New global variable current_jcf declared.  Added
14766         declaration for current_constant_pool_tags, current_constant_pool_data,
14767         current_constant_pool_length, current_constant_pool_data_ref.
14768         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
14769         store the JCF of classes seen in a zip file) and tree *constant_pool
14770         (to save a loaded class constant pool). current_class declared here.
14771         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
14772         retrieve method_ref_constant.
14773         (PUSHC): java_push_constant_from_pool now uses current_jcf.
14774         (OBJECT): get_class_constant now uses current_jcf.
14775         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
14776         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
14777         (expand_invoke): Now uses current_class instead of main_class
14778         (build_class_init): Now uses current_class instead of main_class
14779         * class.c: New static global variable registered_class.
14780         (register_class): New function.
14781         (emit_register_class): Modified to use registered_class instead of
14782         main_class
14783         (is_compiled_class): Now take into account class seen in the archive.
14784
14785 1997-10-06  Per Bothner  <bothner@cygnus.com>
14786
14787         * except.h:  Renamed to: java-except.h.
14788         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
14789         * except.c:  Add semi-working (commented out) implementation.
14790
14791         * expr.c (expand_iinc):  Add needed flush_quick_stack.
14792         * parse.c (set_source_filename):  New function.
14793         (give_name_to_class):  Set input_filename from package.classname.java.
14794
14795         * jcf-io.c (find_class):  Don't look first in ".".
14796
14797 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14798
14799         * zextract.c (read_zip_archive): Now takes into account the
14800         extra_field field.
14801         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
14802
14803 1997-09-20  Per Bothner  <bothner@cygnus.com>
14804
14805         * constants.c, java-tree.h (build_internal_class_name):  New function.
14806         (alloc_class_constant):  Re-implement using build_internal_class_name.
14807         * class.c (make_class_data):  Likewise.
14808         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
14809
14810 1997-09-17  Per Bothner  <bothner@cygnus.com>
14811
14812         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
14813         to NULL before pushing an exception handler target.
14814
14815         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
14816         (java_stack_swap, java_stack_dup):  Re-write to be safe from
14817         clobbering registers.
14818         (build_class_init):  New function.
14819
14820 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14821
14822         * typeck.c (build_java_array_type): Temporary use
14823         permanent_obstack to create the array 'length' field.
14824         * expr.c (lookup_label): Temporay use permanent_obstack to create
14825         label if not found.
14826         * class.c (push_super_field): Tempory use permanent_obstack.
14827
14828 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14829
14830         * typeck.c (type_for_mode): Now handles double_type_node and
14831         float_type_node.
14832         * verify.c (verify_jvm_instructions): The instruction following
14833         the wide bytecode is checked. OPCODE_ret added to the list of
14834         wide.
14835
14836 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14837
14838         * class.c (make_class): Temporary use permanent_obstack. Set the
14839         class CLASS_P field to 1.
14840         (push_class): Temporary use permanent_obstack.
14841         (set_super_info): Temporary use permanent_obstack.
14842         (add_method): Temporary use permanent_obstack, set
14843         METHOD_TRANSIENT().
14844         (add_field): Temporary use permanent_obstack. Sets
14845         FIELD_VOLATILE() and FIELD_TRANSIENT().
14846         (build_class_ref): Temporary use permanent_obstack if the class
14847         isn't compiled.
14848         (build_static_field_ref): Temporary use permanent_obstack when
14849         creating field's rtl.
14850         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
14851         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
14852         and fields. Function finalized, as far as flag handling.
14853         (push_class_static_dummy_field): Temporary use permanent_obstack.
14854         (emit_register_class): Force generation of class registration at
14855         -O3 or deeper.
14856         * decl.c (end_java_method): Call permanent_allocation() before
14857         returning.
14858         * expr.c (can_widen_reference_to): Added comment to interface
14859         handling, fixed typo.
14860         (lookup_field): Now uses CLASS_P() to correct FIXME
14861         (expand_invoke): Verification on public && !static &&
14862         !abstract moved into soft_lookupinterfacemethod (kaffe).
14863         Use Object class dtable if objectref is an array when expanding
14864         invokeinterface.
14865         (java_push_constant_from_pool): Temporary use permanent_obstack
14866         for CONSTANT_string
14867         * parse.c (get_ref_constant): Temporary use permanent_obstack to
14868         create constant references.
14869         (get_constant): Temporary use permanent_obstack to create constant.
14870         (load_class): Temporary use permanent_obstack to load class.
14871         (jcf_parse): Temporary use permanent_obstack to perform class
14872         layout.
14873         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
14874         (build_java_signature): Temporary use permanent_obstack.
14875         * verify.c: (verify_jvm_instruction): removed unnecessary verification
14876         on ACC_SUPER flag.
14877         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
14878         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
14879         (CLASS_P): Defined
14880
14881 1997-09-11  Per Bothner  <bothner@cygnus.com>
14882
14883         * class.c (append_gpp_mangled_type):  Fix typo.
14884         (emit_register_class):  Use main_class to get class object, rather
14885         than looking for no-longer-existing static decl starting with _CL.
14886         * typeck.c (parse_signature_type):  Promote array element type
14887         if it is a RECORD_TYPE.
14888
14889 1997-09-10  Per Bothner  <bothner@cygnus.com>
14890
14891         * class.c (push_class_static_dummy_field):  New function.
14892         (mangle_static_field):  New. Do G++-style mangling of static fields.
14893         (layout_class):  Mandle static fields here, not in add_field.
14894         (build_class_ref):  The class object is now a dummy static field.
14895         * decl.c (find_local_variable):  Look for best, instead of first match.
14896         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
14897         (build_java_athrow):  Don't check here if exception is Throwable.
14898         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
14899         (TYPE_USED):  Removed.  No longer used ...
14900         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
14901         * verify.c (push_pending_label):  New function.
14902         (push_pending_block):  Renamed to check_pending_block.
14903         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
14904         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
14905         re-checking possible handlers) after a store (less wasted work).
14906         Check for null handler (finally) before calling add_handler.
14907         Various changes to (finally?) correctly handle try/finally.
14908
14909 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
14910
14911         * class.c: Include stdio.h.
14912
14913 1997-09-04  Per Bothner  <bothner@cygnus.com>
14914
14915         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
14916         to make sure class is initialized before static/special invoke.
14917
14918         * verify.c (verify_jvm_instructions):  On a store instruction,
14919         call find_local_variable to force pre-allocation of decl and rtx.
14920         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
14921
14922 1997-09-03  Per Bothner  <bothner@cygnus.com>
14923
14924         * class.c (build_class_ref):   Strip off "promoted_" if need be.
14925         (make_field_value): Call build_java_signature when needed.
14926         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
14927         * expr.c (build_java_athrow):  Don't push_value of exception.
14928         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
14929         match specification of [fd]cmp[lg] for NaNs.
14930         (expand_byte_code):  Add support for exception handler ranges.
14931         * except.c:  Add skeleton for EH code-generation.
14932         * verify.c (merge_types):  Treat all promoted integral types as equal.
14933         * constants.c (build_constants_constructor):  To force creation of
14934         current_constant_pool_data_ref, call build_constant_data_ref.
14935
14936         * javaop.def (lload):  Fix typo.
14937         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
14938
14939 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
14940
14941         * parse.c: Don't include function.h.
14942
14943 1997-08-27  Per Bothner  <bothner@cygnus.com>
14944
14945         * except.[ch]:  New files.
14946         * Makefile.in (JAVA_OBJS):  Add except.o
14947         * expr.c:  Temporary warning about unimplemented exceptions.
14948         * verify.c:  Verify exception handlers.
14949
14950         * jcf-dump.c (disassemble_method):  Print exception table.
14951
14952 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14953
14954         * expr.c (verify_jvm_instructions): Started a thorough
14955         verification of invoke* bytecodes.
14956         (expand_byte_code): flush quick stack if PC is the target of a
14957         branch.  and undef RET (conflicting with config/i386/i386.h).
14958         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
14959         used.
14960         (expand_invoke): Now handles invokeinterface and do more
14961         verification according to the bytecode.
14962         (lookup_field): Don't try to load the class if processing
14963         dtable_type.
14964         (can_widen_reference_to): Now handles interfaces.
14965         * decl.c (init_decl_processing): New global variable
14966         soft_lookupinterfacemethod_node, declared in java-tree.h.
14967         Call set_super_info on string_type_node.
14968         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
14969         defined.
14970         * class.c (set_super_info): Fills the CLASS_* flags according to
14971         access_flags.
14972         (get_access_flags_from_decl): Handles all class flags.
14973
14974 1997-08-26  Per Bothner  <bothner@cygnus.com>
14975
14976         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
14977         * parse.c (yyparse):  Check for abstract method, and missing code.
14978         * expr.c (expand_byte_code):  Change interface.
14979         * lang.c (put_decl_node):  Print promoted types prettier.
14980         * verify.c (verify_jvm_instruction):  Change interface.
14981         Partial support for scanning exception table.
14982         For load instructions, handle promoted integral types.
14983
14984 1997-08-21  Per Bothner  <bothner@cygnus.com>
14985
14986         * verify.c:  New file, with contents moved from expr.c.
14987         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
14988         * typeck.c (is_array_type_p):  Moved here from expr.c.
14989         * java-tree.h:  Add some now-needed function declarations.
14990         * Makefile.in (JAVA_OBJS): Added verify.o.
14991
14992 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14993
14994         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
14995         METHOD_ABSTRACT flag.
14996
14997         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
14998         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
14999         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
15000
15001         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
15002         variables.
15003         (start_java_method): Hook for SYNCHRONIZED methods.
15004
15005         * expr.c (build_java_jsr, build_java_ret): New functions
15006         (JSR,PRE): New macros
15007         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
15008         (verify_jvm_instructions): tableswitch, lookupswitch,
15009         monitorenter, monitorexit, goto_w: verified.
15010         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
15011         (build_java_monitor): New function.
15012         (MONITOR_OPERATION): Modified to call build_java_monitor()
15013         (verify_jvm_instructions): Started a thorough verification of
15014         invoke* bytecodes.
15015
15016 1997-08-19  Per Bothner  <bothner@cygnus.com>
15017
15018         Support verification of jsr/ret subroutines (used for try/finally).
15019         * decl.c (return_address_type_node):  New type node.
15020         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
15021         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
15022         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
15023         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
15024         TYPE_USED):  New macros for special types in type_map.
15025
15026         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
15027         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
15028         BCODE_JUMP_TARGET.
15029         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
15030
15031         * expr.c (can_widen_reference_to):  New function.
15032         (pop_type):  Use it.
15033         (merge_type_state):  Support handling start of subroutine.
15034         (push_pending_block):  Return char* error message, instead of calling
15035         fatal on an error.  Also handle subroutines.
15036         (verify_jvm_instructions):  Handle errors from push_poending_block.
15037         Support jsr and ret instructions.
15038
15039 1997-08-19  Per Bothner  <bothner@cygnus.com>
15040
15041         * jcf-io.c (find_classfile):  Fix thinko.
15042         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
15043
15044 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
15045
15046         * Makefile.in (BISON): Remove.
15047
15048 1997-08-07  Per Bothner  <bothner@cygnus.com>
15049
15050         * Makefile.in:  Convert to autoconf.
15051         * config-lang.in (outputs):  Added java/Makefile.
15052
15053         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
15054         Rename cc1java to jc1.
15055
15056         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
15057         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
15058
15059         * class.c (class_depth):  Do load_class if needed.
15060
15061         Mostly better verification.
15062         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
15063         (init_decl_processing):  Change return type of soft_checkcast.
15064         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
15065         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
15066         lang_print_error):  New functions.
15067         (lang_init):  Set global hook print_error_function to lang_print_error.
15068         * expr.c:  In the type_map ptr_type_node is only used for null now.
15069         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
15070         (merge_types):  Dererence pointer to record types before comparing.
15071         (decode_newarray_type, merge_types):  On error just return NULL.
15072         (build_java_binop):  Add preliminary implementation (with warning)
15073         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
15074         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
15075         (expand_compare, expand_java_goto, expand_java_call):  Don't
15076         push_pending_block, since that only makes sense when verifying.
15077         (merge_type_state):  Different return codes.
15078         (push_pending_block):  A block may need to be verified more than once.
15079         (expand_byte_code):  Warn about unused code at code generation time.
15080         (verify_jvm_instruction):  Changed logic, since code may need to be
15081         re-verified if type-state has changed.  Also, better error handling.
15082         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
15083         Improve newarray, anewarray, ?aload, athrow,
15084         * java-tree.h (LABEL_CHANGED):  New macro.
15085
15086 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15087
15088         * decl.c (soft_athrow_node): New global variable initialized.
15089         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
15090         * typeck.c (convert): Added support for REAL_TYPE.
15091         (convert_to_char): New function.
15092         (convert): Handle CHAR_TYPE.
15093         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
15094         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
15095         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
15096         promoted type.
15097         (verify_jvm_instructions): Added break a the end of bogus unop: label.
15098         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
15099         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
15100         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
15101         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
15102         to Use The Right Things.
15103         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
15104         compatible with INT. BOOLEAN is made equivalent to BYTE.
15105         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
15106         OPCODE_ifnonnull): Now supported.
15107         (build_java_athrow): New function.
15108
15109 1997-08-04  Per Bothner  <bothner@cygnus.com>
15110
15111         Rename method name <init> to match G++ (and fix mangling).
15112         * class.c (layout_class):  Replace method name of <init> by class name.
15113         (make_method_value):  Do inverse renaming of constructor from <init>.
15114         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
15115         * typeck.c (lookup_java_constructor):  New function.
15116         * expr.c (expand_invoke):  If method_name is <init>, call
15117         lookup_java_constructor to find constructor.
15118
15119         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
15120
15121 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15122
15123         * parse.c (get_class_constant): Modified to handle array "classes"
15124         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
15125         wide type.
15126         (convert): Modified to handle real type.
15127         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
15128         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
15129         variables declared.
15130         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
15131         soft_multianewarray, soft_newarray_node, soft_throw_node): New
15132         global variables initialized.
15133         (find_local_variable): Handles the case of a pointer
15134         (end_java_method): Restore the use of one more scope
15135         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
15136         build_java_array_length_access, expand_java_arrayload,
15137         expand_java_arraystore, expand_java_array_length,
15138         expand_java_multianewarray, expand_java_anewarray,
15139         build_java_check_indexed_type, is_array_type_p,
15140         build_java_throw_out_of_bound_exception): New functions.
15141         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
15142         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
15143         OPCODE_<t>aload): Implemented code for verification.
15144         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
15145         ARRAY_NEW_MULTI): Macro defined.
15146         (CONVERT): Modified to invoke convert().
15147         (case OPCODE_aload2): Fixed index typo from 2 to 1.
15148
15149 1997-07-31  Per Bothner  <bothner@cygnus.com>
15150
15151         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
15152         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
15153         (make_class_data):  Field name needs '/' as package prefix.
15154         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
15155
15156 1997-07-25  Per Bothner  <bothner@cygnus.com>
15157
15158         Implement debug information for local variables.
15159         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
15160         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
15161         DECL_LOCAL_SLOT_CHAIN):  New macros.
15162         (struct lang_decl_var):  New type.
15163         * parse.c (give_name_to_locals):  Move to decl.c.
15164         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
15165         (start_java_method):  Re-write parameter handling.
15166         (pending_local_decls):  New global variable.
15167         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
15168         (find_local_variable):  Accept pc so we can skips decls not in range.
15169         (struct binding_level):  Add end_pc field.
15170         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
15171         (various):  Change so current pc gets passed to find_local_variable.
15172
15173         * decl.c (init_decl_processing):  Re-arrange fields in
15174         class_type_node and and method_type_node to match kaffe 0.9.1.
15175         * class.c (make_method_value, make_class_data):  Update
15176         initializations to match.
15177
15178 1997-07-16  Per Bothner  <bothner@cygnus.com>
15179
15180         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
15181         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
15182         (push_super_field):  New function.
15183         (make_class_data):  Handle inheritance of class static initializer.
15184         (layout_class):  New name mangling.
15185         * constants.c (build_constant_data_ref):  Init type of data array
15186         to a one-element array.
15187         (build_constants_constructor):  Set DECL_SIZE from complete array type.
15188         * decl.c:  Rename class_type, object_type etc to class_type_node,
15189         object_type_node etc.  Make former inherit from latter.
15190         * expr.c (expand_invoke):  Add cast of function address.
15191         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
15192         * parse.c (yyparse):  Don't call layout_class here.
15193         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
15194
15195 1997-06-14  Per Bothner  <bothner@cygnus.com>
15196
15197         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
15198         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
15199         (alloc_class_constant):  New.
15200         * expr.c (expand_invoke):  Make sure method's class is initialized.
15201         * class.c (interits_from_p, emit_register_class):  New functions.
15202         * parse.c (yyparse):  Call emit_register_class.
15203
15204 1997-06-09  Per Bothner  <bothner@cygnus.com>
15205
15206         * constants.c:  New file, to handle constant pool.
15207         * Makefile.in (JAVA_OBJS):  Add constants.o.
15208         * decl.c (init_decl_processing):  Update, fix, finish various structs.
15209         (pushdecl_top_level):  New.
15210         * parse.c (layout_class):  Moved to class.c.
15211         * expr.c (java_push_constant_from_pool):  New function.
15212         * class.c (build_class_ref):  Make work fully
15213         (make_class_data):  Emit super-class, constant pool, interface vector.
15214
15215 1997-06-03  Per Bothner  <bothner@cygnus.com>
15216
15217         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
15218         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
15219         * class.c (class_depth):  New function.
15220         (lookup_named_class):  Replaced by new function lookup_class.
15221         * decl.c (object_type_node, string_type_node):  New.
15222         Remove various types that we no longer need.
15223         * expr.c (verify_jvm_instructions):  New separate verifier pass.
15224         (push_type, pop_type):  New functions for verifier.
15225         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
15226         (expand_byte_code):  Simplify, since we assume already verified.
15227         (expand_invoke):  Now mostly works.
15228         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
15229         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
15230         * parse.c:  Wait to allocate class object until we know its name.
15231         (layout_class):  Calculate DECL_VINDEX for each virtual method.
15232         * typeck.c (get_array_type):  Rename to ...
15233         (build_java_array_type):  ... and provide working implementation.
15234         (build_java_signature):  New function - build Java signature of type.
15235         (set_java_signature):  New function - cache signature with type.
15236         (lookup_java_method):  New function.
15237
15238 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
15239
15240         * class.c (ident_subst):  Take extra SUFFIX parameter.
15241         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
15242         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
15243         (build_class_ref):  Actually implement.
15244         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
15245         * decl.c (builtin_function):  New.
15246         (init_decl_processing):  Update for current Kaffe.  Declare some
15247         builtin Kaffe functions.
15248         * expr.c (build_address_of):  New.
15249         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
15250         Renamed (from expand_java_new etc), and added working implementations.
15251         (build_field_ref):  Now also handle static fields.
15252         (expand_invoke):  Implement invokestatic, and start implement rest.
15253         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
15254         * javaop.def:  Rename invokevirt -> invokevirtual.
15255         * lang.c (use_handles):  Removed.
15256         * parse.c:  Add support for ConstantValue attribute.
15257         Handle nested loading of a class.  (JPOOL_UTF):  New.
15258
15259 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
15260
15261         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
15262
15263 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
15264
15265         * Make-lang.in (java.install-man):  New empty rule.
15266         * typeck.c (set_local_type):  New function.
15267         * expr.c (STORE_INTERNAL):  Call find_local_variable,
15268         not find_stack_slot.  Call set_local_type.
15269
15270 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
15271
15272         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
15273         and building RECORD_TYPE CONSTRUCTORs.
15274         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
15275
15276         * lang.c (use_handles):  Change the default to 0.
15277         * decl.c:  Define and build class_type, field_type, utf8const_type.
15278         * class.c (make_class_data, make_field_value,
15279         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
15280         hashUtf8String, strLengthUtf8, mangled_classname:
15281         Functions to build reflective data structures.
15282         * parse.c (yyparse):  Call make_class_data.
15283
15284         * jcf-io.c (open_class, find_classfile):  New functions.
15285         * jcf-dump.c:  Support reading classfile from explicitly-named
15286         class file (without CLASSPATH searching).
15287
15288 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
15289
15290         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
15291         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
15292         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
15293         (get_constant):  Now trivial for CONSTANT_Utf8.
15294
15295         * jcf.h:  Make NEW_CPOOL the default.
15296         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
15297
15298 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
15299
15300         New directory.