Update ChangeLog and version files for release
[official-gcc.git] / gcc / java / ChangeLog
blob6accf3f7646b52c8e1aad1df9db8c1e4a0752c29
1 2015-07-16  Release Manager
3         * GCC 5.2.0 released.
5 2015-04-22  Release Manager
7         * GCC 5.1.0 released.
9 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
11         * class.c, expr.c, jcf-parse.c, jvspec.c: All callers of
12         fatal_error changed to pass input_location as first argument.
14 2015-10-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15         
16         * builtins.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
17         fixed-value.h function.h hard-reg-set.h hashtab.h insn-config.h
18         real.h statistics.h stmt.h varasm.h.
20 2015-01-09  Michael Collison  <michael.collison@linaro.org>
22         * boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
23         input.h, alias.h, symtab.h, options.h, fold-const.h,
24         wide-int.h, and inchash.h due to flattening of tree.h.
25         * builtins.c: Ditto.
26         * class.c: Ditto.
27         * constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
28         input.h, alias.h, symtab.h, options.h, fold-const.h,
29         wide-int.h, and inchash.h due to flattening of tree.h.
30         * decl.c: Ditto.
31         * except.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
32         input.h, alias.h, symtab.h, fold-const.h,
33         wide-int.h, and inchash.h due to flattening of tree.h.
34         * expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
35         input.h, alias.h, symtab.h, fold-const.h,
36         wide-int.h,inchash.h and real.h due to flattening of tree.h.
37         * gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
38         input.h, alias.h, symtab.h, options.h, fold-const.h,
39         wide-int.h, and inchash.h due to flattening of tree.h.
40         * jcf-dump.c: Ditto.
41         * jcf-io.c: Ditto.
42         * jcf-parse.c: Ditto.
43         * jvgenmain.c: Ditto.
44         * lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
45         input.h, alias.h, symtab.h, fold-const.h,
46         wide-int.h, and inchash.h due to flattening of tree.h.
47         * mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
48         input.h, alias.h, symtab.h, options.h, fold-const.h,
49         wide-int.h, and inchash.h due to flattening of tree.h.
50         * mangle_name.c: Ditto.
51         * resource.c: Ditto.
52         * typeck.c: Ditto.
53         * verify-glue.c: Ditto.
54         * verify-impl.c: Ditto.
56 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
58         Update copyright years.
60         * jcf-dump.c (version): Update copyright notice dates.
62 2014-11-24  Richard Biener  <rguenther@suse.de>
64         PR java/64004
65         * class.c (build_classdollar_field): Do not set TREE_READONLY.
67 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
69         Merger of git branch "gimple-classes-v2-option-3".
70         * ChangeLog.gimple-classes: New.
71         * java-gimplify.c (java_gimplify_block): Strengthen local "outer"
72         from gimple to gbind *.
74 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
76         * gcc/ChangeLog.jit: New.
78 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
80         * builtins.c, java-tree.h, typeck.c: Remove redundant enum from
81         machine_mode.
83 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
85         * class.c: Adjust include files.
86         * decl.c: Ditto.
87         * jcf-parse.c: Ditto.
88         * resource.c: Ditto.
90 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
92         * java-gimplify.c: Adjust include files.
94 2014-10-22  Alan Modra  <amodra@gmail.com>
96         * mangle.c (finish_mangling): Cast result of obstack_base to (char *).
97         * typeck.c (build_java_argument_signature): Likewise.
98         (build_java_signature): Likewise.
100 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
102         * class.c: Adjust include files.
103         * resource.c: Likewise.
105 2014-10-15  Evgeny Stupachenko  <evstupac@gmail.com>
107         PR target/63536
108         * lang.c (java_print_error_function): Add check on NULL function
109         context.
111 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
113         * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
114         hash_table instead of hashtab.
116 2014-10-07  Marek Polacek  <polacek@redhat.com>
118         * jvgenmain.c (main): Provide declarations for JvRunMain{,Name}.
120 2014-07-08  Mark Wielaard  <mjw@redhat.com>
122         * builtins.c (putVolatile_builtin): Use build_qualified_type
123         instead of build_type_variant.
124         (getVolatile_builtin): Likewise.
125         (build_classdollar_field): Likewise.
127 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
129         * jcf-io.c: Adjust.
131 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
133         * java/class.c (build_utf8_ref): Update handling for section names
134         that are no longer trees.
135         (emit_register_classes_in_jcr_section): Update.
137 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
139         * class.c (build_utf8_ref): Use set_decl_section_name.
140         (emit_register_classes_in_jcr_section): Likewise.
141         (emit_register_classes_in_jcr_section): Likewise.
143 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
145         * class.c (add_method_1): Adjust.
146         (java_treetreehash_new): Likewise.
147         * constants.c (set_constant_entry): Likewise.
148         (cpool_for_class): Likewise.
149         * decl.c (make_binding_level): Likewise.
150         (java_dup_lang_specific_decl): Likewise.
151         * expr.c (add_type_assertion): Likewise.
152         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
153         (lang_decl): don't use variable_size gty attribute.
154         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust.
155         (lang_type): Don't use variable_size gty attribute.
156         * jcf-parse.c (java_parse_file): Adjust.
157         (process_zip_dir): Likewise.
158         * jcf.h: Remove usage of variable_size gty attribute.
159         * jcf-reader.c (jcf_parse_constant_pool): Adjust.
160         (jcf_parse_bootstrap_methods): Likewise.
162 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
164         * constants.c (set_constant_entry): Adjust.
166 2014-05-06  Richard Sandiford  <r.sandiford@uk.ibm.com>
168         * boehm.c (mark_reference_fields): Don't update the mask when
169         setting pointer_after_end.
171 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
172             Mike Stump  <mikestump@comcast.net>
173             Richard Sandiford  <rdsandiford@googlemail.com>
175         * boehm.c: Include wide-int.h.
176         (mark_reference_fields): Use a wide_int mask.
177         (get_boehm_type_descriptor): Use wide-int interfaces.
178         * expr.c: Include wide-int.h.
179         (build_newarray): Remove bogus "== INTEGER_CST".
180         (expand_java_pushc): Use real_from_integer.
181         (build_field_ref): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
182         * jcf-parse.c: Include wide-int.h.
183         (get_constant): Use wide-int interfaces.
185 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
187         Update copyright years
189 2014-01-02  Tobias Burnus  <burnus@net-b.de>
191         * jcf-dump.c (version): Update copyright notice dates.
192         * gcj.texi: Bump @copying's copyright year.
194 2013-12-19  Jakub Jelinek  <jakub@redhat.com>
196         PR other/59545
197         * class.c (hashUtf8String): Compute hash in unsigned type.
198         * javaop.h (WORD_TO_INT): Avoid signed integer overflow.
200 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
202         * java-gimplify.c: Add required include files from gimple.h.
204 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
206         * class.c (maybe_layout_super_class): Update comment.
207         * decl.c (java_add_stmt): Remove use of input_filename macro.
208         * jcf-parse.c (set_source_filename): Remove use of
209         input_filename macro.
210         (parse_class_file): Remove use of input_line and input_filename
211         macros.
212         (java_parse_file): Remove use of input_filename macro.
214 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
216         * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
217         throughout.
219 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
221         * class.c, expr.c: Replace host_integerp (..., 0) with
222         tree_fits_shwi_p throughout.
224 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
226         * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
228 2013-11-14  Diego Novillo  <dnovillo@google.com>
230         * builtins.c: Include stor-layout.h.
231         Include stringpool.h.
232         * class.c: Include stringpool.h.
233         Include stor-layout.h.
234         Include varasm.h.
235         * constants.c: Include stringpool.h.
236         Include stor-layout.h.
237         * decl.c: Include stor-layout.h.
238         Include stringpool.h.
239         Include varasm.h.
240         * except.c: Include stringpool.h.
241         Include stor-layout.h.
242         * expr.c: Include stringpool.h.
243         Include stor-layout.h.
244         * jcf-parse.c: Include stringpool.h.
245         * mangle.c: Include stringpool.h.
246         * resource.c: Include stringpool.h.
247         Include stor-layout.h.
248         * typeck.c: Include stor-layout.h.
249         Include stringpool.h.
250         * verify-glue.c: Include stringpool.h.
252 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
254         * java-gimplify.c: Include gimplify.h.
256 2013-11-07  Jeff Law  <law@redhat.com>
258         * builtins.c (initialize_builtins): Provide __builtin_trap.
260 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
262         Patch autogenerated by refactor_symtab.py from
263         https://github.com/davidmalcolm/gcc-refactoring-scripts
264         revision 58bb219cc090b2f4516a9297d868c245495ee622
266         * decl.c (java_mark_decl_local): Update for conversion of symtab types
267         to a true class hierarchy.
269 2013-10-14  David Malcolm  <dmalcolm@redhat.com>
271         * lang.c (java_handle_option): Update for introduction of
272         gcc::dump_manager.
274 2013-09-25  Tom Tromey  <tromey@redhat.com>
276         * Make-lang.in (jvspec.o): Remove.
277         (CFLAGS-java/jvspec.o): New variable.
278         ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o
279         (java/jvspec.o-warn): Rename from jvspec.o-warn.
280         (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o)
281         (java/class.o, java/constants.o, java/decl.o, java/except.o)
282         (java/expr.o, java/jcf-depend.o, java/jcf-parse.o)
283         (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o)
284         (java/resource.o java/typeck.o, java/win32-host.o)
285         (java/verify-glue.o, java/verify-impl.o, java/zextract.o)
286         (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove.
288 2013-09-25  Tom Tromey  <tromey@redhat.com>
290         * Make-lang.in (jvspec.o): Don't use subshell.
292 2013-06-05  Jan Hubicka  <jh@suse.cz>
294         * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
295         instead of mark_decl_referenced.
297 2013-05-29  Jan Hubicka  <jh@suse.cz>
299         * decl.c (java_mark_decl_local): Update for new symtab flags.
301 2013-05-22  Matthias Klose  <doko@ubuntu.com>
303         * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
305 2013-05-16  Jason Merrill  <jason@redhat.com>
307         * Make-lang.in (jc1$(exeext)): Use link mutex.
309 2013-05-06  Jakub Jelinek  <jakub@redhat.com>
311         PR libgcj/57074
312         * class.c (emit_symbol_table): Use array type of the
313         right size for the_syms_decl and its DECL_INITIAL, instead
314         of symbols_array_type.  Set TREE_TYPE (the_syms_decl) to it.
315         (emit_assertion_table): Use array type of the right size
316         for table_decl and its DECL_INITIAL.
318 2013-04-15  Gerald Pfeifer  <gerald@pfeifer.com>
320         * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
321         (Resources): Adjust reference to Mauve.
322         Remove link to java.sun.com.
323         Refer to GCC, not gcc.
325 2013-04-09  Richard Biener  <rguenther@suse.de>
327         * expr.c (build_java_binop): Pass a type to build_int_cst.
329 2013-03-22  Kai Tietz  <ktietz@redhat.com>
331         * lang.c (put_decl_node): Don't iterate over end_params_node.
333 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
335         * jcf-dump.c (version): Update copyright notice dates.
337 2012-11-16  Diego Novillo  <dnovillo@google.com>
339         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
341         * boehm.c: Use new vec API in vec.h.
342         * class.c: Likewise.
343         * constants.c: Likewise.
344         * decl.c: Likewise.
345         * expr.c: Likewise.
346         * java-tree.h: Likewise.
347         * jcf-parse.c: Likewise.
348         * resource.c: Likewise.
349         * verify-glue.c: Likewise.
351 2012-11-15  Jan Hubicka  <jh@suse.cz>
353         * builtins.c (define_builtin): Accept ECF flags and
354         use set_call_expr_flags.
355         (initialize_builtins): Update.
357 2012-10-01  Lawrence Crowl  <crowl@google.com>
359         * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
360         (JCFDUMP_OBJS): Add dependence on hash-table.o.
361         (jcf-io.o): Add dependence on hash-table.h.
362         * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
364 2012-09-24  Lawrence Crowl  <crowl@google.com>
366         * decl.c (java_init_decl_processing): Change to new double_int API.
367         * jcf-parse.c (get_constant): Likewise.
368         * boehm.c (mark_reference_fields): Likewise.
369         (get_boehm_type_descriptor): Likewise.
371 2012-07-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
373         * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
374         (bootstrap_method): Likewise for the bootstrap_arguments field.
376 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
378         * java-gimplify.c: Include dumpfile.h instead of tree-dump.h
379         * Make-lang.in: Fix dependencies.
381 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
383         * java-tree.h (force_evaluation_order): Remove prototype.
384         * expr.c (force_evaluation_order): Remove unused function.
386 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
388         * decl.c: Do not include libfuncs.h.
389         * class.c: Do not include defaults.h.
390         * jvgenmain.c: Likewise.
391         * magnle.c: Likewise.
392         * Make-lang.in (decl.o): Fix dependencies.
394 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
396         * verify.h: Do not include system.h and coretypes.h here.
397         * verify-impl.c: Include them here instead.
399 2012-07-05  Uros Bizjak  <ubizjak@gmail.com>
401         * jcf-io.c (read_zip_member): Initialize d_stream.
403 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
405         * resource.c: Do not include output.h.
407 2012-05-21  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
409         PR java/52815
410         * class.c (emit_register_classes_in_jcr_section): Revise placement
411         of #ifdef JCR_SECTION_NAME.
413 2012-04-22  Jan Hubicka  <jh@suse.cz>
415         * class.c (build_utf8_ref): Do not mark varpool node as needed.
417 2012-04-20  Jan Hubicka  <jh@suse.cz>
419         * class.c (make_local_function_alias): Do not mark symbol referenced.
421 2012-04-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
423         * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
424         results to long to match formats.
426 2012-04-11  Andrew Haley  <aph@redhat.com>
428         * jcf-reader.c (jcf_parse_bootstrap_methods): Add
429         ATTRIBUTE_UNUSED.
431 2012-04-11  Andrew Haley  <aph@redhat.com>
433         * jcf.h (bootstrap_method): New.
434         (BootstrapMethods): New.
435         (JCF): Add BootstrapMethods.
436         (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
437         * jcf-reader.c (jcf_parse_bootstrap_methods): New.
438         (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
439         and InvokeDynamic.
440         (jcf_parse_bootstrap_methods): New.
441         * javaop.def (invokedynamic): New opcode.
442         * jcf-parse.c (get_constant): An unknown constant type should not
443         be an internal error, but a fatal one.  Make it so.
444         * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
445         (HANDLE_END_BOOTSTRAP_METHODS): New.
446         (print_constant): Handlers for MethodHandle, MethodType, and
447         InvokeDynamic.
449 2012-04-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
451         * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
452         Clear TREE_READONLY.
454 2012-03-29  Steven Bosscher  <steven@gcc.gnu.org>
456         PR java/52730
457         * class.c (emit_register_classes_in_jcr_section): New function.
458         (emit_Jv_RegisterClass_calls): New function, split out from ...
459         (emit_register_classes): ... here. Reorganize.  Do not call
460         output_constant.
462 2012-01-23  Andreas Schwab  <schwab@linux-m68k.org>
464         * lang.c (java_init_options_struct): Set
465         frontend_set_flag_trapping_math.
467 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
469         * jcf-dump.c (version): Update copyright notice dates.
471 2011-12-03  Matthias Klose  <doko@ubuntu.com>
473         * expr.c (SPECIAL_WIDE): Fix typo in message.
475 2011-11-23  Jeffrey A Law  (law@cygnus.com)
477         * lang.c (java_init_options_struct): Disable optimizations
478         which assume a NULL pointer dereference will cause a fault.
480 2011-11-07  Richard Henderson  <rth@redhat.com>
482         * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
483         (compareAndSwapLong_builtin): Likewise.
484         (compareAndSwapObject_builtin): Likewise.
485         (VMSupportsCS8_builtin): Likewise.
487 2011-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
489         * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
491 2011-10-15  Tom Tromey  <tromey@redhat.com>
492             Dodji Seketeli  <dodji@redhat.com>
494         * jcf-parse.c (set_source_filename): Adjust to the new map API.
496 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
498         * class.c (build_static_field_ref): Delete old interface with two
499         parallel arrays to hold standard builtin declarations, and replace
500         it with a function based interface that can support creating
501         builtins on the fly in the future.  Change all uses, and poison
502         the old names.  Make sure 0 is not a legitimate builtin index.
503         * decl.c (java_init_decl_processing): Ditto.
504         * except.c (compareAndSwapLong_builtin): Ditto.
505         (compareAndSwapObject_builtin): Ditto.
506         (putVolatile_builtin): Ditto.
507         (define_builtin): Ditto.
508         (check_for_builtin): Ditto.
509         * expr.c (rewrite_arglist_getcaller): Ditto.
510         (expand_java_field_op): Ditto.
512 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
514         * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
515         New.
516         (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
517         rules.
519 2011-08-18  Peter Collingbourne  <peter@pcc.me.uk>
521         * expr.c (expand_invoke) Use the type of the method rewrite
522         target.
524 2011-08-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
526         * jcf-dump.c (print_constant): Cast first frexp arg.
528 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
530         * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
532 2011-07-19  Richard Guenther  <rguenther@suse.de>
534         * builtins.c (static): Use fold_build_pointer_plus.
535         * class.c (make_class_data): Likewise.
536         (build_symbol_entry): Likewise.
537         * except.c (build_exception_object_ref): Likewise.
538         * expr.c (build_java_arrayaccess): Likewise.
539         (build_field_ref): Likewise.
540         (build_known_method_ref): Likewise.
541         (build_invokevirtual): Likewise.
543 2011-07-06  Richard Guenther  <rguenther@suse.de>
545         * decl.c (java_init_decl_processing):
546         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
548 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
550         * builtins.c: Add sync_ or SYNC__ to builtin names.
551         * expr.c: Add sync_ or SYNC__ to builtin names.
553 2011-06-07  Richard Guenther  <rguenther@suse.de>
555         * decl.c (java_init_decl_processing): Call build_common_nodes,
556         build_common_nodes_2 at the beginning.  Remove then duplicate
557         initializations.
559 2011-06-07  Richard Guenther  <rguenther@suse.de>
561         * decl.c (java_init_decl_processing): Properly initialize
562         size_type_node.
564 2011-05-30  Joern Rennecke  <joern.rennecke@embecosm.com>
566         PR middle-end/46500
567         * expr.c: Include "tm.h" .
569 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
571         * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
572         * expr.c (build_jni_stub): Likewise.
574 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
576         * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
577         of prefix.o.
579 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
581         * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
582         version.o.
583         (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
584         (JVGENMAIN_OBJS): Remove errors.o and intl.o.
585         (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
586         * jcf-dump.c: Include diagnostic.h.
587         (main): Initialize diagnostics.
588         * jvgenmain.c: Include diagnostic.h.
589         (main): Initialize diagnostics.
591 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
593         * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
595 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
597         * java-tree.h (global_bindings_p): Adjust prototype.
598         * decl.c (global_bindings_p): Return bool.
600 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
602         * expr.c (expand_java_switch): Call build_case_label.
603         (expand_java_add_case): Likewise.
605 2011-04-29  Richard Guenther  <rguenther@suse.de>
607         PR middle-end/48819
608         * constants.c (build_constants_constructor): Use ptr_type_node for
609         temp.
611 2011-04-20  Jim Meyering  <meyering@redhat.com>
613         * jcf-parse.c (java_parse_file): Remove useless if-before-free.
615 2011-04-18  Jim Meyering  <meyering@redhat.com>
617         * jcf-parse.c: Fix typo in comment.
619 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
621         * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
623 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
625         * java-tree.h (union lang_tree_node): Check for TS_COMMON before
626         calling TREE_CHAIN.
628 2011-04-11  Martin Jambor  <mjambor@suse.cz>
630         * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
631         cgraph_node and handle returned NULL.
633 2011-03-25  Kai Tietz  <ktietz@redhat.com>
635         * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
636         instead of strcmp.
637         (set_source_filename): Likewise.
638         * win32-host.c (jcf_open_exact_case): Likewise.
640 2011-03-21  Kai Tietz  <ktietz@redhat.com>
642         PR target/12171
643         * lang.c (java_attribute_table): Adjust table.
645 2011-02-13  Joseph Myers  <joseph@codesourcery.com>
647         * jvspec.c (jvgenmain_spec): Remove %{a*}.
649 2011-01-21  Kai Tietz  <kai.tietz@onevision.com>
651         PR bootstrap/47215
652         * decl.c (java_init_decl_processing): Remove
653         va_list_type_node related type initializations.
655 2011-01-11  Kai Tietz  <kai.tietz@onevision.com>
657         PR bootstrap/47215
658         * decl.c (java_init_decl_processing): Initialize
659         long_integer_type_node.
661 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
663         PR bootstrap/47215
664         * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
666 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
668         * decl.c (java_init_decl_processing): Setup va_list_type_node.
670 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
672         * jcf-dump.c (version): Update copyright notice dates.
674 2010-12-15  Dave Korn  <dave.korn.cygwin@gmail.com>
676         * decl.c (java_init_decl_processing): Initialise integer_three_node.
677         * lang.c (put_decl_node): Handle nested function decls.
679 2010-12-07  Joseph Myers  <joseph@codesourcery.com>
681         * jcf-parse.c: Don't include assert.h.
682         (java_parse_file): Use gcc_assert.
684 2010-12-03  Joseph Myers  <joseph@codesourcery.com>
686         * lang.opt (static-libgcj): New option.
688 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
690         * jcf-parse.c: Don't include toplev.h.
691         * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
693 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
695         * boehm.c: Don't include toplev.h.
696         * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
698 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
700         * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
701         verify-glue.c: Don't include toplev.h.
702         * Make-lang.in: Dependencies for above files changed to remove
703         toplev.h.
705 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
707         * boehm.c: Include "config.h" instead of <config.h>.
708         * builtins.c: Don't include <stdarg.h>.
709         * class.c: Don't include "stdio.h".
710         (O_BINARY): Don't define here.
711         * jcf-depend.c: Don't include <assert.h>.
712         (jcf_dependency_set_dep_file, jcf_dependency_init,
713         jcf_dependency_write): Use gcc_assert.
714         * jcf-io.c (O_BINARY): Don't define here.
715         * jcf-path.c: Don't include "tm.h".
716         (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
717         * resource.c: Don't include "stdio.h".
718         (O_BINARY): Don't define here.
719         * verify-impl.c: Don't include <stdio.h>.
721 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
723         * jcf-parse.c (java_parse_file): Take no arguments.
724         * java-tree.h (java_parse_file): Update prototype.
726 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
727             Andrew Haley  <aph@redhat.com>
729         PR java/46386
730         * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
732 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
734         * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
735         * lang.c (java_handle_option): Take location_t parameter.
737 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
739         * expr.c (expand_java_field_op): Use %' in diagnostic.
740         * jcf-parse.c (java_parse_file): Use %' in diagnostics.
741         * jvspec.c (lang_specific_driver): Use %' in diagnostic.
742         * lang.c (java_post_options): Use %' in diagnostics.
744 2010-11-06  Joern Rennecke  <amylaar@spamcop.net>
746         PR middle-end/46314
747         * class.c: Include target.h.
748         (make_local_function_alias):
749         Use targetm.asm_out.generate_internal_label.
750         * expr.c (lookup_label, generate_name): Likewise.
752 2010-11-03  Joern Rennecke  <joern.rennecke@embecosm.com>
754         PR bootstrap/44335
755         * jfc-parse.c (target.h): Include.
756         (handle_constant): Use targetm.words_big_endian and
757         targetm.float_words_big_endian.
758         (get_constant): Use targetm.float_words_big_endian.
760 2010-10-13  Richard Henderson  <rth@redhat.com>
762         * lang.c (java_eh_personality): Update call to
763         build_personality_function.
765 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
767         * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
768         options.h.
770 2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
772         * decl.c (java_init_decl_processing): Use build_function_type_list
773         instead of build_function_type.
774         * jcf-parse.c (java_emit_static_constructor): Likewise.
775         * builtins.c (initialize_builtins): Likewise.
777 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
779         * lang.c (java_init_options_struct): New.  Split out from
780         java_init_options.
781         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
783 2010-10-04  Andi Kleen <ak@linux.intel.com>
785         * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
786         Add + to build rule.
788 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
790         * lang.opt: Don't use VarExists.
792 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
794         * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
795         flag_force_classes_archive_check, flag_redundant, flag_newer,
796         flag_use_divide_subroutine, flag_use_atomic_builtins,
797         flag_use_boehm_gc, flag_hash_synchronization,
798         flag_check_references, flag_optimize_sci, flag_indirect_classes,
799         flag_indirect_dispatch, flag_store_check,
800         flag_reduced_reflection): Remove.
801         * jcf-dump.c (flag_newer): Remove.
802         * jcf.h (quiet_flag): Remove.
803         * parse.h (quiet_flag): Remove.
805 2010-09-28  Richard Henderson  <rth@redhat.com>
807         * lang.c: Include "target.h".
808         (java_eh_personality): Use targetm.except_unwind_info.
809         * Make-lang.in (lang.o): Update deps.
811 2010-09-27  Andrew Haley  <aph@redhat.com>
813         PR java/45773
814         * jvgenmain.c (main): Fix arg processing.
816 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
818         * jvspec.c (lang_specific_driver): Handle OPT__help instead of
819         OPT_fhelp.
820         * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
821         -dependencies, -encoding, -extdirs, -include-directory,
822         -include-directory=, -output-class-directory,
823         -output-class-directory=, -resource, -resource=,
824         -user-dependencies): New.
826 2010-09-16  Richard Guenther  <rguenther@suse.de>
828         * jcf-parse.c (current_file_list): Remove.
829         (java_parse_file): Use build_translation_unit_decl.  Adjust.
831 2010-09-03  Joseph Myers  <joseph@codesourcery.com>
833         * lang.opt (d): New.
835 2010-09-03  H.J. Lu  <hongjiu.lu@intel.com>
837         PR java/45504
838         * jvgenmain.c (main): Check "-D XXX=YYY".
840 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
842         * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
844 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
846         * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
847         fCLASSPATH=): Mark as Java options and as aliases.
848         * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
849         (lang_specific_driver): Don't handle options marked as aliases.
850         * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
852 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
854         * Make-lang.in (jvspec.o): Update dependencies.
855         * jvspec.c: Include opts.h.
856         (PARAM_ARG): Remove.
857         (find_spec_file): Do not add leading -specs=.
858         (lang_specific_driver): Use cl_decoded_option structures.
859         * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
860         extdirs, fmain=, s-bc-abi): New options.
862 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
864         * class.c: Use FOR_EACH_VEC_ELT.
865         * expr.c: Likewise.
866         * jcf-parse.c: Likewise.
867         * resource.c: Likewise.
869 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
871         * lang.opt (MD_, MMD_, version): Mark RejectDriver.
873 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
875         * class.c (build_utf8_ref): Fix code formatting from previous commit.
877 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
879         * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
881 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
883         * lang.c (java_handle_option): Update prototype and return value
884         type.
886 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
888         * lang.c (java_option_lang_mask): New.
889         (java_init_options): Update prototype.
890         (LANG_HOOKS_OPTION_LANG_MASK): Define.
892 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
894         * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
895         * boehm.c: Likewise.
896         * class.c: Likewise.
897         * decl.c: Likewise.
898         * expr.c: Likewise.
899         * jcf-parse.c: Likewise.
900         * typeck.c: Likewise.
901         * verify-glue.c: Likewise.
903 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
905         * boehm.c: Include diagnostic-core.h in every file that includes
906         toplev.h.
907         * class.c: Likewise.
908         * constants.c: Likewise.
909         * decl.c: Likewise.
910         * except.c: Likewise.
911         * expr.c: Likewise.
912         * jcf-parse.c: Likewise.
913         * mangle.c: Likewise.
914         * mangle_name.c: Likewise.
915         * resource.c: Likewise.
916         * typeck.c: Likewise.
917         * verify-glue.c: Likewise.
919 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
921         PR bootstrap/44825
922         * class.c (make_class_data): Cast result of VEC_length calls to int.
924 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
926         * constants.c (build_constants_constructor): Use build_constructor
927         instead of build_constructor_from_list.
928         * class.c (make_method_value): Likewise.
929         (get_dispatch_table): Likewise.
930         (make_class_data): Likewise.
931         (emit_indirect_register_classes): Likewise.
932         (emit_symbol_table): Likewise.
933         (add_assertion_table_entry): Likewise.
934         (emit_assertion_table): Likewise.
935         (make_field_value): Use build_constructor_single instead of
936         build_constructor_from_list.
938 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
940         * java-tree.h (struct lang_type) [catch_classes]: Change type to a
941         VEC.
942         * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
943         instead of tree_cons.
944         * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
945         (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
947 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
949         * lang.c: Do not include except.h
950         * except.c: Likewise.
951         (doing_eh): New, moved from except.c (in gcc/) but removed the
952         do_warning flag.
953         (maybe_start_try): Update doing_eh call.
954         * Make-lang.in: Update dependencies.
956 2010-06-23  Anatoly Sokolov  <aesok@post.ru>
958         * decl.c (java_init_decl_processing): Use double_int_to_tree instead
959         of build_int_cst_wide.
960         * boehm.c (set_bit): Remove.
961         (mark_reference_fields): Use double_int type for 'mask' argument.
962         Use double_int_setbit instead of set_bit.
963         (get_boehm_type_descriptor): Use double_int_setbit instead of
964         set_bit. Use double_int_to_tree instead of build_int_cst_wide.
966 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
968         * gcj.texi: Move to GFDL version 1.3.  Fix copyright years.
970 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
972         * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
974         * jcf-parse.c (java_parse_file): Likewise.
975         (process_zip_dir): Likewise.
977         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
978         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
980         * expr.c (add_type_assertion): Likewise.
982         * decl.c (make_binding_level): Likewise.
983         (java_dup_lang_specific_decl): Likewise.
985         * constants.c (set_constant_entry): Likewise.
986         (cpool_for_class): Likewise.
988         * class.c (add_method_1): Likewise.
989         (java_treetreehash_new): Likewise.
991         * java-tree.h (struct lang_type): Add variable_size GTY option.
992         (struct lang_decl): Likewise.
994         * jch.h (struct cpool_entry): Likewise.
996         * java-tree.h (java_treetreehash_create): Remove parameter ggc.
998         * except.c (prepare_eh_table_type): Update
999         java_treetreehash_create call.
1001         * class.c (add_method_1): Update java_treetreehash_create call.
1002         (java_treetreehash_create): Remove parameter gc.  Use
1003         htab_create_ggc.
1005 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
1007         * jvspec.c (lang_specific_driver): Use GCC-specific formats in
1008         diagnostics.
1010 2010-05-30  Steven Bosscher  <steven@gcc.gnu.org>
1012         * except.c: Include tm.h.
1014 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
1016         * jvspec.c (lang_specific_driver): Use fatal_error instead of
1017         fatal.  Use warning instead of error for warnings.
1019 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
1021         * expr.c (get_symbol_table_index): Add spaces in expression.
1023 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
1025         * java-tree.h (method_entry): Declare.  Declare VECs containing it.
1026         (struct lang_type): Change type of otable_methods, atable_methods, and
1027         itable_methods to VECs.  Fix comment for atable_methods.
1028         (emit_symbol_table): Take a VEC instead of a tree.
1029         (get_symbol_table_index): Take a VEC * instead of a tree *.
1030         * class.c (add_table_and_syms): Take a VEC instead of a tree.
1031         (emit_symbol_table): Update for changed parameter type.
1032         * expr.c (get_symbol_table_index): Likewise.
1034 2010-05-27  Steven Bosscher  <steven@gcc.gnu.org>
1036         * buildings.c: Pretend to be a backend file by undefining
1037         IN_GCC_FRONTEND (still need rtl.h here).
1039 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
1041         * java-tree.h (struct lang_decl_func): Change type of throws_list
1042         field to a VEC.
1043         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
1044         of DECL_FUNCTION_THROWS.
1045         * class.c (make_method_value): Likewise.
1047 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
1049         * class.c (utf8_decl_list): Delete.
1050         (build_utf8_ref): Remove references to it.
1051         * java-tree.h (all_class_list): Delete.
1052         (predef_filenames): Delete.
1053         (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
1054         Delete.
1055         * jcf-parse.c (parse_roots): Decrease size to 2.
1056         (current_file_list): Convert to a VEC.
1057         (all_class_list): Declare.
1058         (jcf_parse): Adjust for new type of all_class_list.
1059         (java_layout_seen_class_methods): Likewise.
1060         (predefined_filenames): Declare.
1061         (add_predefined_file): Use it.
1062         (predefined_filename_p): Likewise.
1063         (java_parse_file): Adjust for new type of current_file_list.
1065 2010-05-25  Jakub Jelinek  <jakub@redhat.com>
1067         * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
1068         for interfaces.
1070         PR debug/43260
1071         * java-tree.h (pending_static_fields): New extern declaration.
1072         (java_write_globals): New prototype.
1073         * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
1074         * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
1075         of a static field push it into pending_static_fields vector.
1076         * class.c (pending_static_fields): New variable.
1077         (add_field): If static field is not DECL_EXTERNAL, push it into
1078         pending_static_fields vector.
1079         (java_write_globals): New function.
1081 2010-05-24  Nathan Froyd  <froydnj@codesourcery.com>
1083         * expr.c (quick_stack): Change type to a VEC.  Update comment.
1084         (tree_list_free_list): Delete.
1085         (flush_quick_stack): Update for quick_stack type change.
1086         (push_value): Likewise.
1087         (pop_value): Likewise.
1089 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
1091         * java-gimplify.c: Do not include tm.h, toplev.h.
1092         * typeck.c: Do not include tm.h.
1093         * mangle_name.c: Do not include tm.h.
1094         * jcf-dump.c: Do not include tm.h, ggc.h.
1095         * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
1096         * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
1097         and timevar.h.
1098         * jcf-parse.c: Do not include tm.h and tm_p.h.
1099         * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
1100         target.h, and expr.h.
1101         * except.c: Do not include tm.h, rtl.h, function.h.
1102         * builtins.c: Do not include convert.h.  Explain why RTL headers
1103         have to be included here.
1104         * verify-glue.c: Do not include tm.h.
1105         * jcf-depend.c: Do not include tm.h.
1106         * jcf-reader.c: Include ggc.h.
1107         * jcf-io.c: Do not include tm.h, toplev.h.
1108         * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
1109         gimple.h.
1110         * lang.c: Do not include rtl.h, expr.h.
1111         * Make-lang.in: Update dependencies.
1113 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
1115         * jcf-parse.c: Include bitmap.h.
1116         * Make-lang.in: Update dependencies.
1118 2010-05-20  Jakub Jelinek  <jakub@redhat.com>
1120         PR debug/43521
1121         * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
1122         PARM_DECL.
1124 2010-05-19  Anatoly Sokolov  <aesok@post.ru>
1126         * jcf-parse.c (get_constant): Use double_int_to_tree instead of
1127         build_int_cst_wide_type.
1129 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
1131         * expr.c (pop_arguments): Fix use of undeclared variable.
1133 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
1135         * expr.c (expand_java_multianewarray): Use build_call_vec instead of
1136         build_call_list.
1137         (pop_arguments): Return a VEC instead of a tree.  Take a method type
1138         rather than a list of argument types.
1139         (rewrite_rule): Change signature. of rewrite_arglist member.
1140         (rewrite_arglist_getcaller): Update signature.
1141         (rewrite_arglist_getclass): Likewise.
1142         (maybe_rewrite_invocation): Update for rewrite_arglist change.
1143         (build_known_method_ref): Take a VEC instead of a tree.
1144         (invoke_build_dtable): Likewise.
1145         (expand_invoke): Update calls to pop_arguments.  Use build_call_vec
1146         instead of build_call_list.
1147         (build_jni_stub): Use build_call_vec instead of build_call_list.
1148         * java-tree.h (maybe_rewrite_invocation): Update declaration.
1149         (build_known_method_ref): Likewise.
1150         (invoke_build_dtable): Likewise.
1152 2010-05-14  Nathan Froyd  <froydnj@codesourcery.com>
1154         PR 44103
1155         * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
1156         vector.  Move call to build_constructor...
1157         (FINISH_RECORD_CONSTRUCTOR): ...here.  Add necessary arguments.  Clear
1158         TREE_CONSTANT on the constructor.
1159         (PUSH_SUPER_VALUE): Change first argument to a vector.
1160         (PUSH_FIELD_VALUE): Likewise.
1161         * resource.c (compile_resource_data): Update calls to above macros.
1162         * constants.c (build_constants_constructor): Likewise.
1163         * class.c (build_utf8_ref): Likewise.
1164         (make_field_value): Likewise.
1165         (make_method_value): Likewise.
1166         (add_table_and_syms): New function.
1167         (make_class_data): Call it.  Update calls to above macros.
1168         (build_symbol_table_entry): New function.
1169         (build_symbol_entry): Call it.  Update calls to above macros.
1170         (emit_symbol_table): Likewise.
1171         (make_catch_class_record): Update calls to above macros.
1172         (build_assertion_table_entry): New function.
1173         (add_assertion_table_entry): Call it.
1174         (emit_assertion_table): Likewise.
1176 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1178         PR 40989
1179         * lang.c (java_handle_option): Add argument kind.
1181 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1183         * decl.c (java_init_decl_processing): Remove argument in call to
1184         initialize_sizetypes
1186 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
1188         * exception.cc (_Jv_Throw): Avoid set but not used warning.
1189         * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
1190         sizeof to avoid set but not used warnings.
1192 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
1194         * lang.c (java_post_options): Constify variable "dot".
1196         * jcf-parse.c (set_source_filename): Constify variable "dot".
1197         (load_class): Constify variable "separator".
1198         Use get_identifier_with_length.
1200         * jvspec.c (lang_specific_driver): Constify two variables named "p".
1202 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
1204         * jcf-dump.c (version): Update copyright notice dates.
1206 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
1208         * jvspec.c (lang_specific_driver): Remove unused
1209         saw_verbose_flag variable.
1210         * jcf-dump.c (main): Remove unused general_purpose_bits
1211         variable.
1212         * builtins.c (initialize_builtins): Remove unused float_ftype_float
1213         variable.
1214         * expr.c (java_stack_pop): Remove unused val variable.
1215         (build_jni_stub): Remove unused res_type variable.
1216         * verify-impl.c (check_field_constant): Remove unused len variable.
1218 2009-10-20  Joel Dice <dicej@mailsnare.net>
1220         PR java/28474
1221         * mangle_name.c (append_unicode_mangled_name): Fix mangling
1222         of names with multiple underscores and "U".
1223         (unicode_mangling_length): Likewise.
1225 2009-10-03  Simon Baldwin  <simonb@google.com>
1227         * config-lang.in (lang_dirs): Remove zlib.
1229 2009-09-28  Richard Henderson  <rth@redhat.com>
1231         * builtins.c (initialize_builtins): Update call to
1232         build_common_builtin_nodes.
1233         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
1235 2009-09-14  Richard Henderson  <rth@redhat.com>
1237         * builtins.c (initialize_builtins): Update call to
1238         build_common_builtin_nodes.
1239         * decl.c (java_init_decl_processing): Don't call
1240         default_init_unwind_resume_libfunc.
1241         * except.c: Include tree-iterator.h.
1242         (build_exception_object_var): New.
1243         (build_exception_object_ref): Use it.
1244         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
1245         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
1246         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
1248 2009-09-13  Richard Guenther  <rguenther@suse.de>
1249         Rafael Avila de Espindola  <espindola@google.com>
1251         * decl.c (do_nothing): Remove.
1252         (java_init_decl_processing): Do not set lang_eh_runtime_type.
1253         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
1254         * lang.c (java_eh_personality): New.
1255         (java_eh_personality_decl): Likewise.
1256         (LANG_HOOKS_EH_PERSONALITY): Define.
1258 2009-09-03  Diego Novillo  <dnovillo@google.com>
1260         * lang.c (lang_hooks): Remove const qualifier.
1262 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
1264         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
1265         type.
1267 2009-09-01  Richard Guenther  <rguenther@suse.de>
1269         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
1270         * java-tree.h (java_mark_addressable): Likewise.
1271         * typeck.c (java_mark_addressable): Likewise.
1273 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1275         * Make-lang.in (java.install-pdf): Install gcj.pdf in
1276         $(pdfdir)/gcc, alongside the other manuals.
1278 2009-08-12  Andrew Haley  <aph@redhat.com>
1280         * builtins.c (compareAndSwapInt_builtin): Use
1281         flag_use_atomic_builtins.
1282         (compareAndSwapLong_builtin): Likewise.
1283         (compareAndSwapObject_builtin): Likewise.
1284         * jvspec.c: Add flag_use_atomic_builtins.
1285         * gcj.texi: Likewise.
1286         * java-tree.h: Likewise.
1287         * lang.opt: Likewise.
1289 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
1291         PR debug/40990
1292         * lang.c (put_decl_node): Outputs different level of information
1293         depending on the verbosity level.
1295 2009-07-31  Andrew Haley  <aph@redhat.com>
1297         PR java/40867
1298         * decl.c (java_replace_references): Set EXPR_LOCATION on all
1299         generated expressions.
1300         (binding_level.loc): new field.
1301         (clear_binding_level): Initialize loc.
1302         (set_input_location): New function.
1303         (pushlevel): Set new binding_level.loc.
1304         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1305         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1306         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1308 2009-07-17  Richard Guenther  <rguenther@suse.de>
1310         PR c/40401
1311         * java-gimplify.c (java_genericize): Do not gimplify here.
1312         But replace all local references.
1313         (java_gimplify_expr): Do not replace local references here.
1314         (java_gimplify_modify_expr): Likewise.
1315         * jcf-parse.c (java_parse_file): Do not finalize the CU or
1316         optimize the cgraph here.
1317         * decl.c (java_replace_reference): Make static.
1318         (java_replace_references): New function.
1319         (end_java_method): Clear base_decl_map.
1320         * java-tree.h (java_replace_references): Declare.
1321         (java_replace_reference): Remove.
1323 2009-07-14  Taras Glek  <tglek@mozilla.com>
1324             Rafael Espindola  <espindola@google.com>
1326         * Make-lang.in (java.install-plugin): New target for
1327         installing plugin headers.
1329 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1331         * class.c: Replace %J by an explicit location. Update all calls.
1333 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1335         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1337 2009-06-29  Andrew Haley  <aph@redhat.com>
1339         PR java/40590
1340         * java-tree.h (cxx_keyword_p): New declaration.
1341         * mangle_name.c (utf8_cmp): Move here from mangle.c.
1342         (cxx_keywords): Likewise.
1343         (cxx_keyword_p): Likewise.
1344         (MANGLE_CXX_KEYWORDS): New macro.
1345         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1346         (append_gpp_mangled_name): Likewise.
1347         * mangle.c: Move code to mangle_name.c.
1348         (mangle_member_name): Don't call cxx_keyword_p.
1350 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
1352         * java-gimplify.c (java_gimplify_block): New argument to
1353         build_empty_stmt.
1354         * expr.c (force_evaluation_order): Same.
1355         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1356         * class.c: Same.
1357         * decl.c: Same.
1358         * jcf-parse.c: Same.
1359         * constants.c: Same.
1360         * resource.c: Same.
1361         * except.c: Same.
1362         * builtins.c: Same.
1363         * expr.c: Same.
1364         * java-tree.h (PUSH_FIELD): Add location field.
1366 2009-06-09  Ian Lance Taylor  <iant@google.com>
1368         * verify.h: Remove extern "C".
1370 2009-06-07  Ian Lance Taylor  <iant@google.com>
1372         * jcf-parse.c (handle_constant): Change local variable 'kind' to
1373         unsigned int.
1375 2009-06-01  Ian Lance Taylor  <iant@google.com>
1377         * jcf-io.c (find_class): Use CONST_CAST.
1379 2009-05-27  Ian Lance Taylor  <iant@google.com>
1381         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1382         $(LINKER).
1383         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1385 2009-05-26  Ian Lance Taylor  <iant@google.com>
1387         * Make-lang.in (jvspec.o): Use $(COMPILER).
1388         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1389         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1391 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
1393         * Make-lang.in (GCJ): Renamed to...
1394         (XGCJ): ... this.
1396 2009-04-27  Ian Lance Taylor  <iant@google.com>
1398         * builtins.c (java_builtins): Add casts to enum type.
1399         * verify-impl.c (check_class_constant): Add cast to enum type.
1400         (check_constant, check_wide_constant): Likewise.
1402 2009-04-27  Richard Guenther  <rguenther@suse.de>
1404         PR java/38374
1405         * constants.c (build_constants_constructor): Retain the old
1406         pointer type as valid TYPE_POINTER_TO after patching the
1407         type of the constant pool decl.
1409 2009-04-24  Ian Lance Taylor  <iant@google.com>
1411         * jcf-parse.c (handle_constant): Add cast to enum type.
1413 2009-04-21  Taras Glek <tglek@mozilla.com>
1415         * builtins.c: Update GTY annotations to new syntax
1416         * decl.c: Likewise
1417         * java-tree.h: Likewise
1418         * jcf.h: Likewise
1419         * lang.c: Likewise
1421 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
1423         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1424         license notices.
1426 2009-04-18  Ian Lance Taylor  <iant@google.com>
1428         * verify-impl.c (verify_instructions_0): Add cast to enum type.
1430 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
1432         * builtins.c (compareAndSwapLong_builtin,
1433         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1434         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1436 2009-03-31  Richard Guenther  <rguenther@suse.de>
1438         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1439         the first operand of binary and comaprison expressions.
1441 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
1443         PR rtl-optimization/323
1444         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1445         Give an error for -fexcess-precision=standard for processors where
1446         the option is significant.
1448 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1450         * lang.opt: Unify help text for -Wdeprecated.
1452 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
1454         * jcf-dump.c (version): Update copyright notice dates.
1456 2009-01-16  Richard Guenther  <rguenther@suse.de>
1458         PR tree-optimization/38835
1459         PR middle-end/36227
1460         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1462 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
1464         PR bootstrap/38262
1465         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1467 2008-11-04  Andrew Haley  <aph@redhat.com>
1469         PR java/37068
1470         * jcf-parse.c (java_emit_static_constructor): Don't call
1471         cgraph_build_static_cdtor.  Rewrite.
1473 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
1475         * Make-lang.in (check-java-subtargets): New target.
1477 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
1479         PR target/35483
1480         * Make-lang.in (class.o): Depend on $(TM_P_H).
1481         (expr.o): Same.
1482         * class.c: Include tm_p.h.
1483         * expr.c: Include tm_p.h.
1485 2008-10-14  Andrew Haley  <aph@redhat.com>
1487         * constants.c (build_constant_data_ref): Make sure we only build
1488         one copy of the decl for the constant pool.
1490 2008-09-22  Andrew Haley  <aph@redhat.com>
1492         * expr.c (rules): Add new rule for
1493         gnu.java.lang.VMCPStringBuilder.toString.
1494         (rewrite_rule.new_classname): New field.
1495         (maybe_rewrite_invocation): Use new_classname field instead of
1496         DECL_CONTEXT (*method_p).
1497         Allow rewrite_arglist to be NULL.
1499 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1501         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1502         (java_get_callee_fndecl): Kill.
1504 2008-09-17  Jan Hubicka  <jh@suse.cz>
1506         PR c++/18071
1507         * class.c (add_method_1): Do not initialize DECL_INLINE.
1508         (make_local_function_alias): Likewise.
1509         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1510         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1512 2008-09-09  Richard Guenther  <rguenther@suse.de>
1514         * decl.c (build_result_decl): Remove no longer applicable
1515         promotion.
1517 2008-09-05  David Daney  <ddaney@avtrex.com>
1519         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1521 2008-08-21  David Daney  <ddaney@avtrex.com>
1523         * class.c (make_class_data): Don't add field_index when
1524         flag_reduced_reflection set.
1526 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
1528         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1530 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1532         PR 28875
1533         * lang.c (java_handle_option): Replace set_Wunused with
1534         warn_unused.
1536 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1538         * gcj.texi: Update copyright years.  Do not list GPL as
1539         Invariant Section.
1541 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
1543         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1544         from ctype's sizes.
1546         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1547         alignment.
1549 2008-07-29  Jan Hubicka  <jh@suse.cz>
1551         * lang.c (java_post_options): Remove handling of flag_no_inline.
1553 2008-07-28  Richard Guenther  <rguenther@suse.de>
1555         Merge from gimple-tuples-branch.
1557         2008-07-18  Richard Guenther  <rguenther@suse.de>
1559         * expr.c: Include tree-iterator.h.
1560         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1562         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
1564         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1565         * expr.c: Same.
1567         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
1569         * java-gimplify.c (java_gimplify_expr): Same.
1570         (java_gimplify_modify_expr): Same.
1571         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1573         2008-05-02  Diego Novillo  <dnovillo@google.com>
1575         * expr.c (build_java_throw_out_of_bounds_exception): Fix
1576         mixed declarations and code.
1578         2008-05-02  Doug Kwan  <dougkwan@google.com>
1580         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1581         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1583         2008-02-19  Diego Novillo  <dnovillo@google.com>
1585         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1587         * java-gimplify.c (java_gimplify_self_mod_expr): Change
1588         gimple_seq arguments to gimple_seq *.  Update all users.
1590         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
1592         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1593         sequences.
1594         (java_gimplify_self_mod_expr): Same.
1595         * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1596         sequences.
1598 2008-07-24  Jan Hubicka  <jh@suse.cz>
1600         * java/decl.c: Include cgraph.h
1601         (end_java_method): Remove non-unit-at-a-time code.
1602         (java_mark_decl_local): Likewise; sanity check that we don't touch
1603         finalized nodes.
1605 2008-07-15  Jan Hubicka  <jh@suse.cz>
1607         * lang.c (java_init_options): Enable unit-at-a-time by default.
1609 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1611         * Make-lang.in (jvspec.o): Fix dependencies.
1613 2008-07-06  Tom Tromey  <tromey@redhat.com>
1615         * Make-lang.in (java/parse.o-warn): Remove.
1616         (java/jcf-io.o-warn): Remove.
1618 2008-07-05  Tom Tromey  <tromey@redhat.com>
1620         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
1621         (compare_path): Remove.
1622         (java_or_class_file): Likewise.
1623         (memoized_dirlist_entry): Likewise.
1624         (memoized_dirlist_hash): Likewise.
1625         (memoized_dirlist_lookup_eq): Likewise.
1626         (memoized_dirlists): Likewise.
1627         (caching_stat): Likewise.
1628         (find_class): Use stat.
1629         * jcf.h (JCF_USE_SCANDIR): Remove.
1631 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
1633         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1634         doc/rebuild-gcj-db.1
1635         (java.uninstall): Likewise.
1636         (java.maintainer-clean): Likewise.
1637         (aot-compile.pod): New rule.
1638         (rebuild-gcj-db.pod): New rule.
1639         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1640         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1642 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1644         * Make-lang.in (java/jcf-io.o-warn): New.
1646 2008-06-24  Tom Tromey  <tromey@redhat.com>
1648         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1649         * expr.c (add_type_assertion): Rename argument.
1650         (build_java_arrayaccess): Don't name variable 'throw'.
1651         (ARRAY_NEW_MULTI): Don't name variable 'class'.
1652         * jcf-io.c (find_class): Don't name variable 'class'.
1653         * mangle.c (compression_table_add): Don't name variable 'new'.
1654         * constants.c (cpool_for_class): Rename argument.
1655         (alloc_constant_fieldref): Likewise.
1656         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1657         'class'.
1658         (read_class): Likewise.
1659         (parse_zip_file_entries): Likewise.
1660         (process_zip_dir): Likewise.
1661         * decl.c (java_mark_class_local): Rename argument.
1662         * class.c (GEN_TABLE): Use type_name, not typename.
1663         (gen_indirect_dispatch_tables): Likewise.
1664         (add_field): Rename argument.
1665         (is_compiled_class): Likewise.
1666         (safe_layout_class): Likewise.
1667         (emit_assertion_table): Likewise.
1668         * typeck.c (has_method): Rename argument.
1670 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1672         * class.c (ident_subst, mangled_classname, unmangle_classname,
1673         gen_indirect_dispatch_tables, add_method_1,
1674         build_fieldref_cache_entry, make_local_function_alias,
1675         layout_class, java_treetreehash_find, java_treetreehash_new,
1676         split_qualified_name): Fix for -Wc++-compat.
1677         * constants.c (set_constant_entry, cpool_for_class): Likewise.
1678         * decl.c (make_binding_level, java_dup_lang_specific_decl,
1679         start_java_method): Likewise.
1680         * except.c (prepare_eh_table_type): Likewise.
1681         * expr.c (type_assertion_hash, note_instructions): Likewise.
1682         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1683         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1684         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1685         Likewise.
1686         * jcf-parse.c (reverse, java_read_sourcefilenames,
1687         annotation_grow, rewrite_reflection_indexes, java_parse_file,
1688         process_zip_dir): Likewise.
1689         * jcf-path.c (add_entry, add_path, jcf_path_init,
1690         jcf_path_extdirs_arg): Likewise.
1691         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1692         * jvgenmain.c (do_mangle_classname): Likewise.
1693         * lang.c (put_decl_string): Likewise.
1694         * verify-impl.c (make_state_copy, make_state, add_new_state):
1695         Likewise.
1697 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1699         * gcj.texi: Expand TABs, remove whitespace from blank lines.
1701 2008-06-14  Tom Tromey  <tromey@redhat.com>
1703         PR java/36247:
1704         * class.c (build_class_ref): Initialize this_classdollar when
1705         needed.
1707 2008-05-23  Andrew Haley  <aph@redhat.com>
1709         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1710         pathname of source file.
1712 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
1714         * jcf-dump.c (print_constant): Use
1715         HOST_LONG_LONG_FORMAT.
1717 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
1719         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1720         DECL_PURE_P.
1722 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1724         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1725         (build_classdollar_field): Don't set TREE_INVARIANT.
1726         (get_dispatch_table): Don't set TREE_INVARIANT.
1727         (make_class_data): Don't set TREE_INVARIANT.
1728         (build_symbol_entry): Don't set TREE_INVARIANT.
1729         (emit_symbol_table): Don't set TREE_INVARIANT.
1730         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1731         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1732         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1733         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1735 2008-04-03  Tom Tromey  <tromey@redhat.com>
1737         * Make-lang.in (java_OBJS): New variable.
1739 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
1741         * java-tree.h (insert_block): Kill.
1742         * decl.c (insert_block): Kill.
1744 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
1746         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1747         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1748         gpl.texi.
1750 2008-03-27  Tom Tromey  <tromey@redhat.com>
1752         * Make-lang.in: Revert automatic dependency patch.
1754 2008-03-25  Tom Tromey  <tromey@redhat.com>
1756         * Make-lang.in: Removed most explicit .o targets.
1757         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
1758         ($(GCJ)$(exeext)): Update.
1759         (JAVA_OBJS): New variable.
1760         (JCFDUMP_OBJS): Reformat.
1761         (java_OBJS): New variable.
1762         (java/jvspec.o-warn): Update.
1763         (java/parse.o-warn): Remove.
1764         (JAVA_TREE_H): Remove.
1765         (java/jcf-io.o): Reduce to variable setting.
1766         (ALL_CPPFLAGS): Likewise.
1768 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
1770         * mangle.c (java_mangle_decl): Remove dead check.
1772 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
1774         * jcf-parse.c (java_parse_file): Assert binding levels are
1775         left in order.
1776         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1777         Delete.
1779 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
1781         * jcf-dump.c (version): Update copyright notice dates.
1783 2008-02-29  Tom Tromey  <tromey@redhat.com>
1785         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1786         method.
1787         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1789 2008-02-26  Tom Tromey  <tromey@redhat.com>
1791         * lang.c (java_post_options): Remove conditional.
1792         * expr.c (expand_byte_code): Remove old location code.
1793         * jcf-parse.c (set_source_filename): Remove old location code.
1794         (give_name_to_class): Likewise.
1795         (jcf_parse): Likewise.
1796         (duplicate_class_warning): Likewise.
1797         (parse_class_file): Likewise.
1798         (java_parse_file): Likewise.
1799         * decl.c (finish_method): Remove old location code.
1800         * class.c (push_class): Remove old location code.
1802 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1804         PR other/35107
1805         * Make-lang.in (jc1): Add $(GMPLIBS).
1807 2008-01-23  David Daney  <ddaney@avtrex.com>
1809         * class.c (hide)  Rename to...
1810         (java_hide_decl) ... this throughout, and make public.
1811         * resource.c (Jr_count): Remove.
1812         (compile_resource_data): Call java_mangle_resource_name to generate
1813         decl name.  Make resource decl public and hidden.
1814         * mangle.c (java_mangle_resource_name): New function.
1815         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1816         functions.
1818 2008-01-04  Andrew Haley  <aph@redhat.com>
1820         PR java/17779
1821         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1822         C90.
1824 2008-01-03  Andrew Haley  <aph@redhat.com>
1826         PR java/17779
1827         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1828         we're about to re-layout the type.
1830 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
1832         * lang.c (java_classify_record): Don't return
1833         RECORD_IS_INTERFACE for now.
1835 2007-12-18  Andrew Haley  <aph@redhat.com>
1837         PR java/27643
1838         * jcf-parse.c (java_parse_file): Remove call to
1839         java_mark_class_local.
1840         (parse_class_file): Reinstate call to java_mark_class_local here.
1841         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1842         already set, call java_mangle_decl() and make_decl_rtl() to
1843         rewrite its name as a hidden alias.
1845 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1847         PR debug/7081
1848         * lang.c (java_classify_record): New.
1849         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1851 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1853         PR 34081/C++
1854         * decl.c (finish_method): Pass 'false' for the new
1855         allocate_struct_function parameter.
1857 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1859         * expr.c (build_jni_stub): Use the computed jni func type for
1860         variable meth.
1862 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1864         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1866 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1868         * expr.c (type_assertion_hash): Hash type uids rather than
1869         tree pointers.
1871 2007-11-17  David Daney  <ddaney@avtrex.com>
1872             Andrew Haley  <aph@redhat.com>
1874         * constants.c (build_constants_constructor):  Use POINTER_SIZE
1875         insead of BITS_PER_WORD in big-endian work around.
1877 2007-11-07  Tom Tromey  <tromey@redhat.com>
1879         PR java/34019:
1880         * gcj.texi (Input Options): Add missing noun.
1882 2007-11-02  Tom Tromey  <tromey@redhat.com>
1884         PR java/33765:
1885         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1886         * zipfile.h (ZIPEMPTYMAGIC): New define.
1888 2007-11-01  Tom Tromey  <tromey@redhat.com>
1890         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1891         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1892         (java/jcf-io.o): Depend on zipfile.h.
1894 2007-10-17  Richard Guenther  <rguenther@suse.de>
1896         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1897         dependencies.
1899 2007-10-03  Andrew Haley  <aph@redhat.com>
1901         PR java/33639
1902         * class.c (mangled_classname): Detect and replace illegal
1903         characters in assembly language symbols.
1904         (gen_indirect_dispatch_tables): Call mangled_classname() on
1905         the type.
1907 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1909         * lang.c (java_print_error_function): Add third argument.
1911 2007-09-15  Tom Tromey  <tromey@redhat.com>
1913         * java-tree.h (struct lang_decl_func) <function_decl_body>:
1914         Remove.
1915         <init_final>: Likewise.
1916         * lang.c (java_dump_tree): Update.
1917         * java-tree.h (DECL_FUNCTION_BODY): Remove.
1919 2007-09-11  Jan Hubicka <jh@suse.cz>
1921         * decl.c (java_expand_body): Kill.
1922         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1924 2007-09-06  Tom Tromey  <tromey@redhat.com>
1926         * jcf-parse.c (parse_class_file): Re-enter the current file.
1928 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
1930         * boehm.c (mark_reference_fields): Move misaligned pointer check
1931         after JREFERENCE_TYPE_P test
1933 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
1935         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1936         if pointer is misaligned.
1938 2007-09-06  Tom Tromey  <tromey@redhat.com>
1940         * lang.c (java_post_options): Update.
1941         * jcf-parse.c (set_source_filename): Update.
1942         (give_name_to_class): Update.
1943         (jcf_parse): Update.
1944         (duplicate_class_warning): Update.
1945         (parse_class_file): Update.
1946         (java_parse_file): Update.
1947         * expr.c (expand_byte_code): Update.
1949 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1951         * decl.c (finish_method): Use set_cfun.
1953 2007-09-04  Andrew Haley  <aph@redhat.com>
1955         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1956         when using the ARM EABI.
1958 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1960         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1962 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1964         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1965         CONST_CAST.
1966         * jcf.h (JCF_FINISH): Likewise.
1968 2007-08-28  Tom Tromey  <tromey@redhat.com>
1970         * Make-lang.in (java.tags): Don't tag '*.y' files.
1972 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1974         * lang.c (java_decl_ok_for_sibcall): Likewise.
1976 2007-08-21  Paul Brook  <paul@codesourcery.com>
1977             Nathan Sidwell  <nathan@codesourcery.com>
1978             Mark Mitchell  <mark@codesourcery.com>
1979             Joseph Myers  <joseph@codesourcery.com>
1981         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
1982         date.
1984 2007-08-20  Richard Guenther  <rguenther@suse.de>
1986         * lang.c (java_tree_inlining_walk_subtrees): Remove.
1987         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1989 2007-08-17  Tom Tromey  <tromey@redhat.com>
1991         * typeck.c (find_method_in_interfaces): Update.
1992         * jcf-parse.c (load_class): Update.
1993         * java-gimplify.c (java_gimplify_component_ref): Removed.
1994         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
1995         arguments.
1996         (java_gimplify_expr): Update.
1997         * decl.c (java_init_decl_processing): Update.
1998         * class.c (set_constant_value): Update.
1999         (make_class_data): Update.
2000         (finish_class): Update.
2001         (build_static_field_ref): Update.
2002         (is_compiled_class): Update.
2003         (maybe_layout_super_class): Update.
2004         (layout_class): Update.
2005         (layout_class_method): Update.
2006         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
2007         (lang_decl_var) <am, final_iud, cif>: Removed fields.
2008         (lang_decl_func) <init_calls_this>: Removed field.
2009         (lang_type) <dot_class, verify_method>: Removed fields.
2010         (FIELD_NESTED_ACCESS): Removed.
2011         (FIELD_NESTED_ACCESS_P): Removed.
2012         (DECL_FIELD_FINAL_IUD): Removed.
2013         (DECL_LOCAL_FINAL_IUD): Removed
2014         (LOCAL_FINAL_P): Removed.
2015         (FINAL_VARIABLE_P): Removed.
2016         (CLASS_FINAL_VARIABLE_P): Removed.
2017         (DECL_BIT_INDEX): Removed.
2018         (DECL_INIT_CALLS_THIS): Removed.
2019         (FIELD_LOCAL_ALIAS): Removed.
2020         (FIELD_LOCAL_ALIAS_USED): Removed.
2021         (FIELD_THISN): Removed.
2022         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
2023         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
2024         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
2025         (TYPE_DOT_CLASS): Removed.
2026         (TYPE_VERIFY_METHOD): Removed.
2027         (ID_CLASSDOLLAR_P): Removed.
2028         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
2029         Removed.
2030         (classdollar_identifier_node): Removed.
2031         (TYPE_UNKNOWN): Removed.
2032         (CLASS_FROM_SOURCE_P): Removed.
2033         * expr.c (build_jni_stub): Update.
2034         (force_evaluation_order): Update.
2035         (build_java_empty_stmt): Update.
2036         (build_class_init): Update.
2037         (java_stack_swap): Update.
2038         (build_jni_stub): Update.
2040 2007-08-17  Tom Tromey  <tromey@redhat.com>
2042         * java-tree.h (LABEL_TYPE_STATE): Removed.
2043         (load_type_state): Removed.
2044         (LABEL_PC): Removed.
2045         (LABEL_VERIFIED): Removed.
2046         (type_states): Declare.
2047         * expr.c (type_states): New global.
2048         (load_type_state): Now static.  Use type_states.  Changed
2049         argument.
2050         (lookup_label): Don't set LABEL_PC.
2051         (expand_byte_code): Don't use LABEL_VERIFIED.
2052         (note_instructions): Initialize type_states.
2053         * verify-glue.c (vfy_note_stack_depth): Rewrote.
2054         (vfy_note_stack_type): Use type_states.
2055         (vfy_note_local_type): Likewise.
2057 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2059         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
2060         * jcf.h (JCF_FINISH): Likewise.
2062 2007-07-31  Nick Clifton  <nickc@redhat.com>
2064         * java-gimplify.c: Change copyright header to refer to version 3
2065         of the GNU General Public License and to point readers at the
2066         COPYING3 file and the FSF's license web page.
2067         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
2068         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
2069         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
2070         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
2071         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
2072         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
2073         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
2075 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2077         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
2079 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2081         * lang.c (java_get_callee_fndecl): Constify.
2083 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2085         * mangle.c (set_type_package_list): Constify.
2086         * verify-glue.c (vfy_make_string): Delete.
2087         * verify.h (vfy_make_string): Likewise.
2089 2007-07-26  Tom Tromey  <tromey@redhat.com>
2091         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
2092         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
2093         EXIT_BLOCK_LABELED_BLOCK): Likewise.
2094         * lang.c (java_tree_inlining_walk_subtrees): Update.
2095         (java_dump_tree): Likewise.
2096         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
2097         Remove.
2098         * decl.c (push_labeled_block, pop_labeled_block): Remove.
2099         * java-gimplify.c (java_gimplify_labeled_block_expr,
2100         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
2101         (java_gimplify_expr): Update.
2103 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2105         * class.c (java_treetreehash_hash, java_treetreehash_compare):
2106         Constify.
2107         * expr.c (type_assertion_eq): Likewise.
2108         * jcf-io.c (compare_path): Likewise.
2109         * jcf-parse.c (cmpstringp): Likewise.
2110         * verify-impl.c (get_one_type, compute_argument_types,
2111         compute_return_type): Likewise.
2113 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2115         PR target/32462
2116         PR libgcj/32465
2117         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
2119 2007-07-12  Richard Guenther  <rguenther@suse.de>
2121         * expr.c (expand_java_return): RETURN_EXPR has void type.
2122         (build_jni_stub): Likewise.  Use a comparison against zero
2123         for null-pointer test in COND_EXPR.
2124         (build_field_ref): Build POINTER_PLUS_EXPR with correct
2125         type.  Convert result instead.
2126         (build_invokevirtual): Likewise.
2128 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
2130         PR 32617
2131         * lang.c (java_init): Remove setting of force_align_functions_log.
2132         * class.c (add_method_1): Set DECL_ALIGN of non-static method
2133         to cope with ptrmemfunc_vbit_in_pfn.
2135 2007-07-03  David Daney  <ddaney@avtrex.com>
2137         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
2138         include path.
2139         (doc/gcj.dvi): Same.
2140         (doc/gcj.pdf): Same.
2141         (java/index.html): Same.
2143 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
2145         * class.c (make_class_data): Build the index in sizetype.
2146         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
2147         adding to a pointer type.
2148         (build_symbol_entry): Likewise.
2149         * expr.c (build_java_arrayaccess): Likewise.
2150         (build_field_ref): Likewise.
2151         (build_known_method_ref): Likewise.
2152         (build_invokevirtual): Likewise.
2153         * except.c (build_exception_object_ref): Do a
2154         NEGATIVE and then a POINTER_PLUS_EXPR instead
2155         of a MINUS_EXPR.
2157 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
2159         * typeck.c (java_signed_type): Remove.
2160         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2161         * java-tree.h (java_signed_type): Remove.
2163 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
2165         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
2166         (print_constant): Likewise.
2168 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
2170         * expr.c (build_java_binop): Use unsigned_type_for instead of
2171         java_unsigned_type.
2172         * java-tree.h (java_unsigned_type): Remove.
2173         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2174         * typeck.c (java_unsigned_type): Remove.
2176 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2178         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
2179         instead of checking GIMPLE_STMT_P in chain_next.
2181 2007-04-06  Colin Walters  <walters@redhat.com>
2183         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
2184         * jcf-io.c (open_class): Copy 'filename'.
2186 2007-04-03  Andrew Haley  <aph@redhat.com>
2188         * jvgenmain.c (main): Change main to use class$, not class$$.
2189         (do_mangle_classname): Likewise.
2190         * class.c (hide): New function.
2191         (add_field): Hide everything that shouldn't be visible outside a
2192         DSO.
2193         (build_static_class_ref): Likewise.
2194         (build_classdollar_field): Likewise.
2195         (make_class_data): Likewise.
2196         (layout_class_method): Likewise.
2197         * expr.c (special_method_p): New function.
2199         * class.c (push_class): Don't bogusly guess the source filename.
2200         * jcf-parse.c (give_name_to_class): Don't set input_location from
2201         DECL_ARTIFICIAL decls.
2203 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
2205         * typeck.c (java_signed_or_unsigned_type): Removed.
2206         (java_signed_type): use get_signed_or_unsigned_type instead of
2207         java_signed_or_unsigned_type.
2208         (java_unsigned_type): Ditto.
2209         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
2210         * java-tree.h (java_signed_or_unsigned_type): Removed.
2212 2007-03-26  Tom Tromey  <tromey@redhat.com>
2214         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
2215         (java.maintainer-clean): Likewise.
2216         (java.install-man): Likewise.
2217         (.INTERMEDIATE): Removed grmiregistry.pod.
2218         (grmiregistry.pod): Removed.
2219         * gcj.texi (Invoking gcjh): Removed.
2220         (Invoking gjnih): Likewise.
2221         (Invoking grmiregistry): Likewise.
2222         (direntry): Updated.
2223         (Top): Likewise.
2224         (which-gcj): Removed.
2226 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2228         * Make-lang.in: Add install-pdf target as copied from
2229         automake v1.10 rules.
2231 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
2233         * gcj.texi: Standardize title page.
2235 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2237         * class.c: Fix a comment typo.
2239 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2240             Brooks Moses  <brooks.moses@codesourcery.com>
2241             Lee Millward  <lee.millward@codesourcery.com>
2243         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
2244         of build3.
2245         (BUILD_MONITOR_EXIT): Likewise.
2247         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
2248         (java_gimplify_modify_expr): Likewise.
2250         * class.c (cache_this_class_ref): Use build_call_expr.
2251         (build_static_field_ref): Likewise.
2252         (emit_indirect_register_classes): Likewise.
2253         (emit_register_classes): Likewise.
2255         * resource.c (write_resource_constructor): Use build_call_expr.
2257         * builtins.c (builtin_creator_function): Change interpretation of
2258         the second parameter to be the whole CALL_EXPR instead of the arglist.
2259         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
2260         (min_builtin): Likewise.
2261         (abs_builtin): Likewise.
2262         (java_build_function_call_expr): Likewise.
2263         (convert_real): Likewise.
2264         (UNMARSHAL3): Likewise.
2265         (UNMARSHAL4): Likewise.
2266         (UNMARSHAL5): Likewise.
2267         (build_arglist_for_builtin): Delete.  Fix callers to use
2268         build_call_expr instead.
2269         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
2270         accessors.
2271         (compareAndSwapInt_builtin): Likewise.
2272         (compareAndSwapLong_builtin): Likewise.
2273         (compareAndSwapObject_builtin): Likewise.
2274         (putVolatile_builtin): Likewise.
2275         (getVolatile_builtin): Likewise.
2276         (VMSupportsCS8_builtin): Likewise.
2277         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
2278         instead of arglist.
2280         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
2281         (build_java_throw_out_of_bounds_exception): Likewise.
2282         (java_check_reference): Likewise.
2283         (build_java_arraystore_check): Likewise.
2284         (build_newarray): Likewise.
2285         (build_anewarray): Likewise.
2286         (expand_java_multinewarray): Use build_call_list instead of build3.
2287         (build_java_monitor): Use build_call_nary instead of build3.
2288         (java_create_object): Likewise.
2289         (expand_java_NEW): Likewise.
2290         (build_instanceof): Likewise.
2291         (expand_java_CHECKCAST): Likewise.
2292         (build_java_soft_divmod): Likewise.
2293         (build_java_binop): Likewise.
2294         (build_field_ref): Likewise.
2295         (build_class_init): Likewise.
2296         (rewrite_arglist_getcaller): Use build_call_expr.
2297         (build_invokeinterface):  Use build_call_nary instead of build3.
2298         (expand_invoke): Use build_call_list instead of build3.
2299         (build_jni_stub): Use build_call_nary, build_call_list, or
2300         build_call_expr instead of build3.
2301         (expand_java_field_op): Use build_call_expr instead of build3.
2302         (force_evaluation_order): Use new CALL_EXPR accessors.
2304         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2306 2007-02-15  David Daney  <ddaney@avtrex.com>
2308         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2309         (java.maintainer-clean):Add gc-analyze.1.
2310         (.INTERMEDIATE): Add gc-analyze.pod.
2311         (gc-analyze.pod): New rule.
2312         (java.install-man): Install gc-analyze.1
2313         * gcj.texi: Add new section for the gc-analyze program.
2315 2007-02-07  Andrew Haley  <aph@redhat.com>
2317         * class.c (uncache_this_class_ref): New.
2318         * expr.c (build_jni_stub): Initialize the class.
2319         (expand_byte_code): Call uncache_this_class_ref after generating
2320         code.
2322 2007-02-06  Tom Tromey  <tromey@redhat.com>
2324         PR java/30714:
2325         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2327 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
2329         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2331 2007-02-02  Andrew Haley  <aph@redhat.com>
2333         * expr.c (expand_byte_code): Call cache_this_class_ref() and
2334         cache_cpool_data_ref().
2335         Set TYPE_CPOOL_DATA_REF.
2336         (cache_cpool_data_ref): New function.
2337         * constants.c (build_ref_from_constant_pool): Remove special-case
2338         code for flag_indirect_classes.
2339         (build_constant_data_ref): Move special-case code for
2340         flag_indirect_classes here from build_ref_from_constant_pool.
2341         * decl.c (finish_method): Move class initialization from here to
2342         cache_this_class_ref.
2343         * class.c (cache_this_class_ref): New function.
2344         (build_class_ref): Use this_classdollar for the ouput class.
2346 2007-02-02  David Daney  <ddaney@avtrex.com>
2348         * class.c (is_compiled_class): Move check to avoid reloading
2349         current class.
2350         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2351         already set.
2353 2007-02-01  Andrew Haley  <aph@redhat.com>
2355         PR java/30641
2356         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2358 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
2360         * class.c, jcf-parse.c: Fix comment typos.
2362 2007-01-30  Tom Tromey  <tromey@redhat.com>
2364         * gcj.texi (Strings): Fix documentation for JvNewString.
2366 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2368         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2369         typos.
2371 2007-01-30  Ben Elliston  <bje@au.ibm.com>
2373         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2375 2007-01-29  Tom Tromey  <tromey@redhat.com>
2377         PR java/30607:
2378         * jvspec.c (lang_specific_driver): Handle separate -I argument.
2379         * lang.opt (-I): Add 'Separate'.
2381 2007-01-29  Andrew Haley  <aph@redhat.com>
2383         * class.c (add_method_1): Mark fndecl as external unless we are
2384         compiling it into this object file.
2386 2007-01-24  Andrew Haley  <aph@redhat.com>
2388         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2389         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2391 2007-01-22  Andrew Haley  <aph@redhat.com>
2393         * builtins.c (VMSupportsCS8_builtin): New function.
2395 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
2397         PR java/30454
2398         * jcf-io.c (opendir_in_zip): Close the file
2399         and free zipf before returning after an error.
2401 2007-01-16  Tom Tromey  <tromey@redhat.com>
2403         * java-tree.def: Added copyright header.
2405 2007-01-15  Tom Tromey  <tromey@redhat.com>
2407         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2408         case.
2409         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2410         Removed case.
2411         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2412         (EXPR_WFL_NODE): Likewise.
2413         (EXPR_WFL_LINECOL): Likewise.
2414         (EXPR_WFL_FILENAME): Likewise.
2415         (EXPR_WFL_LINENO): Likewise.
2416         (build_expr_wfl, expr_add_location): Don't declare.
2417         (build_unknown_wfl): Removed.
2418         (EXPR_WFL_FILENAME_NODE): Removed.
2419         (EXPR_WFL_COLNO): Removed.
2420         (EXPR_WFL_SET_LINECOL): Removed.
2421         (DECL_FUNCTION_WFL): Removed.
2422         (DECL_FIELD_FINAL_WFL): Removed.
2423         (struct lang_decl_func) <wfl>: Removed field.
2424         <called_constructor>: Likewise.
2425         <inner_access>: Likewise.
2426         (struct lang_decl_var) <wfl>: Removed field.
2427         (DECL_CONSTRUCTOR_CALLS): Removed.
2428         (DECL_FUNCTION_ACCESS_DECL): Likewise.
2429         (DECL_FUNCTION_INNER_ACCESS): Likewise.
2430         (DECL_SPECIFIC_COUNT): Likewise.
2431         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2432         * expr.c (build_expr_wfl): Removed.
2433         (expr_add_location): Likewise.
2435 2007-01-12  Tom Tromey  <tromey@redhat.com>
2437         * jcf-dump.c (main): Updated call to find_class.
2438         * lang.c (java_init): Removed dead code.
2439         * jcf-parse.c (read_class): Don't use java_source field.  Removed
2440         dead code.
2441         (parse_zip_file_entries): Don't use java_source field.
2442         (process_zip_dir): Likewise.
2443         (jcf_parse): Removed dead code.
2444         (java_parse_file): Likewise.
2445         (read_class): Updated call to find_class.
2446         * jcf-io.c (find_class): Don't use java_source field.  Removed
2447         'source_ok' argument, .java logic.
2448         * jcf.h (JCF) <java_source>: Removed field.
2449         (JCF_ZERO): Updated.    (find_class): Updated.
2450         * decl.c: Removed dead code.
2451         * class.c: Removed dead code.
2453 2007-01-11  Tom Tromey  <tromey@redhat.com>
2455         * typeck.c (convert): Don't use flag_emit_class_files.
2456         * lang.c (java_post_options): Don't use flag_emit_class_files.
2457         (java_handle_option): Don't use flag_extraneous_semicolon or
2458         flag_redundant.
2459         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2460         flag_emit_class_files.
2461         (load_class): Likewise.
2462         * java-tree.h (flag_emit_class_files): Don't declare.
2463         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2464         (flag_extraneous_semicolon): Don't declare.
2465         (flag_not_overriding): Likewise.
2466         (flag_static_local_jdk1_1): Likewise.
2467         (flag_redundant): Likewise.
2468         * expr.c (build_newarray): Don't use flag_emit_class_files.
2469         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2470         flag_emit_class_files.
2471         (build_class_ref): Likewise.
2472         * builtins.c (check_for_builtin): Don't use
2473         flag_emit_class_files.
2475 2007-01-10  Tom Tromey  <tromey@redhat.com>
2477         * lang.c (java_can_use_bit_fields_p): Removed.
2478         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2480 2007-01-09  Andrew Haley  <aph@redhat.com>
2482         * expr.c (build_java_arrayaccess): Rewrite to generate array
2483         access in canonical form.
2484         (expand_java_arraystore): Use build_fold_addr_expr() on address of
2485         array access.
2487 2007-01-03  Andrew Haley  <aph@redhat.com>
2489         PR java/28754
2490         * expr.c (expand_java_field_op): If we're initializing a field's
2491         declaring interface we should not also initialize the class
2492         context in which it was referenced.
2494 2007-01-02  Tom Tromey  <tromey@redhat.com>
2496         * java-tree.h (compiling_from_source, current_encoding,
2497         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2498         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2499         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2500         JTI_WFL_OPERATOR): Removed
2501         (finit_identifier_node, instinit_identifier_node,
2502         length_identifier_node, super_identifier_node,
2503         continue_identifier_node, access0_identifier_node, wfl_operator):
2504         Removed.
2505         (cyclic_inheritance_report,
2506         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2507         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2508         DECL_FIXED_CONSTRUCTOR_P): Removed.
2509         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2510         Removed.
2511         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2512         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2513         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2514         import_list, import_demand_list>: Removed.
2515         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2516         cxx_keyword_p): Removed.
2517         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2518         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2519         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2520         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2521         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2522         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2523         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2524         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2525         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2526         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2527         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2528         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2529         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2530         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2531         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2532         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2533         java_parse_abort_on_error, extract_field_decl): Removed.
2534         (finput): Declare.
2535         * lang.c: (compiling_from_source, current_encoding): Removed.
2536         (java_handle_option): Ignore -fencoding.
2537         * parse.h: Don't include lex.h.
2538         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2539         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2540         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2541         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2542         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2543         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2544         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2545         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2546         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2547         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2548         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2549         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2550         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2551         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2552         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2553         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2554         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2555         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2556         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2557         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2558         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2559         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2560         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2561         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2562         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2563         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2564         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2565         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2566         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2567         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2568         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2569         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2570         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2571         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2572         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2573         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2574         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2575         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2576         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2577         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2578         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2579         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2580         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2581         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2582         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2583         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2584         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2585         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2586         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2587         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2588         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2589         SET_CPC_STATIC_INITIALIZER_STMT,
2590         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2591         java_complete_class, java_check_circular_reference,
2592         java_fix_constructors, java_layout_classes, java_reorder_fields,
2593         java_method_add_stmt, java_get_line_col, reset_report,
2594         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2595         java_finish_classes, ctxp, ctxp_for_generation,
2596         ctxp_for_generation_last): Removed.
2597         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2598         * mangle.c (utf8_cmp): New function.
2599         (cxx_keywords): New global.
2600         (cxx_keyword_p): New function.
2601         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2602         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2603         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2604         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2605         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2606         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2607         * Make-lang.in (java.srcextra): Do nothing.
2608         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2609         (JAVA_OBJS): Don't mention deleted files.
2610         (java.mostlyclean): Likewise.
2611         (java.clean): Likewise.
2612         (JAVA_LEX_C): Removed.
2613         (buffer.o, check-init.o, parse.o): Remove unused targets.
2614         (typeck.o): Updated.
2615         * jcf-parse.c (read_class): Comment out unused code.
2616         (java_layout_seen_class_methods): New function.
2617         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2618         Removed.
2619         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
2620         (init_jcf_parse): Removed.
2621         * config-lang.in (gtfiles): Remove deleted files.
2622         * decl.c (java_init_decl_processing): Don't initialize
2623         finit_identifier_node, instinit_identifier_node,
2624         length_identifier_node, super_identifier_node,
2625         continue_identifier_node, access0_identifier_node.  Don't call
2626         init_jcf_parse.
2627         * class.c (cyclic_inheritance_report): New global.
2628         (add_method_1): Don't use
2629         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2630         (maybe_layout_super_class): Comment out code.
2631         (safe_layout_class): New function.
2632         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2633         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2634         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2635         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2636         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2637         (java_gimplify_case_expr): Removed.
2638         (java_gimplify_default_expr): Likewise.
2639         (java_gimplify_new_array_init): Likewise.
2640         * parse.y: Removed.
2641         * keyword.gperf, keyword.h: Removed.
2642         * chartables.h: Removed.
2643         * check-init.c: Removed.
2644         * buffer.c, buffer.h: Removed.
2645         * convert.h: Removed.
2646         * gen-table.pl: Removed.
2647         * lex.c, lex.h: Removed.
2649 2007-01-02  Andrew Haley  <aph@redhat.com>
2651         * expr.c (expand_java_arraystore): Make sure we perform a bounds
2652         check at runtime before we perform a type check.
2654 2006-12-19  Andrew Haley  <aph@redhat.com>
2656         * decl.c: Bump minor BC ABI version.
2658 2006-12-13  Gary Benson  <gbenson@redhat.com>
2660         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2662 2006-12-12  Tom Tromey  <tromey@redhat.com>
2664         * lang-specs.h: Pass -M options to jc1.
2665         * jcf-depend.c (jcf_dependency_add_file): Don't emit
2666         dependencies.
2668 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
2670         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2672 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
2674         * lang-specs.h: Pass '%U'-based options as separate arguments.
2676 2006-12-05  Tom Tromey  <tromey@redhat.com>
2678         PR java/29495:
2679         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2680         classes as well.
2681         * class.c (add_field): Handle ACC_SYNTHETIC.
2682         (add_method_1): Likewise.  Handle bridge and varargs.
2683         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2684         annotation.
2685         (set_class_decl_access_flags): Handle synthetic and annotation.
2686         * java-tree.h (METHOD_BRIDGE): New macro.
2687         (METHOD_VARARGS): Likewise.
2688         (TYPE_SYNTHETIC): Likewise.
2689         (TYPE_ANNOTATION): Likewise.
2690         (lang_type): New fields 'synthetic' and 'annotation'.
2691         (lang_decl_func): New fields 'varargs' and 'bridge'.
2693 2006-12-04  Andrew Haley  <aph@redhat.com>
2695         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2696         there's no map.
2698 2006-11-29  Gary Benson  <gbenson@redhat.com>
2700         * expr.c (rewrite_arglist_getcaller): Reorder.
2702 2006-11-29  Andrew Haley  <aph@redhat.com>
2704         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2705         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2707 2006-11-23  Andrew Haley  <aph@redhat.com>
2709         * expr.c (rewrite_arglist_getcaller): New.
2710         (rewrite_arglist_getclass): Fix indentation.
2711         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2712         gnu.classpath.VMStackWalker.getCallingClassLoader().
2713         * builtins.c (initialize_builtins): Remove duplicate def'n of
2714         __sync_synchronize.
2715         Add __builtin_return_address.
2717 2006-11-22  Andrew Haley  <aph@redhat.com>
2719         * jcf-reader.c (get_attribute): Mark attr_type unused.
2721         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2723 2007-01-08  Richard Guenther  <rguenther@suse.de>
2725         * lex.c (do_java_lex): Use build_int_cst_wide_type.
2726         * jcf-parse.c (get_constant): Likewise.
2728 2006-11-12  Jan Hubicka  <jh@suse.cz>
2730         * resource.c (compile_resource_data): Update for new varpool names.
2731         * java/class.c (build_utf8_ref): Likewise.
2733 2006-11-12  David Daney  <ddaney@avtrex.com>
2735         PR java/29805
2736         * typeck.c (build_java_array_type): Increase buffer sizes.
2738 2006-11-11  Richard Guenther  <rguenther@suse.de>
2740         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2741         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2743 2006-11-06  Andrew Haley  <aph@redhat.com>
2745         * java-tree.h (CONSTANT_LazyFlag): New.
2746         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2747         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2748         reflection_data.
2749         (handle_constant): Return 0 for dummy cpool entries.
2750         Handle constants of kind Class.
2751         Handle constants of kind NameAndType.
2752         (handle_enclosingmethod_attribute): New.
2753         (handle_signature_attribute): New.
2754         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2755         (HANDLE_SIGNATURE_ATTRIBUTE): New.
2756         (handle_constant): Use unmangle_classname()rather than calling
2757         identifier_subst() directly.
2759 2006-11-02  Andrew Haley  <aph@redhat.com>
2761         * java-tree.h (FIELD_ENUM): New.
2762         (lang_decl_var.field_enum): New.
2763         (lang_type.enum_class): New.
2764         (CLASS_ENUM): New.
2765         * class.c (set_class_decl_access_flags): Handle enum types.
2766         (add_field): Handle enum fields.
2767         (get_access_flags_from_decl): Likewise.
2769         * class.c (make_class_data): Put reflection_data into rodata.
2771 2006-11-01  Andrew Haley  <aph@redhat.com>
2773         * jcf-parse.c (field_offsets, bit_obstack): New variables.
2774         (jcf_parse): Write end marker to annotation_data.
2775         (java_parse_file): Create field_offsets bitmap.  Destroy it.
2776         (annotation_grow, annotation_rewrite_byte)
2777         (annotation_rewrite_short, annotation_rewrite_int)
2778         (annotation_read_short, annotation_write_byte)
2779         (annotation_write_short, annotation_write_int)
2780         (handle_long_constant, handle_constant, handle_element_value)
2781         (handle_annotation, handle_annotations)
2782         (handle_annotation_attribute, rewrite_reflection_indexes)
2783         (handle_member_annotations, handle_parameter_annotations)
2784         (handle_default_annotation): New functions.
2785         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2786         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2787         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2788         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2789         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2790         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2791         (TYPE_REFLECTION_DATA): New.
2792         (TYPE_REFLECTION_DATASIZE): New.
2793         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2794         an enum.
2795         * jcf-reader.c (get_attribute): Pass field/method index and
2796         attribute type to get_attribute().
2797         * constants.c (find_class_or_string_constant): Make nonstatic.
2798         (cpool_for_class): Likewise.
2799         (build_constants_constructor): Separate string and scalar types.
2800         * class.c (make_class_data): Generate field_indexes permutation.
2801         Pass it to rewrite_reflection_indexes().
2802         (make_class_data): Generate constructor for reflection_data field.
2804 2006-10-20  Tom Tromey  <tromey@redhat.com>
2806         * gcj.texi (Top): Don't mention jv-scan.
2807         (Invoking gcj): Likewise.
2808         (Invoking gcjh): Likewise.
2809         (Invoking gjnih): Likewise.
2810         (Invoking gij): Likewise.
2811         (Invoking gcj-dbtool): Likewise.
2812         (Invoking jv-scan): Removed.
2813         * parse-scan.y: Removed.
2814         * jv-scan.c: Removed.
2815         * config-lang.in (stagestuff): Don't mention jv-scan.
2816         * Make-lang.in (java): Removed jv-scan.
2817         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2818         (JVSCAN_OBJS): Removed.
2819         (jv-scan$(exeext)): Likewise.
2820         (JAVA_MANFILES): Removed jv-scan.1.
2821         (java.uninstall): Don't mention jv-scan.
2822         (java.mostlyclean): Likewise.
2823         (java.maintainer-clean): Likewise.
2824         (.INTERMEDIATE): Likewise.
2825         (java/jv-scan.o): Removed.
2826         (jv-scan.pod): Likewise.
2827         (java.srcextra): Don't mention parse-scan.c.
2828         (java.mostlyclean): Likewise.
2829         (java/parse-scan.c): Removed.
2830         (java/parse-scan.o-warn): Removed.
2831         (java/parse-scan.o): Removed.
2833 2006-10-20  Tom Tromey  <tromey@redhat.com>
2835         * lang.c (java_handle_option): Don't use
2836         jcf_write_base_directory.
2837         * jcf.h (jcf_write_base_directory): Removed.
2838         * parse.y (java_expand_classes): Don't call write_classfile.
2839         * config-lang.in (gtfiles): Removed jcf-write.c.
2840         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2841         (java/jcf-write.o): Removed.
2842         * jcf-parse.c (parse_class_file): Don't call write_classfile.
2843         * java-tree.h (write_classfile): Removed declaration.
2844         * jcf-write.c: Removed.
2846 2006-10-20  Tom Tromey  <tromey@redhat.com>
2848         * Make-lang.in (java): Removed gjnih, gcjh.
2849         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2850         (GCJH_OBJS): Removed.
2851         (GJNIH_OBJS): Likewise.
2852         (gjnih$(exeext)): Likewise.
2853         (gcjh$(exeext)): Likewise.
2854         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2855         (java.install-common): Don't special case gcjh.
2856         (java.uninstall): Don't mention gcjh, gjnih.
2857         (java.mostlyclean): Likewise.
2858         (java.maintainer-clean): Likewise.
2859         (.INTERMEDIATE): Likewise.
2860         (gcjh.pod): Removed.
2861         (gjnih.pod): Likewise.
2862         (GCJH_TARGET_INSTALL_NAME): Removed.
2863         (java/gjavah-jni.o): Removed.
2864         (java/gjavah.o): Likewise.
2865         * config-lang.in (stagestuff): Removed gjnih, gcjh.
2866         * gjavah.c: Removed.
2868 2006-10-17  Tom Tromey  <tromey@redhat.com>
2870         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2871         "string" case.
2873 2006-10-17  Tom Tromey  <tromey@redhat.com>
2875         * jvgenmain.c (main): Handle -findirect-dispatch.
2876         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2877         jvgenmain.
2879 2006-10-06  Andrew Haley  <aph@redhat.com>
2881         * builtins.c (compareAndSwapInt_builtin): Check that we really do
2882         have a compare_and_swap builtin.
2883         (compareAndSwapLong_builtin): Likewise.
2884         (compareAndSwapObject_builtin): Likewise.
2886 2006-10-04  Andrew Haley  <aph@redhat.com>
2888         * builtins.c (java_builtins): Add compareAndSwapInt,
2889         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2890         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2891         putObjectVolatile, getObjectVolatile, getIntVolatile,
2892         getLongVolatile, getLong.
2893         (UNMARSHAL3): New macro.
2894         (UNMARSHAL4): Likewise.
2895         (UNMARSHAL5): Likewise.
2896         (build_arglist_for_builtin): New function.
2897         (build_addr_sum, build_check_this): New functions.
2898         (putObject_builtin. compareAndSwapInt_builtin,
2899         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2900         putVolatile_builtin, getVolatile_builtin): New builtins.
2902 2006-06-08  Andrew Haley  <aph@redhat.com>
2904         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2905         get_symbol_table_index().
2906         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2907         private method.
2908         (build_known_method_ref): New arg: special.  Pass it to
2909         get_symbol_table_index.
2910         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2911         the method list.
2912         (build_invokevirtual): New arg: special.  Pass it to
2913         get_symbol_table_index.
2914         (expand_invoke): New variable: special.
2915         Pass it to maybe_rewrite_invocation().
2916         Pass it to build_known_method_ref().
2917         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2918         build the symbol table conbstructor.
2919         (emit_symbol_table): Extract SPECIAL from the method list and pass
2920         it to build_symbol_entry().
2921         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2922         special accordingly.
2924 2006-09-08  Andrew Haley  <aph@redhat.com>
2926         * class.c (layout_class_method): Use build_java_signature, not
2927         build_java_argument_signature.  Use lookup_java_method, not
2928         lookup_argument_method.
2930 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2931             Bryce McKinlay  <bryce@mckinlay.net.nz>
2933         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2935 2006-07-18  Tom Tromey  <tromey@redhat.com>
2937         * lang.opt: Added missing -W options.
2939 2006-07-12  Tom Tromey  <tromey@redhat.com>
2941         PR java/28329:
2942         * lang-specs.h: Pass '%U'-based options as separate arguments.
2943         Use -faux-classpath.
2944         * lang.c (java_handle_option): Handle OPT_faux_classpath.
2945         * lang.opt (faux-classpath): New option.
2947 2006-07-07  Tom Tromey  <tromey@redhat.com>
2949         * class.c (make_class_data): Set value for reflection_data field.
2950         * decl.c (java_init_decl_processing): Add reflection_data field.
2952 2006-07-07  Tom Tromey  <tromey@redhat.com>
2954         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2955         earlier.
2956         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2958 2006-07-07  Andrew Haley  <aph@redhat.com>
2960         * jcf-parse.c (set_source_filename): Don't check for
2961         CLASS_FROM_CURRENTLY_COMPILED_P.
2962         Remove // comments.
2964 2006-07-07  Andrew Haley  <aph@redhat.com>
2966         * java-tree.h (java_read_sourcefilenames): Declare.
2967         * lang.c (java_handle_option): Call java_read_sourcefilenames().
2968         * lang.opt (fsource-filename): New opt.
2969         * lang-specs.h: Add -fsource-filename.
2970         * jcf-parse.c (num_files, filenames): New variables.
2971         (reverse, cmpstringp, java_read_sourcefilenames,
2972         find_sourcefile): New.
2973         (set_source_filename): Call find_sourcefile to find the real name
2974         of a source file.
2976 2006-06-27  Tom Tromey  <tromey@redhat.com>
2978         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2979         Signature, LocalVariableTypeTable, annotation attributes.
2980         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2981         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2982         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2983         (HANDLE_METHOD): Likewise.
2984         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2985         (print_annotation): New function.
2986         (print_element_value): Likewise.
2987         (indent): Likewise.
2988         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2989         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2990         (print_parameter_annotations): New function.
2991         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2992         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2993         Likewise.
2994         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2995         (print_annotations): New function.
2997 2006-06-23  Tom Tromey  <tromey@redhat.com>
2999         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
3000         emitting class files, always use 1.5.
3001         * gcj.texi (Input Options): Document -fsource.
3002         (Code Generation): Document -ftarget.
3004 2006-06-21  Tom Tromey  <tromey@redhat.com>
3006         PR java/28089:
3007         * expr.c (expand_java_field_op): Initialize field's declaring
3008         class.
3010 2006-06-20  Tom Tromey  <tromey@redhat.com>
3012         * expr.c (push_value): Always flush quick stack.
3014 2006-06-19  Tom Tromey  <tromey@redhat.com>
3016         * expr.c (push_value): Also flush quick stack if value is a
3017         component_ref.
3019 2006-06-19  Tom Tromey  <tromey@redhat.com>
3021         * expr.c (push_value): Flush quick stack if value has side
3022         effects.
3024 2006-06-13  Tom Tromey  <tromey@redhat.com>
3026         * class.c (is_compiled_class): Explicitly check for current
3027         class.
3029 2006-06-09  Tom Tromey  <tromey@redhat.com>
3031         * gjavah.c (decompile_method): Don't decompile a static field
3032         accessor method.
3034 2006-06-06  Tom Tromey  <tromey@redhat.com>
3036         * lang-specs.h <jc1>: Add .jar file to command line if
3037         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
3039 2006-06-05  Tom Tromey  <tromey@redhat.com>
3041         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3042         synthetic, enum, annotation.
3043         * jcf.h (ACC_BRIDGE): New macro.
3044         (ACC_VARARGS): Likewise.
3045         (ACC_SYNTHETIC): Likewise.
3046         (ACC_ENUM): Likewise.
3047         (ACC_ANNOTATION): Likewise.
3049 2006-06-04  Tom Tromey  <tromey@redhat.com>
3051         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
3052         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
3053         and -ftarget.
3054         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
3055         when needed.  Handle classpath-setting.
3056         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
3057         * lang-specs.h: Rewrote.
3059 2006-06-04  Tom Tromey  <tromey@redhat.com>
3061         * jcf-io.c (find_class): Set source_ok to 0.
3062         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
3063         (parse_class_file): Don't call java_mark_class_local.
3064         (java_parse_file): Skip .java files.  Call java_mark_class_local
3065         before lowering any code.
3066         (parse_zip_file_entries): Don't call duplicate_class_warning
3067         here.
3068         (process_zip_dir): ... call it here.
3069         * class.c (add_field): Don't mark field external if it is being
3070         compiled into this object.
3071         (make_class_data): Handle situation where class_dtable_decl is
3072         created before Class is compiled.
3073         (is_compiled_class): Don't assume files in zip are compiled into
3074         this object.
3075         (layout_class_method): Don't mark method external if it is being
3076         compiled into this object.
3078 2006-06-04  Tom Tromey  <tromey@redhat.com>
3080         * jcf-path.c (jcf_path_compute): New function.
3081         * jcf.h (jcf_path_compute): Declare.
3083 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3085         * decl.c: Include langhooks.h.
3086         (builtin_function): Remove.
3087         (java_init_decl_processing): Replace calls to builtin_function
3088         with add_builtin_function.
3089         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
3090         (java/decl.o): Depend on langhooks.h.
3091         * java-tree.h (builtin_function): Remove.
3093 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
3095         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
3097 2006-09-12  Tom Tromey  <tromey@redhat.com>
3099         * expr.c (push_value): Always flush quick stack.
3101 2006-09-12  Tom Tromey  <tromey@redhat.com>
3103         PR java/29013:
3104         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
3105         the push of the called method's return result.
3107 2006-09-12  Tom Tromey  <tromey@redhat.com>
3109         * jvspec.c (lang_specific_driver): Read spec file even if
3110         -fsyntax-only.
3112 2006-09-12  Tom Tromey  <tromey@redhat.com>
3114         PR java/28754:
3115         * expr.c (expand_java_field_op): Initialize field's declaring
3116         interface if necessary.
3118 2006-09-12  Tom Tromey  <tromey@redhat.com>
3120         PR java/28892:
3121         * expr.c (expand_java_field_op): No error for assignments not in
3122         class initializer or constructor.
3124 2006-08-22  Andrew Haley  <aph@redhat.com>
3126         * decl.c (java_add_stmt): Give the statement list a type.
3128 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
3129             Bryce McKinlay  <bryce@mckinlay.net.nz>
3131         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
3133 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
3135         PR java/8923
3136         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
3137         or '--' is used with a constant operand.
3138         (java_complete_lhs): When processing a '++' or '--' expression,
3139         don't call java_complete_tree but java_complete_lhs, so that a
3140         static final variable operand is never replaced by its value. This
3141         avoids an ICE later on.
3142         (patch_unaryop): Fixed typo in comment.
3144 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3146         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
3148 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
3150         * builtins.c (check_for_builtin): If a builtin could result in a
3151         direct call being generated, don't use it if flag_indirect_dispatch
3152         is set.
3154 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
3156         * gcj.texi (Invocation): Corrections for Invocation API example.
3158 2006-07-04  Andrew Haley  <aph@redhat.com>
3160         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
3161         entry.
3163 2006-06-21  Andrew Haley  <aph@redhat.com>
3165         * java-tree.h (update_aliases): Remove
3166         * expr.c (expand_iinc): Remove call to update_aliases().
3167         (STORE_INTERNAL): Likewise.
3168         * decl.c (update_aliases, initialize_local_variable)
3169         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
3171 2006-06-19  Andrew Haley  <aph@redhat.com>
3173         PR java/1305
3174         PR java/27908
3175         * expr.c (java_modify_addr_for_volatile): New function.
3176         (expand_java_field_op): Handle volatile fields.
3177         * java-gimplify.c (java_gimplify_component_ref): Call
3178         java_modify_addr_for_volatile to give the field_ref the correct
3179         volatile type.
3180         (java_gimplify_modify_expr): Likewise.
3181         * java-tree.h (java_modify_addr_for_volatile): New decl.
3183 2006-06-17  Karl Berry  <karl@gnu.org>
3185         * gcj.texi (@dircategory): Use "Software development" instead
3186         of "Programming", following the Free Software Directory.
3188 2006-06-16  Andrew Haley  <aph@redhat.com>
3190         * class.c (make_class_data): When using flag_indirect_classes,
3191         don't initialize the vtable of Class instances.
3193 2006-06-09  Andrew Haley  <aph@redhat.com>
3195         PR java/1305
3196         PR java/27908
3197         * builtins.c (initialize_builtins): Add __sync_synchronize().
3198         * class.c (add_field): Mark volatile fields.
3199         * java-gimplify.c (java_gimplify_expr): Call new functions to
3200         handle self-modifying exprs and COMPONENT_REFs.
3201         (java_gimplify_component_ref): New.
3202         (java_gimplify_modify_expr): Add handling for volatiles.
3204 2006-06-08  Tom Tromey  <tromey@redhat.com>
3206         * gcj.texi (libgcj Runtime Properties): Document
3207         gnu.gcj.user.realname.
3209 2006-06-08  Andrew Haley  <aph@redhat.com>
3211         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
3212         get_symbol_table_index().
3213         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
3214         private method.
3215         (build_known_method_ref): New arg: special.  Pass it to
3216         get_symbol_table_index.
3217         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
3218         the method list.
3219         (build_invokevirtual): New arg: special.  Pass it to
3220         get_symbol_table_index.
3221         (expand_invoke): New variable: special.
3222         Pass it to maybe_rewrite_invocation().
3223         Pass it to build_known_method_ref().
3224         * class.c (build_symbol_entry): Add new arg: special.  Use it to
3225         build the symbol table conbstructor.
3226         (emit_symbol_table): Extract SPECIAL from the method list and pass
3227         it to build_symbol_entry().
3228         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
3229         special accordingly.
3231 2006-06-06  David Daney  <ddaney@avtrex.com>
3233         * gcj.texi (libgcj Runtime Properties): Document
3234         gnu.gcj.runtime.NameFinder.show_raw and
3235         gnu.gcj.runtime.NameFinder.remove_unknown.
3237 2006-06-06  Tom Tromey  <tromey@redhat.com>
3239         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3240         synthetic, enum, annotation.
3241         * jcf.h (ACC_BRIDGE): New macro.
3242         (ACC_VARARGS): Likewise.
3243         (ACC_SYNTHETIC): Likewise.
3244         (ACC_ENUM): Likewise.
3245         (ACC_ANNOTATION): Likewise.
3247 2006-06-06  Mike Stump  <mrs@apple.com>
3249         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
3250         installing during build.
3252 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
3254         * gcj.texi (Extensions): Document the new gcj-dbtool-based
3255         classname-to-library resolution mechanism.
3256         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
3257         mechanism deprecated.
3258         (libgcj Runtime Properties): Document
3259         gnu.gcj.runtime.VMClassLoader.library_control's new default.
3261 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
3263         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
3264         bit wide type.
3265         (jword): Define to uint64 on 64-bit arches.
3266         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
3268 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
3270         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
3271         typos.
3273 2006-05-26  Tom Tromey  <tromey@redhat.com>
3275         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
3276         * verify-glue.c (vfy_class_type): New function.
3277         * verify-impl.c (check_constant): Allow 'ldc class'.
3278         * verify.h (vfy_class_type): Declare.
3280 2006-05-25  Andrew Haley  <aph@redhat.com>
3282         PR java/27756
3283         * decl.c (maybe_pushlevels): When variable ranges are non-nested
3284         update all lifetimes, not just the first one.
3286 2006-05-24  Tom Tromey  <tromey@redhat.com>
3288         * java-tree.h: Fixed flag documentation.
3290 2006-05-24  Tom Tromey  <tromey@redhat.com>
3292         PR libgcj/27729:
3293         * jcf.h (ACC_INVISIBLE): Changed value.
3295 2006-05-24  Andrew Haley  <aph@redhat.com>
3297         PR java/27754
3298         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3299         COMPOUND_EXPR.
3301 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
3303         * lang.opt (femit-class-file): Remove VarExists.
3305 2006-05-16  Tom Tromey  <tromey@redhat.com>
3307         * verify-impl.c (verify_instructions_0) <op_return>: Special case
3308         for Object.<init>.
3310 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
3312         PR driver/26885
3313         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3314         $(GCC_OBJS).
3316 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
3318         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3319         (java/expr.o): Replace target.h with $(TARGET_H).
3320         (java/parse.o): Likewise.
3322 2006-05-10  Andrew Haley  <aph@redhat.com>
3324         * class.c (emit_indirect_register_classes): Fix comment.
3326 2006-05-04  Tom Tromey  <tromey@redhat.com>
3328         * java-tree.h (uses_jv_markobj_p): Declare.
3329         * class.c (uses_jv_markobj_p): Removed.
3330         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3331         (get_boehm_type_descriptor): Use it.
3332         (uses_jv_markobj_p): Moved from class.c.  Return bool.
3334 2006-05-04  Tom Tromey  <tromey@redhat.com>
3336         * java-tree.def (THIS_EXPR): Now a tcc_expression.
3338 2006-05-04  Andrew Haley  <aph@redhat.com>
3340         * class.c (make_field_value): Always build_address_of fdecl if
3341         there is an initializer.
3343 2006-05-03  Andrew Haley  <aph@redhat.com>
3345         PR libgcj/27352
3346         * expr.c (maybe_rewrite_invocation): New function.
3347         (rewrite_arglist_getclass): Likewise.
3348         (rules): New.
3349         (expand_invoke): Call maybe_rewrite_invocation.
3350         * parse.y (patch_invoke): Likewise.
3351         * java-tree.h: (maybe_rewrite_invocation): New function.
3353 2006-04-21  Andrew Haley  <aph@redhat.com>
3355         * lang.c (java_init): Handle flag_indirect_classes.
3356         * jvgenmain.c: Use "class$$" instead of "class$".
3357         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3358         DECLs.
3359         (mangle_class_field): Special case "class$$" as well as "class$".
3360         * constants.c (build_ref_from_constant_pool): If
3361         flag_indirect_classes, generate a ref into the heap.
3362         * decl.c (constants_field_decl_node,
3363         constants_data_field_decl_node): New.
3364         * class.c (build_static_class_ref): New.
3365         (build_classdollar_field): Factor out from build_class_ref().
3366         (make_field_value): Handle static fields in heap.
3367         (make_class_data): Make sure we get a static ref to class.
3368         Make class initializer const if flag_indirect_classes.
3369         (register_class): Build a class_ref for initialization if
3370         flag_indirect_classes.
3371         (emit_indirect_register_classes): New.
3373 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
3375         * expr.c, gjavah.c: Fix comment typos.
3377 2006-04-03  Andrew Haley  <aph@redhat.com>
3379         PR java/26858
3380         * expr.c (build_field_ref): Don't check the field offset if
3381         flag_syntax_only.
3383 2006-03-30  Andrew Haley  <aph@redhat.com>
3385         PR java/26858
3386         * lang.c (java_attribute_table): New.
3387         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3388         * expr.c (build_field_ref): Add a null pointer check for all
3389         fields of offset > 4k.  Don't do so for accesses via the this
3390         pointer, which we know can never be null.
3391         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3392         methods nonnull.
3394 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
3396         * Make-lang.in: Rename docdir to gcc_docdir.
3398 2006-03-30  Tom Tromey  <tromey@redhat.com>
3400         PR java/26042:
3401         * parse.y (java_reorder_fields): Reset superclass field's size as
3402         well.
3404 2006-03-28  Tom Tromey  <tromey@redhat.com>
3406         PR java/26390:
3407         * parse.y (find_most_specific_methods_list): Added 'class'
3408         argument.
3409         (lookup_method_invoke): Updated.
3411 2006-03-15  Tom Tromey  <tromey@redhat.com>
3413         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3414         non-static method calls.
3416 2006-03-15  David Daney  <ddaney@avtrex.com>
3418         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3419         declaration.
3421 2006-03-15  David Daney  <ddaney@avtrex.com>
3423         * lang.opt (-freduced-reflection): New option.
3424         * lang.c (java_post_options): Generate an error if
3425         -freduced-reflection used with -fjni or -findirect-dispatch.
3426         * java-tree.h (flag_reduced_reflection): Declare new variable.
3427         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3428         if bitmap overflows and flag_reduced_reflection set.
3429         * class.c (uses_jv_markobj_p): New function.
3430         (make_class_data): Moved generation of vtable to before
3431         reflection data, generate less reflection data if
3432         flag_reduced_reflection set.
3433         * gcj.texi: Document -freduced-reflection.
3435 2006-03-15  Tom Tromey  <tromey@redhat.com>
3437         PR java/26638:
3438         * class.c (get_interface_method_index): Don't put <clinit> into
3439         interface table.
3441 2006-03-15  Tom Tromey  <tromey@redhat.com>
3443         * parse.y (analyze_clinit_body): Ignore empty statements.
3445 2006-03-08  David Daney  <ddaney@avtrex.com>
3447         * gcj.texi: Document -static-libgcj option.
3449 2006-02-20  Andrew Haley  <aph@redhat.com>
3451         * jcf-parse.c (parse_class_file): Set input_location from
3452         current_class.
3454 2006-02-15  Andrew Haley  <aph@redhat.com>
3456         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3457         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3458         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3460 2006-02-09  Andrew Haley  <aph@redhat.com>
3462         PR java/26192
3463         * expr.c (expand_invoke): Allow methods in arrays to be resolved
3464         in their superclass.
3466         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3467         array types.
3469 2006-02-08  Tom Tromey  <tromey@redhat.com>
3471         PR java/22578:
3472         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3473         * builtins.c (convert_real): New function.
3474         (java_builtins): Handle Float.intBitsToFloat,
3475         Float.floatToRawIntBits, Double.longBitsToDouble,
3476         Double.doubleToRawLongBits.
3478 2006-02-07  Andrew Haley  <aph@redhat.com>
3480         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
3481         class other than the one in which we expected to find it, ignore
3482         the result.
3484         PR java/25535
3485         * constants.c (build_constants_constructor): move initializer into
3486         first halfword on a 64-bit big-endian machine.
3488 2006-02-04  Tom Tromey  <tromey@redhat.com>
3490         PR java/25676:
3491         * builtins.c (max_builtin): Skip floating point 'max'.
3492         (min_builtin): Skip floating point 'min'.
3493         (check_for_builtin): Never return NULL_TREE.
3495 2006-02-04  Tom Tromey  <tromey@redhat.com>
3497         PR java/26097:
3498         * expr.c (push_type): Avoid side effect in gcc_assert.
3500 2006-02-04  Roger Sayle  <roger@eyesopen.com>
3502         * decl.c (java_init_decl_processing): Create char_type_node as a
3503         regular INTEGER_TYPE node.
3504         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3505         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3506         test for char_type_node and promoted_char_type_node as special
3507         instances of INTEGER_TYPE tree codes.
3508         (promote_type,build_java_signature): Likewise.
3509         * jcf-write.c (adjust_typed_op): Likewise.
3510         * mangle.c (mangle_type): Likewise.
3511         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3512         * parse.h (JINTEGRAL_TYPE_P): Likewise.
3514 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
3516         * expr.c (java_stack_swap): Revert gcc_assert patch.
3518 2006-02-03  Ben Elliston  <bje@au.ibm.com>
3520         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3521         * typeck.c: Likewise.
3522         * verify-impl.c: Likewise.
3523         * class.c: Likewise.
3524         * decl.c: Likewise.
3525         * jcf-parse.c: Likewise.
3526         * constants.c: Likewise.
3527         * check-init.c: Likewise.
3528         * jcf-write.c: Likewise.
3529         * verify-glue.c: Likewise.
3530         * mangle.c: Likewise.
3531         * expr.c: Likewise.
3532         * lang.c: Likewise.
3533         * boehm.c: Likewise.
3535 2006-02-01  Jan Hubicka  <jh@suse.cz>
3537         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3538         * lang.c (java_init_options): Set no_unit_at_a_time_default.
3540 2006-01-30  Andrew Haley  <aph@redhat.com>
3542         PR java/21428
3543         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3545 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
3547         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3548         Update copyright notice dates.
3550 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3552         * jvspec.c (lang_specific_spec_functions): Remove.
3554 2006-01-06  Tom Tromey  <tromey@redhat.com>
3556         * gcj.texi (Arrays): Added more documentation for
3557         JvNewObjectArray.
3558         (Primitive types): Correct information about primitive classes.
3559         (Reference types): New node.
3560         (Index): New node.
3562 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
3564         * jcf-parse.c (set_source_filename): Set the decl source location
3565         even when returning early.
3567 2005-12-15  Tom Tromey  <tromey@redhat.com>
3568             Andrew Haley  <aph@redhat.com>
3570         PR java/25429
3571         * parse.y (resolve_expression_name): Don't generate accessor
3572         methods for constant fields.
3574 2005-12-13  Andrew Haley  <aph@redhat.com>
3576         PR java/25366
3577         PR java/25368
3578         * class.c (maybe_layout_super_class): Update current_class before
3579         calling do_resolve_class.
3581 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
3583         PR java/25330
3584         * jcf-write.c (write_classfile): Use PID in temporary class
3585         file. Save/restore errno when reporting error.
3587 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
3589         PR java/9861
3590         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3591         to bare_function_type and including the return type
3592         * builtins.c (initialize_builtins) : Change builtin mangled name
3593         constants to conform to new mangling scheme
3595 2005-12-08  Andrew Haley  <aph@redhat.com>
3597         PR libgcj/25265
3598         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3599         (soft_abstractmethod_node): New.
3600         * expr.c (build_field_ref): Add in-line check for missing field.
3601         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3603 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3605         * Make-lang.in (java.all.build, java.install-normal): Remove.
3607 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3609         * Make-lang.in: Remove all dependencies on s-gtype, except for
3610         gt-java-parse.h.
3612 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
3614         * class.c (build_utf8_ref, emit_register_classes): Use
3615         switch_to_section and get_section.
3617 2005-12-06  Tom Tromey  <tromey@redhat.com>
3619         PR java/25283:
3620         * parse.y (patch_new_array_init): Revert previous patch.
3621         (lookup_method_invoke): Use size-less array type when creating an
3622         anonymous constructor.
3624 2005-12-05  Tom Tromey  <tromey@redhat.com>
3626         * parse.y (patch_new_array_init): Don't set length on array.
3628 2005-12-02  Richard Guenther  <rguenther@suse.de>
3630         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3631         buildN instead of build.
3632         * class.c (finish_class): Likewise.
3633         * expr.c (java_create_object): Likewise.
3635 2005-11-28  Tom Tromey  <tromey@redhat.com>
3637         PR java/18278:
3638         * expr.c (build_jni_stub): Unwrap the return value.
3639         * java-tree.h (soft_unwrapjni_node): New define.
3640         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3641         * decl.c (java_init_decl_processing): Initialize
3642         soft_unwrapjni_node.
3644 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
3646         * gcj.texi (gij options): Add -Xss documentation.
3648 2005-11-08  Wil Mahan  <wmahan@gmail.com>
3650         PR java/23617
3651         * zextract.c (read_zip_archive): Fix out of memory error when
3652         reading jar files with zip-style comments.
3654 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
3656         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3657         formats.
3658         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3660 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3661             Wil Mahan <wmahan@gmail.com>
3663         PR java/23620
3664         * class.c (make_class): Create empty binfo here.
3665         (set_super_info): Only create binfo if we have superclasses.
3667 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
3669         PR java/24127
3670         * parse.y (method_header): Make the result of the rule a NULL_TREE
3671         when a parsing error occurs.
3673 2005-09-29  Tom Tromey  <tromey@redhat.com>
3675         PR java/24120:
3676         * jcf-io.c (memoized_dirlist_hash): New function.
3677         (caching_stat): Use it.
3679 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
3681         PR java/21418
3682         * class.c (inherits_from_p): Try to lay out super class
3683         if it is not already laid out.
3684         (maybe_layout_super_class): Handle the case where SUPER_CLASS
3685         is a NULL_TREE.
3687 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
3689         * builtins.c (max_builtin, min_builtin, abs_builtin,
3690         java_build_function_call_expr): Use fold_buildN.
3691         * class.c (layout_class_method): Likewise.
3692         * expr.c (java_truthvalue_conversion, build_java_jsr,
3693         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3694         build_java_binop, build_field_ref, expand_compare,
3695         build_known_method_ref, build_invokevirtual,
3696         process_jvm_instruction): Likewise.
3697         * parse.y (patch_binop, patch_exit_expr): Likewise.
3698         * typeck.c (convert_ieee_real_to_integer): Likewise.
3699         (convert): Don't call fold after convert_ieee_real_to_integer.
3701 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
3703         PR java/23891
3704         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3705         the newly created type. Set import lists here, not in create_class.
3706         (jdep_resolve_class): Set current_class.
3707         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3708         the current package context, not ctxp->package.
3709         (cicp_cache): Removed.
3710         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3711         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3712         * java-tree.h (TYPE_PACKAGE): New macro.
3713         (struct lang_type): New member 'package'.
3715 2005-09-09  Andrew Haley  <aph@redhat.com>
3717         PR libgcj/23182
3718         * expr.c (pop_type_0): If the expected type is object or ptr
3719         (i.e. void*), return the type of the object we just popped from
3720         the stack.
3722 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
3724         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3725         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3727 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3729         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3730         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3731         typos.  Follow spelling conventions.
3733 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
3735         PR java/23431
3736         * typeck.c (lookup_do): Look up interfaces for the original class,
3737         not the base class.
3738         * parse.y (java_check_regular_methods): Fix diagnostic message for
3739         more restrictive overriding of a method from an interface.
3741 2005-08-16  Tom Tromey  <tromey@redhat.com>
3743         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3744         class' initial state.
3746 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3748         PR java/22113
3749         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3750         `literal_token' for large numeric input tokens.
3752 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3754         PR java/19870
3755         * parse.y (nested_field_access_p): Rename to nested_member_access_p
3756         and expand to handle method accesses across nested classes.
3757         (build_outer_method_access_method): Rename to
3758         build_nested_method_access_method.  Minor adjustments to comments.
3759         (resolve_expression_name): Use the newly-renamed
3760         nested_member_access_p method.
3761         (resolve_qualified_expression_name): Likewise.
3762         (patch_method_invocation): Also consider static methods for access
3763         method generation.  Minor adjustments to comments.
3764         (maybe_use_access_method): Use the more general
3765         nested_memeber_access_p to determine access across nested class
3766         boundaries.  Allow THIS_ARG to be NULL (for static methods).
3768 2005-08-15  Tom Tromey  <tromey@redhat.com>
3770         PR java/23300.
3771         * expr.c (build_field_ref): Don't generate otable reference when
3772         DECL_FIELD_OFFSET is 0.
3773         * class.c (maybe_layout_super_class): Pass outer class to
3774         do_resolve_class.
3776 2005-08-15  Tom Tromey  <tromey@redhat.com>
3778         * java-tree.h (LABEL_IN_SUBR): Removed.
3779         (LABEL_IN_SUBR): Likewise.
3780         (LABEL_IS_SUBR_START): Likewise.
3781         (LABEL_SUBR_START): Likewise.
3782         (LABEL_SUBR_CONTEXT): Likewise.
3783         (LABEL_CHANGED): Likewise.
3784         (LABEL_RETURN_LABEL): Likewise.
3785         (LABEL_RETURN_TYPE_STATE): Likewise.
3786         (LABEL_RETURN_LABELS): Likewise.
3787         (RETURN_MAP_ADJUSTED): Likewise.
3788         (LABEL_PENDING_CHAIN): Likewise.
3790 2005-08-15  Tom Tromey  <tromey@redhat.com>
3792         * Make-lang.in (JAVA_OBJS): Removed verify.o
3793         (java/verify.o): Removed.
3794         * verify.c: Removed.
3795         * lang.c (flag_new_verifier): Removed.
3796         (java_post_options): Updated.
3797         * java-tree.h (flag_new_verifier): Removed.
3798         (verify_jvm_instructions): Removed.
3799         * expr.c (pop_type_0): Assume flag_new_verifier is true.
3800         (build_java_check_indexed_type): Likewise.
3801         (expand_java_arraystore): Likewise.
3802         (expand_java_arrayload): Likewise.
3803         (pop_arguments): Likewise.
3804         (expand_byte_code): Likewise.
3805         (process_jvm_instruction): Likewise.
3807 2005-08-10  Andrew Haley  <aph@redhat.com>
3809         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3810         type mismatches to make legal GIMPLE.
3812 2005-08-10  Robin Green <greenrd@greenrd.org>
3814         PR java/23230:
3815         * parse.y (maybe_use_access_method): Generalize check from
3816         java.lang.Object to any superclass of current_class
3818 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3820         * class.c (build_class_ref): Wrap the primary class type in a
3821         NOP_EXPR.
3822         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3823         primary class type from the NOP_EXPR in which it was placed.
3825 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
3827         * expr.c (expand_load_internal): Fix missing parens in
3828         predicate.
3830 2005-07-28  Andrew Haley  <aph@redhat.com>
3832         * expr.c (expand_load_internal): Convert to destination type.
3834 2005-07-22  Manfred Hollstein  <mh@suse.com>
3836         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3837         (check_constant): Likewise.
3838         (check_wide_constant): Likewise.
3840 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
3842         Make CONSTRUCTOR use VEC to store initializers.
3843         * check-init.c (check_init): Update to cope with VEC in
3844         CONSTRUCTOR_ELTS.
3845         * class.c (make_field_value, make_method_value, get_dispatch_table,
3846         make_class_data, emit_symbol_table, emit_catch_table,
3847         emit_assertion_table): Use build_constructor_from_list instead of
3848         build_constructor.
3849         * constants.c (build_constants_constructor): Likewise.
3850         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3851         VEC in CONSTRUCTOR_ELTS.
3852         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3853         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3854         of a TREE_LIST.
3855         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3856         CONSTRUCTOR_ELTS.
3857         * parse.y (build_new_array_init): Use build_constructor_from_list
3858         instead of build_constructor.
3859         (patch_new_array_init): Update to cope with VEC in
3860         CONSTRUCTOR_ELTS.
3861         (array_constructor_check_entry): Likewise.
3863 2005-07-12  Tom Tromey  <tromey@redhat.com>
3865         * jvspec.c (lang_specific_driver): Put filelist_filename first on
3866         command line.
3868 2005-07-12  Tom Tromey  <tromey@redhat.com>
3870         PR java/19674:
3871         * parse-scan.y (interface_member_declaration): Added
3872         empty_statement.
3874 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
3876         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3877         (LABEL_PENDING_CHAIN): Ditto.
3878         (LABEL_PC): Ditto.
3879         (DECL_BIT_INDEX): Ditto.
3881 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3883         PR java/18119
3884         * parse.y (inner_class_accessible): New function. Logic moved from
3885         check_inner_class_access.
3886         (check_inner_class_access): Use inner_class_accessible.
3887         (resolve_inner_class): Simplify arguments. Create circularity hash
3888         here. Keep looking for classes if we found one that was inaccessible.
3889         Return the inaccessible class only if there is no other match.
3890         (do_resolve_class): Update for new resolve_inner_class arguments.
3891         Don't create circularity_hash here.
3893 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3895         PR java/21045
3896         * parse.y (add_exception_to_throws): New function.
3897         (purge_unchecked_exceptions): Removed.
3898         (get_constructor_super): Renamed from verify_constructor_super. Now
3899         returns the super constructor after verification.
3900         (java_complete_expand_method): Don't use purge_unchecked_exceptions
3901         or save/restore the exception list.
3902         (check_thrown_exceptions): Add uncaught exceptions in anonymous
3903         class initializers and constructors to the throws clause of the method.
3905 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
3907         PR java/19674
3908         * parse.y (interface_member_declaration): Allow empty statements in
3909         interface declarations.
3911 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
3913         * Makefile.in (parse.o): Adjust dependencies.
3914         * parse.y: Include tree-dump.h.
3916 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
3918         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
3919         flag for quoting.
3921 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
3923         * parse.y (issue_warning_error_from_context): Call
3924         pp_output_formatted_text to be able to get the buffer.
3926 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
3928         * parse.y (issue_warning_error_from_context): Update for the
3929         renaming of pp_format_text to pp_format.
3931 2005-06-28  Paul Brook  <paul@codesourcery.com>
3933         * decl.c (java_init_decl_processing): Call
3934         default_init_unwind_resume_libfunc.
3936 2005-06-27  Tom Tromey  <tromey@redhat.com>
3938         PR java/21540, PR java/13788:
3939         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3940         fold_constant_for_init.
3941         (patch_binop): Added 'folding' argument.  Updated all callers.
3942         (patch_unaryop) <NOP_EXPR>: New case.
3943         (fold_constant_for_init) <NOP_EXPR>: Likewise.
3944         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3946 2005-06-25  Jan Hubicka  <jh@suse.cz>
3948         * builtins.c (define_builtin): Accept new flags parameter.
3949         (initialize_builtins): Mark the builtins const and nothrow accordingly.
3951 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
3953         * all files: Update FSF address in copyright headers.
3955 2005-06-24  Tom Tromey  <tromey@redhat.com>
3957         * verify-impl.c (verify_instructions_0): Correctly handle
3958         situation where PC falls off end.
3960 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3962         PR java/20697
3963         * parse.y (find_most_specific_methods_list): Remove special case for
3964         inner classes.
3966 2005-06-15  Tom Tromey  <tromey@redhat.com>
3968         PR libgcj/21906:
3969         * class.c (make_method_value): Use soft_abstractmethod_node for
3970         abstract method.
3971         * java-tree.h (soft_abstractmethod_node): New define.
3972         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3973         * decl.c (java_init_decl_processing): Initialize
3974         soft_abstractmethod_node.
3976 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3978         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3980 2005-06-13  Per Bothner  <per@bothner.com>
3982         * expr.c (int highest_label_pc_this_method,
3983         start_label_pc_this_method): New globals.
3984         (lookup_label): Add start_label_pc_this_method to pc for label, and
3985         update highest_label_pc_this_method.  This prevents conflicts between
3986         labels from different methods.
3987         * java-tree.h: Declare new globals.
3988         * jcf-parse.c (parse_class_file): If needed bump
3989         start_label_pc_this_method and reset highest_label_pc_this_method.
3991 2005-06-13  Tom Tromey  <tromey@redhat.com>
3993         PR java/21844:
3994         * parse.y (nested_field_access_p): Handle case where outer field
3995         is inherited by enclosing class.
3997 2005-06-12  Per Bothner  <per@bothner.com>
3999         * class.c (inherits_from_p): Do load_class if needed.
4001 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4003         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
4004         * java-tree.h (parse_error_context): Move...
4005         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
4006         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
4007         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
4009 2005-06-08  Roger Sayle  <roger@eyesopen.com>
4011         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
4013 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
4015         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
4016         msgid for argument name.
4017         * gjavah.c (error): Likewise.
4018         * java-tree.h (parse_error_context): Likewise.
4019         * parse.y (parse_error_context, parse_warning_context,
4020         issue_warning_error_from_context): Likewise.
4022 2005-06-01  Tom Tromey  <tromey@redhat.com>
4024         PR java/21722:
4025         * class.c (build_static_field_ref): Don't fold constant fields if
4026         current class is from a .class file and we're using indirect
4027         dispatch.
4029 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4031         * java/verify-glue.c: Don't include errors.h and include toplev.h.
4032         * java/Make-lang.in: Updates dependencies.
4034 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
4036         PR java/19870.
4037         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
4038         NESTED_FIELD_ACCESS_IDENTIFIER_P.
4039         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
4040         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
4041         * jcf-write.c (generate_classfile): Use
4042         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
4043         OUTER_FIELD_ACCESS_IDENTIFIER_P.
4044         * parse.y (build_outer_field_access): Rename to
4045         build_nested_field_access. Support static fields and outer-to-inner
4046         class accesses.
4047         (outer_field_access_p): Rename to nested_field_access_p. Support
4048         static fields and generalise to outer-to-inner class and sibling
4049         inner class accesses.
4050         (outer_field_expanded_access_p): Rename to
4051         nested_field_expanded_access_p and support static fields.
4052         (outer_field_access_fix): Rename to nested_field_access_fix and
4053         support static fields.
4054         (build_outer_field_access_expr): Rename to
4055         build_nested_field_access_expr and support static fields.
4056         (build_outer_field_access_methods): Rename to
4057         build_nested_field_access_methods and support static fields. For
4058         static fields, generate accessors without class instance parameters.
4059         (build_outer_field_access_method): Rename to
4060         build_nested_field_access_method and support static fields.
4061         (build_outer_method_access_method): Use
4062         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
4063         OUTER_FIELD_ACCESS_IDENTIFIER_P.
4064         (resolve_expression_name): Consider static field accesses across
4065         nested classes.
4066         (resolve_qualified_expression_name): Likewise.
4067         (java_complete_lhs): Use nested_field_access_fix instead of
4068         outer_field_access_fix.
4069         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
4070         Use nested_field_expanded_access_p instead of
4071         outer_field_expanded_access_p. Use nested_field_access_fix instead
4072         of outer_field_access_fix.
4073         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
4074         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
4076 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4078         * decl.c (GCJ_BINARYCOMPAT_ADDITION,
4079         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
4080         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
4081         MINOR_BINARYCOMPAT_ABI_VERSION): New.
4082         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
4083         (parse_version): Calculate version ID using new method. Use bit-flags
4084         for flag_indirect_dispatch and flag_bootstrap_classes.
4086 2005-05-25  Richard Henderson  <rth@redhat.com>
4088         PR libgcj/21692
4089         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
4090         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
4091         DECL_CONTEXT; avoid pushdecl_top_level.
4092         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
4093         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
4094         (layout_class_method): Likewise.
4095         * decl.c (java_mark_cni_decl_local): New.
4096         (java_mark_class_local): Use it.
4097         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
4098         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
4099         (struct lang_decl_func): Add local_cni;
4100         (struct lang_decl_var): Add class_field, vtable.
4101         (java_mangle_decl): Declare.
4102         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
4103         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
4104         (mangle_obstack_1): New.
4105         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
4106         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
4107         lhd_set_decl_assembler_name for things that don't need mangling.
4108         (mangle_class_field): Rename from java_mangle_class_field, make
4109         static, don't call init_mangling or finish_mangling.
4110         (mangle_vtable): Similarly.
4111         (mangle_local_cni_method_decl): New.
4112         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
4113         gcc_assert, and MANGLE_RAW_STRING.
4114         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
4116 2005-05-25  DJ Delorie  <dj@redhat.com>
4118         * class.c (set_constant_value): Move warning control from if() to
4119         warning(OPT_*).
4121 2005-05-24  Richard Henderson  <rth@redhat.com>
4123         * builtins.c (define_builtin): Don't call make_decl_rtl.
4124         * constants.c (build_constant_data_ref): Likewise.
4125         * class.c (build_utf8_ref): Likewise.
4126         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
4127         (get_dispatch_table, layout_class_method): Likewise.
4128         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
4129         by hand.
4130         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
4131         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
4132         to determine if we need a non-zero address.
4133         * decl.c (builtin_function): Don't call make_decl_rtl.
4134         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
4135         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
4136         * resource.c (compile_resource_data): Likewise.
4137         * parse.y (resolve_field_access): Re-word comment to avoid
4138         building DECL_RTL.
4140 2005-05-24  Richard Henderson  <rth@redhat.com>
4142         * class.c (registered_class): Take it out of class_roots; turn into
4143         a vec of trees.
4144         (register_class): Make static.  Don't duplicate decl node.  Use
4145         VEC_safe_push.
4146         (emit_register_classes): Use VEC_iterate.  Use output_constant
4147         instead of assemble_integer.  Don't call mark_decl_referenced
4148         directly.
4149         * java-tree.h (register_class): Remove decl.
4151 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
4153         PR java/17845
4155         * parse.y (register_package, package_list): Remove.
4156         (package_declaration): Do not call register_package.
4157         (do_resolve_class): Do not use package_list.
4159 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
4161         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
4162         unused variable.
4164 2005-05-15  Tom Tromey  <tromey@redhat.com>
4166         PR java/21519:
4167         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
4168         NOTE_PUSH.
4170 2005-05-12  Aaron Luchko <aluchko@redhat.com>
4172         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
4174 2005-05-11  Tom Tromey  <tromey@redhat.com>
4176         * gcj.texi (Code Generation): Document -fbootstrap-classes.
4177         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
4178         (parse_version): Use it.
4179         * lang.opt (-fbootstrap-classes): New option.
4181 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
4183         PR java/21436
4184         * class.c (maybe_layout_super_class): Look for imports in this_class.
4185         * parse.h (ctxp_for_generation_last): New.
4186         (do_resolve_class): Add a parameter.
4187         * parse.y (ctxp_for_generation_last): New.
4188         (java_pop_parser_context): Add at end of list.
4189         (find_in_imports, find_in_imports_on_demand): Look in ctxp
4190         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
4191         the given type are NULL.
4192         (do_resolve_class): Look into the imports of the new second parameter.
4193         Adjust recursive calls.
4194         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
4195         calls to do_resolve_class.
4196         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
4197         (java_complete_class): Do not do that here.
4199 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
4201         PR java/20309
4202         * Make-lang.in (java): Add gjnih.
4203         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
4204         (GJNIH_OBJS): New variable.
4205         (gjnih$(exeext)): New target.
4206         (JAVA_MANFILES): Add gjnih.1.
4207         (java.uninstall): Add gjnih.1.
4208         (java.mostlyclean): Add gjnih.
4209         (java.maintainer-clean): Add gjnih.1.
4210         (java/gjavah-jni.o): New target.
4211         (.INTERMEDIATE): Add gjnih.pod.
4212         (gjnih.pod): New target.
4213         * config-lang.in (stagestuff): Add gjnih.
4214         * gcj.texi (Top): Add gjnih node.
4215         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
4216         -bootclasspath options.
4217         (Invoking gjnih): New node.
4218         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
4219         (TOOLNAME): New macro.
4220         (error): Replace hard-coded gcjh with TOOLNAME.
4221         (process_file): Likewise.
4222         (usage): Likewise.
4223         (version): Likewise.
4224         (help): Likewise.  Add help output for -force, -old, -trace and -J
4225         options.
4226         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
4227         (options): Add force, old, trace and J fields.
4228         (main): Handle -force, -old, -trace and -J options.
4230 2005-05-03  Tom Tromey  <tromey@redhat.com>
4232         PR java/21245:
4233         * gjavah.c (main): Unlink output file on error.
4235 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
4237         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
4238         copyright.
4240 2005-04-29  Tom Tromey  <tromey@redhat.com>
4242         * expr.c (build_jni_stub): Updated for change to build_block.
4244 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
4246         * expr.c (force_evaluation_order): Declare 'saved' earlier.
4248 2005-04-28  Andrew Haley  <aph@redhat.com>
4250         PR java/19285
4251         * java-tree.h (soft_resolvepoolentry_node): New.
4252         (alloc_constant_fieldref): Declare.
4253         * expr.c (expand_java_field_op): Don't call class_init for
4254         accesses to static fields with indirect dispatch.
4255         * builtins.c (initialize_builtins): Add "__builtin_expect".
4256         * decl.c (soft_resolvepoolentry_node): New variable.
4257         (java_init_decl_processing): Create a decl for
4258         "_Jv_ResolvePoolEntry".
4259         * class.c (build_fieldref_cache_entry): New function.
4260         (build_static_field_ref): Rewrite for indirect dispatch.
4261         * constants.c (find_name_and_type_constant_tree): New function.
4262         (alloc_constant_fieldref): Likewise.
4263         (build_constants_constructor): Handle CONSTANT_Fieldref and
4264         CONSTANT_NameAndType.
4266         PR java/21115
4267         * expr.c (force_evaluation_order): Convert outgoing args smaller
4268         than integer.
4270 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
4272         * gcj.texi (libgcj Runtime Properties): Remove obsolete
4273         gnu.gcj.runtime.NameFinder.* system properties. Update documentation
4274         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
4276 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4278         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4279         to `unlock_stream' with `unlock_std_streams'.
4281 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
4283         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
4284         instead of just expr.h.
4286 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4288         * gjavah.c (main): Unlock the stdio streams.
4289         * jcf-dump.c (main): Likewise.
4290         * jv-scan.c (main): Likewise.
4291         * jvgenmain.c (main): Likewise.
4293 2005-04-23  DJ Delorie  <dj@redhat.com>
4295         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4296         parse.y: Adjust warning() callers.
4298 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
4300         * gcj.texi (Object fields): Change "Integer" to "Int" in example
4301         contructor.
4303 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4305         * gcj.texi: Fix typos and bogus example.
4307 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
4309         * except.c: Fix a comment typo.
4311 2005-04-19  Julian Brown  <julian@codesourcery.com>
4313         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4314         indirect dispatch with PIC.
4316 2005-04-18  Andrew Haley  <aph@redhat.com>
4318         * java-except.h (struct eh_range.handler): Remove unused field.
4319         (handle_nested_ranges): Remove function declaration.
4320         (sanity_check_exception_range): Add function declaration.
4321         * verify.c (verify_jvm_instructions): Remove call to
4322         handle_nested_ranges.
4323         * verify-glue.c (verify_jvm_instructions_new): Call
4324         sanity_check_exception_range.
4325         * except.c (link_handler, eh_range_freelist, link_handler,
4326         handle_nested_ranges): Remove.
4327         (add_handler): Rewrite.
4328         (sanity_check_exception_range): New function.
4329         (print_ranges): New function.
4331 2005-04-13  Julian Brown  <julian@codesourcery.com>
4333         * decl.c (finish_method): Give methods once-only linkage.
4335 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
4337         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4339 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4341         * java-tree.h: Don't use PARAMS().
4343 2005-04-07  Per Bothner  <per@bothner.com>
4345         * class.c (push_class): By default, suppress debug output.
4346         (finish_class): Enable debug output for classes we're emitting.
4348 2005-04-07  Andrew Haley  <aph@redhat.com>
4350         * gcj.texi: Correct gcj-dbtool instructions.
4352 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
4354         * gcj.texi: Fix a typo.
4355         * lang.c: Fix a comment typo.
4357 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
4359         * gcj.texi (Invoking gij): Add descriptions of new -X options.
4360         Mention recognized-and-ignored compatibility options.
4361         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4362         JvFree.
4363         (About CNI): Add Memory allocation section.
4365 2005-04-01  Tom Tromey  <tromey@redhat.com>
4367         * decl.c (java_init_decl_processing): Fix types of
4368         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4369         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4370         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4372 2005-03-31  Jan Hubicka  <jh@suse.cz>
4374         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4375         * class.c: Include cgraph.h
4376         (make_local_functoin_alias): Mark aslias as needed.
4377         * resource.c: Include cgraph.h
4378         (compile_resource_data): Go via cgraph interface.
4380 2005-03-30  Ian Lance Taylor  <ian@airs.com>
4382         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4384 2005-03-30  Tom Tromey  <tromey@redhat.com>
4386         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4387         inner_class_info_index==0 or outer_class_info_index==0.
4389 2005-03-29  Tom Tromey  <tromey@redhat.com>
4391         * gcj.texi (libgcj Runtime Properties): Document
4392         gnu.gcj.runtime.endorsed.dirs.
4394 2005-03-24  Anthony Green  <green@redhat.com>
4396         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4397         'gcj-dbtool -p'.
4399 2005-03-23  Tom Tromey  <tromey@redhat.com>
4401         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4402         (parse_version): Use it.
4404 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
4406         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4408 2005-03-18  Andrew Haley  <aph@redhat.com>
4410         PR java/20522
4411         * decl.c (update_aliases): Don't update variables that are about
4412         to die.
4413         (maybe_poplevels): Add comment.
4415 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
4417         PR java/20502
4418         * jcf-parse.c (duplicate_class_warning): New function.
4419         (java_parse_file): Call duplicate_class_warning if
4420         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4421         (parse_zip_file_entries): Likewise. Also set
4422         CLASS_FROM_CURRENTLY_COMPILED_P.
4424 2005-03-16  Andrew Haley  <aph@redhat.com>
4426         * expr.c (expand_java_arrayload): Don't generate a
4427         NullPointerException based on the type of the node.
4428         (build_java_array_length_access): Likewise.
4430 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
4432         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4434 2005-03-11  Tom Tromey  <tromey@redhat.com>
4436         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4437         (libgcj Runtime Properties): Document the default .db.
4439 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
4441         PR java/20312
4442         * parse.y (checks_throws_clauses): Check exceptions list even when
4443         the base class does not come from a source file being compiled.
4444         (java_complete_lhs): Remove unused variable 'wfl'.
4446 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
4448         PR java/20338
4449         * decl.c (finish_method): Emit _Jv_InitClass for private static
4450         methods inside inner classes as well.
4452 2005-03-08  Julian Brown  <julian@codesourcery.com>
4453         * Revert patch from 2005-03-08 for causing bootstrap failure on
4454         ppc-darwin.
4456 2005-03-08  Julian Brown  <julian@codesourcery.com>
4458         * decl.c (finish_method): Give methods once-only linkage.
4460 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
4462         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4464 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
4466         * verify-glue.c (vfy_is_assignable_from): Perform static check using
4467         can_widen_reference_to if the C++ ABI is in use.
4468         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4469         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4470         type_isresolved, init_state, set_pc, state_get_pc,
4471         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4472         (verify_fail): Report the current PC from the verifier context.
4473         (free_state): Remove #if 0 block to enable this function.
4474         (free_verifier_context): Call free_state on state_list iterator
4475         values before freeing them.
4476         * expr.c (pop_type_0): Pop correct type for error message when stack
4477         contains a multi-word type.
4479 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
4481         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4482         for known NULL array length access.
4484 2005-03-07  Tom Tromey  <tromey@redhat.com>
4486         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4488 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
4490         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4491         typeck.c: Update copyright.
4493 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
4495         Remove xref code.
4496         * xref.c, xref.h: Remove file.
4497         * Make-lang.in (java/xref.o): Remove.
4498         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4499         * lang.c (flag_emit_xref): Remove definition.
4500         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4501         * typeck.c (convert): Remove use of do_not_fold.
4502         * parse.y (do_not_fold): Remove definition.
4503         (parser grammar): Remove xref code.
4504         (maybe_create_class_interface_decl, create_class): Likewise.
4505         (register_fields, method_header, finish_method_declaration): Likewise.
4506         (declare_local_variables, source_end_java_method): Likewise.
4507         (java_complete_expand_classes): Do not set do_not_fold.
4508         (java_complete_expand_method): Remove xref code.
4509         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4510         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4511         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4512         (patch_synchronized_statement, patch_throw_statement): Likewise.
4513         (maybe_build_class_init_for_field): Likewise.
4515 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
4517         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4518         instead of IS_NON_TYPE_CODE_CLASS.
4520 2005-03-04  Andrew Haley  <aph@redhat.com>
4522         PR java/18362
4523         * class.c (set_method_index): Don't set method_index if it is
4524         NULL_TREE.
4525         (layout_class_method): Don't complain about "non-static method foo
4526         overrides static method" in the case of indirect dispatch.
4528 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4530         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4531         warning.
4532         * Make-lang.in: Don't elide warnings in jcf-io.c.
4534 2005-03-01  Per Bothner  <per@bothner.com>
4536         PR java/8608
4537         * check-init.c (wfl): Remove static.
4538         (final_assign_error, check_init): Replace calls to parse_error_context
4539         by plain error.
4540         (check_init): Save, set, and restore input_location for each exp.
4542 2005-03-01  Per Bothner  <per@bothner.com>
4544         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4545         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4546         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4548 2005-03-01  Per Bothner  <per@bothner.com>
4550         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4552 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4554         PR libgcj/16923
4555         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4556         JvVMOption.
4558 2005-02-22  Tom Tromey  <tromey@redhat.com>
4560         PR java/20056:
4561         * verify-impl.c (EITHER): New define.
4562         (types_compatible): Handle it.
4563         (check_field_constant): Use it.
4565 2005-02-18  Tom Tromey  <tromey@redhat.com>
4567         PR java/20056:
4568         * verify-impl.c (types_equal): Fixed test.
4570         PR java/20056:
4571         * verify-glue.c (vfy_class_has_field): New function.
4572         * verify.h (vfy_class_has_field): Declare.
4573         * verify-impl.c (check_field_constant): Added 'putfield'
4574         argument.
4575         (verify_instructions_0): Updated.
4576         (types_equal): New function.
4578 2005-02-14  Tom Tromey  <tromey@redhat.com>
4580         PR java/19921:
4581         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4582         stack effect of multianewarray.
4584 2005-02-14  Andrew Haley  <aph@redhat.com>
4586         PR java/19907
4587         * expr.c (expand_byte_code): Call promote_arguments().
4588         (promote_arguments): New function.
4589         * decl.c (check_local_unnamed_variable): Remove special case for
4590         new verifier.
4591         (find_local_variable): Promote all boolean types to int
4592         when searching for local variable decls.
4594 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
4596         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4597         parse-scan.y: Update copyright.
4599 2005-02-11  Per Bothner  <per@bothner.com>
4601         PR java/15543
4602         * parse-scan.y (input_location): Remove variable.
4603         (main_input_filename): New - replaces input_filename, which isn't
4604         settable if USE_MAPPED_LOCATION.
4605         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4606         so we don't reference input_location or wfl_operator in that case.
4607         * jv-scan.c (expand_location): Remove - no longer used.
4608         (main): Set main_input_filename rather than input_filename.
4610 2005-02-09  Richard Henderson  <rth@redhat.com>
4612         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4613         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4615 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
4617         * expr.c (add_type_assertion): Use the proper enumeration type,
4618         since this is what htab_find_slot() is expecting.
4620 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
4622         * gcj.texi: Update copyright dates.
4624 2005-02-02  Tom Tromey  <tromey@redhat.com>
4626         * gcj.texi (libgcj Runtime Properties): Default library_control
4627         to 'cache'.
4629 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
4631         PR java/15543
4632         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4633         (modifiers) when square brackets are present in a declaration for
4634         a final paramter.
4635         * jv-scan.c (main): Set input_filename and input_line.
4637 2005-02-01  Tom Tromey  <tromey@redhat.com>
4639         PR java/19742:
4640         * gjavah.c (get_field_name): Don't override name for JNI header.
4642 2005-02-01  Roger Sayle  <roger@eyesopen.com>
4644         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4645         of unsigned types using iushr and lushr JVM bytecodes.
4647 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4649         PR java/19738
4650         * gjavah.c (jni_print_float): Do not emit floating-point
4651         initialiser for a static final field.
4652         (jni_print_double): Likewise.
4654 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
4656         Revert:
4657         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4658         * gjavah.c (print_field_info): Mark static data members of
4659         floating-point type with "__extension__".
4661 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4663         * gjavah.c (print_field_info): Mark static data members of
4664         floating-point type with "__extension__".
4666 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4668         PR java/9157
4669         * parse.y (build_string_concatenation): Remove redundant if.
4670         (patch_conditional_expr): Attempt to patch_string() the condition
4671         of a ?: as well, in addition to its other operands.
4673 2005-01-25  Tom Tromey  <tromey@redhat.com>
4675         * Make-lang.in (java/java-tree-inline.o): Removed.
4677 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
4679         PR java/19070
4680         * parse.y (patch_binop): Allow comparisons against NULL only
4681         if the other operand is of a reference type.
4683 2005-01-24  Tom Tromey  <tromey@redhat.com>
4685         * java-tree.h (gcj_abi_version): Declare.
4686         * class.c (make_class_data): Push gcj_abi_version into "next"
4687         field.  Renamed field.
4688         * decl.c (gcj_abi_version): New global.
4689         (parse_version): New function.
4690         (java_init_decl_processing): Call it.  Renamed 'next' field.
4691         Include version.h.
4692         (GCJ_BINARYCOMPAT_ADDITION): New define.
4694 2005-01-24  Roger Sayle  <roger@eyesopen.com>
4696         PR java/19295
4697         * jcf-write.c (generate_bytecode_insns): Conversions between
4698         integer types of the same precision shouldn't generate widening
4699         or narrowing conversion bytecodes.
4701 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
4703         * java-except.h, java-tree.h: Remove unused prototypes.
4705 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
4707         PR java/18091:
4708         * jcf-write.c (perform_relocations): Don't call memcpy if source
4709         and destination are the same.
4711 2005-01-17  Tom Tromey  <tromey@redhat.com>
4713         * verify-impl.c (get_short): Sign extend.
4714         (get_int): Likewise.
4716 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
4718         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4719         with TYPE_SIZE.
4721 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4723         * verify.c: Revert to the version before the BC-ABI merge.
4725 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4727         PR java/19277
4728         * check-init.c (check_init): Take care of references that do not
4729         have an explicit final variable declaration (e.g. array length
4730         access) for pre/post in/de-crement operators.
4732 2005-01-08  Mark Wielaard  <mark@klomp.org>
4734         * parse.y (process_imports): Allocate (and free) original_name only
4735         when not already defined.
4736         * jcf-parse.c (read_class): Free results of find_class() and
4737         lrealpath().
4738         (java_parse_file): Keep pointer to head of file_list and free when
4739         done. Free result of lrealpath().
4741 2005-01-05  Tom Tromey  <tromey@redhat.com>
4743         * gcj.texi (Standard Properties): java.ext.dirs is now used.
4745 2004-12-20  Andrew Haley  <aph@redhat.com>
4747         * typeck.c: Use fold_convert for ints and booleans.
4749 2004-12-17  Andrew Haley  <aph@redhat.com>
4751         PR java/18931
4752         * typeck.c (convert): Use a CONVERT_EXPR when converting to
4753         BOOLEAN_TYPE or CHAR_TYPE.
4754         (convert_to_boolean, convert_to_char) : Remove.
4755         * convert.h (convert_to_boolean, convert_to_char) : Remove.
4756         * expr.c (expand_load_internal): Do type conversion if type is not
4757         as required.
4759 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
4761         PR target/18459
4762         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4763         Update comment.
4765 2004-12-07  Andrew Haley  <aph@redhat.com>
4767         PR java/18811:
4768         * jcf-parse.c (load_class): Remove sanity test for missing inner
4769         class file.
4771 2004-12-06  Tom Tromey  <tromey@redhat.com>
4773         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4774         (java.uninstall): Likewise.
4775         (java.maintainer-clean): Likewise.
4776         (.INTERMEDIATE): Likewise.
4777         (java.install-man): Likewise.
4778         (gcj-dbtool.pod): New target.
4779         * gcj.texi (Code Generation): Document -findirect-dispatch.
4780         (libgcj Runtime Properties): Document
4781         gnu.gcj.precompiled.db.path.
4782         (Top): Link to "Invoking gcj-dbtool".
4784 2004-12-06  Tom Tromey  <tromey@redhat.com>
4786         PR java/14853:
4787         * java-tree.h (extract_field_decl): Declare.
4788         * parse.y (extract_field_decl): Renamed from
4789         strip_out_static_field_access_decl.  No longer static.
4790         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4792 2004-12-03  Tom Tromey  <tromey@redhat.com>
4794         * lang.c (flag_new_verifier): Define.
4795         (java_post_options): Set flag_new_verifier if indirect dispatch
4796         is being used.
4797         * lang.opt (fnew-verifier): Removed.
4799 2004-12-03  Tom Tromey  <tromey@redhat.com>
4801         PR bootstrap/14614:
4802         * Make-lang.in (java.install-common): Only install transformed
4803         gcjh if gcj-cross exists.
4805 2004-12-03  Andrew Haley  <aph@redhat.com>
4807         PR java/18812
4808         * except.c (link_handler): Patch 'outer' field of siblings of the
4809         range we're demoting.
4811 2004-12-03  Andrew Haley  <aph@redhat.com>
4813         PR java/18697
4814         * class.c (layout_class_method): Don't fail to override a method
4815         simply because it has DECL_ARTIFICIAL set.
4817 2004-12-02  Tom Tromey  <tromey@redhat.com>
4819         PR java/16675:
4820         * parse.y (craft_constructor): Special case null_pointer_node.
4822 2004-12-02  Tom Tromey  <tromey@redhat.com>
4824         PR java/18741:
4825         * java-gimplify.c (java_gimplify_expr): Don't call
4826         SET_EXPR_LOCATION unless wrapped tree is an expression.
4828 2004-11-27  Per Bothner  <per@bothner.com>
4830         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
4831         Fix fencepost error in 'i', which got executed one too many times.
4832         Also, fold memcpy into explicit loop, as originally intended.
4833         Also, free temporary 'buf' which otherwise leaks.
4835 2004-11-27  Per Bothner  <per@bothner.com>
4837         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4838         local static variables if not USE_MAPPED_LOCATION.
4840 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
4842         * class.c, decl.c, expr.c: Fix comment typos.
4844 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
4846         PR java/18305
4847         * decl.c (end_java_method): Call
4848         attach_init_test_initialization_flags on all the init_decls.
4849         * parse.y (attach_init_test_initialization_flags): Move to ...
4850         * expr.c (attach_init_test_initialization_flags): here and
4851         support BIND_EXPR also.
4852         * java-tree.h (attach_init_test_initialization_flags): Prototype.
4853         * jcf-parse.c (parse_class_file): Don't disable class init
4854         optimization.
4856 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
4858         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4859         in diagnostics.
4861 2004-11-24  Richard Henderson  <rth@redhat.com>
4863         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4864         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4866 2004-11-24  Tom Tromey  <tromey@redhat.com>
4868         * verify.c (defer_merging): Don't use C++-style comment.
4869         * verify.h (java_opcode): Added java_opcode_end.
4870         * class.c (build_class_ref): Remove C++ comment and old FIXME.
4872         * verify-impl.c (vfy_push_type): Removed bogus "return".
4873         (initialize_stack): Use vfy_alloc and vfy_free.
4874         (verify_instructions_0): Likewise.
4876         * Merged gcj-abi-2-dev-branch to trunk.
4878 2004-11-24  Andrew Haley  <aph@redhat.com>
4880         * jcf-parse.c (parse_class_file): Set file_start_location.
4882 2004-11-10  Tom Tromey  <tromey@redhat.com>
4884         * class.c (make_field_value): Don't call build_static_field_ref.
4885         (build_static_field_ref): Don't emit direct references when using
4886         indirect dispatch.
4888         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
4889         -verbose:class into man page synopsis.
4891 2004-11-09  Tom Tromey  <tromey@redhat.com>
4893         * expr.c (build_java_arraystore_check): Still generate check if
4894         element type is itself an array.
4896 2004-11-08  Tom Tromey  <tromey@redhat.com>
4898         * java-tree.h (soft_check_assignment_node): Removed.
4899         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4900         * decl.c (java_init_decl_processing): Don't initialize
4901         soft_check_assignment_node.
4903 2004-11-05  Tom Tromey  <tromey@redhat.com>
4905         * class.c (layout_class_methods): Don't add Miranda methods when
4906         using indirect dispatch.
4908 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
4910         * class.c (make_class_data): Call emit_assertion_table to set the
4911         'assertion_table' field.
4912         (build_signature_for_libgcj): Move here from expr.c.
4913         (add_assertion_table_entry): New function. Callback for assertion
4914         hashtable traversal.
4915         (emit_assertion_table): New. Take class argument, and generate
4916         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4917         * decl.c (init_decl_processing): Define assertion_entry_type record.
4918         Push 'assertion_table' class field instead of 'verify'.
4919         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4920         (type_assertion_hash): Include 'assertion_code' in hash.
4921         (add_type_assertion): Rewritten. Take class and assertion_code
4922         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4923         (can_widen_reference_to): Use new add_type_assertion() arguments.
4924         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4925         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4926         (verify_identifier_node): Removed.
4927         (assertion_entry_type, assertion_table_type): New.
4928         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4929         assertion code definitions.
4930         (struct type_assertion): Add assertion_code. Rename 'source_type' and
4931         'target_type' to 'op1' and 'op2'.
4932         (add_type_assertion): Declare.
4933         (lang_printable_name_wls): Remove unused definition.
4934         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4935         to emit runtime assertion.
4936         (vfy_note_stack_type): Clean up non-C90 declarations.
4937         (vfy_note_local_type): Likewise.
4938         * verify.h (vfy_is_assignable_from): Declare.
4939         * verify-impl.c (is_assignable_from_slow): Remove unused function.
4940         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4941         instead of is_assignable_from_slow().
4942         (types_compatible): Reinstate ref_compatible() call.
4944 2004-11-04  Tom Tromey  <tromey@redhat.com>
4946         * class.c (build_static_field_ref): Reverted previous patch.
4948         * class.c (build_static_field_ref): Don't emit direct references
4949         when using indirect dispatch.
4951 2004-11-03  Tom Tromey  <tromey@redhat.com>
4953         * expr.c (expand_java_arrayload): Set lhs_type_node.
4954         (expand_java_arraystore): Set rhs_type_node.
4956 2004-11-02  Tom Tromey  <tromey@redhat.com>
4958         * jcf-parse.c (compute_class_name): Use filename length from zip
4959         directory, not strlen.
4961         * expr.c (expand_invoke): Mark new interface methods as abstract.
4963 2004-11-01  Tom Tromey  <tromey@redhat.com>
4965         * verify-impl.c (push_jump): Removed check for uninitialized
4966         objects.
4967         (push_exception_jump): Likewise.
4968         (handle_ret_insn): Likewise.
4969         (handle_jsr_insn): Likewise.
4970         (state_check_no_uninitialized_objects): Removed.
4972         * decl.c (check_local_unnamed_variable): Recognize
4973         promoted-to-int parameters when using the new verifier.
4974         * expr.c (expand_java_arraystore): Explicitly request array type
4975         when using new verifier.
4976         (expand_java_arrayload): Likewise.
4977         (invoke_build_dtable): Don't pass object_type_node as
4978         expression argument to build_java_indirect_ref.
4979         (build_java_check_indexed_type): Do nothing.
4980         (build_java_arraystore_check): Handle case where array doesn't
4981         have array type.
4982         (build_java_array_length_access): Likewise.
4983         (expand_invoke): Handle case where interface overrides a method
4984         from Object.
4985         (pop_type_0): Always succeed for reference types.
4986         (process_jvm_instruction): Don't pop a value in a dead
4987         exception handler.
4988         (pop_arguments): Convert arguments to correct types.
4990 2004-10-29  Andrew Haley  <aph@redhat.com>
4992         * jcf-parse.c (give_name_to_class): Remove line that was
4993         incorrectly merged.
4995 2004-10-29  Andrew Haley  <aph@redhat.com>
4997         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4999 2004-10-20  Andrew Haley  <aph@redhat.com>
5001         * decl.c (end_java_method): Don't expand if flag_syntax_only.
5003 2004-10-26  Tom Tromey  <tromey@redhat.com>
5005         * verify.h (vfy_notify_verified): Removed.
5006         * verify-glue.c (vfy_notify_verified): Removed.
5008 2004-10-26  Tom Tromey  <tromey@redhat.com>
5010         * verify-impl.c (debug_print_state): Declare `i' before code.
5011         (merge_types): Modify `t' when it is null_type.
5013 2004-10-26  Tom Tromey  <tromey@redhat.com>
5015         * verify-impl.c (type_print): Renamed from print.  Now static and
5016         takes an argument.
5017         (debug_print_state): Use type_print.
5019 2004-10-25  Tom Tromey  <tromey@redhat.com>
5021         * expr.c (build_invokeinterface): Compute correct offset for
5022         index into interface methods.
5024 2004-10-20  Tom Tromey  <tromey@redhat.com>
5026         * java-tree.h (verify_jvm_instructions_new): Declare.
5028         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
5029         command line.
5031         * verify-impl.c (verify_instructions): Correctly handle wide
5032         types on the stack.
5033         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
5034         (vfy_get_component_type): Strip pointer types.
5035         (vfy_find_class): Use get_type_from_signature.  Strip pointer
5036         types.
5037         Include java-except.h.
5039 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
5041         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
5042         vfy_push_type_t, set_variable, add_new_state, merge_into,
5043         handle_jsr_insn, branch_prepass, check_class_constant,
5044         check_wide_constant, get_one_type, compute_static_types,
5045         verify_instructions_0): Clean up C99 declarations after statements.
5047 2004-10-20  Tom Tromey  <tromey@redhat.com>
5049         * verify-impl.c (merge_refs): Compare reference against iterator,
5050         not ref2.
5052         * verify-glue.c (vfy_tag): Mask off resolved flag.
5054 2004-10-19  Tom Tromey  <tromey@redhat.com>
5056         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
5057         (init_state_with_stack): Initialize `this_type' in state.
5058         (verify_method): Use debug_print.
5059         * verify-glue.c (vfy_is_primitive): Removed debugging print.
5060         (vfy_note_stack_depth): Reverted last patch.
5061         (vfy_note_stack_type): Note pointer to Object, not Object.
5062         (vfy_note_local_type): Likewise.
5064         * verify.h (vfy_note_instruction_seen): Declare.
5065         * verify-glue.c (verify_jvm_instructions_new): Set
5066         BCODE_EXCEPTION_TARGET on target instruction.
5067         (vfy_note_instruction_seen): New function.
5068         * verify-impl.c (FLAG_INSN_SEEN): New define.
5069         (verify_instructions_0): Set flag on instruction.  Save state for
5070         PC=0 later.
5071         (verify_instructions): Call vfy_note_instruction_seen.
5073         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
5074         (verify_jvm_instructions_new): Call method_init_exceptions,
5075         add_handler, and handle_nested_ranges.
5076         * verify-impl.c (verify_method): Return 1 on success.
5077         (verify_instructions_0): Save the state at PC=0.
5079         * verify-impl.c (init_type_from_class): Set is_resolved and
5080         ref_next on new ref_intersection.
5081         (init_type_from_string): Likewise.
5083 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
5085         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
5086         if flag_new_verifier is set.
5087         * java-tree.h (flag_new_verifier): Declare.
5088         * lang.opt (fnew-verifier): New option.
5089         * verify-impl.c: Work around namespace pollution by undef'ing
5090         'current_class'.
5091         (struct verifier_context): Make 'bytecode' const.
5092         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
5093         (types_compatible): For the BC-ABI, always consider reference types
5094         compatible.
5095         (check_class_constant): Use vfr->current_class.
5096         (check_constant): Likewise.
5097         (check_wide_constant): Likewise.
5098         (check_field_constant): Check for 'L' at start of type name.
5099         (get_one_type): Return pointer instead of type. Set type result in
5100         caller via passed type pointer.
5101         (compute_argument_types): Update to use new get_one_type arguments.
5102         (compute_return_type): Likewise.
5103         (make_verifier_context): New. Allocate and initialize 'vfr'.
5104         (free_verifier_context): New. Free 'vfr' and its contents.
5105         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
5106         and free_verifier_context.
5108 2004-10-15  Tom Tromey  <tromey@redhat.com>
5110         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
5111         * verify.h (vfy_fail): Fixed formatting.
5113         * verify-impl.c (vfr): Fixed comment formatting.
5114         (collapse_type): New function.
5115         (verify_instructions): Notify compiler about type map.
5116         * verify.h (vfy_note_stack_depth): Updated.
5117         (vfy_note_stack_type): Likewise.
5118         (vfy_note_local_type): Likewise.
5119         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
5120         Declare.
5121         * verify-glue.c (vfy_note_stack_depth): Correctly size type
5122         state.  Added `method' argument.
5123         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
5124         argument.
5125         (vfy_note_local_type): New function.
5126         (vfy_unsuitable_type): Likewise.
5127         (vfy_return_address_type): Likewise.
5128         (vfy_null_type): Likewise.
5130         * verify.h (VFY_IN_GCC): Removed.
5131         (VFY_WANT_TYPEMAP): Removed.
5132         * verify-impl.c (verify_instructions_0): Removed useless "\".
5133         (struct state) <next>: Uncomment.
5135 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
5137         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
5138         C-style.
5140 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
5142         * Make-lang.in (verify.o): Re-enabled this target.
5143         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
5144         (vfy_get_interface): Likewise.
5145         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
5146         * verify.h (verify_jvm_instructions_new): Declare.
5147         * verify-impl.c (free_state): Temporarily comment out unused
5148         function.
5150 2004-10-06  Tom Tromey  <tromey@redhat.com>
5152         * java-tree.h (JV_STATE_READ): New enum value.
5154 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
5156         * verify.h: New file.
5158 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
5160         * verify-impl.c, verify-glue.c, verify.h: New files.
5161         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
5163 2004-09-24  Andrew Haley  <aph@redhat.com>
5165         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
5166         for a slot if it's of pointer type.
5168 2004-09-14  Tom Tromey  <tromey@redhat.com>
5170         * class.c (make_class_data): Correctly initialize "state" field.
5171         Initialize "engine" field.
5172         * decl.c (java_init_decl_processing): Add "engine" field.
5174 2004-09-10  Andrew Haley  <aph@redhat.com>
5176         PR java/12760
5177         * expr.c (build_invokeinterface): Use fast method for interface
5178         dispatch.
5179         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
5180         JTI_ITABLE_PTR_TYPE.
5181         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
5182         (emit_symbol_table): Add new arg, element_size.
5183         * decl.c (java_init_decl_processing): Initialize Class.itable.
5184         * class.c (GEN_TABLE): New macro.
5185         (gen_indirect_dispatch_tables): Use it.  Add itable.
5186         (make_class_data): Add new arg for emit_symbol_table().
5187         Emit itable.
5188         (add_miranda_methods): Make sure search_class has been parsed.
5189         (emit_symbol_table): Add new arg, element_size.
5191 2004-09-06  Andrew Haley  <aph@redhat.com>
5193         * verify.c (merge_types): Return Object for all merges of
5194         interfaces.
5195         * expr.c (add_type_assertion): Don't generate assertions when
5196         source type is array of Object.
5198 2004-09-03  Andrew Haley  <aph@redhat.com>
5200         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
5202         * lang.c (java_post_options): Force flag_verify_invocations if
5203         we're not using indirect dispatch.
5205         * expr.c (pop_type_0): Move test for interfaces before call to
5206         can_widen_reference_to().
5207         (build_signature_for_libgcj): Remove generation of canonical array
5208         type.
5209         (add_type_assertion): Canonicalize both arrays.
5210         Don't assert that type X can be assigned to Object.
5211         Don't assert that type X an be assigned to type X.
5212         Don't assert that Object can be assigned to type X.
5213         (can_widen_reference_to): Warn whenever we generate an assertion.
5214         (process_jvm_instruction): Use throwable_type_node for the type of
5215         an exception class.
5217 2004-09-01  Andrew Haley  <aph@redhat.com>
5219         * decl.c (java_init_decl_processing): Change
5220         verify_identifier_node to "__verify".
5221         * expr.c (add_type_assertion): Use verify_identifier_node for name.
5222         * java-tree.h (verify_identifier_node): Change to "__verify".
5224         * expr.c (build_signature_for_libgcj): New function.
5225         (add_type_assertion): Use it to construct signatures for
5226         source_type and target_type.
5228 2004-08-27  Andrew Haley  <aph@redhat.com>
5230         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
5231         (verify_identifier_node): New.
5232         (TYPE_VERIFY_METHOD): New.
5233         (struct type_assertion): New type.
5234         * expr.c (type_assertion_eq): New function.
5235         (type_assertion_hash): New function.
5236         (add_type_assertion): New function.
5237         (can_widen_reference_to): Call add_type_assertion().
5238         * decl.c (java_init_decl_processing): Add verify_identifier_node.
5239         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
5240         (finish_class): Output TYPE_VERIFY_METHOD (type).
5242         * decl.c (end_java_method): Nullify unused fields.
5244 2004-08-17  Andrew Haley  <aph@redhat.com>
5246         * verify.c (defer_merging): Quieten.
5247         * jcf-parse.c (load_class): Only try to open a class file if it's
5248         java.lang.Object or if it's part of the current compilation.
5249         Check that the class we just tried to load is the class we just
5250         loaded.  Quieten.
5251         (java_parse_file): Set flag_verify_invocations off if we're
5252         compiling from .class.
5253         (parse_zip_file_entries): Abort if we try to read a dummy class.
5254         * expr.c (can_widen_reference_to): Quieten.
5255         (build_invokevirtual): Abort if we try to invokevirtual an
5256         interface.
5257         (expand_invoke): Don't build a non-interface call to an interface.
5258         (build_instanceof): Don't do premature optimization if
5259         flag_verify_invocations is not set.
5260         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
5261         from superclass.
5262         (build_static_field_ref): Add correct type conversion for
5263         field_address.
5264         (add_miranda_methods): Disable generation of Miranda methods for
5265         dummy classes.
5266         (layout_class_method): Don't complain about non-static method
5267         overrides static method with dummy classes.
5269 2004-08-13  Tom Tromey  <tromey@redhat.com>
5271         * class.c (build_static_field_ref): Re-enable atable lookups for
5272         static fields.
5274         * parse.y (strip_out_static_field_access_decl): Indentation fix.
5276 2004-08-11  Tom Tromey  <tromey@redhat.com>
5278         * gcj.texi (libgcj Runtime Properties): Document new properties.
5280 2004-08-06  Andrew Haley  <aph@redhat.com>
5282         * jcf-parse.c (load_class): Check that we really have loaded the
5283         class we're looking for.
5285 2004-07-19  Andrew Haley  <aph@redhat.com>
5287         * verify.c (verify_jvm_instructions): Comment change only.
5289         * typeck.c (build_java_array_type): Add size field to array name.
5291         * java-tree.h (LOCAL_SLOT_P): New.
5292         (update_aliases): Add PC argument.
5293         (pushdecl_function_level): New function.
5295         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5296         MODIFY_EXPR, and SAVE_EXPR.
5297         (java_gimplify_modify_expr): New function.
5299         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5300         (expand_iinc): Pass PC to update_aliases().
5301         (STORE_INTERNAL): Likewise.
5302         (process_jvm_instruction): Likewise.
5304         * decl.c (base_decl_map): New variable.
5305         (uniq): New variable.
5306         (update_aliases): Rewrite with more thorough checking.
5307         (debug_variable_p): New function.
5308         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
5309         (check_local_named_variable): Delete whole function.
5310         (initialize_local_variable): New function.
5311         (check_local_unnamed_variable): Add checks and comments.
5312         (find_local_variable): Rewrite.
5313         (java_replace_reference): New function.
5314         (function_binding_level): New variable.
5315         (pushdecl_function_level): New function.
5316         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5317         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5318         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5319         function_binding_level.
5320         (end_java_method): Null unused fields to save memory.
5322 2004-06-29  Andrew Haley  <aph@redhat.com>
5324         * except.c (expand_start_java_handler): Push a new binding level.
5325         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5326         register_exception_range() to register where we'll do it.
5327         (expand_end_java_handler): Remove old bogus code.  Replace with
5328         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5329         the top of the expression we're curently building.
5330         (maybe_end_try): Delete.
5331         * decl.c (binding_level.exception_range): New field.
5332         (clear_binding_level): Add field exception_range.  Reformat.
5333         (poplevel): Call expand_end_java_handler().
5334         (poplevel): Call java_add_stmt only if functionbody is false.
5335         (maybe_poplevels): Don't call maybe_end_try() from here.
5336         (end_java_method): Clear no longer used trees in function decl.
5337         (register_exception_range): New function.
5338         * java-tree.h (register_exception_range, struct eh_range): Declare.
5340 2004-06-22  Andrew Haley  <aph@redhat.com>
5342         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5343         the otable.
5344         * check-init.c (get_variable_decl): Teach check-init about
5345         FIELD_DECLs addressed via the otable.
5346         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5347         CLASS_PARSED_P.
5349 2004-05-28  Andrew Haley  <aph@redhat.com>
5351         * jcf-parse.c (load_class): Don't try to read a class that we've
5352         already read.
5354         * expr.c (build_invokeinterface): Use the old-fashioned way of
5355         doing indirect dispatch: look up interfaces by name.
5356         * java-tree.h (enum java_tree_index): Add
5357         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5358         * decl.c (java_init_decl_processing): Add
5359         soft_lookupinterfacemethodbyname_node.
5361         * gjavah.c (print_method_info): Final methods have vtable entries,
5362         so gjavah needs to output them.
5363         * class.c (layout_class_method): Generate vtable entries for final
5364         methods.
5365         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5366         dispatch, even if a method is final.
5368 2004-05-25  Andrew Haley  <aph@redhat.com>
5370         * class.c (build_symbol_entry): Convert the names of constructors
5371         to init_identifier_node when generating an entry for the indirect
5372         dispatch table.
5374         * expr.c (build_known_method_ref): Generate indirect calls for
5375         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5377 2004-05-24  Andrew Haley  <aph@redhat.com>
5379         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5380         atable element is of the right type.
5382         * class.c (build_static_field_ref): Cast pointer to correct type
5383         for field.
5385 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
5387         * Merged with HEAD as of 20040514. Diff against
5388         gcj-abi-2-merge-20040514.
5390 2004-04-16  Andrew Haley  <aph@redhat.com>
5392         * verify.c (check_pending_block): Disable subroutine checks.
5393         (defer_merging): New function.
5394         (merge_types): If types are dummy, use defer_merging to combine them.
5395         (verify_jvm_instructions): If invocation is invokeinterface and
5396         target is dummy, assume target really is an interface.
5398         * parse.y (patch_invoke): Break out call to java_create_object.
5400         * lang.c (flag_verify_invocations): New.
5402         * jcf-parse.c (load_class): If we've already failed to load a
5403         class, don't try again.
5404         (load_class): If we can't find a .class file, don't fail, but emit
5405         a warning.
5406         (parse_class_file): Don't act on dummy methods.
5408         * java-tree.h (flag_verify_invocations): New.
5409         (TYPE_DUMMY): New.
5410         (lang_type.dummy_class): New field.
5411         (java_create_object): New function.
5412         (METHOD_DUMMY): New.
5414         * expr.c (build_field_ref): Widen field offset.
5415         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5416         that each of its elements is compatible with the one we're
5417         popping.
5418         (pop_type_0): Issue a warning to say that we need to generate a
5419         runtime check.
5420         (java_create_object): New function.
5421         (build_field_ref): Only generate hard refs if we're not using
5422         indirect dispatch.
5423         (expand_java_field_op): If we're using !verify_invocations and we
5424         see a missing field, generate a decl for it.
5426         (expand_invoke): If a class doesn't have the method we seek and
5427         we're using !flag_verify_invocations, generate a decl for the
5428         method now.
5430         (build_known_method_ref): Always use indirect dispatch via the
5431         atable for static methods.
5433         (expand_java_NEW): Break out object creation into new function,
5434         java_create_object.
5436         (can_widen_reference_to): Issue a warning to say that we need to
5437         generate a runtime check.
5439         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5440         (make_method_value): Also use index for interfaces.
5441         (make_class_data): Skip dummy field for inherited data.
5442         Don't build method array for dummy methods.
5443         Set size_in_byte to -1 when using inirect dispatch
5444         Don't build a hard class ref if we don't have a hard ref to our
5445         superclass, or if we're using inirect dispatch.
5446         Null out dispatch tables.
5448         (layout_class_method): Don't complain about non-static method
5449         overrides static method is method is artificial.
5451         (build_static_field_ref): Disable atable references to static
5452         fields for the time being.
5454         (layout_class_methods): Check for CLASS_INTERFACE as
5455         well as CLASS_ABSTRACT.
5457 2004-11-24  Steven Bosscher  <stevenb@suse.de>
5459         * class.c (make_class_data): Don't check flag_inline_functions.
5460         * lang.c (flag_really_inline): Remove unused flag.
5461         (java_handle_option): Don't set it here.  Remove special handling
5462         of flag_inline_functions for Java.
5463         (java_init): Don't set flag_inline_trees here.  Already done...
5464         (java_post_options): ...here.  Don't clear flag_inline_functions.
5466 2004-11-24  Steven Bosscher  <stevenb@suse.de>
5468         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5469         (java_gimplify_exit_block_expr): New function.
5470         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5471         LABELED_BLOCK_EXPR.
5472         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5473         (EXIT_BLOCK_EXPR): Likewise.
5474         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5475         (LABELED_BLOCK_BODY): Likewise.
5476         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5477         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5478         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
5479         TREE_OPERAND.
5480         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5481         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5482         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
5483         second operand of EXIT_BLOCK_EXPR.
5484         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5485         TREE_OPERAND.
5486         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5488 2004-11-23  Ben Elliston  <bje@au.ibm.com>
5490         * xref.h (xref_flag_value): Remove.
5491         (xref_set_data, xref_get_data): Likewise.
5492         (xref_set_current_fp): Likewise.
5493         (XREF_NONE): Likewise.
5494         (XREF_GET_DATA): Likewise.
5495         * xref.c (xref_flag_value): Remove.
5496         (xref_set_data, xref_get_data): Likewise.
5497         (xref_set_current_fp): Likewise.
5499 2004-11-23  Ben Elliston  <bje@au.ibm.com>
5501         * gjavah.c (output_directory): Make static.
5502         (temp_directory): Likewise.
5504 2004-11-15  Tom Tromey  <tromey@redhat.com>
5506         * decl.c (instn_ptr_type_node): Removed.
5507         (lineNumbers_ptr_type_node): Removed.
5508         (jint_type): Removed.
5509         (jint_ptr_type): Removed.
5511 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
5513         PR java/15576
5514         * check-init.c (check_init): Ignore DECL_EXPR.
5515         * expr.c (always_initialize_class_p): Reenable.
5516         (build_class_init): Use a variable to store the decl.  Also use
5517         boolean_false_node instead of integer_zero_node.
5518         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5519         to the block.
5521 2004-11-08  Tom Tromey  <tromey@redhat.com>
5523         PR java/16843:
5524         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5525         generating a JNI header.
5526         (print_field_info): Handle JNI headers.
5527         (jni_print_float): Likewise.
5528         (jni_print_double): Likewise.
5530 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
5532         * decl.c (end_java_method): Remove duplicated code.
5534 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
5535             Gerald Pfeifer  <gerald@pfeifer.com>
5537         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5538         as well.
5540 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
5542         PR java/17265
5543         * class.c: Reinstate 2004-08-18 patch.
5544         (make_local_function_alias): Don't create an alias for extern (native)
5545         functions.
5547 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
5549         PR java/17265
5550         * class.c (make_local_function_alias): Revert 2004-08-18 change.
5551         (make_method_value): Likewise.
5553 2004-10-21  Andrew Haley  <aph@redhat.com>
5555         PR java/18091:
5556         * jcf-parse.c (set_source_filename): Add code to build new sfname.
5558 2004-10-20  Andrew Haley  <aph@redhat.com>
5560         * decl.c (end_java_method): Don't expand if flag_syntax_only.
5561         Remove duplicated code block.
5563 2004-10-18  Steven Bosscher  <stevenb@suse.de>
5565         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5566         New rules to work around old Bison warnings.
5568 2004-10-17  Steven Bosscher  <stevenb@suse.de>
5570         * class.c (ident_subst): Always alloca buffer.
5571         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5572         opcode after including javaop.def.
5573         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5574         conditional expression that exits, to avoid warnings.
5575         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5576         a user of an extension.
5577         * win32-host.c: Move check down to have non-empty file when
5578         WIN32 is not defined.
5580         * Make-lang.in (java-warn): Add STRICT_WARN.
5581         (java/jcf-io.o-warn): Don't have Werror for this file.
5582         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5584 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
5586         * expr.c (expr_add_location): Move declaration to before all
5587         statements.
5588         * parse.y (java_expand_classes): Ditto.
5589         * lex.c (java_peek_unicode): Ditto.
5591 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
5593         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5594         if possible, else convert `foo' to 'foo'.
5595         * class.c: Likewise.
5596         * decl.c: Likewise.
5597         * expr.c: Likewise.
5598         * jcf-io.c: Likewise.
5599         * jcf-parse.c: Likewise.
5600         * lang.c: Likewise.
5601         * lex.c: Likewise.
5602         * parse.h: Likewise.
5604 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
5606         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5607         rename parameter 'msg' to 'msgid' in function declaration.
5608         (issue_warning_error_from_context): Likewise.
5609         (yyerror): Rename parameter 'msg' to 'msgid'.
5610         (all over): Use new quoting style for diagnostics.
5612 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
5614         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5615         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5616         Update copyright.
5618 2004-10-14  Matt Austern  <austern@apple.com>
5620         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5621         pointer_set_t* now.
5623 2004-10-13  Tom Tromey  <tromey@redhat.com>
5625         PR java/15578:
5626         * lang.opt (--extdirs): Document.
5627         * jvspec.c (lang_specific_driver): Recognize -encoding and
5628         -extdirs.
5630 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
5632         * parse.y (issue_warning_error_from_context): Use va_list *
5633         instead of va_list parameter.
5634         (parse_error_context): Update call.
5635         (parse_warning_context): Likewise.
5637 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
5639         * parse.y, parse-scan.y: Add list of diagnostic messages to
5640         insulate translation template from version of yacc/bison used
5641         to compile the grammar.
5643 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
5645         Prepare for %q, %< and %> in diagnostic message strings.
5646         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5647         Name second parameter 'msgid'.
5648         * parse.y: Additionally include pretty-print.h and diagnostic.h.
5649         (issue_warning_error_from_context): Use pretty-printer functions
5650         instead of vsprintf for constructing formatted messages. Rename
5651         parameter 'msg' to 'msgid'.
5652         (parse_error_context): Rename parameter 'msg' to 'msgid'.
5653         (parse_warning_context): Likewise.
5655 2004-10-05  Andrew Haley  <aph@redhat.com>
5657         PR java/17779
5658         * jcf-parse.c (parse_zip_file_entries): If a class has a
5659         superclass and a TYPE_SIZE of zero, lay it out.
5661 2004-09-30  Andrew Haley  <aph@redhat.com>
5663         PR java/17733
5664         * jcf-parse.c (compute_class_name): Rewrite.
5666 2004-10-01  Jan Hubicka  <jh@suse.cz>
5668         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5670 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5672         * lex.c: Fix a comment typo.
5674 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5676         * java-tree.h: Fix a comment typo.
5678 2004-09-30  Per Bothner  <per@bothner.com>
5680         Simplify lexer.  Implement --enable-mapped-location support.
5681         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
5682         (parse_source_file_1): Pass filename as extra parameter, so we can call
5683         linemap_add and set input_location here, rather than in both callers.
5684         (read_class): Pass copied filename to parse_source_file_1.
5685         Don't initialize wfl_operator - only needed for source compilation.
5686         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
5687         * lex.h:  Remove a bunch of debugging macros.
5688         * lex.h (struct_java_line, struct java_error):  Remove types.
5689         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
5690         (struct java_lc_s):  Remove prev_col field.
5691         (struct java_lexer):  New fields next_unicode, next_columns, and
5692         avail_unicode.  New position field, and maybe token_start field.
5693         Don't need hit_eof field - use next_unicode == -1 instead.
5694         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
5695         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
5696         * parse.h:  Various changes for USE_MAPPED_LOCATION.
5697         (EXPR_WFL_EMIT_LINE_NOTE): XXX
5698         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5699         (struct parser_ctxt):  New file_start_location field.
5700         Remove p_line, c_line fields since we no longer save lines.
5701         Remove elc, lineno, and current_jcf fields - no longer used.
5702         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
5703         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5704         source_location and is probably not needed anymore anyway.
5705         Use new expr_add_Location function.
5706         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
5707         (java_pop_parser_context):  Minor cleanup.
5708         (java_parser_context_save_global, java_parser_context_restore_global,
5709         java_pop_parser_context):  Save/restore input_location as a unit.
5710         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
5711         a source_location instead of a wfl context node.
5712         (check_class_interface_creation):  input_filename is not addressable.
5713         (create_artificial_method):  Calling java_parser_context_save_global
5714         and java_parser_context_restore_global is overkill.  Instead,
5715         temporarily set input_location from class decl.
5716         (java_layout_seen_class_methods): Set input_location from method decl.
5717         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5718         (finish_loop_body):  Likewise.
5719         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
5720         (java_sprint_unicode):  Take a character, not index in line.
5721         (java_sneak_uncode):  Replaced by java_peek_unicode.
5722         (java_unget_unicode):  No longer used.
5723         (java_allocate_new_line. java_store_unicode):  Removed, since we
5724         no longer remember "lines".
5725         (java_new_lexer):  Update for new data structures.
5726         (java_read_char):  Move unget_value checking to java_read_unicode.
5727         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5728         efficient functions that are used directly when lexing.
5729         (java_read_unicode_collapsing_terminators):  No longer needed.
5730         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5731         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5732         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
5733         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
5734         combine switch branches, and test for common token kinds earlier.
5735         (java_lex_error):  Rewrite.
5736         * jv-scan.c (expand_location): New function, copied from tree.c.
5737         (main): Set ctxp->filename instead of setting input_filename directly.
5739 2004-09-30  Per Bothner  <per@bothner.com>
5741         More cleanup for --enable-mapped-location.
5742         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
5743         input_location here.  Instead do it in give_name_to_class.
5744         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5745         * expr.c (expand_byte_code): Call linemap_line_start.
5746         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
5747         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
5748         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
5749         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
5750         to USE_MAPPED_LOCATION case.
5752         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
5753         * jcf-parse.c (java_parse_file): Don't set input_filename.
5754         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5755         Create a list of TRANSLATION_UNIT_DECL.
5756         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
5757         reason is so we can set a DECL_SOURCE_LOCATION for each file.
5758         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5759         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5760         (file_start_location):  New static.
5761         (set_source_filename):  Avoid extra access to input_filename macro.
5762         Concatenate new name with class's package prefix.
5763         (set_source_filename, give_name_to_class): Update.
5764         (give_name_to_class):  Set class's "line 0" input_location here.
5765         (parse_class_file):  Set input_location as a unit.
5767         * jcf-parse.c (load_class): Sanity test if missing inner class file.
5769 2004-09-29  Per Bothner  <per@bothner.com>
5771         * java-tree.h:  Redefine some macros and add some declaration
5772         to handle the USE_MAPPED_LOCATION case.
5773         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
5774         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
5775         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5776         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5778         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5779         * decl.c (finish_method, java_add_stmt): Likewise.
5780         * java-gimplify.c (java-gimplify.c):  Likewise.
5781         * jcf-write.c (generate_bytecode_insns):  Likewise.
5782         * lang.c (java_post_options): Likewise - call linemap_add.
5784 2004-09-29  Andrew Haley  <aph@redhat.com>
5786         PR java/17007
5787         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5788         result of TRUNC_MOD_EXPR.
5789         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5790         * decl.c (java_init_decl_processing): Mark
5791         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5793 2004-09-28  Tom Tromey  <tromey@redhat.com>
5795         PR java/15710:
5796         * class.c (add_miranda_methods): Load superinterface if not
5797         already loaded.
5799 2004-09-28  Andrew Haley  <aph@redhat.com>
5801         PR java/17586
5802         * jcf-parse.c (load_class): Don't try to read a class that we've
5803         already read.
5805 2004-09-28  Andrew Haley  <aph@redhat.com>
5807         * jcf-parse.c (load_class): Back out previous broken patch.
5809 2004-09-28  Andrew Haley  <aph@redhat.com>
5811         PR java/17586
5812         * jcf-parse.c (load_class): Don't try to read a class that we've
5813         already read.
5814         Check that we really did read the right class.
5816 2004-09-25  Tom Tromey  <tromey@redhat.com>
5818         PR java/17500:
5819         * parse.y (create_artificial_method): Use add_method_1.
5821 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
5823         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5824         comment typos.
5825         * gcj.texi: Fix typos.
5827 2004-09-24  Tom Tromey  <tromey@redhat.com>
5829         PR java/15656:
5830         * parse.y (class_instance_creation_expression): Set `$$' to NULL
5831         in error parts of rule.
5832         (unary_expression): Don't call error_if_numeric_overflow when $1
5833         is NULL.
5835 2004-09-24  Tom Tromey  <tromey@redhat.com>
5837         PR java/16789:
5838         * parse.y (resolve_qualified_expression_name): Set
5839         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5840         * expr.c (force_evaluation_order): Check for empty argument list
5841         after stripping COMPOUND_EXPR.
5843 2004-09-23  Andrew Haley  <aph@redhat.com>
5845         PR java/16927:
5846         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5847         COND_EXPRs.
5849 2004-09-23  Tom Tromey  <tromey@redhat.com>
5851         PR java/17329:
5852         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5853         where operand is null.
5855 2004-09-23  Tom Tromey  <tromey@redhat.com>
5857         PR java/17380:
5858         * parse.y (not_accessible_p): Allow access to protected members
5859         even when class is not static.
5861 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
5863         * Make-lang.in: Revert the gcc-none.o change.
5865 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
5867         * parse.y (patch_anonymous_class): VEC_space returns true if there
5868         is space.
5870 2004-09-21  Matt Austern  <austern@apple.com>
5872         Fix bootstrap.
5873         * gjavah.c (free_method_name_list): Fix function definition so
5874         it's a proper C prototype.
5876 2004-09-21  Tom Tromey  <tromey@redhat.com>
5878         PR java/17575:
5879         * gjavah.c (free_method_name_list): New method.
5880         (main): Call it.
5882 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
5883             Zack Weinberg  <zack@codesourcery.com>
5885         * java-tree.def: Use tree_code_class enumeration constants
5886         instead of code letters.
5887         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5888         new tree-class enumeration constants.
5890 2004-09-13  Tom Tromey  <tromey@redhat.com>
5892         PR java/17216:
5893         * class.c (layout_class_method): Put synthetic methods into the
5894         vtable.
5896 2004-09-11  Andrew Pinski  <apinski@apple.com>
5898         * Make-lang.in (java/ggc-none.c): Change dependency
5899         for ggc.h into $(GGC_H).
5901 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5903         * Make-lang.in (java/win32-host.o): Add dependency on
5904         coretypes.h.
5905         * win32-host.c: Add includes for coretypes.h, jcf.h
5907 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5909         * Make-lang.in (GCJH_OBJS): Change dependency from
5910         ggc-none.o to java/ggc-none.o
5911         (JCFDUMP_OBJS): Likewise.
5912         (java/ggc-none.o): New target.
5914 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
5916         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
5917         * class.c (build_utf8_ref, build_static_field_ref,
5918         make_field_value, make_method_value, get_dispatch_table,
5919         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5920         * constants.c (get_tag_node, build_ref_from_constant_pool,
5921         build_constants_constructor): Likewise.
5922         * decl.c (java_init_decl_processing): Likewise.
5923         * expr.c (build_java_array_length_access, build_newarray,
5924         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5925         build_java_binop, build_field_ref, expand_java_add_case,
5926         expand_java_call, build_known_method_ref, build_invokevirtual,
5927         build_invokeinterface, build_jni_stub): Likewise.
5928         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5929         * jcf-parse.c (get_constant): Likewise.
5930         * lex.c (do_java_lex): Likewise.
5931         * parse.y (patch_binop, patch_unaryop, patch_cast,
5932         build_newarray_node, patch_newarray): Likewise.
5933         * resource.c (compile_resource_data): Likewise.
5934         * typeck.c (build_prim_array_type): Likewise.
5936 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
5938         * decl.c (java_init_decl_processing): Adjust
5939         initialize_sizetypes call.
5941 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
5943         * jv-scan.c (fancy_abort): Add.
5945 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
5947         * expr.c (build_java_arrayaccess): Use convert to change
5948         len's type.
5950 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
5952         * class.c (make_local_function_alias): Allocate extra space for 'L'
5953         in name buffer. Reported by Thomas Neumann.
5955 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
5957         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5958         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
5959         * lex.c (do_java_lex): Adjust.
5960         (error_if_numeric_overflow): Likewise.
5962 2004-08-18  Andrew Pinski  <apinski@apple.com>
5964         * class.c (make_local_function_alias): Only make a new decl if we
5965         support alias attribute on all decls.
5967 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
5969         * class.c (make_local_function_alias): New function. Create local
5970         alias for public method DECL.
5971         (make_method_value): Use make_local_function_alias.
5972         * parse.y (craft_constructor): Don't special-case anonymous classes.
5973         Always set ctor_name to init_identifier_node.
5974         (lookup_method_invoke): Call layout_class_method when creating
5975         anonymous class constructor.
5977 2004-08-18  Richard Henderson  <rth@redhat.com>
5979         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5980         default case.  Treat '<' similarly.  Update for
5981         is_gimple_formal_tmp_var name change.
5983 2004-08-17  Andrew Haley  <aph@redhat.com>
5985         * lang.c (lang_printable_name): Obey verbose flag.
5986         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5987         lang_printable_name().
5988         (verify_constructor_circularity, get_printable_method_name,
5989         check_abstract_method_definitions, java_check_regular_methods,
5990         java_check_abstract_methods, check_inner_class_access,
5991         fix_constructors, patch_method_invocation, patch_return):
5992         Likewise.
5993         * expr.c (pop_type_0): Likewise.
5995         * java-tree.h (lang_printable_name_wls): Delete.
5997 2004-08-16  Tom Tromey  <tromey@redhat.com>
5999         PR java/8473:
6000         * parse.y (primary): Changed for initialized and uninitialized
6001         array creations.
6002         (array_access): Handle array_creation_initialized.
6003         (array_creation_expression): Split into
6004         array_creation_initialized and array_creation_uninitialized.
6006 2004-08-16  Andrew Haley  <aph@redhat.com>
6008         * jcf-write.c (find_constant_index): Canonicalize NaNs when
6009         generating bytecode.
6011 2004-08-16  Elliot Lee <sopwith@redhat.com>
6013         PR java/9677
6014         * jcf-parse.c (java_parse_file): Handle filenames with embedded
6015         spaces, and quoted filelists.
6017 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
6019         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
6020         * class.c (build_utf8_ref, build_static_field_ref,
6021         make_field_value, make_method_value, get_dispatch_table,
6022         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
6023         * constants.c (get_tag_node,  build_ref_from_constant_pool,
6024         build_constants_constructor): Likewise.
6025         * decl.c (java_init_decl_processing): Likewise.
6026         * expr.c (build_java_array_length_access, build_newarray,
6027         expand_java_multianewarray, expand_java_pushc, expand_iinc,
6028         build_java_binop, build_field_ref, expand_java_add_case,
6029         expand_java_call, build_known_method_ref, build_invokevirtual,
6030         build_invokeinterface, build_jni_stub): Likewise.
6031         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6032         * jcf-parse.c (get_constant): Likewise.
6033         * lex.c (do_java_lex): Likewise.
6034         * parse.y (patch_binop, patch_unaryop, patch_cast,
6035         build_null_of_type, patch_newarray): Likewise.
6036         * resource.c (compile_resource_data): Likewise.
6037         * typeck.c (build_prim_array_type): Likewise.
6039 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
6041         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
6042         Don't create BLOCK here or call java_gimplify_block.
6044 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6046         * java-tree.h (flag_deprecated): Removed.
6047         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
6048         * parse.y (check_deprecation): Check warn_deprecated instead of
6049         flag_deprecated.
6051 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
6053         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
6054         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
6055         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
6056         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
6057         flag_force_classes_archive_check, flag_optimize_sci,
6058         flag_indirect_dispatch): Remove explicit declarations.
6059         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
6060         final comment.
6062 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
6064         PR bootstrap/14893
6065         * Make-lang.in (java.install-man): Install from either build
6066         tree or source tree, whichever has the file first.
6068 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
6070         * jcf-parse.c (get_constant): Adjust force_fit_type call.
6071         * lex.h (SET_LVAL_NODE_TYPE): Remove.
6072         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
6073         (do_java_lex): Likewise. Adjust force_fit_type call.
6075 2004-08-04  Roger Sayle  <roger@eyesopen.com>
6076             Andrew Haley  <aph@redhat.com>
6078         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
6079         checking trees as they're being built.
6080         (convert): Call convert_ieee_real_to_integer if we're
6081         converting a constant, even if we're writing a class file.
6083 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
6085         PR java/16701
6086         * parse.y (fold_constant_for_init): Call resolve_field_access with
6087         correct current_class context.
6089 2004-08-01  Roger Sayle  <roger@eyesopen.com>
6091         * decl.c (update_aliases, initialize_local_variable): Replace calls
6092         to build with calls to buildN.
6093         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
6094         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
6095         * parse.h (BUILD_THROW): Likewise.
6096         * parse.y (switch_expression, synchronized_statement,
6097         catch_clause_parameter, array_creation_expression,
6098         conditional_expression, make_qualified_name,
6099         resolve_qualified_expression_name, patch_method_invocation,
6100         patch_invoke, build_method_invocation, build_new_invocation,
6101         build_assignment, patch_assignment, build_binop, patch_binop,
6102         build_string_concatenation, build_incdec, patch_unaryop,
6103         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
6104         patch_return, build_if_else_statement, build_labeled_block,
6105         build_new_loop, build_loop_body, build_bc_statement,
6106         build_assertion, encapsulate_with_try_catch, build_try_statement,
6107         build_try_finally_statement, patch_synchronized_statement,
6108         emit_test_initialization): Likewise, replace build with buildN.
6110 2004-07-28  Eric Christopher  <echristo@redhat.com>
6112         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
6113         (java_unsafe_for_reeval): Ditto.
6115 2004-07-26    <hp@bitrange.com>
6117         * parse.y (build_super_invocation): Adjust declaration order to
6118         avoid declaration after statement.
6120 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
6122         * decl.c: Rename all identifiers named `class' to `cl'.
6124 2004-07-25  Richard Henderson  <rth@redhat.com>
6126         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
6128 2004-07-23  Mike Stump  <mrs@apple.com>
6130         * boehm.c (set_bit): Improve type safety wrt unsignedness.
6131         * gjavah.c (throwable_p, decode_signature_piece,
6132         print_full_cxx_name, print_include, add_namelet, add_class_decl,
6133         process_file): Likewise.
6134         * jcf-dump.c (main): Likewise.
6135         * jcf-io.c (read_zip_member): Likewise.
6136         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
6137         give_name_to_class, get_class_constant): Likewise.
6138         * jcf-write.c (find_constant_wide, push_long_const,
6139         generate_classfile): Likewise.
6140         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
6141         * parse.y (read_import_dir): Likewise.
6142         * typeck.c (parse_signature_type): Likewise.
6143         * verify.c (verify_jvm_instructions): Likewise.
6144         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
6146 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
6148         * Make-lang.in: Replace rmic and rmiregistry references with
6149         grmic and grmiregistry.
6150         * gcj.texi: Likewise.
6152 2004-07-20  Andrew Haley  <aph@redhat.com>
6154         PR java/16431.
6155         * verify.c (verify_jvm_instructions): Comment change only.
6157         * typeck.c (build_java_array_type): Add size field to array name.
6159         * java-tree.h (LOCAL_SLOT_P): New.
6160         (update_aliases): Add PC argument.
6161         (pushdecl_function_level): New function.
6163         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
6164         MODIFY_EXPR, and SAVE_EXPR.
6165         (java_gimplify_modify_expr): New function.
6167         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
6168         (expand_iinc): Pass PC to update_aliases().
6169         (STORE_INTERNAL): Likewise.
6170         (process_jvm_instruction): Likewise.
6172         * decl.c (base_decl_map): New variable.
6173         (uniq): New variable.
6174         (update_aliases): Rewrite with more thorough checking.
6175         (debug_variable_p): New function.
6176         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
6177         (check_local_named_variable): Delete whole function.
6178         (initialize_local_variable): New function.
6179         (check_local_unnamed_variable): Add checks and comments.
6180         (find_local_variable): Rewrite.
6181         (java_replace_reference): New function.
6182         (function_binding_level): New variable.
6183         (pushdecl_function_level): New function.
6184         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
6185         (maybe_pushlevels): Call pushdecl() on each of the new decls.
6186         (start_java_method): Reset uniq.  Create base_decl_map.  Set
6187         function_binding_level.
6188         (end_java_method): Null unused fields to save memory.
6190 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6192         * class.c (add_interface_do): Remove.
6193         (set_super_info, interface_of_p, maybe_add_interface,
6194         add_interface, make_class_data, layout_class,
6195         add_miranda_methods): Adjust BINFO accessors and addition.
6196         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
6197         accessors.
6198         * jcf-write.c (generate_classfile): Likewise.
6199         * parse.y (patch_anonymous_class, check_inner_circular_reference,
6200         check_circular_reference, java_complete_class,
6201         check_abstract_method_definitions,
6202         java_check_abstract_method_definitions,
6203         check_interface_throws_clauses, java_check_abstract_methods,
6204         lookup_java_interface_method2,
6205         find_applicable_accessible_methods_list): Adjust BINFO accessors
6206         and addition.
6207         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
6209 2004-07-18  Roger Sayle  <roger@eyesopen.com>
6211         * builtins.c (max_builtin, min_builtin,
6212         java_build_function_call_expr): Replace calls to build with buildN.
6213         * class.c (build_class_ref, build_static_field_ref,
6214         get_dispatch_table, make_class_data, layout_class_method): Likewise.
6215         * constants.c (build_ref_from_constant_pool): Likewise.
6216         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
6217         add_stmt_to_compound): Likewise.
6218         * except.c (build_exception_object_ref, expand_end_java_handler):
6219         Likewise.
6220         * java-gimplify.c (java_gimplify_case_expr,
6221         java_gimplify_default_expr, java_gimplify_block,
6222         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
6223         * jcf-write.c (generate_bytecode_insns): Likewise.
6224         * typeck.c (convert_ieee_real_to_integer): Likewise.
6226 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
6228         * java-tree.h (builtin_function): Declare.
6230 2004-07-16  Steven Bosscher  <stevenb@suse.de>
6232         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
6233         abuse restore_line_number_status.
6235 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
6237         g++/15861
6238         * jcf-parse.c (java_emit_static_constructor): Specify default
6239         priority.
6241 2004-07-13  Per Bothner  <per@bothner.com>
6243         * java-tree.h (all_class_filename):  Remove useless macro.
6244         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
6245         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
6246         * parse.y (java_parser_context_restore_global):  Replace
6247         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
6248         * jcf-parse.c (read_class, java_parse_file):  Likewise.
6250 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
6252         PR java/16474
6253         gjavah.c (print_field_info): Emit constant only if field is static.
6255 2004-07-11  Roger Sayle  <roger@eyesopen.com>
6257         * expr.c (java_truthvalue_conversion, flush_quick_stack,
6258         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
6259         build_java_ret, build_java_throw_out_of_bounds_exception,
6260         build_java_array_length_access, java_check_reference,
6261         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
6262         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
6263         expand_java_arrayload, build_java_monitor, expand_java_return,
6264         expand_load_internal, expand_java_NEW, build_get_class,
6265         build_instanceof, expand_java_CHECKCAST, expand_iinc,
6266         build_java_soft_divmod, build_java_binop, build_field_ref,
6267         expand_compare, expand_java_goto, expand_java_switch,
6268         expand_java_add_case, build_class_init, build_known_method_ref,
6269         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
6270         expand_invoke, build_jni_stub, expand_java_field_op,
6271         java_expand_expr, expand_byte_code, STORE_INTERNAL,
6272         force_evaluation_order, emit_init_test_initialization): Convert
6273         calls to "build" into calls to the prefered "buildN" functions.
6275 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
6277         * java-tree.h (set_block): Remove.
6278         * lang.c (java_clear_binding_stack): New.
6279         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6280         * decl.c (struct binding_level): Remove this_block.
6281         (clear_binding_level): Likewise.
6282         (poplevel): Don't handle this_block.
6283         (set_block): Remove.
6285 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
6287         * class.c (common_enclosing_context_p): Remove statement with no
6288         side-effects.
6290 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
6292         PR java/8618
6293         * parse.y (create_anonymous_class): Remove 'location' argument. Use
6294         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6295         (craft_constructor): Inherit access flags for implicit constructor
6296         from the enclosing class.
6297         (create_class): Fix comment typo.
6298         (resolve_qualified_expression_name): Pass type of qualifier to
6299         not_accessible_p, not the type in which target field was found.
6300         (not_accessible_p): Handle inner classes. Expand protected
6301         qualifier-subtype check to enclosing instances, but don't apply this
6302         check to static members. Allow protected access to inner classes
6303         of a subtype. Allow private access within common enclosing context.
6304         (build_super_invocation): Get WFL line number info from current
6305         class decl.
6306         (build_incomplete_class_ref): Update for new create_anonymous_class
6307         signature.
6308         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6309         common_enclosing_instance_p.
6310         * class.c (common_enclosing_context_p): New. Determine if types
6311         share a common enclosing context, even across static contexts.
6312         (common_enclosing_instance_p): Renamed from
6313         common_enclosing_context_p. Determines if types share a common
6314         non-static enclosing instance.
6315         * java-tree.h (common_enclosing_instance_p): Declare.
6316         * jcf-write.c (get_method_access_flags): New. Surpress private flag
6317         for inner class constructors.
6318         (generate_classfile): Use get_method_access_flags.
6320 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
6322         * class.c (interface_of_p): Check for null TYPE_BINFO.
6324 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
6326         * class.c (make_class): Do not create binfo here.
6327         (set_super_info): Create it here.
6328         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6330 2004-07-08  Richard Henderson  <rth@redhat.com>
6332         * expr.c (case_identity, get_primitive_array_vtable,
6333         java_expand_expr, emit_init_test_initialization): Remove.
6334         * java-tree.h (java_expand_expr): Remove.
6335         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6337 2004-07-07  Per Bothner  <per@bothner.com>
6339         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
6340         get internal error due to mismatched types.
6342         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
6344         * gcj.texi (Linking):   New node.  Document -lgij usage.
6346 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
6348         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6349         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6350         * java/class.c (set_super_info, class_depth, interface_of_p,
6351         maybe_add_interface, add_interface, make_class_data,
6352         layout_class, add_miranda_methods): Adjust BINFO macros.
6353         * expr.c (can_widen_reference_to, lookup_field): Likewise.
6354         * jcf-write.c (generate_classfile): Likewise.
6355         * parse.y (patch_anonymous_class,
6356         check_inner_circular_reference, check_circular_reference,
6357         java_complete_class, check_abstract_method_definitions,
6358         java_check_abstract_method_definitions,
6359         check_interface_throws_clauses, java_check_abstract_methods,
6360         lookup_java_interface_method2,
6361         find_applicable_accessible_methods_list): Likewise.
6362         * typeck.c (find_method_in_interface): Likewise.
6363         * verify.c (merge_types): Likewise.
6365 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
6367         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6368         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6370 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
6372         * class.c (make_class): Use make_tree_binfo.
6373         (set_super_info, add_interface_do): Likewise.
6374         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6376 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
6378         * verify.c: Correct array element access formatting thinko.
6380 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
6382         * verify.c: Insert a short blurb at the start referring to the JVMS.
6383         (merge_type_state): Remove redundant nested if statement.
6384         (verify_jvm_instructions): Ensure current_subr is initialised to
6385         NULL_TREE.
6386         Minor formatting fixes all over the place.
6388 2004-07-02  Richard Henderson  <rth@redhat.com>
6390         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6392 2004-07-01  Richard Henderson  <rth@redhat.com>
6394         * class.c (registerClass_libfunc): Remove.
6395         (init_class_processing): Don't set it.
6396         (emit_register_classes): Take list_p parameter.  Fill it in
6397         with _Jv_RegisterClass calls.
6398         * decl.c (java_init_decl_processing): Don't call
6399         init_resource_processing.
6400         * jcf-parse.c (java_emit_static_constructor): New.
6401         (java_parse_file): Call it.
6402         * resource.c (registerResource_libfunc): Remove.
6403         (init_resource_processing): Remove.
6404         (write_resource_constructor): Take list_p parameter.  Fill it in
6405         with _Jv_RegisterResource calls.
6406         * java-tree.h: Update prototypes.
6408 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
6410         PR java/1262
6411         * class.c (layout_class_method): Do not override package-private
6412         method if its in a different package.
6413         (split_qualified_name): Move here from parse.y. Rename from
6414         breakdown_qualified. Add comment.
6415         (in_same_package): Move here from parse.y. Add comment.
6416         * java-tree.h (break_down_qualified, in_same_package): Declare.
6417         (in_same_package): Likewise.
6418         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6419         Callers updated.
6421 2004-06-29  Andrew Haley  <aph@redhat.com>
6423         * except.c (expand_start_java_handler): Push a new binding level.
6424         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
6425         register_exception_range() to register where we'll do it.
6426         (expand_end_java_handler): Remove old bogus code.  Replace with
6427         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6428         the top of the expression we're curently building.
6429         (maybe_end_try): Delete.
6430         * decl.c (binding_level.exception_range): New field.
6431         (clear_binding_level): Add field exception_range.  Reformat.
6432         (poplevel): Call expand_end_java_handler().
6433         (poplevel): Call java_add_stmt only if functionbody is false.
6434         (maybe_poplevels): Don't call maybe_end_try() from here.
6435         (end_java_method): Clear no longer used trees in function decl.
6436         (register_exception_range): New function.
6437         * java-tree.h (register_exception_range, struct eh_range): Declare.
6439 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
6441         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6443 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
6445         Formatting fixes.
6446         * expr.c (class_has_finalize_method): Fix method name indentation.
6447         (expand_java_call): Remove K&R style parameter declaration.
6448         (expand_invoke): Fix statement indentation.
6449         (expand_java_field_op): Likewise.
6450         * parse-scan.y: Fix typo.
6451         (reset_report): Fix method name indentation.
6452         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6453         line. Fix typos.
6454         * verify.c (verify_jvm_instructions): Document parameters, insert
6455         page break.
6456         * lang.c (lang_init_source): Fix method name indentation.
6457         * class.c (common_enclosing_context_p): Likewise.
6458         (emit_symbol_table): Fix parameter list indentation.
6459         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6460         parameter declaration.
6461         * constants.c: Fix copyright notice indentation.
6462         * typeck.c (find_method_in_superclasses): Fix parameter list
6463         indentation.
6464         (find_method_in_interfaces): Likewise.
6465         * zextract.c (makelong): Fix method name indentation.
6467 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6469         PR java/15715.
6470         * parse.y (create_interface): Set correct access modifiers for
6471         interfaces.
6472         * jcf-write.c (get_classfile_modifiers): New function.
6473         (generate_classfile): Use get_classfile_modifiers, not
6474         get_access_flags.
6476 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6478         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6479         dependency to current parser context, not NULL_TREE, for top-level
6480         classes.
6481         (jdep_resolve_class): Enable member access check for all inner
6482         class dependencies.
6484 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6486         * parse.y (qualify_and_find): Pass type decl, not identifier, to
6487         load_class.
6489 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6491         PR java/15734
6492         * expr.c (expand_java_field_op): Ensure that target class for static
6493         field access has been loaded.
6495 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6496             Ranjit Mathew  <rmathew@hotmail.com>
6498         PR java/1207, java/16178
6499         * jcf-parse.c (load_class): Return immediately if passed a type decl
6500         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6501         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6502         before calling load_class.
6503         (qualify_and_find): Likewise.
6504         (find_in_imports_on_demand): Likewise.
6505         (find_applicable_accessible_methods_list): Likewise.
6507 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
6509         * parse.y (java_layout_seen_class_methods): Don't call load_class
6510         on class defined by source parser.
6512 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
6514         * parse.y (set_nested_class_simple_name_value): Removed.
6515         (java_complete_expand_class): Remove calls to
6516         set_nested_class_simple_name_value.
6518 2004-06-22  Andrew Haley  <aph@redhat.com>
6519             Ranjit Mathew  <rmathew@hotmail.com>
6521         Fixes PR java/16113.
6522         * decl.c (force_poplevels): Remove call to expand_end_bindings.
6524 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
6526         * parse.y (create_class): Correct diagnostic message about
6527         java.lang.Object extending anything else.
6529 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6531         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6532         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6533         * constants.c (build_ref_from_constant_pool): Likewise.
6534         * expr.c (build_java_array_length_access): Likewise.
6535         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6536         (invoke_build_dtable, build_invokevirtual): Likewise.
6537         (build_invokeinterface, java_expand_expr): Likewise.
6538         (emit_init_test_initialization): Likewise.
6539         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6540         * parse.y (make_qualifed_name, build_array_ref): Likewise.
6542 2004-06-21  Andrew Haley  <aph@redhat.com>
6544         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6545         block.
6547 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
6549         * jcf.h (struct JCF): Change java_source, right_zip and finished
6550         to unsigned int.
6551         * lex.h (struct java_lexer): Change hit_eof, read_anything,
6552         byte_swap and use_fallback to unsigned int.
6553         * parse.h (struct _jdep): Change flag0 to unsigned int.
6555 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
6557         Fixes PR java/13948
6558         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6559         before trying to lay out its methods.
6560         * jcf-parse.c (read_class): Track parsed files using canonical paths
6561         obtained via lrealpath from libiberty.
6562         (java_parse_file): Likewise.
6563         (parse_source_file_1): Rename formal parameter to reflect its
6564         modified purpose. Minor formatting fix.
6566 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6568         * class.c (emit_register_classes): Make the function uninlinable,
6569         do not set current_function_cannot_inline.
6570         * resource.c (write_resource_constructor): Do not reset
6571         flag_inline_functions around rest_of_compilation.
6573 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
6575         PR java/15769
6576         * expr.c (java_truthvalue_conversion): Handle
6577         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6578         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6579         i.e. return the expression.
6581 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
6583         * gjavah.c: Include version.h
6585 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
6587         * jcf-write.c (generate_bytecode_conditional): Correct handling
6588         of unordered conditionals. Add comment.
6590 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
6591             Per Bothner  <per@bothner.com>
6593         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6594         local variable was initialised upon declaration.
6595         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6596         variable was final and initialised upon declaration.
6597         * check-init.c (check_final_reassigned): Give error only if a blank
6598         final is not definitely unassigned or if an initialised final is
6599         reassigned.
6600         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6601         assignment expressions. Remove case MODIFY_EXPR, label do_default.
6602         (check_init): Perform initialised-variable-removing-optimisation
6603         only on non-final local variables.
6605 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6607         * jcf-write.c (generate_bytecode_conditional): Handle binops
6608         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6609         and LTGT_EXPR.
6610         (generate_bytecode_insns): Likewise.
6612 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6614         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6615         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6617 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6619         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6620         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6622 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6624         * decl.c (struct binding_level): Add GTY marker. Compile
6625         binding_depth unconditionally.
6626         (current_binding_level, free_binding_level, global_binding_level):
6627         Likewise.
6628         (clear_binding_level): Unconditionally set binding_depth.
6629         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6631 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6633         * lex.c (java_new_lexer): Set 'encoding'.
6634         (java_read_char): Improve error message for unrecognized characters.
6635         * lex.h (struct java_lexer): New field 'encoding'.
6637 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6639         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6641 2004-05-21  Mark Wielaard  <mark@klomp.org>
6643         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6644         extern.
6646 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
6648         * typeck.c: Remove non-printable character 160.
6650 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
6652         * check-init.c: Correct minor typos.
6654 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6656         * Make-lang.in, expr.c, java-gimplify.c: Rename
6657         tree-simple.[ch] to tree-gimple.[ch].
6659 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
6661         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6663 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6665         Merge from tree-ssa-20020619-branch.  See
6666         ChangeLog.tree-ssa for details.
6668         * Make-lang.in, builtins.c, check-init.c, class.c,
6669         constants.c, decl.c, except.c, expr.c, java-except.h,
6670         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6671         lang.c, lang.opt, parse.y, resource.c: Merged.
6672         * java-gimplify.c: New file.
6674 2004-05-10  Andrew Haley  <aph@redhat.com>
6676         * parse.y (create_class): Set TYPE_VFIELD.
6677         * decl.c (java_init_decl_processing): Likewise.
6679         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6680         * class.c (make_method_value): Replace DECL_VINDEX with call to
6681         get_method_index().
6682         (get_dispatch_vector): Likewise.
6683         (layout_class_method): Likewise.
6684         Replace set of DECL_VINDEX with call to set_method_index().
6685         (set_method_index): New function.
6686         (get_method_index): New function.
6687         * java-tree.h (set_method_index): New function decl.
6688         (get_method_index): New function decl.
6690 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
6692         * parse.y (check_pkg_class_access): Add new argument
6693         and use it when cl is NULL to call lookup_cl on it.
6694         (parser_check_super_interface): Do not call lookup_cl.
6695         Pass this_decl to check_pkg_class_access and NULL
6696         instead of lookup_cl.
6697         (parser_check_super): Update for change in
6698         check_pkg_class_access.
6699         (do_resolve_class): Likewise.
6700         (process_imports): Likewise.
6701         (find_in_imports_on_demand): Likewise.
6702         (resolve_qualified_expression_name): Likewise.
6704 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
6706         Fixes PR java/9685, PR java/15073
6707         * parse.y (accessibility_string): New method.
6708         (not_accessible_field_error): Use accessibility_string()
6709         instead of java_accstring_lookup().
6710         (resolve_qualified_expression_name): Check with
6711         check_pkg_class_access() before allowing access using
6712         qualified names.
6713         Fix comment typo.
6714         Use check_pkg_class_access() instead of not_accessible_p()
6715         for unqualified types.
6716         (not_accessible_p): Use DECL_CONTEXT (member) instead of
6717         REFERENCE for package-private access checking.
6718         (patch_method_invocation): Use accessibility_string() instead
6719         of java_accstring_lookup().
6721 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
6723         Fixes PR java/15133
6724         * gjavah.c (struct method_name): Add member is_native.
6725         (overloaded_jni_method_exists_p): Match candidate method only if
6726         it is native.
6727         (print_method_info): Initialise is_native flag from the method's
6728         access flags.
6730 2004-04-30  Roger Sayle  <roger@eyesopen.com>
6732         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6733         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6735 2004-04-22  Roger Sayle  <roger@eyesopen.com>
6737         * resource.c (write_resource_constructor): Guard call to possibly
6738         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6740 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
6742         * class.c (make_class_data): Add new field aux_info.
6743         * decl.c (java_init_decl_processing): Push type and decl for
6744         `aux_info'.
6746 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6748         * expr.c (expand_java_NEW): Don't use size argument for
6749         _Jv_AllocObject calls.
6750         * parse.y (patch_invoke): Likewise.
6752 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6754         * expr.c (build_invokeinterface): Remove unused variables to
6755         fix warnings.
6757 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6759         * class.c (get_interface_method_index): New function. Return dispatch
6760         index for interface method.
6761         (make_method_value): For interface methods, set index field to
6762         iface dispatch index, not DECL_VINDEX.
6763         * expr.c (build_invokeinterface): Use get_interface_method_index.
6765 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6767         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6769 2004-03-31  Andrew Haley  <aph@redhat.com>
6771         PR java/14104
6772         * jcf-io.c (opendir_in_zip): Tidy up error handling.
6774 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6776         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6777         form of GTY markers.
6779 2004-03-25  Marcus Meissner  <meissner@suse.de>
6781         PR java/14689:
6782         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6784 2004-03-23  Tom Tromey  <tromey@redhat.com>
6786         PR java/14315:
6787         * jcf-write.c (make_class_file_name): Don't report if mkdir
6788         failed with EEXIST.
6790 2004-03-23  Tom Tromey  <tromey@redhat.com>
6792         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6794 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
6796         * class.c, gjavah.c, lang.c: Fix comment typos.
6797         * gcj.texi: Fix typos.
6799 2004-03-19  Per Bothner  <per@bothner.com>
6801         * gcj.texi (Code Generation):  Document new flags and assert defaults.
6803         * class.c (assume_compiled_node_struct):  Rename type to
6804         class_flag_node_struct, as it is now also used for enable_assertions.
6805         Rename assume_compiled_node typedef.  Rename excludep field to value.
6806         (find_assume_compiled_node):  Rename function to find_class_flag_node.
6807         Minor optimization - avoid needless strlen.
6808         (add_assume_compiled):  Some tweaking and optimization.
6809         Rename and generalize to add_class_flag takem an extra parameter.
6810         (add_assume_compled):  New just calls add_class_flag.
6811         (add_enable_assert, enable_assertions):  New functions.
6812         (enable_assert_tree):  New static.
6813         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6814         * lang.opt (fenable-assertions, fenable-assertions=,
6815         fdisable-assertions, fdisable-assertions=):  New options.
6816         * lang.c (java_handle_option):  Handle new options.
6817         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
6818         class in an interface - create helper class nested in outer interface.
6819         (build_assertion):  Short-circuit if enable_assertions is false.
6821 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6823         * java-tree.h: Changes throughout to add checking to macros
6824         and numerous whitespace changes.
6825         (VAR_OR_FIELD_CHECK): New macro.
6826         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6827         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6829 2004-03-16  Per Bothner  <per@bothner.com>
6831         * jcf-jump.c (options):  New --print-constants option.
6832         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
6834         * jcf-dump.c (flag_print_constant_pool):  Default to off.
6835         (print_constant_terse_with_index):  New helper function.
6836         (various places):  Check flag_print_constant_pool where missing.
6837         (main):  If verbose set flag_print_constant_pool.
6838         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
6840 2004-03-15  Andrew Haley  <aph@redhat.com>
6842         PR java/14581
6843         * parse.y (java_complete_lhs): Check that final variable has an
6844         initializer.
6846 2004-03-12  Andrew Haley  <aph@redhat.com>
6848         PR java/14551
6849         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6850         conversion.
6852 2004-02-29  Roger Sayle  <roger@eyesopen.com>
6854         * jcf-parse.c (java_parse_file): Handle the case that input_filename
6855         is NULL.
6857 2004-02-27  Per Bothner  <per@bothner.com>
6859         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
6860         suggestion:  Use build_incomplete_class_ref.
6861         This fixes PR java/13508, java/11714.
6863 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
6865         * java/parse.h: Update copyright.
6867 2004-02-26  Andrew Haley  <aph@redhat.com>
6869         PR java/14231:
6870         * parse.y (check_interface_throws_clauses): Check for
6871         !METHOD_INVISIBLE (iface_method).
6872         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6873         well as CLASS_ABSTRACT.
6875 2004-02-25  Per Bothner  <per@bothner.com>
6877         * parse.y (build_assertion):  If we're in an inner class, create the
6878         class$ helper routine in the outer class.
6880 2004-02-19  Richard Henderson  <rth@redhat.com>
6882         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6884 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
6886         * Make-lang.in (java.install-man): Add extra dependencies.
6888 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
6890         * Make-lang.in: Install man pages under the same names
6891         (possibly transformed) as the program they document.
6893 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
6895         * gjavah.c: Include "intl.h".
6896         (error): New function.
6897         (main): Call gcc_init_libintl.
6898         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6899         print_stub_or_jni, process_file, main): Use error rather than
6900         fprintf.
6901         (print_method_info, usage, help, version, main): Mark strings for
6902         translation with _.  Avoid splitting up sentences.  Send
6903         information messages to stdout.
6904         * jcf-dump.c: Include "intl.h".
6905         (main): Call gcc_init_libintl.
6906         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6907         Mark error, usage and version messages for translation with _.
6908         Avoid splitting up sentences.
6909         * jv-scan.c: Include "intl.h".
6910         (fatal_error, warning): Change parameter s to msgid.  Translate
6911         messages.
6912         (main): Call gcc_init_libintl.
6913         (usage, help, version): Mark error, usage and version messages for
6914         translation with _.  Avoid splitting up sentences.
6915         * jvgenmain.c: Include "intl.h".
6916         (main): Call gcc_init_libintl.
6917         (usage, main): Mark error messages for translation with _.
6918         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6919         JVGENMAIN_OBJS): Add intl.o.
6920         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6921         java/jvgenmain.o): Update dependencies.
6923 2004-02-08  Per Bothner  <per@bothner.com>
6925         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
6926         class don't use not_accessible_field_error, which can get confused.
6928 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6930         Make-lang.in (po-generated):  Delete.
6932 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6934         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6935         Depend on target.h.
6936         * decl.c: Include target.h.
6937         (start_java_method): Replace PROMOTE_PROTOTYPES with
6938         targetm.calls.promote_prototypes.
6939         * expr.c: Include target.h.
6940         (pop_arguments): Replace PROMOTE_PROTOTYPES with
6941         targetm.calls.promote_prototypes.
6942         * parse.y: Include target.h.
6943         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6944         with targetm.calls.promote_prototypes.
6946 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6948         * typeck.c: Update copyright.
6950 2004-02-02  Tom Tromey  <tromey@redhat.com>
6952         * decl.c (java_init_decl_processing): Remove duplicate
6953         gnu/gcj/RawData.
6955 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
6957         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6959 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
6961         * expr.c (build_field_ref): Move variable
6962         definition up.
6964 2004-01-28  Andrew Haley  <aph@redhat.com>
6966         * expr.c (build_field_ref): Widen field offset.
6968 2004-01-27  Andrew Haley  <aph@redhat.com>
6970         java/13273
6971         * parse.y (check_interface_throws_clauses): Make sure class_decl
6972         has been loaded.
6974 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
6976         PR java/13733
6977         * parse.y (patch_assignment): Don't modify lhs_type for
6978         reference assignments.
6980 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6982         * Make-lang.in: Replace $(docdir) with doc.
6983         (java.info, java.srcinfo, java.man, java.srcman): New rules.
6984         (java.install-man): Revamp rule.
6986 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6988         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6989         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6990         instead of deferred backquote.
6992 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
6994         * typeck.c (find_method_in_interfaces): Move variable
6995         definition up.
6997 2004-01-16  Andrew Haley  <aph@redhat.com>
6999         PR java/13273:
7000         * typeck.c (shallow_find_method): New.
7001         (find_method_in_superclasses): New.
7002         (find_method_in_interfaces): New.
7003         (lookup_do): Rewrite.
7004         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
7006         * jcf-parse.c (read_class): Save and restore output_class.
7007         * decl.c (java_expand_body): Set output_class from fndecl.
7009 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
7011         * class.c (gen_indirect_dispatch_tables): Fix string length
7012         calculations.
7014 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
7016         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
7017         (java.srcextra): Copy above back to source directory if requested.
7018         (po-generated): Delete reference to $(parsedir).
7019         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
7020         Use implicit rule.
7022 2004-01-14  Jan Hubicka  <jh@suse.cz>
7024         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
7025         estimation.
7027 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
7029         * java-tree.h (java_expand_expr): Change prototype.
7030         * expr.c (java_expand_expr): Add alt_rtl parameter.
7032 2004-01-09  Andrew Haley  <aph@redhat.com>
7034         PR java/12755:
7035         * parse.y (java_fix_constructors):  Set output_class.
7036         (java_reorder_fields): Likewise.
7037         (java_layout_classes): Likewise.
7038         (java_expand_classes): Generate indirect dispatch tables.
7039         (java_expand_classes): Set output_class.
7040         (java_finish_classes): Likewise.
7041         * lang.c (java_init): Turn on always_initialize_class_p if we're
7042         using indirect dis[atch.
7043         (java_decl_ok_for_sibcall): Use output_class, not current_class.
7044         (java_get_callee_fndecl): Use class local atable.
7045         * jcf-parse.c
7046         (always_initialize_class_p): Decl moved to java-tree.h.
7047         (HANDLE_CLASS_INFO): Set output_class.
7048         (read_class): Likewise.
7049         (parse_class_file): Call gen_indirect_dispatch_tables.
7050         (parse_zip_file_entries): Set output_class.
7051         (java_parse_file): Set output_class.  Don't emit symbol tables.
7052         * java-tree.h (output_class): New.
7053         Remove global declarations for otable, atable, and ctable.
7054         (always_initialize_class_p): moved here from decl.c.
7055         (DECL_OWNER): New.
7056         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
7057         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
7058         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
7059         (struct lang_type): Add otable_methods, otable_decl,
7060         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
7061         ctable_decl, catch_classes, type_to_runtime_map.
7062         * expr.c (build_field_ref): Make otable, atable, and ctable class
7063         local rather than global.
7064         (build_known_method_ref): Likewise.
7065         (build_invokeinterface): Likewise.
7066         (java_expand_expr): Pass runtime type (rather than actual type) to
7067         expand_start_catch.
7068         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
7069         this class.  Look up each class in that map to delete duplicates.
7070         (expand_end_java_handler): Pass runtime type (rather than actual
7071         type) to expand_start_catch.
7072         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
7073         (do_nothing): New.
7074         (java_init_decl_processing): Rearrange things.  Remove global
7075         declarations of otable, atable, and ctable.
7076         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
7077         (java_expand_body): Set output_class.
7078         * constants.c (build_constant_data_ref): Use output_class, not
7079         current_class.
7080         (alloc_name_constant): Likewise.
7081         * class.c (gen_indirect_dispatch_tables): New.
7082         (build_class_ref): Generate hard reference to superclass, even if
7083         using indirect dispatch.
7084         (build_static_field_ref): Use class local atable.
7085         (make_class_data): Generate hard reference to superclass, even if
7086         using indirect dispatch.
7087         Generate symbolic references to interfaces when using indirect
7088         dispatch.
7089         (make_class_data): Emit otable, atable, and ctable.
7090         Make otable, atable, and ctable class local rather than global.
7091         (emit_catch_table): Make otable, atable, and ctable class local
7092         rather than global.
7094 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
7096         * parse.y (catch_clause_parameter): Fix typo.
7098         PR java/13404
7099         * parse.y: (catch_clause_parameter): Return early if $3, aka
7100         formal_parameter, is null.
7102 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
7104         * class.c: Remove uses of "register" specifier in
7105         declarations of arguments and local variables.
7106         * decl.c: Likewise.
7107         * expr.c: Likewise.
7108         * gjavah.c: Likewise.
7109         * jcf-dump.c: Likewise.
7110         * jcf-io.c: Likewise.
7111         * jcf-parse.c: Likewise.
7112         * jcf-write.c: Likewise.
7113         * keyword.h: Likewise.
7114         * parse.y: Likewise.
7115         * typeck.c: Likewise.
7116         * verify.c: Likewise.
7118 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
7120         * Make-lang.in (GCJ_CROSS_NAME): Delete.
7121         (java.install_common, java.install-man): Adjust for above.
7122         (java.uninstall): Likewise.
7124 2003-12-03  Michael Koch  <konqueror@gmx.de>
7126         * class.c (make_class_data):
7127         Push field value to 'hack_signers' instead of 'signers'.
7128         * decl.c (java_init_decl_processing):
7129         Push field 'hack_signers' instead of 'signers'.
7131 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
7133         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
7134         including iconv.h.
7136 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
7138         PR java/12374:
7139         * parse.y (qualify_ambiguous_name): Remove lots of broken
7140         field access processing - there's no need to do that here,
7141         because we have resolve_field_access.  Remove
7142         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
7143         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
7144         used.
7146 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
7148         Fix PR java/13237
7149         * parse.y (java_complete_lhs): Save location prior to patching
7150         CALL_EXPR.
7152 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
7154         PR java/12548
7155         * resource.c (write_resource_constructor): Append
7156         "_resource" to constructor identifier name.
7158 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
7160         Fix PR java/13183.
7161         * constants.c (cpool_for_class): New function.
7162         (outgoing_cpool): Remove global variable.
7163         (alloc_name_constant): Use cpool_for_class.
7164         (build_constants_constructor): Likewise.
7165         * decl.c (java_expand_body): Set current_class.
7166         * java-tree.h (outgoing_cpool) Remove declaration.
7167         (init_outgoing_cpool): Likewise.
7168         * jcf-parse.c (init_outgoing_cpool): Remove function.
7169         (parse_class_file): Don't call init_outgoing_cpool.
7170         * parse.y (java_complete_expand_methods): Don't call
7171         init_outgoing_cpool.  Don't save outgoing_cpool.
7172         (java_expand_classes): Don't restore outgoing_cpool.
7173         (java_finish_classes): Likewise.
7175 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
7177         * Make-lang.in: (java.install-common) Add
7178         symlink for $(target_noncanonical)-gcjh for
7179         native builds.
7181 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
7183         * Make-lang.in (java.extraclean): Delete.
7185 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
7187         * Make-lang.in (check-java): Add.
7189 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
7191         Fix PR java/13024.
7192         * except.c (prepare_eh_table_type): Allocate variable-sized
7193         buffer `buf' with alloca.
7195 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
7197         Fix PR java/12857.
7199         decl.c (java_init_decl_processing): Don't initialize
7200         class_not_found_type_node, no_class_def_found_type_node.
7202         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
7203         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
7204         (class_not_found_type_node, no_class_def_found_type_node):
7205         Don't define.
7207         parse.y (build_dot_class_method_invocation): Add this_class
7208         argument.  Qualify method invocations to a different class.
7209         (create_new_parser_context): Initialize saved_data_ctx to 0.
7210         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
7211         (build_dot_class_method): Don't load classes.  Register
7212         incomplete types.
7213         (build_incomplete_class_ref): Special cases for interfaces
7214         and inner classes.  Move build_dot_class_method call to here...
7215         (patch_incomplete_class_ref): ...from here.  Pass current_class
7216         to build_dot_class_method_invocation.
7217         (build_assertion): Pass class_type to
7218         build_dot_class_method_invocation.
7219         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
7221 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
7223         Fix PR java/12739.
7224         * java-tree.h (BLOCK_EMPTY_P): Define.
7225         * parse.y (java_complete_lhs): Check for empty blocks
7226         in TRY_FINALLY_EXPR case.
7228 2003-11-17  Andrew Haley  <aph@redhat.com>
7230         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
7231         (struct lang_decl_var:freed): New variable.
7232         * decl.c (poplevel): Mark local vars that have gone out of scope.
7233         (push_jvm_slot): Don't use the RTL of a var that has gone out of
7234         scope.
7236 2003-11-16  Jason Merrill  <jason@redhat.com>
7238         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
7239         and TAGS files that include them for each front end.
7241 2003-11-15  Tom Tromey  <tromey@redhat.com>
7243         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
7245 2003-11-12  Jason Merrill  <jason@redhat.com>
7247         PR optimization/12547
7248         * lang.c (java_tree_inlining_walk_subtrees): Just walk
7249         BLOCK_EXPR_BODY directly.
7251 2003-11-12  Andrew Haley  <aph@redhat.com>
7253         PR java/11045
7254         * parse.y (fold_constant_for_init): Check that we really do have a
7255         constant.
7257         PR java/11533
7258         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
7259         init_test_decls being inlined.
7261         PR java/12890:
7262         * parse.y (do_resolve_class): Check return value from
7263         breakdown_qualified().
7265 2003-11-11  Tom Tromey  <tromey@redhat.com>
7267         PR java/12915:
7268         * parse.y (merge_string_cste): Handle case where we have a
7269         pointer that happens to be zero, not null_pointer_node.
7271 2003-11-10  Tom Tromey  <tromey@redhat.com>
7273         * jcf-parse.c (classify_zip_file): Correctly compare
7274         filename_length against length of manifest file's name.
7276 2003-11-08  Tom Tromey  <tromey@redhat.com>
7278         PR java/12894:
7279         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
7281 2003-11-06  Andrew Haley  <aph@redhat.com>
7283         * expr.c (java_stack_swap): Make sure destination stack slots are
7284         of the correct type.
7286 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
7288         * Make-lang.in (dvi): Move targets to $(docobjdir).
7289         (gcj.dvi): Simplify rule and adjust target.
7290         (gcj.info): Simplify rule.
7291         (gcj.pod): New intermediate rule.
7292         (gcjh.pod): Likewise.
7293         (jv-scan.pod): Likewise.
7294         (jcf-dump.pod): Likewise.
7295         (gij.pod): Likewise.
7296         (jv-convert.pod): Likewise.
7297         (rmic.pod): Likewise.
7298         (rmiregistry.pod): Likewise.
7299         (gcj.1): Delete.
7300         (gcjh.1): Delete.
7301         (jv-scan.1): Delete.
7302         (jcf-dump.1): Delete.
7303         (gij.1): Delete.
7304         (jv-convert.1): Delete.
7305         (rmic.1): Delete.
7306         (rmiregistry.1): Delete.
7308 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
7310         Fixes PR java/12866.
7311         * parse.y (resolve_qualified_expression_name): Move test
7312         for outer field access methods from here...
7313         (check_thrown_exceptions) ...to here.
7315 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
7317         * .cvsignore: Delete.
7319 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
7321         * verify.c (verify_jvm_instructions): Don't warn about legal
7322         eh binding regions generated for example by jdk 1.4.1.
7324 2003-10-24  David S. Miller  <davem@redhat.com>
7326         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7328 2003-10-22  Andrew Haley  <aph@redhat.com>
7330         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7331         (java_get_callee_fndecl): New.
7333         * jcf-parse.c (java_parse_file): Call emit_catch_table().
7335         * java-tree.h (ctable_decl): New.
7336         (catch_classes):  New.
7337         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7339         * decl.c (java_init_decl_processing): Add catch_class_type.
7340         Add ctable_decl.
7341         Add catch_classes field.
7343         * class.c (build_indirect_class_ref): Break out from
7344         build_class_ref.
7345         (make_field_value): Check flag_indirect_dispatch.
7346         (make_class_data): Ditto.
7347         Tidy uses of PUSH_FIELD_VALUE.
7348         Add field catch_classes.
7349         (make_catch_class_record): New.
7351         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7353 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
7355         * jcf-write.c: Follow spelling conventions.
7356         * parse.y: Likewise.
7358 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
7360         * ChangeLog: Fix typos.
7361         * expr.c: Fix comment typos.
7362         * jcf-write.c: Likewise.
7363         * lang.c: Likewise.
7364         * lex.c: Likewise.
7365         * mangle.c: Likewise.
7366         * parse-scan.y: Likewise.
7367         * parse.y: Likewise.
7369 2003-10-22  Tom Tromey  <tromey@redhat.com>
7371         * expr.c (expand_byte_code): Only warn about dead bytecode when
7372         extra_warnings is set.
7374 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
7376         Fix for PR java/12586.
7377         * mangle.c (find_compression_record_match): Don't iterate through
7378         package namespace elements unless they all match compression_table
7379         entries.
7381 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
7383         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7384         (generate-manpages): Likewise.
7385         (java.maintainer-clean): Likewise.
7386         (gcj.info): Likewise.
7387         (gcj.1): Likewise.
7388         (gcjh.1): Likewise.
7389         (jv-scan.1): Likewise.
7390         (jcf-dump.1): Likewise.
7391         (gij.1): Likewise.
7392         (jv-convert.1): Likewise.
7393         (rmic.1): Likewise.
7394         (rmiregistry.1): Likewise.
7395         (java.install-man): Likewise.
7396         (parse-scan.o): Move and define complete compile line.
7397         (parse.o): Likewise.
7398         (jcf-tree-inline.o): Move.
7400 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
7402         * Make-lang.in (info): Update dependencies.
7403         (java.install-info): Remove.
7404         ($(srcdir)/java/gcj.info): Replace with ...
7405         ($(docobjdir)/gcj.info): ... this.
7407 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
7409         * Make-lang.in: Replace uses of $(target_alias) with
7410         $(target_noncanonical).
7412 2003-10-09  Tom Tromey  <tromey@redhat.com>
7414         * decl.c (java_init_decl_processing): Declare signers field.
7415         * class.c (make_class_data): Set signers field.
7417 2003-10-09  Jason Merrill  <jason@redhat.com>
7419         * parse.y (patch_assignment): Use make_node to create a BLOCK.
7420         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7421         POINTER_TYPE.
7423 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
7425         * Make-lang.in (java.info): Replace with ...
7426         (info): ... this.
7427         (java.dvi): Replace with ...
7428         (dvi): ... this.
7429         (java.generated-manpages): Replace with ...
7431 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
7433         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7435 2003-10-01  Andrew Haley  <aph@redhat.com>
7437         * jcf-parse.c (java_parse_file): Write otable and atable.
7438         * java-tree.h (atable_methods): New.
7439         (atable_decl): New.
7440         (atable_syms_decl): New.
7441         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7442         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7443         (symbol_*type): Rename method_symbol* to symbol*type.
7444         (emit_offset_symbol_table): Delete.
7445         (emit_symbol_table): New.
7446         (get_symbol_table_index): New.
7447         (atable_type): New.
7448         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7449         (build_known_method_ref): Likewise.
7450         (get_symbol_table_index): Rename from get_offset_table_index.
7451         Parameterize to allow re-use by differing types of symbol table.
7452         (build_invokevirtual): Pass table to get_offset_table_index.
7453         * decl.c (java_init_decl_processing): Push types and decls for
7454         atable and atable_syyms.
7455         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7456         (make_class_data): Add new fields atable and atable_syms.
7457         (emit_symbol_table): Rename from emit_offset_symbol_table.
7458         Parameterize to allow re-use by different types of symbol table.
7459         (build_symbol_entry): Renamed from build_method_symbols_entry.
7461 2003-09-30  Roger Sayle  <roger@eyesopen.com>
7463         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7464         semantics for SAVE_EXPR, by caching the result in a temporary.
7466 2003-09-28  Richard Henderson  <rth@redhat.com>
7468         * check-init.c (check_init): Save and restore input_location
7469         instead of file and line separately.
7470         * decl.c (java_expand_body): Likewise.
7471         * jcf-write.c (generate_bytecode_insns): Likewise.
7472         * parse.y (safe_layout_class): Likewise.
7473         * jcf-parse.c (read_class, parse_class_file): Likewise.
7474         (java_parse_file): Use %H for warning locator.
7476 2003-09-28  Roger Sayle  <roger@eyesopen.com>
7478         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7479         with void-type branches instead of using a COMPOUND_EXPR.
7481 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
7483         * decl.c (java_optimize_inline, dump_function): Remove.
7484         * java-tree.h (java_optimize_inline): Remove declaration.
7485         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7486         * parse.y (source_end_java_method, java_expand_classes):
7487         Likewise.  Remove dead code.
7489 2003-09-27  Roger Sayle  <roger@eyesopen.com>
7491         * lang.c (java_init_options): Set flag_evaluation_order.
7492         * expr.c (force_evaluation_order): Don't attempt to force
7493         evaluation order of binary operations using save_expr.
7494         * parse.y (java_complete_lhs): No longer need to call
7495         force_evaluation_order when constructing binary operators.
7497 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7498             Bryce McKinlay  <bryce@mckinlay.net.nz>
7500         PR java/1333:
7501         * parse.y (not_accessible_field_error): New function.
7502         (resolve_expression_name): Check field access permissions.
7503         (resolve_qualified_expression_name): Use
7504         not_accessible_field_error.
7505         (resolve_qualified_expression_name): Likewise.
7507 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7509         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7511 2003-09-23  Roger Sayle  <roger@eyesopen.com>
7513         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7514         with equal operands without side-effects.
7516 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
7518         * decl.c (java_init_decl_processing): Don't emit otable decls
7519         if flag_indirect_dispatch is not set.
7521 2003-09-21  Richard Henderson  <rth@redhat.com>
7523         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7524         resource.c: Revert.
7526 2003-09-21  Richard Henderson  <rth@redhat.com>
7528         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7529         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7531 2003-09-20  Richard Henderson  <rth@redhat.com>
7533         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7535 2003-09-18  Roger Sayle  <roger@eyesopen.com>
7537         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7538         * check-init.c (check_init): Likewise.
7540 2003-09-18  Roger Sayle  <roger@eyesopen.com>
7542         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7544 2003-09-16  Andrew Haley  <aph@redhat.com>
7546         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7548 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
7550         Fixes PR java/9577
7551         * mangle.c (find_compression_record_match): Skip
7552         over a "6JArray" (the array template mangled string)
7553         IDENTIFIER_NODE.
7554         (mangle_array_type): Correct minor typo.
7555         (atms): Move definition to the beginning.
7557 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
7559         * class.c (add_miranda_methods): Ensure super-interfaces are laid
7560         out. Fix for PR java/12254.
7562 2003-09-11  Richard Henderson  <rth@redhat.com>
7564         * parse.y (source_end_java_method): Update for new
7565         cgraph_finalize_function argument.
7567 2003-09-09  Richard Henderson  <rth@redhat.com>
7569         * parse.y (source_end_java_method): Update call to
7570         cgraph_finalize_function.
7572 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
7574         * decl.c (java_expand_body): New function.
7575         * expr.c (build_class_init): Set DECL_IGNORED_P.
7576         * java-tree.h (start_complete_expand_method,
7577         java_expand_body): Declare.
7578         * jcf-parse.c (cgraph.h): Include.
7579         (java_parse_file): Handle flag_unit_at_a_time.
7580         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7581         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7582         (java_estimate_num_insns): Use walk_tree_without_duplicates.
7583         (java_start_inlining): New function.
7584         * parse.h (java_finish_classes): Declare.
7585         * parse.y: Include cgraph.h.
7586         (block): Don't special-case empty block production.
7587         (craft_constructor): Set DECL_INLINE.
7588         (source_end_java_method): Handle flag_unit_at_a_time.
7589         Replace inline code with call to java_expand_body.
7590         (start_complete_expand_method): Remove static modifier.
7591         (java_expand_method_bodies): Patch function tree for
7592         class initialization and/or synchronization as needed.
7593         Don't begin RTL expansion yet.
7594         (java_expand_classes): Check flag_unit_at_a_time before
7595         calling finish_class.
7596         (java_finish_classes): New function.
7597         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7598         (patch_assignment): Set DECL_CONTEXT on temporary variable.
7599         (emit_test_initialization): Set DECL_IGNORED_P.
7601 2003-09-03  Roger Sayle  <roger@eyesopen.com>
7603         * builtins.c (enum builtin_type): Delete unused enumeration.
7604         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7606 2003-08-28  Tom Tromey  <tromey@redhat.com>
7608         * gcj.texi (Extensions): Document gcjlib URLs.
7610 2003-08-20  Tom Tromey  <tromey@redhat.com>
7612         * gcj.texi (Extensions): Added xref.
7613         (libgcj Runtime Properties): Document
7614         gnu.gcj.runtime.VMClassLoader.library_control.
7616 2003-08-20  Andrew Haley  <aph@redhat.com>
7618         * except.c (prepare_eh_table_type): Use new encoding for exception
7619         handlers when using -fno-assume-compiled.
7621 2003-08-13  Tom Tromey  <tromey@redhat.com>
7623         * gcj.texi (Invoking gij): Document -X and -?.
7625 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
7627         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7628         GCJH_OBJS, JCFDUMP_OBJS
7629         * win32-host.c: Removed the unnecessary and broken dependency
7630         on jcf.h
7632 2003-08-11  Tom Tromey  <tromey@redhat.com>
7634         * parse.y (java_check_regular_methods): Typo fixes.  Call
7635         check_interface_throws_clauses.  Use
7636         check_concrete_throws_clauses.
7637         (check_interface_throws_clauses): New function.
7638         (check_concrete_throws_clauses): New function.
7639         (hack_is_accessible_p): New function.
7640         (find_most_specific_methods_list): Added FIXME.
7641         * typeck.c (lookup_do): Use `flags' argument to decide what to
7642         do.  Reimplemented.
7643         (lookup_argument_method_generic): New function.
7644         (lookup_argument_method2): Removed.
7645         * jcf.h (ACC_INVISIBLE): New define.
7646         * jcf-write.c (generate_classfile): Skip invisible methods.
7647         * class.c (add_miranda_methods): New function.
7648         (layout_class_methods): Use it.
7649         (get_access_flags_from_decl): Use ACC_INVISIBLE.
7650         * java-tree.h (METHOD_INVISIBLE): New define.
7651         (lang_decl_func) [invisible]: New field.
7652         (lookup_argument_method_generic): Declare.
7653         (SEARCH_INTERFACE): New define.
7654         (SEARCH_SUPER): Likewise.
7655         (SEARCH_ONLY_INTERFACE): Likewise.
7656         (SEARCH_VISIBLE): Likewise.
7657         (lookup_argument_method2): Removed declaration.
7659 2003-08-05  Tom Tromey  <tromey@redhat.com>
7661         Fix for PR java/11600:
7662         * parse.y (java_complete_lhs): See whether we're calling a method
7663         on an array.
7664         (check_thrown_exceptions): Added `is_array_call' argument;
7665         fixed `clone' checking; updated all callers.
7667 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
7669         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7671 2003-08-03  Tom Tromey  <tromey@redhat.com>
7673         * java-tree.h (METHOD_TRANSIENT): Removed.
7674         * decl.c (pushdecl): Removed some dead code.
7675         * class.c (get_access_flags_from_decl): Can't have transient
7676         method.
7677         (add_method_1): Can't have a transient method.
7679 2003-07-28  Andreas Jaeger  <aj@suse.de>
7681         * jvspec.c: Convert to ISO C90 prototypes.
7683 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7685         * decl.c (force_poplevels): Fix warning call.
7687 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7689         * expr.c (expand_java_field_op): Don't use xxx_with_decl
7690         (expand_java_field_op): Likewise.
7691         * class.c (layout_class_method): Likewise
7692         (emit_register_classes): Likewise.
7693         * decl.c (pushdecl): Likewise.
7694         (poplevel): Likewise.
7695         (force_poplevels): Likewise.
7696         (give_name_to_locals): Likewise.
7697         * check-init.c (check_for_initialization): Likewise.
7699 2003-07-24  Jason Merrill  <jason@redhat.com>
7701         * java-tree.h: Move boolean_type_node et al to the back end.
7703 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7705         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7706         casts.
7708 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
7710         * lang.opt: Don't show -MD_ and -MDD_.
7712 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
7714         * lang-options.h: Remove.
7715         * lang.opt: Add help text.
7717 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
7719         * expr.c: Remove the last argument to expand_assignment().
7721 2003-07-09  Jan Hubicka  <jh@suse.cz>
7723         * java-tree.h (DECL_NUM_STMTS): Rename to...
7724         (DECL_ESTIMATED_INSNS): ... this.
7725         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7726         New static functions.
7727         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7728         * parser.y (add_stmt_to_compound): Do not account statements.
7730 2003-07-08  Mark Wielaard  <mark@klomp.org>
7732         * gcj.texi: CNI now expands to Compiled Native Interface.
7734 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7736         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7738 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
7740         * expr.c (expand_byte_code): Adjist emit_line_note call.
7742 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
7744         * lang.c (java_handle_option): Don't handle filenames.
7746 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
7748         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7749         DIR_SEPARATOR.
7750         Use FILENAME_CMP.
7751         * jcf-write.c: Don't default-define DIR_SEPARATOR.
7752         * jcf.h: Delete COMPARE_FILENAMES definition.
7754 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
7756         * lang.c (java_init_options): Update prototype.
7758 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
7760         * decl.c (poplevel): Adjust define_label call.
7762 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
7764         * gjavah.c (flag_jni): Make non-static.
7765         * parse-scan.y (ctxp): Make non-static.
7767         * class.c (build_method_symbols_entry)
7768         * expr.c (get_offset_table_index)
7769         * jcf-parse.c (jcf_parse):
7770         Mark the definition static, matching the forward declaration.
7772 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
7774         * lang.c (java_handle_option): Don't check for missing arguments.
7776 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7778         * class.c (push_class): Use a location_t to save place.
7779         (emit_register_classes): Set input_location. Adjust
7780         expand_function_end call.
7781         * resource.c (write_resource_constructor): Likewise.
7782         * decl.c (end_java_method): Adjust expand_function_end call.
7783         * parse.y (source_end_java_method): Likewise.
7785 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
7787         * lang.c (java_handle_option): Likewise.
7789 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
7791         * lang.c (java_handle_option): Special-casing of optional
7792         joined arguments no longer needed.
7793         * lang.opt: Update switches that take optional argument.
7795 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7797         * lang.opt: Declare Java.
7798         * lang.c (java_init_options): Update.
7800 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7802         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7804 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7806         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7807         * lang.c (java_handle_option): -MD and -MMD have an underscore.
7808         * lang.opt: -MD and -MMD have an underscore.
7810 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7812         * class.c (emit_register_classes): Adjust init_function_start
7813         call.
7814         * decl.c (complete_start_java_method): Likewise.
7815         * resource.c (write_resource_constructor): Likewise.
7817 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7819         * Make-lang.in: Update to use options.c and options.h.
7820         * lang.c: Include options.h not j-options.h.
7821         (java_handle_option): Abort on unrecognized option.
7822         (java_init_options): Request Java switches.
7824 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
7826         * Make-lang.in: Handle mostlyclean.
7828 2003-06-11  Tom Tromey  <tromey@redhat.com>
7830         * lang.c (java_handle_option): Update dependency_tracking for
7831         OPT_MF case.
7833         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7834         empty argument.
7836 2003-06-10  Andrew Haley  <aph@redhat.com>
7838         * resource.c (write_resource_constructor): Use expand_expr to
7839         generate the address of the label attached to a resource.
7840         * Make-lang.in (java/resource.o): Add expr.h
7842 2003-06-10  Andrew Haley  <aph@redhat.com>
7844         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7845         (java_decl_ok_for_sibcall): New.
7847 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
7849         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7850         (java/j-options.c, java/j-options.h): New.
7851         * java-tree.h (resource_name, compile_resource_file,
7852         compile_resource_data): Constify.
7853         * jcf-write.c (jcf_write_base_directory): Similarly.
7854         * jcf.h (jcf_write_base_directory): Similarly.
7855         * lang.c: Include j-options.h.
7856         (cl_options_count, cl_options, string_option, java_decode_option,
7857         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7858         process_option_with_no): Remove.
7859         (resource_name): Constify.
7860         (LANG_HOOKS_HANDLE_OPTION): Override.
7861         (java_handle_option): New.
7862         (java_init): Don't call jcf_path_init.
7863         (java_init_options): Call jcf_path_init.
7864         * lang.opt: New.
7865         * resource.c (compile_resource_data, compile_resource_file): Constify.
7867 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
7869         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7870         (struct lang_decl_func): Add last_line field.
7871         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7872         DECL_SOURCE_LINE_LAST): Remove.
7873         * parse.y (missing_return_error, finish_method_declaration,
7874         lookup_cl, start_artificial_method_body, source_end_java_method,
7875         start_complete_expand_method): Adjust.
7877 2003-06-08  Tom Tromey  <tromey@redhat.com>
7879         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7880         fno-assume-compiled.
7882 2003-06-08  Roger Sayle  <roger@eyesopen.com>
7884         * builtins.c (define_builtin_type, builtin_types): Delete.
7885         (define_builtin): Rewritten to take just the built-in code,
7886         the function's name, type and fallback library function name.
7887         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7888         (initialize_builtins): Overhaul to define the GCC builtins
7889         used by gcj manually, providing the Java run-time's
7890         implementations as the fallback library function.
7892 2003-06-08  Anthony Green  <green@redhat.com>
7894         * parse.y (patch_cast): Fix conversions from floating-point to
7895         integral types.
7897 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
7899         * Make-lang.in: Update.
7900         * lang.c: Include opts.h. Define cl_options_count and cl_options.
7902 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
7904         * lang.c (java_init_options): Update.
7906 2003-06-05  Jan Hubicka  <jh@suse.cz>
7908         * Make-lang.in:  Add support for stageprofile and stagefeedback
7910 2003-05-31  Roger Sayle  <roger@eyesopen.com>
7912         * lang.c (java_init_options): Prescribe wrap-around two's
7913         complement arithmetic overflow by setting flag_wrapv.
7915 2003-05-29  Roger Sayle  <roger@eyesopen.com>
7917         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7918         (builtin_record): Add an additional builtin_code field to
7919         record which GCC built-in corresponds to the Java function.
7920         (java_builtins):  Add new entries for atan, atan2, exp, log,
7921         pow and tan.
7922         (max_builtin, min_builtin, abs_builtin): Perform constant
7923         folding on the resulting tree.
7924         (java_build_function_call_expr): Likewise, perform constant
7925         folding on the resulting tree.
7926         (initialize_builtins): The NULL creators are now allowed in
7927         the java_builtins table, which is now terminated by an entry
7928         with builtin_code == END_BUILTINS.
7929         (check_for_builtin): Likewise.  If the matching creator is
7930         NULL, construct the call using java_build_function_call_expr
7931         directly with the decl for the corresponding builtin_code.
7933 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
7935         * win32-host.c: Normalize copyright boilerplate.
7937 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7939         * parse.y (print_int_node): Use string concatentation on
7940         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7941         function calls into one.
7943 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
7945         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7946         fatal_io_error with calls to fatal_error; add ": %m" to the end of
7947         all the affected error messages.
7949 2003-05-13  Richard Henderson  <rth@redhat.com>
7951         * class.c (layout_class_method): Set DECL_EXTERNAL.
7952         * decl.c (java_mark_decl_local, java_mark_class_local): New.
7953         * java-tree.h (java_mark_class_local): Declare.
7954         * jcf-parse.c (parse_class_file): Use it.
7955         * parse.y (java_expand_classes): Likewise.
7957 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
7959         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7960         * lex.h: #include input.h.
7961         * jv-scan.c (input_filename): Remove.
7963 2003-05-02  Tom Tromey  <tromey@redhat.com>
7965         PR java/10491:
7966         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7967         (handle_inner_classes): New function.
7969 2003-05-01  Tom Tromey  <tromey@redhat.com>
7971         PR java/10459:
7972         * parse.y (finish_for_loop): Do nothing if update expression is a
7973         EXPR_WFL_NODE wrapping nothing.
7974         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7976 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
7978         * lex.h (input_lineno): Remove declaration.
7979         * parse-scan.y: #include input.h.
7980         (input_filename): Remove declaration.
7981         (input_location): Add definition.
7982         (input_line): Remove definition.
7984 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7986         * lex.h (lineno): Rename to ...
7987         (input_line): ... here
7988         * parse-scan.y (lineno): Rename to ...
7989         (input_line): ... here.
7990         (reset_report): Rename lineno to input_line.
7991         * check-init.c (check_init): Likewise.
7992         * class.c (push_class): Likewise.
7993         * decl.c (complete_start_java_method, end_java_method): Likewise.
7994         * expr.c (expand_byte_code): Likewise.
7995         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7996         * jcf-write.c (generate_bytecode_insns): Likewise.
7997         * lex.c (java_init_lex, java_allocate_new_line,
7998         do_java_lex): Likewise.
7999         * parse.h (YYNOT_TWICE): Likewise.
8000         * parse.y (empty_statement, expression_statement,
8001         java_pop_parser_context, java_parser_context_save_global,
8002         yyerror, register_fields, method_header, safe_layout_class,
8003         find_in_imports_on_demand, create_artificial_method,
8004         source_end_java_method, start_complete_expand_method,
8005         build_thisn_assign, java_complete_lhs,
8006         maybe_absorb_scoping_block): Likewise.
8008 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
8010         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
8011         '/' when computing java source filename
8013 2003-04-13  Tom Tromey  <tromey@redhat.com>
8015         * gjavah.c (print_c_decl): Indentation fix.
8017 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
8019         * class.c (make_field_value, make_method_value, get_dispatch_table)
8020         (make_class_data, emit_offset_symbol_table)
8021         * constants.c (build_constants_constructor)
8022         * java-tree.h (START_RECORD_CONSTRUCTOR)
8023         * parse.y (maybe_build_array_element_wfl):
8024         Use build_constructor.
8026 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
8028         PR java/10253:
8029         * parse.y (string_convert_int_cst): Always use at least one digit
8030         in string conversion. Remove ASCII dependence.
8031         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
8033 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
8035         * Make-lang.in: added win32-host.c
8036         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
8037         resolves to open() on non-Win32 platforms and
8038         Win32-specific jcf_open_exact_case() on Win32
8039         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
8040         when trying .java and .class files
8041         * win32-host.c: added to repository. Defines
8042         Win32-specific jcf_open_exact_case()
8044 2003-04-10  Andrew Haley  <aph@redhat.com>
8046         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
8047         (maybe_free_localvar): Renamed from localvar_free.
8048         Add new arg, really.
8049         (generate_bytecode_insns): Set new variable, jsrs.
8050         Only free local vars if no jsr insns have been emittted.
8051         Call maybe_free_localvar, not localvar_free.
8053 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
8055         * gcj.texi: Remove @ at start of file.
8057 2003-03-25  Tom Tromey  <tromey@redhat.com>
8059         * parse.y (create_interface): Call CHECK_DEPRECATED.
8061 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
8063         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
8065 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
8067         * javaop.h (jfloat, jdouble): Make them structures mirroring
8068         the bit fields of IEEE float and double respectively.
8069         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
8070         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
8071         (union Word, union DWord): Delete.
8072         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
8074         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
8075         D_NAN_MASK): Delete.
8076         (jni_print_float, jni_print_double): New.  Generate
8077         hexadecimal floating constants.
8078         (print_field_info): Use jni_print_float/double.
8080         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
8081         finite floating point numbers for output; special case
8082         non-finite floats.
8084 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
8086         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
8087         Replace 0 and 1 with true and false in return statements.
8089 2003-03-19  Tom Tromey  <tromey@redhat.com>
8091         * lex.c (do_java_lex): Renamed from java_lex.
8092         (java_lex): New function.
8093         Include timevar.h.
8095 2003-03-13  Tom Tromey  <tromey@redhat.com>
8097         * parse.y (resolve_inner_class): Error if qualifier is a primitive
8098         type.
8100 2003-03-04  Andrew Haley  <aph@redhat.com>
8102         * gjavah.c (is_first_data_member): New global variable.
8103         (print_c_decl): If it's the first data member, align it as the
8104         superclass.
8105         (process_file): Set is_first_data_member.
8107 2003-03-11  Tom Tromey  <tromey@redhat.com>
8109         * parse.y (resolve_field_access): Initialize class if field is
8110         found in another static field.
8111         * expr.c (build_class_init): Don't optimize out initialization of
8112         implemented interface.
8114 2003-03-11  Andrew Haley  <aph@redhat.com>
8116         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
8117         warning.
8119 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
8121         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
8122         and DIR_SEPARATOR_2 for a target.
8123         Correct minor typos.
8125         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
8126         and DIR_SEPARATOR_2 for a target into account.
8128 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
8130         * lang.c (java_init): Update prototype, move code to java_post_options.
8131         (java_post_options): Similarly.
8133 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
8135         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
8136         compare file name components depending on the case-sensitivity
8137         or otherwise of the host file system.
8139         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
8140         "strcmp" to compare file name components.
8141         Use IS_DIR_SEPARATOR instead of comparing directly against
8142         DIR_SEPARATOR.
8143         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
8144         comparing directly against DIR_SEPARATOR.
8146 2003-03-04  Tom Tromey  <tromey@redhat.com>
8148         * Make-lang.in (java.tags): New target.
8150 2003-03-01  Roger Sayle  <roger@eyesopen.com>
8152         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
8153         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
8155 2003-03-01  Tom Tromey  <tromey@redhat.com>
8157         * parse.y (jdep_resolve_class): Only check deprecation if we found
8158         a decl.
8160 2003-02-28  Tom Tromey  <tromey@redhat.com>
8162         PR java/9695:
8163         * class.c (maybe_layout_super_class): Always pass a WFL to
8164         do_resolve_class.
8165         * parse.y (do_resolve_class): Updated comment to explain
8166         parameters.
8168 2003-02-26  Tom Tromey  <tromey@redhat.com>
8170         * jcf-write.c (generate_classfile): Check whether class is
8171         deprecated before writing attribute count.
8173 2003-02-25  Roger Sayle  <roger@eyesopen.com>
8175         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
8176         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
8178 2003-02-23  Tom Tromey  <tromey@redhat.com>
8180         * lang-options.h: Added -Wdeprecated.
8181         * gcj.texi (Warnings): Document -Wdeprecated.
8182         * java-tree.h (flag_deprecated): Declare.
8183         * lang.c (lang_W_options): Added deprecated.
8184         (flag_deprecated): New global.
8185         * chartables.h: Rebuilt.
8186         * gen-table.pl (process_one): Look at whitespace.
8187         (print_tables): Define LETTER_SPACE, LETTER_MASK.
8188         * parse.h (CLEAR_DEPRECATED): New macro.
8189         (CHECK_DEPRECATED_NO_RESET): New macro.
8190         * jcf-parse.c (handle_deprecated): New function.
8191         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
8192         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
8193         * parse.y (resolve_type_during_patch): Check deprecation.
8194         (jdep_resolve_class): Likewise.
8195         (process_imports): Likewise.
8196         (resolve_expression_name): Likewise.
8197         (check_deprecation): Strip arrays from decl.  Check
8198         flag_deprecated.
8199         (patch_method_invocation): Also check the particular constructor
8200         for deprecation.
8201         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
8202         * jcf-write.c (append_deprecated_attribute): New function.
8203         (generate_classfile): Generate deprecated attribute when
8204         appropriate.
8205         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
8206         (java_lex) [case '*']: Simplify logic.
8207         (java_start_char_p): Use LETTER_MASK.
8208         (java_part_char_p): Likewise.
8209         (java_space_char_p): New function.
8211 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
8213         Change base class access representation.
8214         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
8215         (add_interface_do): Likewise.
8217 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
8219         * decl.c (java_init_decl_processing): Change
8220         soft_lookupjnimethod_node to reflect the change in
8221         signature of _Jv_LookupJNIMethod in libjava/jni.cc
8222         * expr.c (build_jni_stub): Calculate and pass the size
8223         on the stack of the arguments to a JNI function. Use
8224         new target macro MODIFY_JNI_METHOD_CALL to allow a
8225         target to modify the call to a JNI method.
8227 2003-02-08  Roger Sayle  <roger@eyesopen.com>
8229         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
8230         instead of basename to avoid compiler warnings on Tru64.
8232 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
8234         * gcj.texi: Update to GFDL 1.2.
8236 2003-01-31  Andrew Haley  <aph@redhat.com>
8238         * parse.y (java_expand_classes): Scan the whole class list looking
8239         for access methods that haven't yet been expanded.
8241 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
8243         Fix for java/4269:
8245         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
8246         to fix bootstrap on sparc-unknown-netbsdelf1.5.
8247         * jcf-parse.c: Likewise.
8249 2003-01-31  Mark Wielaard  <mark@klomp.org>
8251         * gjavah.c (throwable_p): Allocate 1 more byte for string.
8253 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
8255         * class.c (make_class): Use BINFO_ELTS.
8256         (set_super_info): Likewse.
8257         (add_interface_do): Likewise.
8259 2003-01-30  Tom Tromey  <tromey@redhat.com>
8261         * jcf-parse.c (read_class): Update identifier's class value if it
8262         changed during parsing.
8264 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
8266         * Make-lang.in (po-generated): Find the targets in $(parsedir).
8267         Propagate change to all other rules as required.
8268         (java/parse-scan.o): Add explicit dependency on
8269         $(parsedir)/java/parse-scan.c .
8271 2003-01-29  Tom Tromey  <tromey@redhat.com>
8273         * parse.y (patch_assignment): Only transform the rhs of an
8274         assignment when compiling to native.
8276 2003-01-28  Tom Tromey  <tromey@redhat.com>
8278         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
8280 2003-01-28  Tom Tromey  <tromey@redhat.com>
8282         * lex.c (java_lex): Don't include UEOF as part of token.
8283         (java_read_unicode): Error if \u sequence prematurely terminated.
8285 2003-01-27  Tom Tromey  <tromey@redhat.com>
8287         * parse.y (java_check_regular_methods): Check for construct after
8288         checking types in throws clause.
8290 2003-01-24  Tom Tromey  <tromey@redhat.com>
8292         * class.c (build_static_field_ref): Only a String or numeric field
8293         can fold to a constant.
8295 2003-01-23  Tom Tromey  <tromey@redhat.com>
8297         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8298         file name in resource buffer.
8300 2003-01-23  Tom Tromey  <tromey@redhat.com>
8302         * expr.c (build_known_method_ref): Use method's context to find
8303         method table index.
8305 2003-01-23  Tom Tromey  <tromey@redhat.com>
8307         * constants.c (set_constant_entry): Allocated cleared memory.
8309 2003-01-22  Tom Tromey  <tromey@redhat.com>
8311         * java-tree.h: Don't use PARAMS.
8312         * resource.c: Add prototypes for all functions.
8313         (write_resource_constructor): Use `const char *' to avoid
8314         warning.
8316 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
8318         * jcf-parse.c (process_zip_dir): Remove unused variable.
8320 2003-01-22  Tom Tromey  <tromey@redhat.com>
8322         * expr.c (build_invokeinterface): Abort if method's context is not
8323         an interface.
8325 2003-01-22  Tom Tromey  <tromey@redhat.com>
8327         * gcj.texi (Input and output files): Mention non-class entries.
8328         * decl.c (java_init_decl_processing): Call
8329         init_resource_processing.
8330         * java-tree.h (compile_resource_data, write_resource_constructor,
8331         compile_resource_file, init_resource_processing): Declare.
8332         * config-lang.in (gtfiles): Added resource.c.
8333         * Make-lang.in (gt-java-resource.h): New target.
8334         (JAVA_OBJS): Added resource.o.
8335         (java/resource.o): New target.
8336         * resource.c: New file.
8337         * class.c (compile_resource_file): Moved to resource.c.
8338         (registerResource_libfunc): Likewise.
8339         (utf8_decl_list): Mark with GTY; now static.
8340         * jcf-parse.c (classify_zip_file): New function.
8341         (parse_zip_file_entries): Use it; compile .properties files.
8342         (process_zip_dir): Use classify_zip_file and compute_class_name.
8343         Don't write class name into zip directory.
8344         (java_parse_file): Call write_resource_constructor.
8345         (compute_class_name): New function.
8346         * jcf-io.c (read_zip_member): Reindented.
8348 2003-01-21  Tom Tromey  <tromey@redhat.com>
8350         * class.c (supers_all_compiled): New function.
8351         (make_class_data): Use it.
8353 2003-01-21  Tom Tromey  <tromey@redhat.com>
8355         * parse.y (method_header): Native method can't be strictfp.
8356         No method can be transient or volatile.
8358 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8360         Make-lang.in (jvspec.o-warn): Add -Wno-error.
8362 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
8364         * check-init.c: Fix comment typos.
8365         * class.c: Likewise.
8366         * constants.c: Likewise.
8367         * decl.c: Likewise.
8368         * except.c: Likewise.
8369         * expr.c: Likewise.
8370         * java-except.h: Likewise.
8371         * java-tree.h: Likewise.
8372         * javaop.h: Likewise.
8373         * jcf-dump.c: Likewise.
8374         * jcf-io.c: Likewise.
8375         * jcf-parse.c: Likewise.
8376         * jcf-write.c: Likewise.
8377         * lang.c: Likewise.
8378         * mangle.c: Likewise.
8379         * typeck.c: Likewise.
8380         * verify.c: Likewise.
8382 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8384         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8385         * jcf-write.c: Include "tm_p.h".
8387 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8389         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8391 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8393         * builtins.c (java_build_function_call_expr): Renamed from
8394         build_function_call_expr.  All callers changed.
8396         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8397         * jcf-parse.c: Include tm_p.h.
8399         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8400         warning.
8402 2003-01-14  Tom Tromey  <tromey@redhat.com>
8404         * class.c (make_class_data): Check that super is compiled before
8405         building class reference to it.
8407 2003-01-14  Andrew Haley  <aph@redhat.com>
8409         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8410         varargs function -- correct.
8412 2003-01-14  Andrew Haley  <aph@redhat.com>
8414         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8416 2003-01-14  Andrew Haley  <aph@redhat.com>
8418         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8419         varargs function -- correct.
8421         * parse.y (patch_assignment): Copy the rhs of an assignment into a
8422         temporary if the RHS is a reference.
8424 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8426         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8427         * keyword.h: Regenerated.
8429         * All Files: Convert to ISO C style function definitions.
8431 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
8433         * parse.y (check_pkg_class_access): ANSIfy definition.
8435 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8437         * decl.c, parse-scan.y, parse.y: Don't cast return value of
8438         xmalloc et al.
8440         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8442 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
8444         Merge from pch-branch:
8446         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
8448         * Make-lang.in (java/gjavah.o): Update dependencies.
8449         * gjavah.c: Include ggc.h.
8451         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
8453         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8454         (JCFDUMP_OBJS): Add ggc-none.o.
8455         (java/jcf-dump.o): Depend on GGC_H.
8456         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8457         CPool substructures.
8458         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8459         * jcf-dump.c: Include ggc.h.
8461         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
8463         * jcf.h (union cpool_entry): New.
8464         (struct CPool): Use gengtype to mark.  Change field 'data' to be
8465         an array of unions.
8466         (struct JCF): Use gengtype to mark.
8467         (CPOOL_UINT): Update for new cpool_entry type.
8468         (CPOOL_USHORT1): Likewise.
8469         (CPOOL_USHORT2): Likewise.
8470         (CPOOL_FINISH): Use GC to free cpool subfields.
8471         * parse.h (struct parser_ctxt): Mark field current_jcf.
8472         * lex.c (java_init_lex): Use GC to allocate struct JCF.
8473         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8474         (main_jcf): Use gengtype to mark.
8475         (ggc_mark_jcf): Delete.
8476         (get_constant): Update for new cpool_entry type.
8477         (give_name_to_class): Likewise.
8478         (get_class_constant): Likewise.
8479         (init_outgoing_cpool): Use GGC to allocate struct CPool.
8480         (java_parse_file): Use GGC to allocate struct JCF.
8481         (init_jcf_parse): Don't call ggc_add_root.
8482         * jcf-reader.c (jcf_parse_constant_pool): Update for new
8483         cpool_entry type.
8484         * java-tree.h (current_jcf): Use gengtype to mark.
8485         (CPOOL_UTF): Update for new cpool_entry type.
8486         (outgoing_cpool): Use gengtype to mark.
8487         (struct lang_type): GC struct JCF and struct CPool.
8488         * config-lang.in (gtfiles): Add jcf.h.
8489         * constants.c (find_tree_constant): New.
8490         (set_constant_entry): Allocate cpool subfields using GGC.  Update
8491         for new cpool_entry type.
8492         (find_constant1): Update for new cpool_entry type.
8493         (find_constant2): Likewise.
8494         (find_utf8_constant): Use find_tree_constant.
8495         (find_class_or_string_constant): Remove unnecessary cast to jword.
8496         Update for new cpool_entry type.
8497         (count_constant_pool_bytes): Update for new cpool_entry type.
8498         (write_constant_pool): Likewise.
8499         (alloc_name_constant): Use find_tree_constant.
8500         (build_constants_constructor): Update for new cpool_entry type.
8502         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
8504         * parse.y (mark_parser_ctxt): Delete.
8505         (goal): Don't use ggc_add_root.
8506         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8507         (java_pop_parser_context): Let GC free parser_ctxt.
8508         (java_parser_context_resume): Likewise.
8509         * parse.h (struct parser_ctxt): Use gengtype to mark.
8510         (ctxp): Likewise.
8511         (ctxp_for_generation): Likewise.
8512         * lex.h (struct java_lc_s): Mark for gengtype.
8513         (java_lexer): Rearrange for gengtype.
8514         * config-lang.in (gtfiles): Add lex.h, parse.h.
8516 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8518         * All Files: Remove PARAMS macro.
8520         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8521         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8522         `__STDC__' macros.
8524         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8525         VA_CLOSE.
8527 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
8529         * Make-lang.in (java.install-common, java.uninstall,
8530         java.install-info, java.install-man): Prepend $(DESTDIR)
8531         to destination paths in all (un)installation commands.
8532         (java.install-common): Rewrite $(LN) command to support
8533         DESTDIR with "ln" as well as with "ln -s".
8535 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
8537         * java-tree.h: Protect against multiple inclusion.
8539 2003-01-07  Tom Tromey  <tromey@redhat.com>
8541         * class.c (add_assume_compiled): Don't adjust parent if we're
8542         already at the root of tree.
8544 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8546         * lang.c (dump_compound_expr): Prototype.
8548 2003-01-03  Tom Tromey  <tromey@redhat.com>
8550         Fix for PR java/8712:
8551         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8552         when simply checking against `null'.
8554 2003-01-03  Tom Tromey  <tromey@redhat.com>
8556         * gcj.texi (Standard Properties): Document http.proxyHost and
8557         http.proxyPort.
8559         * gcj.texi (GNU Classpath Properties): Document new properties.
8561 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
8563         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8564         java/lang-options.h, java/mangle.c, java/mangle_name.c,
8565         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8567 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
8569         * Make-lang.in, boehm.c, buffer.c,
8570           buffer.h, builtins.c, class.c,
8571           config-lang.in, constants.c,
8572           convert.h, decl.c, except.c,
8573           expr.c, java-except.h,
8574           java-tree.h, javaop.def,
8575           jcf-parse.c, jcf-write.c,
8576           jv-scan.c, jvgenmain.c,
8577           jvspec.c, keyword.gperf,
8578           keyword.h, lang-options.h,
8579           lang-specs.h, lang.c, lex.c,
8580           lex.h, mangle.c, mangle_name.c,
8581           parse-scan.y, parse.h, parse.y,
8582           typeck.c, verify.c, xref.c,
8583           xref.h: Replace "GNU CC" with
8584           "GCC" in the copyright header.
8586         * check-init.c, gjavah.c, javaop.h,
8587           jcf-depend.c, jcf-dump.c, jcf-io.c,
8588           jcf-path.c, jcf-reader.c, jcf.h,
8589           zextract.c, zipfile.h: These files are
8590           "part of GCC". Also say "GCC" not "GNU CC".
8592 2002-12-30  DJ Delorie  <dj@redhat.com>
8594         * Make-lang.in: Protect against texi2pod/pod2man failing.
8596 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
8598         * gcj.texi: Use @copying.
8600 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
8602         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8603         print_cxx_classname.
8604         (print_cxx_classname): Add add_scope parameter.
8605         (print_class_decls): Do not emit a semicolon after the extern
8606         "Java" block.
8607         (process_file): Adjust calls to print_cxx_classname.
8609 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8611         * gcj.texi: Include Cover Texts in man page.
8613 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
8615         * class.c (build_static_field_ref): Check FIELD_FINAL.
8617         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8618         instead of current_constant_pool_data_ref.
8619         * java-tree.h (current_constant_pool_data_ref): Undefine.
8620         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8621         * jcf-parse.c (init_outgoing_cpool): Don't initialize
8622         current_constant_pool_data_ref.
8624         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8625         not build_internal_class_name.
8627         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8628         Use it when class ref isn't certain to be compiled.
8630 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8632         * gcj.texi: Include gcc-common.texi.
8633         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8634         $(srcdir)/doc/include/gcc-common.texi.
8636 2002-12-22  Anthony Green  <green@redhat.com>
8638         * gcj.texi (Limitations): Add note about org.xml.sax and
8639         org.w3c.dom.
8641 2002-12-20  Tom Tromey  <tromey@redhat.com>
8643         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8644         where minimum case value is Integer.MIN_VALUE.
8645         Fixes PR java/8955.
8647 2002-12-18  Andrew Haley  <aph@redhat.com>
8649         * parse.y (patch_invoke): Force evaluation order when `check' is
8650         set.  For PR libgcj/8945.
8652 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
8654         * gcj.texi: Change version number to 3.4.
8656 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
8657         Andrew Haley <aph@redhat.com>
8659         * parse.y (source_end_java_method): Remove custom encoding of line
8660         numbers for a function decl before passing it to the back end.
8662 2002-12-03  Andrew Haley  <aph@redhat.com>
8664         * class.c (make_class_data): New field, "chain".
8665         * decl.c (java_init_decl_processing): Likewise.
8667 2002-12-02  Tom Tromey  <tromey@redhat.com>
8669         For PR java/8740:
8670         * parse.y (do_resolve_class): Handle qualified name via
8671         recursion.
8673 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
8675         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8676         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8677         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8678         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8679         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8680         Include coretypes.h and tm.h.
8681         * Make-lang.in: Update dependencies.
8683 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8685         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8687 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8689         * jcf-reader.c: Don't expand JCF_readu4 inside the
8690         expansion of JCF_SKIP.
8692 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8694         * jcf-reader.c: Don't expand JCF_readu4 inside the
8695         expansion of JCF_SKIP.
8697 2002-11-22  Tom Tromey  <tromey@redhat.com>
8699         * parse.y (patch_binop): Cast right hand side of shift expression
8700         to `int'.  Fixes PR java/8676.
8702 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
8703             Andrew Haley <aph@redhat.com>
8705         * gcc/java/jcf-write.c (write_classfile): Remove target
8706         class file, if it exists, before renaming the temporary
8707         class file to it.
8709 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
8711         * jvspec.c (lang_specific_spec_functions): New.
8713 2002-11-18  Tom Tromey  <tromey@redhat.com>
8715         Fix for PR java/7912:
8716         * expr.c (can_widen_reference_to): Allow cast of array to
8717         Cloneable or Serializable.
8718         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8719         (java_io_serializable_identifier_node): Likewise.
8720         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8721         (valid_ref_assignconv_cast_p): Use new identifier nodes.
8722         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8723         java_io_serializable.
8724         * decl.c (java_init_decl_processing): Initialize
8725         java_lang_cloneable_identifier_node and
8726         java_io_serializable_identifier_node.
8727         (java_lang_cloneable_identifier_node): New global.
8728         (java_io_serializable_identifier_node): Likewise.
8730 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
8732         * buffer.c: Remove unnecessary casts.
8733         * check-init.c: Likewise.
8734         * class.c: Likewise.
8735         * constants.c: Likewise.
8736         * decl.c: Likewise.
8737         * except.c: Likewise.
8738         * gjavah.c: Likewise.
8739         * jcf-io.c: Likewise.
8740         * jcf-parse.c: Likewise.
8741         * jcf-path.c: Likewise.
8742         * jvspec.c: Likewise.
8743         * lang.c: Likewise.
8744         * lex.c: Likewise.
8745         * verify.c: Likewise.
8747 2002-11-06  Tom Tromey  <tromey@redhat.com>
8749         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8750         a JNI header.
8752 2002-11-05  Tom Tromey  <tromey@redhat.com>
8754         Fix for PR java/6388.
8755         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8756         * java-tree.h (enum java_tree_index): New values
8757         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8758         (decimal_int_max, decimal_long_max): New defines.
8759         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
8760         (error_if_numeric_overflow): Rewrote range checking.
8761         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8762         decimal_long_max.
8764 2002-11-02  Tom Tromey  <tromey@redhat.com>
8766         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8768         * class.c (make_method_value): Put class name, not signature, into
8769         `throws' field.  For PR java/8415.
8771 2002-10-24  Tom Tromey  <tromey@redhat.com>
8773         * gcj.texi (Invoking gij): Document --showversion.
8774         (Standard Properties): java.library.path now set.
8776 2002-10-23  Tom Tromey  <tromey@redhat.com>
8778         * gjavah.c (decode_signature_piece): In JNI mode, print
8779         `jobjectArray' when array depth is nonzero.
8780         Fixes PR java/8296.
8782 2002-10-15  Andrew Haley  <aph@redhat.com>
8784         * parse.y (patch_invoke): Call force_evaluation_order on a static
8785         arg list.
8786         (resolve_qualified_expression_name): Call force_evaluation_order
8787         on a arg list that is part of a Qualified Expression Name.
8789         * lang.c (dump_compound_expr): New.
8790         (java_dump_tree): New.
8792 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
8794         * gcj.texi: Added item describing the GCJ runtime property
8795         "gnu.gcj.progname".
8797 2002-10-15  Richard Henderson  <rth@redhat.com>
8799         * jcf-parse.c (get_constant): Fix type warning.
8801 2002-10-15  Andrew Haley  <aph@redhat.com>
8803         * java-tree.h (java_inlining_merge_static_initializers): Declare.
8804         (java_inlining_map_static_initializers): Declare.
8806 2002-10-14  Andrew Haley  <aph@redhat.com>
8808         * tree-inline.c (remap_block): All local class initialization
8809         flags go in the outermost scope.
8810         (expand_call_inline): Call java_inlining_map_static_initializers.
8811         (expand_call_inline): Call java_inlining_merge_static_initializers.
8812         * java/lang.c (merge_init_test_initialization): New.
8813         (java_inlining_merge_static_initializers): New.
8814         (inline_init_test_initialization): New.
8815         (java_inlining_map_static_initializers): New.
8817 2002-10-11  Mark Wielaard  <mark@klomp.org>
8819         * gcj.texi (Compatibility): Add Limitations and Extensions section.
8821 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8823         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8825 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8827         * parse.y (merge_string_cste): Add parentheses around & within |.
8829 2002-10-08  Tom Tromey  <tromey@redhat.com>
8831         * parse.y (variable_declarator_id): Simplify error path for
8832         array declarator error.  For PR java/8003.
8834 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
8836         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8837         bug_report_url.
8839 2002-10-08  Andrew Haley  <aph@redhat.com>
8841         * parse.y (attach_init_test_initialization_flags): Check for
8842         error_mark_node.
8844 2002-10-07  Anthony Green  <green@redhat.com>
8846         * parse.y (merge_string_cste): Fix bug in string concatenation.
8848 2002-10-03  Michael Koch  <konqueror@gmx.de>
8850         * gcj.texi (Standard properties):
8851         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8853 2002-10-02  Roger Sayle  <roger@eyesopen.com>
8855         PR optimization/6627
8856         * lang.c (java_init): If storing the vbit in function
8857         pointers, ensure that force_align_functions_log is atleast
8858         one to aid compatability with g++ vtables.
8860 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
8862         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8863         foul of type-based aliasing.
8865 2002-09-30  Anthony Green  <green@redhat.com>
8867         * gcj.texi (Invoking jv-scan): Fix texinfo.
8869 2002-09-28  Anthony Green  <green@redhat.com>
8871         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8872         (Code Generation): Add -fno-assert documentation.
8873         * jv-scan.c (flag_assert): New global.
8874         (options): Add assert option.
8875         (help): Add --no-assert documentation.
8876         * parse-scan.y (flag_assert): New global.
8877         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8878         (flag_assert): New global.
8879         * java-tree.h (flag_assert): New global.
8880         * lex.c (java_lex): Obey flag_assert.
8881         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8882         calling cc1.
8884 2002-09-26  Andrew Haley  <aph@redhat.com>
8886         * expr.c (build_java_array_length_access): Check for null pointer.
8887         * expr.c (expand_java_arrayload): Likewise.
8889 2002-09-21  Richard Henderson  <rth@redhat.com>
8891         * jcf-parse.c (get_constant): Decode from IEEE no matter
8892         what the target format.
8894 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
8896         * ChangeLog: Follow spelling conventions.
8897         * class.c: Likewise.
8898         * decl.c: Likewise.
8899         * expr.c: Likewise.
8900         * gjavah.c: Likewise.
8901         * java-tree.h: Likewise.
8902         * jcf-dump.c: Likewise.
8903         * jcf-parse.c: Likewise.
8904         * jvspec.c: Likewise.
8905         * lang.c: Likewise.
8906         * mangle.c: Likewise.
8907         * parse.y: Likewise.
8909 2002-09-17  Tom Tromey  <tromey@redhat.com>
8911         * lex.c (java_read_unicode_collapsing_terminators): Handle case
8912         where \r appears at EOF.  Fixes PR java/7950.
8914 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
8916         * jvspec.c (lang_specific_driver): Remove unused variable.
8918 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8920         * java-tree.h (union lang_tree_node): Add chain_next option.
8922 2002-09-16  Richard Henderson  <rth@redhat.com>
8924         * jcf-parse.c (get_constant): Runtime check for IEEE format;
8925         use new real.h interface.
8926         * jcf-write.c (find_constant_index): Use new real.h interface.
8927         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8929 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8931         * lang.c: Follow spelling conventions.
8933 2002-09-11  Per Bothner  <per@bothner.com>
8935         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
8936         constant to the type of the field.
8937         (java_complete_tree):  Remove now-redundant code.
8939         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
8941 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
8943         For PR java/5794:
8944         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8945         return label if a ret instruction for the jsr has been reached.
8947 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
8949         * parse.y (DIR_SEPARATOR): Don't define.
8950         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8952 2002-08-28  Andrew Haley  <aph@redhat.com>
8954         * verify.c (verify_jvm_instructions): Allow exception handler
8955         inside code that is being protected, but generate a warning.
8956         * except.c (link_handler): Initialize `expanded' in new eh_range.
8957         (binding_depth, is_class_level, current_pc): Declare extern.
8959 2002-09-01  Mark Wielaard <mark@klomp.org>
8961         * gcj.texi: Add chapter about system properties.
8962         Fixed some typos.
8964 2002-08-26  Tom Tromey  <tromey@redhat.com>
8966         * parse.y (try_builtin_assignconv): Allow narrowing primitive
8967         conversion if RHS_TYPE is byte, short, or char.
8969 2002-08-22  Tom Tromey  <tromey@redhat.com>
8971         * gcj.texi (Invoking gij): Document -cp and -classpath.
8973 2002-08-21  Tom Tromey  <tromey@redhat.com>
8975         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8976         $(prefix)/share.  For PR libgcj/7633.
8978         For PR java/6005 and PR java/7611:
8979         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8980         (java_can_use_bit_fields_p): New function.
8982 2002-08-16  Tom Tromey  <tromey@redhat.com>
8984         * gcj.texi (Class Initialization): Mention class initialization of
8985         arrays.
8987 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
8989         * Make-lang.in (java-tree-inline.o): New.
8990         (JAVA_OBJS): Add java-tree-inline.o.
8991         * parse.y (source_end_java_method): Call java_optimize_inline.
8992         (java_expand_method_bodies): Save method's tree in
8993         DECL_SAVED_TREE.
8994         (add_stmt_to_compound): Keep track of the number of statments.
8995         * lang.c (java_init): Enable flag_inline_trees.
8996         (java_post_options): If flag_inline_functions is on, enable
8997         flag_inline_trees instread.
8998         (decl_constant_value): New.
8999         (java_tree_inlining_walk_subtrees): New.
9000         * java-tree.h (DECL_NUM_STMTS): New macro.
9001         (java_optimize_inline): Declare.
9002         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
9003         Handle a LABEL_EXPR.
9004         * decl.c (build_result_decl): If we already have a DECL_RESULT
9005         don't make another.
9006         (dump_function): New.
9007         (java_optimize_inline): New.
9008         (dump_function): New.
9010 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
9012         For PR java/7483:
9013         * parse.y (build_assertion): Invert return from
9014         desiredAssertionStatus.
9016 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9018         * jcf-write.c (get_access_flags): Return correct access flags for
9019         private and protected inner classes.
9021 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
9023         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
9025 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
9027         * mangle_name.c: Don't include obstack.h twice.
9028         * xref.c: Don't include obstack.h.
9030 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
9032         * class.c: (permanent_obstack): Delete declaration.
9033         * constants.c: (permanent_obstack): Delete declaration.
9034         * except.c: (permanent_obstack): Delete declaration.
9035         * expr.c: (permanent_obstack): Delete declaration.
9036         * jcf-parse.c: (permanent_obstack): Delete declaration.
9037         (saveable_obstack): Delete declaration.
9038         * parse.h: (permanent_obstack): Delete declaration.
9039         * typeck.c: (permanent_obstack): Delete declaration.
9041 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
9043         * gcj.texi (version-gcc): Increase to 3.3.
9045 2002-07-22  Tom Tromey  <tromey@redhat.com>
9047         * lex.c (java_lex): Check for `e' or `E' after 0.
9049 2002-07-21  Richard Henderson  <rth@redhat.com>
9051         * lang.c (java_unsafe_for_reeval): New.
9052         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
9054 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
9056         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
9057         (jcf_path_init): Use GET_ENVIRONMENT.
9059 2002-07-10  Roger Sayle  <roger@eyesopen.com>
9060             Zack Weinberg <zack@codesourcery.com>
9062         * builtins.c (initialize_builtins): Remove defines that
9063         handled C/C++ specific junk hereby removed from builtins.def.
9065 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
9067         * lang.c (java_post_options): Update prototype.
9069 2002-07-05  Roger Sayle  <roger@eyesopen.com>
9071         * builtins.c (initialize_builtins): Ignore the additional
9072         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
9073         the builtins.def file.
9075 2002-07-01  Tom Tromey  <tromey@redhat.com>
9077         For PR libgcj/7073:
9078         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
9079         specially.
9081 2002-07-01  Roger Sayle  <roger@eyesopen.com>
9083         * java/decl.c (builtin_function): Accept additional parameter.
9084         (java_init_decl_processing): Pass an additional NULL_TREE
9085         argument to builtin_function.
9087 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
9089         * gcj.texi: Fixed gcj invocation example so that it compiles.
9091 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9093         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
9094         * parse.y (mark_parser_ctxt): Likewise.
9095         (check_modifiers, declare_local_variables): Avoid incorrect
9096         hardcoded constant 10.
9098         * lex.c (java_read_char): Avoid "comparison is always true"
9099         warning.
9101 2002-06-25  Andreas Schwab  <schwab@suse.de>
9103         * expr.c (JSR): Avoid undefined operation on PC.
9105 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9107         * decl.c (clear_binding_level): Const-ify.
9109 2002-06-13  Akim Demaille  <akim@epita.fr>
9111         * parse.y (class_declaration, interface_declaration): Make sure
9112         all their rules have an action, in order to avoid meaningless `$$
9113         = $1' and their type clashes.
9115 2002-06-11  Tom Tromey  <tromey@redhat.com>
9117         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
9118         * parse-scan.y (statement_without_trailing_substatement): Added
9119         assert_statement.
9120         (assert_statement): New rule.
9121         * java-tree.h (struct lang_type) [assertions]: New field.
9122         (TYPE_USES_ASSERTIONS): New macro.
9123         (CLASS_USES_ASSERTIONS): Likewise.
9124         (FIELD_SYNTHETIC): New define.
9125         * lex.c (java_lval;): Added ASSERT_TK.
9126         * parse.y (ASSERT_TK): Added.
9127         (statement_without_trailing_substatement): Added assert_statement.
9128         (assert_statement): New rule.
9129         (build_assertion): New function.
9130         (maybe_generate_pre_expand_clinit): Create and initialize
9131         $assertionsDisabled.
9132         (lookup_package_type): Removed decl.
9133         * keyword.h: Rebuilt.
9134         * keyword.gperf (assert): New token.
9136 2002-06-10  Akim Demaille  <akim@epita.fr>
9138         * parse.y (interface_type_list, class_member_declaration)
9139         (unary_expression_not_plus_minus): Remove duplicate %type.
9140         Whitespace changes.
9142 2002-06-09  Tom Tromey  <tromey@redhat.com>
9144         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
9146         * parse.y (method_header): Give error message in all cases.
9147         Fixes PR java/6865.
9149 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9151         Don't use RTL inlining. Fix for PR java/6820.
9152         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
9153         (flag_really_inline): New.
9154         (java_decode_option): Set flag_really_inline if -finline-functions
9155         is seen.
9156         (java_post_options): New function. Turn off inlining unless
9157         flag_really_inline is set.
9159 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9161         * gjavah.c (throwable_p): Accept argument as either a classname or
9162         signature fragment. Create null-terminated classname string for super
9163         when calling itself recursively.
9164         (decode_signature_piece): Skip first character from class name
9165         signature when calling throwable_p.
9167 2002-06-08  H.J. Lu  (hjl@gnu.org)
9169         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
9171 2002-06-04  Tom Tromey  <tromey@redhat.com>
9173         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
9175 2002-06-04  Michael Koch  <konqueror@gmx.de>
9177         * gcj.texi (Input Options): Fixed typo.
9179 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
9181         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
9182         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
9183         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
9184         and all now-pointless local variables.  Rename other local
9185         variables to reflect their not being handles.
9187         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
9188         #if JCF_USE_STDIO blocks.
9190         * parse.y: Add missing semicolon at end of rule.
9192 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
9194         * check-init.c (attach_initialized_static_class): Delete, unused.
9195         * parse.y: Use htab_t instead of struct hashtable, update
9196         all uses.
9197         * java-tree.h: Include hashtab.h instead of hash.h.
9198         (struct lang_decl_func): Use htab_t, set up for gengtype.
9199         (struct init_test_hash_entry): Delete.
9200         (struct treetreehash_entry): New.
9201         (java_treetreehash_find): New
9202         (java_treetreehash_new): New prototype.
9203         (java_treetreehash_create): New prototype.
9204         (java_mark_tree): Delete prototype.
9205         (java_hash_hash_tree_node): Delete prototype.
9206         (java_hash_compare_tree_node): Delete prototype.
9207         (attach_initialized_static_class): Delete prototype.
9208         * expr.c (build_class_init): Update to use java_treetreehash
9209         functions.
9210         (java_expand_expr): Update to use htab_t.
9211         (emit_init_test_initialization): Likewise.
9212         * decl.c (java_mark_tree): Delete.
9213         * class.c (init_test_hash_newfunc): Delete.
9214         (java_hash_hash_tree_node): Delete.
9215         (java_hash_compare_tree_node): Delete.
9216         (add_method_1): Update to use java_treetreehash functions.
9217         (JAVA_TREEHASHHASH_H): New macro.
9218         (java_treetreehash_hash): New function.
9219         (java_treetreehash_compare): New function.
9220         (java_treetreehash_find): New function.
9221         (java_treetreehash_new): New function.
9222         (java_treetreehash_create): New function.
9223         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
9225         * Make-lang.in (java/parse.o): Depend on debug.h.
9226         * java-tree.h (struct lang_identifier): Use gengtype.
9227         (union lang_tree_node): New.
9228         (struct lang_decl_func): Use gengtype.
9229         (struct lang_decl_var): Likewise.
9230         (struct lang_decl): Likewise.
9231         * parse.y: Include debug.h.
9232         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
9234         * lang.c (struct language_function): New dummy structure.
9236         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
9237         descriminator for DECL_LANG_SPECIFIC.
9238         (struct lang_decl_func): Rename from struct lang_decl.
9239         (enum lang_decl_desc): New.
9240         (struct lang_decl): Make it a union.  Update all the accessor macros.
9241         (struct lang_type): Use gengtype.
9242         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
9243         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
9244         are now the same size.
9245         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
9246         use discriminator to mark DECL_LANG_SPECIFIC.
9248         * Make-lang.in (gt-java-builtins.h): New rule.
9249         (java/builtins.o): Add dependency on gt-<filename>.h.
9250         * builtins.c: Use gengtype for roots.
9251         (union string_or_tree): Use gengtype.
9252         (struct builtin_record): Use gengtype.
9253         * config-lang.in (gtfiles): Add builtins.c.
9255         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
9256         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
9257         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
9258         gt-java-parse.h, gtype-java.h): Add rules to generate.
9259         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
9260         (class.o): Add dependency on gt-*.h.
9261         (constants.o): Likewise.
9262         (decl.o): Likewise.
9263         (expr.o): Likewise.
9264         (jcf-parse.o): Likewise.
9265         (jcf-write.o): Likewise.
9266         (lang.o): Likewise.
9267         * config-lang.in (gtfiles): New.
9268         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9269         * constants.c: Replace uses of ggc_add_* with GTY markers.
9270         Include gt-*.h.
9271         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9272         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9273         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
9274         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
9275         Include gt-*.h.
9276         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
9277         Include gt-*.h.
9278         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9279         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
9280         gt-*.h.
9281         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9282         Include gtype-java.h.
9284 2002-06-02  Tom Tromey  <tromey@redhat.com>
9286         Fix for PR java/5913:
9287         * parse.y (patch_binop): Call patch_string on op1.
9289 2002-06-02  Tom Tromey  <tromey@redhat.com>
9291         Fix for PR java/1343, PR java/6336:
9292         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9293         formatting.  Changed return type.
9294         (anonymous_class_counter): Moved to top of file.
9295         (maybe_make_nested_class_name): Append number to class name for
9296         function-local classes.
9298 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
9300         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9301         * Make-lang.in: Update dependency lists.
9303 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
9305         * gjavah.c (throwable_p): Do not free the name of the class after
9306         passing it to find_class.
9307         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9308         * jcf-io.c (dirent.h): Include it.
9309         (fnmatch.h): Likewise.
9310         (compare_path): New function.
9311         (java_or_class_file): Likewise.
9312         (memoized_dirlist_entry): New type.
9313         (memoized_dirlist_lookup_eq): New function.
9314         (memoized_dirlists): New variable.
9315         (caching_stat): New function.
9316         (memoized_class_lookup_eq): New function.
9317         (memoized_class_lookups): Likewise.
9318         (find_class): Use memoized_class_lookups and caching_stat.
9319         * jcf.h (JCF_USE_SCANDIR): Define.
9320         * parse.y (java_expand_classes): Write the class files in reverse
9321         order.
9323 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9325         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9327 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
9329         * jcf-write.c (write_classfile): Unlink the temporary file if it
9330         cannot be renamed.  Use concat to build up the name of the
9331         temporary file.
9333 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
9335         * jcf-write.c (write_classfile): Write the file to a
9336         temporary file and then rename it.
9338 2002-05-07  Tom Tromey  <tromey@redhat.com>
9340         * gjavah.c (throwable_p): Use xstrdup, not strdup.
9342         Fix for PR java/1200:
9343         * gjavah.c (throwable_p): New function.
9344         (decode_signature_piece): Use it.  A `WeakReference' isn't the
9345         same as a `jweak'.
9346         Include hashtab.h.
9347         (gcjh_streq): New function.
9349 2002-05-07  Andreas Jaeger  <aj@suse.de>
9351         * parse.y (finish_for_loop): Fix if statement.
9353 2002-05-06  Tom Tromey  <tromey@redhat.com>
9355         Fix for PR java/5941:
9356         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9357         loop update expression.
9358         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9359         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9361 2002-05-04  Mark Wielaard  <mark@klomp.org>
9363         For PR java/6519:
9364         * parse.y (build_string_concatenation): Return just op1 only when op2
9365         is null and op1 is a STRING_CST, otherwise always construct a
9366         StringBuffer.
9368 2002-04-27  Tom Tromey  <tromey@redhat.com>
9370         For PR java/6382:
9371         * parse.y (string_convert_int_cst): New function.
9372         (merge_string_cste): Use it.
9374 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9376         * java-tree.h (java_parse_file): Update.
9377         (java_set_yydebug): Remove.
9378         * jcf-parse.c (yydebug): Remove.
9379         (java_set_yydebug): Die.
9380         (java_parse_file): Update.
9381         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9383 2002-04-24  Tom Tromey  <tromey@redhat.com>
9385         For PR java/6425:
9386         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9387         EXPR_WFL_QUALIFICATION of qual_wfl.
9389 2002-04-23  Per Bothner  <per@bothner.com>
9391         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
9392         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
9393         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
9395 2002-04-23  Tom Tromey  <tromey@redhat.com>
9397         For PR java/6314:
9398         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
9399         recognize `-fcompile-resource='.
9400         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
9401         a bit.
9403 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9405         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9406         paths. Fixes PR java/2791.
9408 2002-04-19  Andrew Haley  <aph@redhat.com>
9410         * jcf-write.c (push_long_const): lo, hi: New variables.
9411         Use rshift_double to extract the high part of a 64-bit long.
9412         Use WORD_TO_INT to extract the low part.
9414         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9415         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
9416         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9418 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9420         * typeck.c (incomplete_type_error): Remove.
9422 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9424         * class.c (make_class_data): Set DECL_ALIGN on static class data,
9425         for hash synchronization.
9426         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9427         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9428         class_type_node.
9430 2002-04-16  Mark Wielaard  <mark@klomp.org>
9432         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9433         negative zero.
9435 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9437         Fix for PR java/6294:
9438         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9439         interfaces.
9441 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9443         Fix for PR java/6085:
9444         * parse.y (patch_method_invocation): Always use build_access_to_thisn
9445         to get enclosing "this" argument for inner-class constructor
9446         invocation. Pass correct arguments to build_access_to_thisn.
9448 2002-04-10  Andreas Jaeger  <aj@suse.de>
9450         * gcj.texi (Input Options): Fix extdirs patch.
9452 2002-04-10  Anthony Green  <green@redhat.com>
9454         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9456 2002-04-09  Anthony Green  <green@redhat.com>
9458         * gcj.texi (Input Options): Add --extdirs documentation.
9459         * jcf-dump.c (OPT_extdirs): New macro.
9460         (options): Add extdirs option.
9461         (help): Describe --extdirs.
9462         (main): Handle OPT_extdirs.
9463         * gjavah.c (OPT_extdirs): New macro.
9464         (options): Add extdirs option.
9465         (help): Describe --extdirs.
9466         (main): Handle OPT_extdirs.
9467         * jcf-path.c (jcf_path_init): Add extdirs support.
9468         (jcf_path_extdirs_arg): New function.
9469         (extensions): New variable to hold extensions path entries.
9470         * jvspec.c: Remove -fextdirs= when compiling main().
9471         * lang.c (java_decode_option): Handle -fextdirs=.
9472         * jcf.h (jcf_path_extdirs_arg): Declare new function.
9473         * Make-lang.in: Compile jcf-path with version info for use in
9474         identifying the appropriate libgcj.jar.
9476 2002-04-08  Tom Tromey  <tromey@redhat.com>
9478         For PR libgcj/5303:
9479         * .cvsignore: Added rmic.1 and rmiregistry.1.
9480         * gcj.texi (Top): Link to new nodes.
9481         (Invoking rmic): New node.
9482         (Invoking rmiregistry): Likewise.
9483         * Make-lang.in (java.generated-manpages): Added rmic.1 and
9484         rmiregistry.1.
9485         (java.maintainer-clean): Likewise.
9486         ($(srcdir)/java/rmic.1): New target.
9487         ($(srcdir)/java/rmiregistry.1): Likewise.
9488         (java.install-man): Handle rmic.1 and rmiregistry.1.
9490 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9492         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9493         Add note about handling uncaught exceptions. Add an exception handler
9494         to example.
9496 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9498         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9499         after using it to patch CALL_EXPR.
9501 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9503         * gcj.texi (Invocation): Document CNI invocation API.
9505 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9507         * expr.c (truthvalue_conversion): Rename.  Update.
9508         (expand_compare): Update.
9509         * java-tree.h (java_truthvalue_conversion): New.
9510         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9512 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9514         * java-tree.h (java_mark_addressable): New.
9515         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9516         * typeck.c (mark_addressable): Rename, update.
9518 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9520         * expr.c (build_java_binop): Update.
9521         * java-tree.h (java_signed_type, java_unsigned_type,
9522         java_signed_or_unsigned_type): Update.
9523         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9524         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9525         * parse.y (patch_binop): Update.
9526         * typeck.c (signed_or_unsigned_type, unsigned_type,
9527         signed_type): Update.
9529 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9531         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9532         (java_dummy_print): Remove.
9533         (lang_print_error): Rename.  Exit early if inhibiting output.
9534         (inhibit_error_printing_function): New.
9535         (java_init): Don't set hook.
9536         (lang_init_source): Use new boolean.
9538 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
9540         * parse.y (do_resolve_class): Fix infinite recursion.
9542 2002-03-29  Tom Tromey  <tromey@redhat.com>
9544         * parse.y (check_inner_circular_reference): Ignore incomplete
9545         types.
9547 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9549         * Make-lang.in (builtins.o): Update.
9550         * boehm.c (get_boehm_type_descriptor): Update.
9551         * builtins.c: Include langhooks.h.
9552         * decl.c (java_init_decl_processing): Update.
9553         * java-tree.h (java_type_for_mode, java_type_for_size): New.
9554         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9555         Redefine.
9556         * typeck.c (type_for_mode, type_for_size): Update.
9558 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
9560         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9562 2002-03-28  Tom Tromey  <tromey@redhat.com>
9564         * except.c (expand_end_java_handler): If the handler type is NULL,
9565         use java.lang.Throwable.  Fixes PR java/5986.
9567 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9569         Fix for PR java/4715:
9570         * jcf-parse.c (parse_source_file_3): New function.
9571         (read_class): Call it.
9572         (java_parse_file): Likewise.
9574 2002-03-28  Jan Hubicka  <jh@suse.cz>
9576         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9578 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9580         * parse.y (resolve_package): Initialize "decl".
9581         (lookup_package_type): Remove unused function.
9583 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9585         Fix for PR java/5993:
9586         * parse.y (resolve_package): Return the decl if resolution was
9587         successful. Don't special case "java.lang" and "java.lang.reflect"
9588         packages. Set type_name to the merged identifier.
9589         (resolved_qualified_expression_name): Print error using "name" if
9590         resolve_package returns NULL_TREE.
9592 2002-03-27  Tom Tromey  <tromey@redhat.com>
9594         * expr.c (expand_invoke): Don't generate null pointer check if
9595         we're calling <init>.
9597 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9599         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9600         fix prototype.
9601         * java-tree.h (java_lang_expand_expr): Similarly.
9602         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9603         (java_init): Don't set hook.
9605 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9607         Fix for PR java/5850:
9608         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9609         context if field was not found in the current scope.
9610         * expr.c (lookup_field): Don't look in enclosing contexts.
9612 2002-03-26  Tom Tromey  <tromey@redhat.com>
9614         Fix for PR java/5942:
9615         * parse.y (init_src_parse): Added sanity check.
9616         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9617         elements, not 11.
9619 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9621         * decl.c (lang_mark_tree): Rename java_mark_tree.
9622         * java-tree.h (java_mark_tree): New.
9623         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9625 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
9627         * lex.c: Change java_perform_atof to take normal parameters
9628         instead of a pointer to a parameter block.  Call it directly
9629         from java_lex.
9631 2002-03-22  Mark Wielaard  <mark@klomp.org>
9633         Fix for PR java/5368:
9634         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9635         when printing error message.
9637 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9639         * decl.c (maybe_build_cleanup): Remove.
9641 2002-03-22  Tom Tromey  <tromey@redhat.com>
9643         Andrew Haley  <aph@cambridge.redhat.com>
9645         * expr.c (build_field_ref): Don't build a check if the field is a
9646         member of `this'.
9648 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
9650         Fix for PR java/6026:
9651         * lex.c (java_lex): Fix parsing of consecutive floats.
9653 2002-03-21  Tom Tromey  <tromey@redhat.com>
9655         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9656         class.
9658 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9660         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9661         insert_block, getdecls, kept_level_p, global_bindings_p): New.
9663 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9665         * gcj.texi: @code{gcj} becomes @command{gcj}.
9666         @code{gcc} becomes @command{gcc}.
9667         GcjRaw changed to gnu.gcc.RawData.
9669 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9671         * decl.c (start_java_method): Use new hook.
9672         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9673         (java_init): Remove old hook.
9675 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9677         * builtins.c (define_builtin): Do nothing if `type' is null.
9678         Fixes PR java/5876.
9680 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9682         * parse.y (parser_check_super_interface): Fix error message
9683         grammar/order.
9685 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9687         * jcf-parse.c (get_constant): Delete unused variables.
9689 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9691         * java-tree.h (java_parse_file): New.
9692         * jcf-parse.c (yyparse): Rename java_parse_file.
9693         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9695 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9697         * parse.y (craft_constructor): Return the constructor decl.
9698         (java_expand_classes): Update comments.
9699         (lookup_method_invoke): Call fix_constructors immediately for
9700         anonymous class. Fixes PR java/5935.
9702 2002-03-15  Anthony Green  <green@redhat.com>
9704         * jcf-parse.c (yyparse): Don't emit class registration
9705         constructor when compiling resource files.
9707 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9709         * lang.c (java_tree_code_type, java_tree_code_length,
9710         tree_code_name): Delete.
9711         (tree_code_type, tree_code_length, tree_code_name): Define.
9712         (java_init): Don't try to copy into the various tree_code
9713         arrays.
9715 2002-03-12  Tom Tromey  <tromey@redhat.com>
9717         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9718         UTF-8, not UCS-2.  Fixes PR java/5923.
9720         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9721         a call_expr wrapped in a convert.  Fixes PR java/5848.
9723 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9725         * jcf-write.c (write_classfile): Improve error strings.
9727 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9729         * lex.c: Adjust comments to GNU standards.
9731 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9733         Fix for PR java/5902:
9734         * lex.c (java_lex): Fix parsing of literals.
9736 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9738         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9739         to prevent it getting evaluated twice in the store checking case.
9740         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9741         examining OBJECT.
9743 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9745         * decl.c (java_init_decl_processing): Make sure class_type_node
9746         alignment is not less than 64 bits if hash synchronization is enabled.
9748 2002-03-08  Per Bothner  <per@bothner.com>
9750         * parse.y (java_complete_lhs):  Check if patch_assignment
9751         returned an error-mark.
9753         * parse.y (try_builtin_assignconv):  Don't special-case zero.
9755 2002-03-08  Per Bothner  <per@bothner.com>
9757         Fix for PR java/5812.
9758         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
9759         here instead of in JSR macro.  Likewise with load_type_state call.
9760         Do the latter on if the return_pc has been verified (the jsr returns).
9761         (JSR):  Now just call build_java_jsr.
9763 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
9765         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9766         (java.install-common): Link native driver to
9767         JAVA_TARGET_INSTALL_NAME.
9769 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
9771         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9772         * builtins.c(sin_builtin): Likewise
9773         * builtins.c(sqrt_builtin): Likewise
9775 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
9777         * java/expr.c, java/jcf-parse.c, java/lex.c:
9778         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9779         REAL_ARITHMETIC blocks unconditional.  Delete some further
9780         #ifdef blocks predicated on REAL_ARITHMETIC.
9782 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9784         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9785         explicit sizeof/sizeof.
9786         * decl.c (java_init_decl_processing): Likewise.
9787         * jcf-parse.c (init_jcf_parse): Likewise.
9788         * parse.y (init_src_parse): Likewise.
9790 2002-03-02  Per Bothner  <per@bothner.com>
9792         Make --CLASSPATH by a synonym for --classpath and -classpath.
9793         Implement --bootclasspath.
9794         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
9795         (classpath_l):  Remove.
9796         (jcf_path_CLASSPATH_arg):  Remove.
9797         (jcf_path_bootclasspath_arg):  New function.
9798         (jcf_path_seal):  Simplify accordingly.
9800         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
9801         (jcf_path_CLASSPATH):  Remove declaration.
9802         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
9803         (lang_specific_driver):  Translate -bootclasspath.
9804         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
9805         * lang.c (decode_lang_options):  Do jcf_path_init first.
9806         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
9807         * gjavah.c:  Also handle --bootclasspath.
9808         Handle --CLASSPATH as a synonum for --classpath.
9809         * jcf-dump.c: Likewise.
9811         "." is not part of system path, but is the default for --classpath.
9812         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
9813         (jcf_path_seal):  Add "." if no CLASSPATH specified.
9815         * gcj.texi:  Document changes.
9817 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9819         * expr.c (build_java_arraystore_check): Fix formatting.
9821 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9823         Fix for PR java/5758, java/5632:
9824         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9825         inner-class separator too.
9826         * parse.y (do_resolve_class): New local `decl_result.'
9827         Progressively build a name for what can have been loaded.
9829 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9831         * expr.c (java_array_data_offset): Removed function.
9832         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9833         (build_java_array_length_access): Obtain "length" value using a
9834         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9835         (build_java_arrayaccess): Correct comment. Access "data" using a
9836         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9837         (build_java_arraystore_check): New function.
9838         (expand_java_arraystore): Use build_java_arraystore_check.
9839         * parse.y (patch_assignment): Simplify code to insert a store check
9840         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9841         * check-init.c (check_init): Update to reflect that an array length
9842         access is now a COMPONENT_REF.
9843         * gcj.texi (Code Generation): Improve documentation of
9844         -fno-bounds-check. Add documentation for -fno-store-check.
9845         * java-tree.h (flag_store_check): Declare.
9846         (build_java_arraystore_check): Declare.
9847         * lang.c (flag_store_check): Initialize to 1.
9848         (lang_f_options): Add store-check option.
9849         * jvspec.c: Don't pass store-check option to jvgenmain.
9850         * lang-options.h: Add help string for -fno-store-check.
9852 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9854         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9855         * java-tree.h (java_dup_lang_specific_decl): New.
9856         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9858 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9860         * builtins.c, decl.c: Delete traditional-mode-related code
9861         copied from the C front end but not used, or used only to
9862         permit the compiler to link.
9864 2002-02-22  Tom Tromey  <tromey@redhat.com>
9866         Fix for PR java/2369:
9867         * jvspec.c (verify_class_name): New function.
9868         (lang_specific_driver): Call it.
9869         (JAVA_START_CHAR_P): New macro.
9870         (JAVA_PART_CHAR_P): Likewise.
9872 2002-02-22  Per Bothner  <per@bothner.com>
9874         * class.c:  Change vtable to be more compatible with g++ v3 abi.
9875         (get_dispatch_table):  Prepend offset-to-top (always 0) and
9876         type_info pointer (currently unimplemented hence NULL) to vtable.
9877         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9878         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
9879         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9880         (build_dtable_decl):  Add declarations for new fields.
9882 2002-02-20  Per Bothner  <per@bothner.com>
9884         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9885         to finit$ (otherwise generate_bytecode_insns drops it). However, we
9886         don't need to set it on the COMPOUND_EXPR - the caller does that.
9888 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9890         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9891         `--CLASSPATH' becomes `--classpath.'
9892         * gjavah.c: Likewise.
9893         * jcf-dump.c: Likewise.
9894         * lang-options.h: Likewise.
9895         * lang.c: Likewise.
9896         * jcf-path.c: Updated comment.
9897         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9898         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9899         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9900         (jcf_path_CLASSPATH_arg): Ditto.
9901         (classpath_u): Updated leading comment.
9903 2002-02-20  Per Bothner  <per@bothner.com>
9905         * builtins.c (check_for_builtin):  New function.
9906         (build_call_or_builtin):  Remove.
9907         * java-tree.h:  Update accordingly.
9908         * expr.c (expand_invoke):  Use build + check_for_builtin instead
9909         of build_call_or_builtin.
9910         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
9911         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9912         flag (which had caused jcf-write to incorrectly emit invokevirtual).
9914 2002-02-17  Tom Tromey  <tromey@redhat.com>
9916         * java-tree.h (TYPE_STRICTFP): New macro.
9917         (struct lang_type) [strictfp]: New field.
9918         (CLASS_STRICTFP): New macro.
9919         (METHOD_STRICTFP): New macro.
9920         (struct lang_decl) [strictfp]: New field.
9921         * parse.y (method_header): Disallow strictfp constructor or
9922         abstract method.
9923         (STRICT_TK): Move before MODIFIER_TK.
9924         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9925         (METHOD_MODIFIERS): Likewise.
9926         (INTERFACE_MODIFIERS): Likewise.
9927         * jcf-write.c (get_access_flags): Likewise.
9928         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9929         (add_method_1): Likewise.
9930         (get_access_flags_from_decl): Likewise.
9931         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
9932         recognize strictfp flag.
9933         * jcf.h (ACC_STRICT): New define.
9935 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
9937         * class.c(build_utf8_ref): Move declaration of decl_size
9939 2002-02-07  Tom Tromey  <tromey@redhat.com>
9941         * gcj.texi (Input Options): --CLASSPATH does not suppress system
9942         path.
9944 2002-02-04  Anthony Green  <green@redhat.com>
9946         * class.c (build_utf8_ref): Put UTF-8 constants into merged
9947         sections if available.
9949 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9951         * parse.y (java_expand_classes): Fix typo in static field loop.
9953 2002-02-02  Richard Henderson  <rth@redhat.com>
9955         * class.c (add_field): Mark static fields external.
9956         (build_class_ref): Remove redundant set.
9957         * parse.y (java_expand_classes): Mark static fields of classes
9958         to be compiled as local.
9959         * jcf-parse.c (parse_class_file): Likewise.
9961 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9963         * gcj.texi (About CNI): New node.
9965 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9967         PR java/5080
9968         * jcf-parse.c : Check for HAVE_LOCALE_H before using
9969         setlocale() with LC_CTYPE as a parameter.
9970         * jv-scan.c: Same.
9972 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
9974         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9975         Follow GNU Coding Standards for --version.
9977 2002-01-28  Tom Tromey  <tromey@redhat.com>
9979         * expr.c (build_jni_stub): Ensure storage for `meth' is
9980         generated.
9981         * parse.y (java_complete_expand_methods): Set
9982         current_function_decl before building JNI stub.
9984 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9986         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9987         BUILT_IN_SQRTF.
9989 2002-01-22  Tom Tromey  <tromey@redhat.com>
9991         * decl.c (java_init_decl_processing): Use add_predefined_file.
9992         Predefine RawData.java.
9993         (predef_filenames): Removed.
9994         (java_init_decl_processing): Don't register predef_filenames.
9995         * jcf-parse.c (add_predefined_file): New function.
9996         (predefined_filename_p): Rewrote.
9997         (predefined_filename_p): No longer static.
9998         * decl.c (java_init_decl_processing): Call initialize_builtins.
9999         * Make-lang.in (JAVA_OBJS): Added builtins.o.
10000         (java/builtins.o): New target.
10001         * builtins.c: New file.
10002         * parse.y (patch_invoke): Use build_call_or_builtin.
10003         * java-tree.h (build_call_or_builtin): Declare.
10004         (initialize_builtins): Declare.
10005         (java_set_exception_lang_code): Removed unused declaration.
10006         (PREDEF_FILENAMES_SIZE): Removed.
10007         (java_tree_index): Added JTI_PREDEF_FILENAMES.
10008         (predef_filenames): New define.
10009         (add_predefined_file): Declare.
10010         (predefined_filename_p): Declare.
10011         * expr.c (expand_invoke): Use build_call_or_builtin.
10013 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10015         * parse.y (patch_switch_statement): Fix format specifier.
10017 2002-01-16  Tom Tromey  <tromey@redhat.com>
10019         More for PR java/5365:
10020         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
10021         default.
10022         (process_file): Generate include for
10023         java.lang.UnsupportedOperationExceptions.
10025 2002-01-15  Andreas Jaeger  <aj@suse.de>
10027         * .cvsignore: Add man pages.
10029 2002-01-15  Tom Tromey  <tromey@redhat.com>
10031         Fix for PR java/5365:
10032         * gjavah.c (process_file): Turn class name into a file name.
10034 2002-01-14  Matthias Klose  <doko@debian.org>
10036         * gcj.texi: Fix whitespace and formatting errors in the
10037         synopsis of the man pages. Update copyright.
10039 2002-01-14  Tom Tromey  <tromey@redhat.com>
10041         For PR libgcj/5303:
10042         * Make-lang.in (java.install-man): Handle jv-convert man page.
10043         (java.generated-manpages): Added jv-convert.1.
10044         (java.uninstall): Remove jv-convert.1.
10045         (java.maintainer-clean): Likewise.
10046         ($(srcdir)/java/jv-convert.1): New target.
10047         * gcj.texi (Top): Link to jv-convert node.
10048         (Individual utilities): Likewise.
10049         (Invoking jv-convert): New node.
10051 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
10052             Martin Kahlert  <martin.kahlert@infineon.com>
10054         * jcf-parse.c (get_constant): Don't swap lo/hi for big
10055         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
10057 2002-01-03  Graham Stott  <grahams@redhat.com>
10059         * class.c (compile_resource_file): Update copyright date.
10060         Constify filename parameter.
10061         (java-tree.h): Update copyright date.
10062         (compile_resource_file): Constify filename parameter.
10064 2002-01-03  Graham Stott  <grahams@redhat.com>
10066         * gcc/jcf-parse.c: Update copyright date.
10067         (yyparse): Constify resource_filename.
10069 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10071         * parse.y (src_parse_roots): Don't needlessly zero init.
10073 2001-12-31  Tom Tromey  <tromey@redhat.com>
10075         * parse.y (dump_java_tree): New function.
10076         (source_end_java_method): Call it.
10077         (end_class_declaration): Likewise.
10078         * lang.c (java_decode_option): Call dump_switch_p.
10080 2001-12-28  Tom Tromey  <tromey@redhat.com>
10082         * gen-table.pl: Don't process characters after \uffff.  Added
10083         comment pointing to input file.
10085 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10087         * gen-table.pl: Const-ify output.  Document the location of a
10088         suitable unicode input file.
10090         * chartables.h: Regenerate.
10092 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10094         * chartables.h: Const-ify.
10095         * gjavah.c (options): Likewise.
10096         * jcf-dump.c (options): Likewise.
10097         * jv-scan.c (options): Likewise.
10098         * lex.c (java_start_char_p, java_part_char_p): Likewise.
10099         * parse.y (binop_lookup): Likewise.
10101 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10103         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
10104         the static arrays that are output.
10105         * jvspec.c (jvgenmain_spec): Make static.
10106         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
10107         * keyword.h: Regenerate.
10108         * lang.c (string_option, process_option_with_no, lang_f_options,
10109         lang_W_options): Const-ify.
10110         * lex.c (java_lex): Likewise.
10112 2001-12-21  Richard Henderson  <rth@redhat.com>
10114         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
10115         (get_boehm_type_descriptor): ... here.  Arrange for the
10116         TREE_TYPE to get set properly.
10118 2001-12-21  Richard Henderson  <rth@redhat.com>
10120         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
10121         only if the target requires collect2.
10123         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
10125 2001-12-20  Tom Tromey  <tromey@redhat.com>
10127         For PR java/4509:
10128         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
10129         CAN_COMPLETE_NORMALLY for the node.
10130         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
10131         generate code for second branch if first branch can't complete
10132         normally.
10133         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
10134         the loop head if the loop body can't complete normally.
10136 2001-12-20  Tom Tromey  <tromey@redhat.com>
10138         For PR java/4766:
10139         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
10140         case where `finally' clause can't complete normally.
10142 2001-12-20  Tom Tromey  <tromey@redhat.com>
10144         Fixes PR java/5057:
10145         * parse.y (analyze_clinit_body): Added this_class parameter.
10146         Check for more cases where we must keep <clinit>.
10147         (maybe_yank_clinit): Cleaned up flow control.
10149 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10151         * decl.c (java_init_decl_processing): Don't initialize
10152         finit_leg_identifier_node.
10153         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
10154         (finit_leg_identifier_node): Remove.
10155         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
10157 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10159         * mangle.c (mangle_member_name): Don't special-case for
10160         NO_DOLLAR_IN_LABEL.
10161         * mangle_name.c (unicode_mangling_length): Likewise.
10162         (append_unicode_mangled_name): Likewise.
10163         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
10164         code.
10166 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10168         * expr.c (build_java_array_length_access): Don't force null pointer
10169         check unless flag_check_references is set.
10171 2001-12-20  Tom Tromey  <tromey@redhat.com>
10173         Fix for PR java/3417:
10174         * parse.y (patch_assignment): Added special processing for
10175         `return'.
10176         (patch_return): Don't convert booleans to integers, and don't
10177         special-case `null'.
10179 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10181         * config-lang.in (diff_excludes): Remove.
10183 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10185         * gcj.texi: Update link to GCC manual.
10187 2001-12-17  Tom Tromey  <tromey@redhat.com>
10189         * parse.y (link_nested_class_to_enclosing): Removed useless
10190         statement.
10192 2001-12-16  Tom Tromey  <tromey@redhat.com>
10194         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
10195         Fixes PR java/5088.
10197 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10199         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
10200         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
10201         spelling errors.
10203 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10205         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
10207 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10209         * decl.c (java_init_decl_processing): Build otable_type correctly.
10210         otable_decl is an otable_type.
10212 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10214         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
10215         otable_type, otable_ptr_type, method_symbol_type,
10216         method_symbols_array_type, method_symbols_array_ptr_type): New
10217         field/global tree definitions.
10218         (flag_indirect_dispatch): New flag.
10219         * decl.c (java_init_decl_processing): Initialize new otable and
10220         otable_syms type nodes and decls. Add new field "index" to
10221         method_type_node.
10222         * class.c (build_method_symbols_entry): New function.
10223         (make_method_value): Set "index" to to method's vtable index for
10224         virtual methods when indirect-dispatch is not used.
10225         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
10226         and set vtable_method_count to -1. Set otable and otable_syms field
10227         if indirect-dispatch is used and there was something to put in them.
10228         (build_method_symbols_entry): New function.
10229         (emit_offset_symbol_table): New function.
10230         * expr.c (get_offset_table_index): New function.
10231         (build_invokevirtual): Build array reference to otable at the index
10232         returned by get_offset_table_index, and use the result as the vtable
10233         offset.
10234         (build_invokeinterface): Similar.
10235         * jcf-parse.c (yyparse): If indirect-dispatch, call
10236         emit_offset_symbol_table at the end of compilation, after all classes
10237         have been generated.
10238         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
10239         * lang.c (flag_indirect_dispatch): Define.
10240         (lang_f_options): Add indirect-dispatch flag.
10242 2001-12-14  Matthias Klose  <doko@debian.org>
10244         * gcj.texi: Markup for man page generation. Document missing
10245         options printed by <tool> --help.
10246         Terminate description of gij's -ms option with a dot.
10247         * Make-lang.in ($(srcdir)/java/*.1): New targets.
10248         (java.generated-manpages java.install-man, java.uninstall,
10249         java-maintainer-clean) Updated.
10251 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
10253         * class.c (get_dispatch_table): Fix java vtable layout
10254         for TARGET_VTABLE_USES_DESCRIPTORS.
10255         * decl.c (java_init_decl_processing): Initialize
10256         alloc_no_finalizer_node, finalize_identifier_node.
10257         * expr.c (class_has_finalize_method): New function.
10258         (expand_java_NEW): Generate calls for finalizer-free allocation.
10259         (build_invokevirtual): Fix java vtable layout for
10260         TARGET_VTABLE_USES_DESCRIPTORS.
10261         * java-tree.h (enum java_tree_index): New entries:
10262         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
10263         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
10264         (class_has_finalize_method): declare.
10265         (HAS_FINALIZER_P): New macro.
10266         * parse.y (patch_invoke): Generate calls for finalizer-free
10267         allocation.
10269 2001-12-12  Matthias Klose  <doko@debian.org>
10271         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
10272         whitespace at end of line.
10274 2001-12-11  Tom Tromey  <tromey@redhat.com>
10276         * lex.c (java_init_lex): Define wfl_to_string as
10277         gnu.gcj.runtime.StringBuffer unless generating bytecode.
10279 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
10281         * class.c (make_method_value): Use null_pointer_node to
10282         represent empty exception table.
10284 2001-12-10  Tom Tromey  <tromey@redhat.com>
10286         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
10288 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
10290         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10292 2001-12-09  Per Bothner  <per@bothner.com>
10294         * check-init.c (current_switch_has_default):  New static field.
10295         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
10296         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
10297         DEFAULT_EXPR seen, simulate a default alternative that copies state.
10299 2001-12-09  Tom Tromey  <tromey@redhat.com>
10301         * check-init.c (check_init): Don't allow pre- or post- increment
10302         or decrement of final variable.
10303         (final_assign_error): Minor error message rewording.
10305 2001-12-08  Tom Tromey  <tromey@redhat.com>
10307         * java-tree.h: Fixed typo.
10309         * gjavah.c (decompile_method): Don't decompile to `return this'
10310         for static methods.
10312         * gjavah.c (cxx_keywords): Re-sorted.
10313         * lex.c (cxx_keywords): Re-sorted.
10315         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10316         else.
10318         * gjavah.c (print_namelet): Clear subnamelets.
10319         (HANDLE_METHOD): Set `method_printed' earlier.
10321 2001-12-07  Tom Tromey  <tromey@redhat.com>
10323         * lang.c (lang_f_options): Added
10324         optimize-static-class-initialization.
10325         (java_decode_option): Removed special case.
10327 2001-12-07  Per Bothner  <per@bothner.com>
10329         * check-init.c (check_init):  Fix typo freeing memory twice.
10331 2001-12-05  Per Bothner  <per@bothner.com>
10333         Restore support for static class initialization optimization.
10334         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10335         * check-init.c (check_int):  At end of BLOCK handle initialization
10336         blocks, which used to be done in java_complete_expand_method but did
10337         not handle the case where check_for_initialization might allocate
10338         more than a word of bits.
10339         * decl.c (lang_make_tree):  The smic field is now a tree.
10340         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
10341         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
10343         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
10345         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10346         Change from a hash table to a list.
10347         (struct_lang_decl):  Change field 'smic' to match.
10348         * class.c (add_method_1):  Initialize
10349         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10350         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
10351         (java_expand_method_bodies): -here, since 'smic' is now a list.
10352         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
10354         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
10356         * class.c (java_hash_compare_tree_node):  Fix casts.
10358 2001-12-04  Per Bothner  <per@bothner.com>
10360         * check-init.c:   Handle definite unassignment to finals in addition
10361         to definite assignment.
10362         (loop_current_locals):  New field.
10363         (num_current_locals, int start_current_locals, num_current_words):
10364         Make static.
10365         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
10366         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10367         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
10368         (get_variable_decl, check_final_reassigned):  New functions.
10369         (check_init, check_bool_init):  Modify as needed for checking finals.
10370         (check_for_initialization):  Take extra parameter and return void.
10371         Do extra start-up logic to check final fields for assignment.
10372         * parse.y (check_static_final_variable_assignment_flag,
10373         reset_static_final_variable_assignment_flag, check_final_assignment,
10374         check_final_variable_local_assignment_flag,
10375         reset_final_variable_indirect_assignment_flag,
10376         reset_final_variable_global_assignment_flag):  Remove functions.
10377         (java_complete_expand_methods, outer_field_access_fix,
10378         patch_assignment): Remove no-longer used logic.
10379         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
10380         * parse.y (register_fields, java_complete_tree):  Update accordingly.
10382         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
10383         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
10384         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
10386         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
10388         * java-tree.h (DECL FINAL):  New bit-field.
10389         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
10390         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
10391         (DECL_INIT_CALLS_THIS):  New macro.
10392         (struct lang_decl):  New bit-field init_calls_this.
10393         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10394         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10395         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
10396         use it for both local variables and final fields.
10397         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
10398         and local_final.
10399         (struct lang_type):  Remove hfv bit-field.
10400         (check_for_initialization):  Change to return void.
10402         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
10403         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
10404         * check-init.c (final_assign_error):  New helper function.
10405         (check_final_reassigned, check_init):  Use it.
10406         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10408         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
10409         bit-fields to unsigned.
10411 2001-12-03  Per Bothner  <per@bothner.com>
10413         * parse.y (patch_binop):  Minor constant folding.
10415         * parse.y (build_current_thisn):  Shorter 'buffer'.
10417 2001-12-03  Per Bothner  <per@bothner.com>
10419         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
10420         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10421         * jcf-write.c (generate_bytecode_insns):  Remove support for
10422         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10423         * check-init.c (check_init):  Likewise.
10425 2001-12-03  Per Bothner  <per@bothner.com>
10427         * verify.c (subroutine_nesting):  New function.
10428         (verify_jvm_instructions):  Use it to fix logic for checking that
10429         we're done with the current subroutine.
10431         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10432         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10434 2001-12-03  Per Bothner  <per@bothner.com>
10436         * jcf.h:  Fix obvious typo in comment.
10437         * typeck.c (build_null_signature):  Add comment.
10439 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10441         * expr.c: Remove leading capital from diagnostic messages, as
10442         per GNU coding standards.
10443         * jcf-io.c: Similarly.
10444         * jcf-parse.c: Similarly.
10445         * jv-scan.c: Similarly.
10446         * jvspec.c: Similarly.
10447         * mangle.c: Similarly.
10449 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
10450             Alexandre Petit-Bianco  <apbianco@redhat.com>
10452         * expr.c (build_java_arrayaccess): Call save_expr on array for
10453         correct evaluation order, modified comment, fixed indentation.
10454         * parse.y: (patch_assignment): Correctly extract the array base
10455         from the tree generate by build_java_arrayaccess, added comments.
10456         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10457         Fixes PR java/3096, PR java/3803, PR java/3965.
10459 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10461         * expr.c (expand_byte_code): Remove trailing periods from messages.
10462         * jcf-parse.c (load_class, jcf_parse): Similarly.
10463         * jcf-write.c (generate_classfile): Similarly.
10464         * lex.c (java_lex): Similarly.
10466 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10468         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10470 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10472         * Make-lang.in (java.generated-manpages): New dummy target.
10474 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10476         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10477         ASM_FINAL_SPEC.
10478         (lang_specific_pre_link): Use set_input to set input_filename.
10479         Append `main' here.
10480         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10481         (main): Fix definition.
10482         Strip `main' from classname.
10483         Fixes PR java/227.
10485 2001-11-18  Roger Sayle <roger@eyesopen.com>
10487         * parse.h (java_expand_switch): Remove old prototype.
10489 2001-11-18  Tom Tromey  <tromey@redhat.com>
10491         Fix for PR java/1401:
10492         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10493         arg0 is null.
10494         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10495         correctly.
10497 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10499         * lang.c (finish_parse): Rename to java_finish.
10500         (LANG_HOOKS_FINISH, java_finish): New.
10502 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10504         * decl.c (init_decl_processing): Rename java_init_decl_processing.
10505         * java-tree.h: New prototype.
10506         * lang.c (java_init): Update prototype.  Combine with old init_parse.
10508 2001-11-13  Tom Tromey  <tromey@redhat.com>
10510         * gjavah.c (method_signature): New global.
10511         (HANDLE_METHOD): Set it.
10512         (decompile_return_statement): New function.
10513         (decompile_method): Use it.
10514         (print_method_info): Removed `synth' argument.
10516 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10518         * java-tree.h (java_set_yydebug): New.
10519         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10520         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10521         (print_lang_decl, print_lang_type, print_lang_identifier,
10522         print_lang_statistics, lang_print_xnode): Remove.
10524 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10526         * jcf-parse.c (init_lex): Remove.
10527         * lang.c (language_string, lang_identify): Remove.
10528         (struct lang_hooks): Constify.
10529         (LANG_HOOKS_NAME): Override.
10530         (init_parse): Update.
10532 2001-11-08  Andreas Franck  <afranck@gmx.de>
10534         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10535         program_transform_name the way suggested by autoconf.
10536         (java.install-common): Also transform auxiliary program names with
10537         program_transform_name.
10539 2001-11-08  Tom Tromey  <tromey@cygnus.com>
10541         * parse.y (trap_overflow_corner_case): New rule.
10542         (unary_expression): Use it.
10543         * lex.c (java_init_lex): Don't set minus_seen.
10544         (yylex): Don't use minus_seen.  Communicate overflow to parser for
10545         it to handle.
10546         (error_if_numeric_overflow): New function.
10547         * parse.h (minus_seen): Removed field.
10548         (JAVA_RADIX10_FLAG): New define.
10550 2001-11-07  Tom Tromey  <tromey@redhat.com>
10552         Patch for PR java/1414:
10553         * parse.y (case_label_list): New global.
10554         (goal): Register case_label_list with GC.
10555         (java_complete_lhs): Save new case on case_label_list.
10556         (patch_switch_statement): Check for duplicate case labels.
10558 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10560         * parse.y (patch_assignment): Removed unused third argument.
10561         (java_complete_lhs): Removed unused third argument to patch_assignment.
10563 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10565         * lang.c: Include langhooks-def.h.
10566         * Make-lang.in: Update.
10568 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
10570         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10572 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10574         * mangle.c (find_compression_record_match): Don't match compression
10575         records for package name elements unless they occur at the start of
10576         the name. Fix for PR java/4717.
10578 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10580         * expr.c (expand_java_field_op): Don't special-case references to
10581         java.lang.PRIMTYPE.TYPE.
10582         (build_primtype_type_ref): Removed.
10583         * java-tree.h (build_primtype_type_ref): Remove prototype.
10584         * parse.y (maybe_build_primttype_type_ref): Removed.
10585         (complete_function_arguments): Don't special-case references to
10586         java.lang.PRIMTYPE.TYPE.
10587         (patch_assignment): Likewise.
10588         (array_constructor_check_entry): Likewise.
10590 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10592         * mangle.c (static tree compression_table): Fixed leading comment.
10593         * parse.h (struct parser_ctxt): Fixed field comment.
10594         * parse.y (check_pkg_class_access): New prototype, fixed leading
10595         comment, new parameter used to emit error only if passed as true.
10596         (parse_check_super): Pass extra argument to check_pkg_class_access.
10597         (do_resolve_class): Likewise.
10598         (process_imports): Likewise.
10599         (read_import_dir): Fixed indentation.
10600         (find_in_imports_on_demand): New local class_type_name. Local
10601         node_to_use deleted. while loop changed into for loop. Report
10602         multiple definition only for accessible classes. Improved error
10603         message.
10604         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10605         assigned to parameter list, fixed indentation. while loop changed
10606         into for loop, restore TREE_CHAIN on local `tem' before the next
10607         iteration.
10609 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10611         * lang.c (lang_get_alias_set): Deleted.
10613 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10615         * gjavah.c (jni_print_char): Fix thinko in last change.
10617         * gjavah.c (jni_print_char, decode_signature_piece): Use
10618         safe-ctype macros and/or fold extra calls into fewer ones.
10619         * lex.c (java_read_unicode, java_lex): Likewise.
10620         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10621         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10622         * mangle_name.c (append_unicode_mangled_name,
10623         unicode_mangling_length): Likewise.
10625 2001-10-17  Richard Henderson  <rth@redhat.com>
10627         * Make-lang.in (java/lang.o): Depend on langhooks.h.
10629 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10631         * lang.c (langhooks.h): Included.
10632         (LANG_HOOKS_INIT): Redefined.
10633         (LANG_HOOKS_INIT_OPTIONS): Likewise.
10634         (LANG_HOOKS_DECODE_OPTION): Likewise.
10635         (struct lang_hooks lang_hooks): New initialization.
10637 2001-10-11  Per Bothner  <per@bothner.com>
10639         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
10640         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10641         The former is simpler, and jcf-write.c handles it better.
10642         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
10643         or WITH_CLEANUP_EXPR.
10644         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
10645         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10647         * parse.y (patch_if_else_statement):  If the condition is constant,
10648         optimize away the test.
10650 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10652         * parse.y (patch_cast): Call patch_string on the first operand of
10653         the incoming node, update it if necessary. Fixes PR java/4510.
10655 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10657         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10658         when name qualifier matches a package name.
10660 2001-10-08  Tom Tromey  <tromey@redhat.com>
10662         Fix for PR java/4489:
10663         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10664         force a new label when computing `body_block'.
10666 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10668         * jcf-io.c (format_uint): Const-ify.
10669         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10670         * lex.c (java_get_line_col): Likewise.
10671         * parse.y (build_incdec): Likewise.
10673 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10675         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10676         a NULL enclosing context if appropriate. Fixes PR java/4466.
10678 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10680         * parse.y (patch_assignment): Use lvalue's original TYPE when
10681         building the final COMPOUND_EXPR.
10682         (try_reference_assignconv): Fixed leading comment.
10684 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10686         * parse.y (check_final_variable_indirect_assignment): For
10687         COMPOUND_EXPR, return only if finals were found initialized
10688         properly, if not, keep on checking.
10689         (check_final_variable_global_assignment_flag): New local
10690         error_found, set when appropriate and used to decide whether to
10691         report uninitialized finals. Fixed typo in comment.
10693 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10695         * decl.c (init_decl_processing): Fixed typo in predef_filenames
10696         last three initializations. Fixes PR java/4360.
10698 2001-09-21  Richard Henderson  <rth@redhat.com>
10700         * class.c (get_dispatch_table): Handle function descriptors.
10701         (build_dtable_decl): Likewise.
10702         * expr.c (build_invokevirtual): Likewise.
10704 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10706         * parse.y (patch_method_invocation): Build class initialization
10707         when static finals are used to qualify method invocation.
10708         Fixes PR java/4366.
10710 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
10712         * parse.h: (WFL_STRIP_BRACKET): Re-written using
10713         build_type_name_from_array_name.
10714         (STRING_STRIP_BRACKETS): New macro.
10715         * parse.y (build_type_name_from_array_name): New function.
10716         (array_creation_expression:): Accumulate []s instead of [s.
10717         (cast_expression:): Accumulate []s instead of [s after cast type
10718         name.
10719         (build_array_from_name): Local string deleted, use
10720         build_type_name_from_array_name.
10721         (build_unresolved_array_type): Accumulate []s instead of [s after
10722         type name.
10723         (register_fields): Fixed comment.
10724         (resolve_class): Local name, base deleted, new locals tname and
10725         array_dims. Use build_type_name_from_array_name. Use array_dims to
10726         build array type.
10727         (purify_type_name): Use STRING_STRIP_BRACKETS.
10729 2001-09-18  Andreas Jaeger  <aj@suse.de>
10731         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10732         * jv-scan.c: Likewise.
10734 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10736         * parse.y (patch_method_invocation): Inner class creation context
10737         check not enforced within constructors. Fixes PR java/1873.
10739 2001-09-16  Tom Tromey  <tromey@redhat.com>
10741         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10742         NOTE_PUSH for single-case push.  Fixes PR java/4189.
10744 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10746         * java-tree.h (TYPE_IMPORT_LIST): New macro.
10747         (TYPE_IMPORT_DEMAND_LIST): Likewise.
10748         (struct lang_type): New fields import_list and import_demand_list.
10749         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10750         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10751         (do_resolve_class): New local saved_enclosing_type, initialized,
10752         passed as parameter to find_in_imports and find_in_imports_on_demand.
10753         (find_in_imports): Added paramater enclosing_type, use its
10754         TYPE_IMPORT_LIST when applicable.
10755         (find_in_imports_on_demand): Added parameter enclosing_type, use
10756         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10757         declaration and initialization.
10758         (fold_constant_for_init): Switch/restore current_class to the
10759         appropriate context.
10761 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
10763         * verify.c (verify_jvm_instructions): Fix typo.
10765 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10767         * expr.c (expand_invoke): Const-ification.
10768         * parse.y (patch_method_invocation): Likewise.
10770 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10772         * gjavah.c (cxx_keywords): Const-ification.
10773         * keyword.gperf (java_keyword): Likewise.
10774         * lang.c (java_tree_code_name): Likewise.
10775         * lex.c (cxx_keywords): Likewise.
10776         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10778 2001-09-11  Richard Henderson  <rth@redhat.com>
10780         * parse.h (ctxp_for_generation): Mark extern.
10782 2001-09-10  Richard Henderson  <rth@redhat.com>
10784         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10786 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10788         * typeck.c (java_array_type_length, build_prim_array_type):
10789         Represent empty arrays by NULL index.
10791 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
10793         * java-tree.h (compile_resource_file): Grouped with other prototypes.
10794         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10796 2001-09-06  Anthony Green  <green@redhat.com>
10798         * class.c (O_BINARY): Define if necessary.
10799         (registerResource_libfunc): Declare.
10800         (init_class_processing): Initilize registerResource_libfunc.
10801         (compile_resource_file): New function.
10802         * java-tree.h (resource_name): Declare.
10803         (compile_resource_file): Declare.
10804         * jcf-parse.c (yyparse): Handle compiling java resource files.
10805         * lang.c (java_decode_option): Handle -fcompile-resource option.
10806         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10807         resource files.
10808         * gcj.texi (Code Generation): Add documentation for -R flag.
10810 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
10812         * jcf-write.c (generate_classfile): Issue an error in case of
10813         field/initial value mismatch.
10814         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10815         being initialized and we're generating bytecode.
10816         (java_complete_lhs): In MODIFY_EXPR section: added comments,
10817         set DECL_INITIAL properly when appropriate.
10818         Fixes PR java/4230
10819         Fixes PR java/4204
10821 2001-09-01  Per Bothner  <per@bothner.com>
10823         * parse.y (maybe_yank_clinit):  A field without an initializer is not
10824         relevant.  All initializers except static final and constant require
10825         <clinit>, regardless of flag_emit_class_files.
10827 2001-08-31  Per Bothner  <per@bothner.com>
10829         * class.c (set_constant_value):  When not emitting class files, then a
10830         String ConstantValue is a utf8const_ptr_type.
10832 2001-08-30  Per Bothner  <per@bothner.com>
10834         * jcf-write.c (generate_classfile):  Check that field is primitive
10835         or string before emitting ConstantValue attribute.
10837 2001-08-30  Per Bothner  <per@bothner.com>
10839         * parse.y (resolve_qualified_expression_name):  If creating a
10840         COMPOUND_EXPR, set it's type correctly.
10842 2001-08-30  Per Bothner  <per@bothner.com>
10844         * jcf-io.c (open_class):  Set filename field.
10846         * jcf-parse,c (parse_class_file):  Set current_function_decl
10847         for better error message when Code attribute is missing.
10849         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
10850         better diagnostics, especially for constructors.
10852 2001-08-30  Per Bothner  <per@bothner.com>
10854         * jcf-write.c (generate_classfile):  Don't write ConstantValue
10855         attribute if field is not final, for compatibility with jdk.
10857         * jcf-write.c (generate_classfile):  Convert ConstantValue values
10858         to correct type.  Work-around for front-end bug.
10859         * class.c (set_constant_value):  Error if constant has wrong type.
10861 2001-08-30  Per Bothner  <per@bothner.com>
10863         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
10864         "Double" are printed at verbosity 1.
10866         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
10868         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
10870 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10872         * parse.y (patch_assignment): Don't verify final re-assignment here.
10873         (java_complete_lhs): Verify assignments to finals calling
10874         patch_assignment. Verify re-assignments to finals before calling
10875         patch_assignment.
10877 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
10879         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10880         Fixes PR java/1413
10882 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
10884         * lex.c (java_lex): new local found_hex_digits. Set and then used
10885         in test to reject invalid hexadecimal numbers.
10886         * parse.y (java_complete_tree): Prevent unwanted cast with
10887         initialized floating point finals.
10888         (patch_binop): Emit a warning when detecting a division by zero,
10889         mark result not constant, don't simplify non integer division.
10891 2001-08-28  Per Bothner  <per@bothner.com>
10893         * jcf-write.c  (generate_bytecode_insns):  For increments and
10894         decrements just recurse to push constant.  Improvement on Mark's patch.
10896 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
10898         * jcf-write.c (generate_bytecode_insns): Generate an integer to
10899         real conversion for increments and decrements of reals.
10901 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10903         * parse.y (resolve_qualified_expression_name): Handle unresolved
10904         qualified expressions, prevent numerical qualifiers, fixed typo.
10905         Fixes PR java/4141
10907 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10909         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10910         don't report anything but deprecated class when marked so. Handle
10911         VAR_DECL.
10912         (patch_method_invocation): Check deprecation on methods and types.
10913         (patch_binop): code becomes an enum tree_code, added default: to
10914         switch to handle that. Detect division by zero, try to fold and
10915         return before using a subroutine.
10917 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10919         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10920         file smaller than 4 bytes.
10921         * parse.y (check_inner_circular_reference): New function.
10922         (check_circular_reference): Likewise.
10923         (array_initializer:): Accept {,}.
10924         (java_check_circular_reference): Rewritten using
10925         check_circular_reference and check_inner_circular_reference.
10926         (java_complete_expand_method): Unconditionally save and restore
10927         the unpurged exception list.
10928         (build_dot_class_method_invocation): Unmangle signature parameter.
10930 2001-08-21  Tom Tromey  <tromey@redhat.com>
10932         * decl.c (init_decl_processing): Add `throws' field to method
10933         descriptor.
10934         * class.c (make_method_value): Compute `throws' field for method.
10936 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10938         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10939         circularity is detected.
10940         (ctors_unchecked_throws_clause_p): Fixed leading comment.
10942 2001-08-17  Richard Henderson  <rth@redhat.com>
10944         * class.c (emit_register_classes): Add align parameter to
10945         call to assemble_integer.
10947 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
10949         * jcf-parse.c (load_class): New locals saved and class_loaded. If
10950         loading a class_or_name fails, try considering an innerclass name
10951         and load the enclosing context.
10952         * parse.y (resolve_inner_class): New function.
10953         (find_as_inner_class): Added leading comment.
10954         (register_incomplete_type): Keep the current context as enclosing
10955         context for JDEP_FIELD dependencies.
10956         (do_resolve_class): Locals new_class_decl and super initialized to
10957         NULL. Call resolve_inner_class, explore the enclosing context
10958         superclass if necessary.
10959         Fixes PR java/4007
10961 2001-08-16  Tom Tromey  <tromey@redhat.com>
10963         * jcf-dump.c (main): Updated for change to jcf_path_seal.
10964         * gjavah.c (main): Updated for change to jcf_path_seal.
10965         * lang.c (version_flag): New global.
10966         (java_decode_option): Recognize `-version'.
10967         (java_init): Update for change to jcf_path_seal.
10968         * jcf.h (jcf_path_seal): Added `print' argument.
10969         * jcf-path.c (jcf_path_seal): Added `print' argument.
10971 2001-08-13  Zack Weinberg  <zackw@panix.com>
10973         * Make-lang.in (java/decl.o): Update dependencies.
10974         * decl.c: Include libfuncs.h, don't include toplev.h.
10976 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10978         * decl.c (init_decl_processing): exception_type_node,
10979         class_not_found_type_node, and no_class_def_found_type_node
10980         initialized. predef_filenames augmented accordingly.
10981         instinit_identifier_node initialized.
10982         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10983         * java-tree.h (enum java_tree_index): New entries
10984         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10985         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10986         (exception_type_node): New macro.
10987         (class_not_found_type_node): Likewise.
10988         (no_class_def_found_type_node): Likewise.
10989         (instinit_identifier_node): Likewise.
10990         (PREDEF_FILENAMES_SIZE): Adjusted.
10991         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10992         (struct lang_type): Fixed typo in bitfield name.
10993         (DECL_INSTINIT_P): New macro.
10994         (ID_INSTINIT_P): Likewise.
10995         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10996         attribute.
10997         * parse.y (encapsulate_with_try_catch): New function.
10998         (generate_instinit): Likewise.
10999         (build_instinit_invocation): Likewise.
11000         (ctors_unchecked_throws_clause_p): Likewise.
11001         (add_instance_initializer): Deleted.
11002         (build_instance_initializer): Likewise.
11003         (in_instance_initializer): Likewise.
11004         (check_method_redefinition): instinit$ not to be verified.
11005         (java_complete_expand_methods): Generate instinit$, simplified code.
11006         (build_dot_class_method): Eliminated unnecessary locals. Use
11007         encapsulate_with_try_catch, removed unnecessary code.
11008         (fix_constructors): New local iii. Use build_instinit_invocation.
11009         (patch_method_invocation): Added comment.
11010         (maybe_use_access_method): Don't consider instinit$.
11011         (find_applicable_accessible_methods_list): Shorten the search for
11012         instinit$ too.
11013         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
11014         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
11015         (patch_throw_statement): Likewise. Fixed typo.
11017 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
11019         Revert:
11020         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
11021         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
11022         ASM_FINAL_SPEC.
11023         (lang_specific_pre_link): Use set_input to set input_filename.
11024         Append `main' here.
11025         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
11026         (main): Fix definition.
11027         Strip `main' from classname.
11028         Fixes PR java/227.
11030 2001-08-11  Zack Weinberg  <zackw@panix.com>
11032         * lex.h: Don't include setjmp.h.  Don't define
11033         SET_FLOAT_HANDLER or prototype set_float_handler.
11035 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11037         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
11038         `poplevel' in the right order.
11040 2001-08-09  Richard Henderson  <rth@redhat.com>
11042         * Make-lang.in (class.o): Depend on TARGET_H.
11043         * class.c (emit_register_classes): Use target hooks instead of
11044         assemble_constructor and assemble_destructor.
11046 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
11048         * check-init.c (flags.h): Include
11049         (check_init): Don't report uninitialized static class
11050         initialization flags, don't free bit index when doing static class
11051         initialization optimization.
11052         (check_for_initialization): Return type changed to `unsigned int.'
11053         (attach_initialized_static_class): New function.
11054         * class.c (add_method_1): Create the initialized static class
11055         table if necessary.
11056         (finish_class): Always emit deferred inline methods.
11057         * decl.c (emit_init_test_initialization): Moved to expr.c
11058         (complete_start_java_method): Don't traverse
11059         DECL_FUNCTION_INIT_TEST_TABLE.
11060         (lang_mark_tree): Mark hash tables in function decls.
11061         * expr.c (emit_init_test_initialization): Moved from decl.c.
11062         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
11063         initialization flag, set DECL_CONTEXT and
11064         LOCAL_CLASS_INITIALIZATION_FLAG.
11065         (java_lang_expand_expr): Emit initialization code for static class
11066         initialized flags when entering block, if necessary.
11067         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
11068         * java-tree.h (flag_optimize_sci): New global variable declaration.
11069         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
11070         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
11071         (LOCAL_FINAL_P): Fixed typo in comment.
11072         (FINAL_VARIABLE_P): Likewise.
11073         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
11074         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
11075         (struct lang_decl): New fields `ict', `smic' and `cif.'
11076         (check_for_initialization): New returned value for global.
11077         (attach_initialized_static_class): New global function.
11078         (STATIC_CLASS_INIT_OPT_P): New macro.
11079         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
11080         * lang.c (java_decode_option): Handle
11081         `-fno-optimize-static-class-initialization'
11082         * parse.y (start_complete_expand_method): New function.
11083         (java_expand_method_bodies): Likewise.
11084         (attach_init_test_initialization_flags): Likewise.
11085         (adjust_init_test_initialization): Likewise.
11086         (emit_test_initialization): Likewise.
11087         (java_complete_expand_methods): Nullify abstract and native method
11088         bodies.
11089         (java_complete_expand_method): New locals `fbody', `block_body'
11090         and `exception_copy.' Reorganized: directly return on empty method
11091         bodies, call `start_complete_expand_method', remember definitely
11092         initialized static class in function, don't expand method bodies.
11093         (java_expand_classes): Call `java_expand_method_bodies' before
11094         `finish_class' when compiling to native.
11095         (resolve_expression_name): Use `orig' after building outer class
11096         field access.
11097         (patch_invoke): Remember static method invocations.
11099 2001-08-06  Richard Henderson  <rth@redhat.com>
11101         * class.c (emit_register_classes): Pass a symbol_ref and priority
11102         to assemble_constructor.
11104 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
11106         * java-tree.h (all_class_filename): New macro.
11107         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
11108         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
11109         newly created IDENTIFIER_NODE to `all_class_filename.'
11111 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
11113         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
11114         Use ggc_add_tree_root to register roots.
11116 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11118         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
11119         second operand calling check_init.
11120         * decl.c (complete_start_java_method): Swaped second and third
11121         arguments while creating WITH_CLEANUP_EXPR node.
11122         * jcf-write.c (generate_bytecode_insns): Use second operand
11123         instead of third when handling WITH_CLEANUP_EXPR.
11124         * parse.y (java_complete_lhs): Expand second operand of
11125         WITH_CLEANUP_EXPR nodes.
11126         (patch_synchronized_statement): Swaped second and third arguments
11127         while creating WITH_CLEANUP_EXPR node.
11129 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
11131         * parse.y (create_interface): Avoid cyclic inheritance report when
11132         syntax error encountered during class definition.
11133         Fixes PR java/2956
11135 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
11137         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
11138         ASM_FINAL_SPEC.
11139         (lang_specific_pre_link): Use set_input to set input_filename.
11140         Append `main' here.
11141         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
11142         (main): Fix definition.
11143         Strip `main' from classname.
11144         Fixes PR java/227.
11146 2001-07-18  Tom Tromey  <tromey@redhat.com>
11148         For PR java/2812:
11149         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
11150         * lex.c (java_new_lexer): Use ICONV_CONST.
11151         (java_read_char): Likewise.
11152         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
11153         (jv-scan$(exeext)): Likewise.
11155 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
11157         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
11158         * parse.y (check_class_interface_creation): Allow `private' if the
11159         enclosing is not an interface.
11160         (create_interface): Interface tagged public if the enclosing
11161         context is an interface.
11162         (create_class): Class tagged public if the enclosing context
11163         is an interface.
11164         Fixes PR java/2959
11166 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
11168         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
11169         Fixes PR java/2665
11171 2001-07-14  Tim Josling  <tej@melbpc.org.au>
11173         * check-init.c (check_init): Remove references to EXPON_EXPR.
11175 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
11177         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
11178         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
11179         Fixes PR java/3602
11181 2001-07-13  Tom Tromey  <tromey@redhat.com>
11183         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
11184         invocation.
11186 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
11188         * parse.y (patch_method_invocation): Don't override primary if one
11189         is already provided, but let this$<n> be built. Fixed comment.
11191 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
11193         * parse.y (empty_statement:): Report empty statement error only
11194         when found at class declaration level.
11195         Fixes PR java/3635
11197 2001-07-12  Tom Tromey  <tromey@redhat.com>
11199         * expr.c (expand_load_internal): New function.
11200         (LOAD_INTERNAL): Use it.
11202 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
11204         * parse.y (verify_constructor_super): Compare anonymous class ctor
11205         args with `valid_method_invocation_conversion_p.'
11206         Fixes PR java/3285
11208 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
11210         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
11211         `-fsyntax-only.' Fixes PR java/3248
11213 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
11215         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
11217 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
11219         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
11220         current function is static. Fixes PR java/1970
11222 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11224         * parse.y (patch_method_invocation): Add enclosing context to ctor
11225         calls if necessary. Fixes PR java/2953
11227 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11229         * parse.y (resolve_package): Abort if qualified expression member
11230         isn't right.
11231         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
11232         Fixes PR java/1391
11234 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
11236         * verify.c: Don't use // comments.
11238 2001-07-05  Tom Tromey  <tromey@redhat.com>
11240         * lang.c (flag_assume_compiled): Removed.
11241         * java-tree.h (flag_assume_compiled): Removed.
11242         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
11243         -fhash-synchronization, -fuse-divide-subroutine,
11244         -fcheck-references, -femit-class-file, -femit-class-files,
11245         -fassume-compiled.  Updated --encoding information.  Changed
11246         -foutput-class-dir to `-d'.
11248 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
11250         * jcf-parse.c (parse_class_file): Add lineno parameter to
11251         debug_start_source_file call.
11253 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11255         * gcj.texi: Use gpl.texi.
11256         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
11257         dependencies and use doc/include in search path.
11259 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
11261         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
11262         `this'.  If so, don't build instance initializers.
11264 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
11266         * parse.y (resolve_expression_name): Improved error message for
11267         inner class cases. Fixes PR java/1958
11269 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
11271         * lang.c: #include diagnostic.h
11272         (lang_print_error): Add a `diagnostic_context *' parameter.
11273         (java_dummy_print): Likewise.
11274         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
11276 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
11278         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
11279         * jcf.h (typedef struct JCF): New bitfield `finished.'
11280         (JCF_FINISH): Set `finished.'
11281         (JCF_ZERO): Reset `finished.'
11282         Fixes PR java/2633
11284 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
11286         * parse.y (class_body_declaration:): Don't install empty instance
11287         initializers.
11288         Fixes PR java/1314
11290 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
11292         * class.c (set_super_info): Call `set_class_decl_access_flags.'
11293         (set_class_decl_access_flags): New function.
11294         * java-tree.h (set_class_decl_access_flags): New prototype.
11295         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11296         (parse_class_file): New local `decl_max_locals.' Take wide types
11297         into account to compute DECL_MAX_LOCALS.
11298         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11299         imports on demand.
11301 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
11303         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11305 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11307         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11308         * parse.y (do_resolve_class): Moved comments out to leading comment
11309         section. Removed local `start', New local `_ht' and
11310         `circularity_hash.'  Record `enclosing' in hash table and search
11311         it to detect circularity.  Use `enclosing' as an argument to
11312         `lookup_cl.' Free the hash table when done.
11314 2001-06-19  Tom Tromey  <tromey@redhat.com>
11316         * lex.c (java_read_char): Disallow invalid and overlong
11317         sequences.  Fixes PR java/2319.
11319 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
11321         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11323 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11325         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11326         arguments accordingly.
11328 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11330         * gcj.texi: Move contents to just after title page.
11332 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
11334         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11335         builtin type.
11336         (patch_incomplete_class_ref): Build the class ref, build the class
11337         init if necessary, complete the tree.
11338         Fixes PR java/2605
11340 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11342         * parse.y (lookup_field_wrapper): Test `name' code.
11343         (resolve_qualified_expression_name): Test `qual_wfl' code.
11344         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11345         handle `qual_wfl' by code.
11346         (maybe_build_primttype_type_ref): Test `wfl' code.
11348 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11350         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11351         fdl.texi.
11352         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
11353         the dvi file in the java directory.
11355 2001-05-25  Sam TH  <sam@uchicago.edu>
11357         * gen-table.pl javaop.h jcf.h lex.h,
11358         parse.h: Fix header include guards.
11360 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
11362         * jv-scan.c (version): Update copyright year.
11364 2001-05-21  Per Bothner  <per@bothner.com>
11366         * jcf-parse.c (read_class):  If class is from .class or .zip file
11367         and it's already been read, don't push/pop parser context.
11369 2001-05-18  Per Bothner  <per@bothner.com>
11371         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
11372         command line so the jvgenmain-generated main program comes first.
11374 2001-05-15  Tom Tromey  <tromey@redhat.com>
11376         * class.c (build_utf8_ref): Don't generate identifier based on
11377         utf8const contents.
11379 2001-05-12  Richard Henderson  <rth@redhat.com>
11381         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11382         * expr.c (java_lang_expand_expr): Expand it.
11383         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11384         calling build_exception_object_ref.
11385         * parse.y (catch_clause_parameter): Likewise.
11386         (build_dot_class_method): Likewise.
11387         (try_reference_assignconv): Likewise.
11388         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11389         * jcf-write.c (generate_bytecode_insns): Likewise.
11391 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
11393         * parse.y (build_unresolved_array_type): Set
11394         EXPR_WFL_QUALIFICATION on the newly created wfl.
11395         Fixes PR java/2538. Fixes PR java/2535.
11397 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
11399         * parse.y (fix_constructors): Removed unnecessary assignment to
11400         local. Moved assignment to `this$<n>', fixed comments and
11401         indentation.
11402         (build_wfl_wrap): Fixed indentation.
11403         Fixes PR java/2598, java/2579 and java/2658.
11405 2001-05-03  Mo DeJong  <mdejong@redhat.com>
11407         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11408         check for byte swap.
11410 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
11412         * expr.c (build_class_init): Move MODIFY_EXPR
11413         outside of COND_EXPR.  Remove variable `call'.
11415 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11417         * decl.c: NULL_PTR -> NULL.
11418         * jcf-write.c: Likewise.
11420 2001-05-01  Tom Tromey  <tromey@redhat.com>
11422         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11423         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11424         * gcj.texi: Updated copyright text.  Include fdl.texi.
11425         (Top): Link to new node.
11427 2001-05-01  Per Bothner  <per@bothner.com>
11429         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
11431 2001-05-01  Per Bothner  <per@bothner.com>
11433         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
11434         import_list contains the name, not the TREE_PURPOSE.
11436 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11438         * jcf-io.c (read_zip_member): Cast to long in comparison with
11439         signed value.
11441         * jvspec.c (lang_specific_driver): Initialize variables.
11443         * mangle.c (find_compression_record_match): Likewise.
11445         * typeck.c (build_null_signature): Provide static prototype.  Mark
11446         parameter with ATTRIBUTE_UNUSED.
11448         * verify.c (verify_jvm_instructions): Initialize variable.
11450 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11452         * parse.y (do_resolve_class): Check for cyclic inheritance during
11453         inner class resolution.
11455 2001-04-27  Per Bothner  <per@bothner.com>
11457         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
11458         while iterating, since that could cause gc to lose stuff.
11460 2001-04-26  Per Bothner  <per@bothner.com>
11462         Fix method search wrt scope of inner classes to match JLS2.
11463         * typeck.c (build_null_signature):  New static function.
11464         (has_method):  New function.  Uses build_null_signature and lookup_do.
11465         * java-tree.h (has_method):  New declaration.
11466         * parse.y (find_applicable_accessible_methods_list):  Do not search
11467         context of inner classes here.
11468         (patch_method_invocation):  Search scope, ie. current and outer clases,
11469         for method matching simple name, to find class.
11471 2001-04-26  Per Bothner  <per@bothner.com>
11473         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11474         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
11476         * constants.c (find_methodref_with_class_index):  New function.
11477         (find_methodref_index):  Use find_methodref_with_class_index.
11478         * java-tree.h (find_methodref_with_class_index):  New declaration.
11479         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
11480         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11481         If context changed from interface to class, don't use invokeinterface.
11483 2001-04-25  Per Bothner  <per@bothner.com>
11485         * verify.c (verify_jvm_instructions):  For field instructions,
11486         check that field index is valid.  For invoke instructions, check that
11487         method index is valid.
11489 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
11491         * config-lang.in (target_libs): Copy from $libgcj_saved.
11493 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11495         * decl.c (init_decl_processing): Add new class "protectionDomain"
11496         field.
11497         * class.c (make_class_data): Set initial value for "protectionDomain".
11499 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11501         * jvspec.c (lang_specific_driver): Fix memory allocation
11502         deficit, by using concat in lieu of xmalloc/sprintf.
11504 2001-04-20  Per Bothner  <per@bothner.com>
11506         Fixes to compile multiple .class files at once.
11507         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
11508         * java-tree.h (CLASS_PARSED_P):  New macro.
11509         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11510         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
11511         (read_class):  Avoid some code duplication.
11512         Don't call JCF_FINISH for a .class file - might be needed later.
11513         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
11514         rather than CLASS_LOADED_P, since latter implies class laid out.
11515         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
11516         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
11518 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11520         * Make-lang.in (java/boehm.o): Depend on toplev.h.
11522         * boehm.c: Include toplev.h.
11524 2001-04-06  Tom Tromey  <tromey@redhat.com>
11525             Alexandre Petit-Bianco  <apbianco@redhat.com>
11527         Fix for PR gcj/1404 and PR gcj/2332:
11528         * parse.y (build_array_from_name): If we use the type_wfl then
11529         accumulate dimensions from the original type as well.
11530         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11532 2001-04-06  Tom Tromey  <tromey@redhat.com>
11534         * parse.y (analyze_clinit_body): Return true if the second operand
11535         of a METHOD_EXPR is nonzero.
11537 2001-04-06  Tom Tromey  <tromey@redhat.com>
11539         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11540         directory.
11541         ($(srcdir)/java/parse.c): Likewise.
11543 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
11545         * gcj.texi: Use `which-gcj' instead of `which-g77.'
11546         (version-gcc): Initialized.
11547         (which-gcj): Likewise.
11549 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11551         * java-tree.h (struct lang_decl): New macro
11552         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11553         * parse.y (build_instance_initializer): New function.
11554         (add_instance_initializer): Use it.
11555         (java_fix_constructors): Set `current_class' before fix pass.
11556         (fix_constructors): Just return if already fixed. Move `super()'
11557         invocation ahead. Use `build_instance_initializer.'
11558         Fixes PR java/1315.
11560 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11562         * parse.y (resolve_qualified_expression_name): Pass field's
11563         DECL_CONTEXT to `not_accessible_p.'
11564         (not_accessible_p): Changed parameters order in `inherits_from_p'
11565         invocation.
11567 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
11569         * lang-options.h: Add flag_check_references.
11571 2001-04-04  Per Bothner  <per@bothner.com>
11573         * java-tree.h (CONSTANT_VALUE_P):  New macro.
11574         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
11575         * parse.y (maybe_build_class_init_for_field):  New static function.
11576         (resolve_expression_name, resolve_field_access):  Use
11577         maybe_build_class_init_for_field instead of build_class_init
11578         This does not do the init if the field is compile-time-constant.
11579         (resolve_field_access):  Simplify.
11581         * parse.y (fold_constant_for_init):  Merge test into switch.
11583 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
11585         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11586         on gansidecl.h.
11587         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11589 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
11591         * expr.c (pop_type_0): Save the result of the first
11592         lang_printable_name call in a scratch buffer, so it
11593         won't be clobbered by the second call.
11595 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
11597         * parse-scan.y (array_type:): Rewritten.
11598         (type_declaration:): `empty_statement' replaces `SC_TK.'
11599         (class_member_declaration:): `empty statement' added.
11600         (method_body:): Simplified.
11601         (static_initializer:): Likewise.
11602         (primary_no_new_array:): Use `type_literals.'
11603         (type_literals:): New rule.
11604         (dims:): Set and update `bracket_count.'
11605         Fixes PR java/1074. Fixes PR java/2412.
11607 2001-03-28  Hans Boehm  <boehm@acm.org>
11609         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11610         (get_boehm_type_descriptor): Set type on returned value to be a
11611         pointer length integer.
11613 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11615         * expr.c (pop_type_0): Call `concat' rather than building the
11616         string manually.
11617         (pop_type): Add format specifier in call to `error'.
11619         * parse.y (patch_method_invocation): Avoid casting away
11620         const-ness.
11622 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
11624         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11626 2001-03-28  Richard Henderson  <rth@redhat.com>
11628         IA-64 ABI Exception Handling:
11629         * Make-lang.in (except.o): Don't depend on eh-common.h.
11630         * check-init.c (check_init): Handle EXC_PTR_EXPR.
11631         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11632         [soft_exceptioninfo_call_node]: Remove.
11633         [eh_personality_libfunc, lang_eh_runtime_type]: New.
11634         (end_java_method): No emit_handlers.
11635         * except.c (java_set_exception_lang_code): Remove.
11636         (method_init_exceptions): Don't call it.
11637         (prepare_eh_table_type): No CATCH_ALL_TYPE.
11638         (build_exception_object_ref): New.
11639         (expand_end_java_handler): Update for except.h name changes.
11640         (emit_handlers, expand_resume_after_catch): Remove.
11641         * expr.c (java_lang_expand_expr): Update for except.h name changes.
11642         (process_jvm_instruction): Use build_exception_object_ref.
11643         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11644         (soft_exceptioninfo_call_node): Remove.
11645         (build_exception_object_ref): Declare.
11646         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11647         soft_exceptioninfo_call_node.  Move processing ...
11648         [EXC_PTR_EXPR]: ... here.
11649         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11650         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11651         (source_end_java_method): No java_set_exception_lang_code or
11652         emit_handlers.
11653         (build_dot_class_method): Use build_exception_object_ref.
11654         (try_reference_assignconv): Check EXC_PTR_EXPR not
11655         soft_exceptioninfo_call_node.
11657 2001-03-28  Richard Henderson  <rth@redhat.com>
11659         * java-tree.h (throw_node): Define as a single member of
11660         java_global_trees instead of a separate array.
11661         (JTI_THROW_NODE): New.
11662         * decl.c (throw_node): Don't declare.
11663         (init_decl_processing): Init a scalar throw_node.
11664         Don't register it for gc.
11665         * check-init.c (check_init): Reference scalar throw_node.
11666         * expr.c (build_java_athrow): Likewise.
11667         * jcf-write.c (generate_bytecode_insns): Likewise.
11668         * parse.h (BUILD_THROW): Likewise.
11670 2001-03-28  Richard Henderson  <rth@redhat.com>
11672         * decl.c (end_java_method): Do not save and restore
11673         flag_non_call_exceptions.
11674         * parse.y (source_end_java_method): Likewise.
11675         * lang.c (flag_exceptions): Don't declare.
11676         (java_init_options): Set flag_non_call_exceptions.  Set
11677         flag_exceptions here ...
11678         (java_init): ... not here.
11680 2001-03-27  Richard Henderson  <rth@redhat.com>
11682         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11683         exceptions_via_longjmp.
11685         * lang.c (flag_new_exceptions): Don't declare it.
11686         (java_init_options): Or set it.
11688 2001-03-27  Richard Henderson  <rth@redhat.com>
11690         * decl.c (end_java_method): Rename asynchronous_exceptions to
11691         flag_non_call_exceptions.
11692         * parse.y (source_end_java_method): Likewise.
11694 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11696         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11698 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11700         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11702 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
11704         * parse.y (find_as_inner_class): Follow current package
11705         indications not to mistakingly load an unrelated class.
11707 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11709         * constants.c (PUTN): Use memcpy, not bcopy.
11711         * lex.c (java_read_char): Use memmove, not bcopy.
11713         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11715 2001-03-23  Per Bothner  <per@bothner.com>
11717         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
11718         macro for better error pin-pointing.
11719         * java-tree.h:  Fix typo in comment.
11721         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
11722         Don't include jsr/goto in exception range.
11723         Check if start and end of exception range are the same (also TRY_EXPR).
11724         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11725         However, do emit the following goto even if try_block is empty.
11726         Defer freeing exception_decl until after the finalizer, to make
11727         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
11729         * parse.y (java_complete_lhs):  If the try-clause is empty, just
11730         return the finally-clause and vice versa.
11732 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
11734         * gcj.texi (Input Options): documented the check for attribute
11735         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11736         * java-tree.h (flag_force_classes_archive_check): Declared extern.
11737         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11738         (jcf_parse): Check for the right classes archive if necessary.
11739         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11740         (jcf_parse_fields): Fixed indentation.
11741         * jcf-write.c (append_gcj_attribute): New function.
11742         (generate_classfile): Compute the attribute count, invoke
11743         `append_gcj_attribute'.
11744         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11745         turned into bit-fields. New bit-field `right_zip.'
11746         (JCF_ZERO): Set `right_zip' to zero.
11747         * lang-options.h (-fforce-classes-archive-check): Added flag.
11748         * lang.c (flag_force_classes_archive_check): New flag.
11749         (lang_f_options): New entry `force-classes-archive-check.'
11750         Fixes PR java/1213.
11752 2001-02-07  Andrew Haley  <aph@redhat.com>
11754         * gcj.texi (Configure-time Options): Add -fcheck-references.
11755         * expr.c (build_java_indirect_ref): New function.
11756         (java_check_reference): New function.
11757         (build_java_array_length_access): Use build_java_indirect_ref to
11758         check for null references.
11759         (build_java_arrayaccess): Likewise.
11760         (build_get_class): Likewise.
11761         (build_field_ref): Likewise.
11762         (invoke_build_dtable): Likewise.
11763         (build_invokeinterface): Likewise.
11764         * lang.c (lang_f_options): Add flag_check_references.
11765         * jvspec.c (jvgenmain_spec): Add flag_check_references.
11766         * java-tree.h (flag_check_references): New variable.
11767         * lang.c (flag_check_references): Likewise.
11768         * parse.y (patch_invoke): Use java_check_reference.
11769         (patch_assignment): Allow for extra nesting in
11770         _Jv_CheckArrayStore.
11772 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
11774         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11775         * lex.c (cxx_keywords): Likewise.
11777 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11779         * parse.y (qualify_ambiguous_name): Broaden `length'
11780         recognition. Help MODIFY_EXPR be resolved as expression names.
11781         Fixes PR java/2066. Fixes PR java/2400.
11783 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
11785         * gjavah.c (process_file): Mark interface definitions with
11786         "__attribute__ ((java_interface))".
11788 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11790         * class.c (layout_class): Fixed push_super_field's second
11791         argument. Fixes PR java/2333.
11792         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11793         too early to lay innerclasses out.
11795 2001-03-20  Tom Tromey  <tromey@redhat.com>
11796             Alexandre Petit-Bianco <apbianco@redhat.com>
11798         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11799         inside an array reference. Insertion of the array store check
11800         rewritten. Fixes PR java/2299.
11802 2001-03-20  Tom Tromey  <tromey@redhat.com>
11804         * lex.c (java_read_unicode): Only accept leading `u's.
11806 2001-03-20  Tom Tromey  <tromey@redhat.com>
11808         * jcf-parse.c (read_class): Initialize `class'.
11810 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11812         * jcf_parse.c (jcf_parse): Eliminate unused variable.
11814 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11816         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11817         (layout_class): Likewise.
11818         (layout_class_method): Likewise.
11819         (emit_register_classes): Likewise.
11820         * decl.c (builtin_function): Likewise.
11821         (give_name_to_locals): Likewise.
11823 2001-03-19  Per Bothner  <per@bothner.com>
11825         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
11826         before trying to load an inner class.
11828         Fixes to process to command-line .class files in two passes.
11829         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
11830         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
11831         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
11832         * class.c (is_compiled_class):  Fix for renamed flag.
11833         * parse.y (maybe_create_class_interface_decl):  Likewise.
11834         * jcf-parse.c (yyparse):  Also set if compiling .class files.
11835         * jcf-parse.c (read_class);  Read current_class.
11836         (jcf_parse):  Make static.
11837         (load_inner_classes):  New function, with code moved from jcf_parse,
11838         because we need to inner classes after the command-line files are read.
11839         (yyparse):  Set finput to NULL when it doesn't need to be closed.
11840         Reduce use of main_jcf (basically only for archive) and
11841         use finput instead of main_jcf->read_state.
11842         Inline jcf_figure_file_type into yyparse.
11843         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11844         Defer load_inner_classes and parse_class_file to a second pass,
11845         after we've correctly mapped command-line .clas fiels to classes.
11846         (jcf_figure_file_type):  Removed.
11847         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
11848         (JCF_ZERO):  Also clear zipd field.
11849         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
11851 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11853         * jcf-parse.c (yyparse): Change ch from char * to char.
11855 2001-03-19  Per Bothner  <per@bothner.com>
11857         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
11858         Add constructed filelist-file at end, following -xjava.  Thus any .o
11859         and library files are not affected by the -xjava.  Also wrap
11860         explicit @FILE with -xjava and -xnone.
11862 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
11864         * class.c (build_static_field_ref): Call make_decl_rtl() after
11865         setting the DECL_EXTERNAL flag.
11867 2001-03-17  Per Bothner  <per@bothner.com>
11869         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
11871         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
11872         when result is is needed (target is STACK_TARGET).
11874         * parse.h (JDEP_SOLV):  Removed.
11875         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
11877         * parse.y (incomplete_class_list): Removed.
11878         (obtain_incomplete_type): Don't use or set incomplete_class_list.
11879         It doesn't work if resolve_class changes the name of an array type
11880         that is on the list and then someone else looks for the modified name.
11881         Also, seems liable to break when compiling multiple source files at
11882         once.  So the simplest is to just remove incomplete_class_list -
11883         it is only a minor space win and it is not even clear it saves time.
11885         * parse.y (resolve_class):  Remove unneeded promote_type.
11887 2001-03-15  Per Bothner  <per@bothner.com>
11889         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
11890         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
11891         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11892         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11894         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
11895         * parse.y (java_expand_classes):  Likewise.
11897         * parse.y (expand_start_java_method):  Was only called once and had a
11898         misleading name, so inline in caller java_complete_expand_method.
11899         (enter_a_block):  Likewise inline in enter_block and remove.
11901         Remove junk from when gcc/java was created (by copying from C/C++).
11902         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
11903         (struct binding_level):  Remove fields keep, keep_if_subblocks,
11904         more_cleanups_ok, have_cleanups (which have never been used).
11905         (pushlevel, poplevel):  Remove related useless code.
11907         * class.c (make_class_data):  The class_dtable_decl (i.e. the
11908         vtable for Class) should be external, except when compiling Class.
11910         * jvspec.c (lang_specific_driver):  Fix -C handling.
11911         Check -save-temps to see if temp @FILE should be deleted.
11912         Follow-up to/fix for February 16 patch.
11914         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
11915         (type_stack_dup):  Remove no-longer neded error check.
11917 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
11919         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11920         to 'for_pointer'. If this type is for a pointer (argument) mangling,
11921         don't surround the element with 'N..E' if the type name is
11922         unqualified.
11924 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11926         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11927         DECL_RTL_SET_P, etc.
11928         (make_method_value): Likewise.
11929         (get_dispatch_table): Likewise.
11931         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11933 2001-03-07  Tom Tromey  <tromey@redhat.com>
11935         * config-lang.in (lang_requires): Define.
11937 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
11939         * typeck.c (convert): Check flag_unsafe_math_optimizations,
11940         not flag_fast_math.
11942 2001-03-05  Per Bothner  <per@bothner.com>
11944         Fix a problem where rest_of_decl_compilation applied to
11945         class_dtable_decl causes problems because it was done too early,
11946         before output file was opened.
11947         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
11948         * class.c (class_dtable_decl):  Add macro - element of class_roots.
11949         (make_class_data):  Define class_dtable_decl.
11950         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
11952 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11954         * java/class.c, java/decl.c, java/java-tree.h: Replace all
11955         uses of 'boolean' with 'bool'.
11957 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11959         * lang-specs.h: Add zero initializer for cpp_spec field to all
11960         array elements.
11962 2001-02-16  Per Bothner  <per@bothner.com>
11964         Handle compiling multiple input files at once, and @FILE syntax.
11965         * gcj.texi:  Updated documentation to match.
11966         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
11967         * jcf-parse.c (parse_source_file):  Split into ...
11968         (parse_source_file_1):  New function - and:
11969         (parse_source_file_2):  New function.
11970         (yyparse):  On -ffilelist-file, open and scan named file.
11971         On first pass over files, only do parse_source_file_1.
11972         A new second pass calls parse_source_file_2 for each file to compile.
11973         (init_jcf_parse):  Call init_src_parse.
11974         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
11975         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
11976         as multiple input file combined in one compilation.
11977         * lang-options.h:  Add -ffilelist-file
11978         * lang.c (flag_filelist_file):  New flag variable.
11979         (lang_f_options):  Handle -ffilelist-file.
11980         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11981         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
11982         gclass_list - use global fields of src_parse_roots instead.
11983         * parse.y (src_parse_roots):  New array.
11984         (incomplete_class_list, gclass_list):  New macros.
11985         (push_parser_context, java_pop_parser_context,
11986         java_parser_context_resume):  Don't fiddle with deleted fields.
11987         (various):  Use incomplete_class gclass_list and global macros
11988         instead of parse_ctxt fields - the lists are global.
11989         (init_src_parse):  New function.
11991 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11993         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11995 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11997         * parse.y (check_inner_class_access): Moved declaration of local
11998         `enclosing_decl_type' to the right location.
12000 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
12002         * parse.y (parser_check_super_interface): Don't call
12003         check_pkg_class_access for an inner interface.
12004         (parser_check_super): Don't call check_pkg_class_access for inner
12005         class.
12006         (do_resolve_class): Simplify enclosing type loop. Don't call
12007         check_pkg_class_access if CL and DECL are not set.
12008         (find_in_imports_on_demand): Set DECL if class_type needed to be
12009         loaded. Don't call check_pkg_class_access for an inner class.
12010         (check_inner_class_access): Rewritten to implement member access
12011         rules as per spec 6.6.1.
12012         (check_pkg_class_access): Handle the empty package correctly.
12013         (in_same_package): New function. Determine if two classes are in the
12014         same package.
12016 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
12018         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
12019         method into array types.
12020         * parse.y (patch_method_invocation): Bypass access check on clone call
12021         to array instance.
12023 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
12025         * expr.c (build_instanceof): Check for arrays when trying fold to
12026         false.
12028 2001-02-15  Jim Meyering  <meyering@lucent.com>
12030         * Make-lang.in (java.install-common): Depend on `installdirs'.
12031         (java.install-info): Likewise.
12033 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
12035         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
12037 2001-02-14  Tom Tromey  <tromey@redhat.com>
12038             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12040         Fix for PR java/1261.
12041         * typeck.c (build_java_array_type): Add public `clone' method to
12042         arrays.
12043         * parse.y (resolve_qualified_expression_name): Use current_class
12044         when checking for inaccessibility.
12045         (patch_method_invocation): Fixed error message when accessibility
12046         denied.  Added `from_super' argument.
12048 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
12050         * parse.y (resolve_class): Don't build a fake decl. Use the one
12051         already built.
12052         * typeck.c (build_java_array_type): Build and assign decl to array
12053         type.
12055 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
12057         * parse.y (not_accessible_p): Changed leading comment. Added extra
12058         `where' argument. Use it to enforce protected access rules.
12059         (resolve_qualified_expression_name): Added extra argument to
12060         not_accessible_p.
12061         (patch_method_invocation): Use argument `primary' to provide
12062         not_accessible_p with an extra argument.
12063         (lookup_method_invoke): Added extra argument to not_accessible_p.
12064         (search_applicable_method_list): Likewise.
12066 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
12068         * parse.y (resolve_qualified_expression_name): Try to resolve as
12069         an inner class access only if `decl' is a TYPE_DECL.
12071 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12073         * decl.c (classdollar_identifier_node): Initialize.
12074         * java-tree.h (enum java_tree_index): New entry
12075         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
12076         (classdollar_identifier_node): New macro.
12077         (ID_CLASSDOLLAR_P): Likewise.
12078         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
12079         (build_dot_class_method_invocation): Likewise.
12080         (find_applicable_accessible_methods_list): `class$' can't be
12081         inherited.
12083 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
12085         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
12087 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
12089         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
12090         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
12091         gone.
12093 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
12095         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
12096         outside of the `__U' sequence too.
12097         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
12098         sequence too.
12100 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
12102         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
12104 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12106         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
12107         (JVGENMAIN_OBJS): Likewise.
12108         * java-tree.h (append_gpp_mangled_name): New prototype.
12109         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
12110         Removed cast calling `gcc_add_root.'
12111         * jvgenmain.c (mangle_obstack): New global, initialized.
12112         (main): Use it.
12113         (do_mangle_class): Constify local `ptr.'
12114         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
12115         append_gpp_mangle_name and update `count' if necessary.
12116         Use `mangle_obstack.'
12117         * mangle.c (append_unicode_mangled_name): Removed.
12118         (append_gpp_mangled_name): Likewise.
12119         (unicode_mangling_length): Likewise.
12120         (mangle_member_name): Return type set to `void.'
12121         (mangle_field_decl): Don't append `U' in escaped names.
12122         (mangle_method_decl): Likewise.
12123         (mangle_member_name): Just use `append_gpp_mangled_name.'
12124         * mangle_name.c: New file.
12126 2001-02-07  Per Bothner  <per@bothner.com>
12128         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
12130         * check-init.c (check_init):  Don't call done_alternative after
12131         processing loop code, as a LOOP_EXPR never terminates normally.
12133 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12135         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
12137 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12139         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
12140         DECLs.
12142 2001-02-06  Tom Tromey  <tromey@redhat.com>
12144         * lex.c (java_new_lexer): Longer error message.
12146 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
12147             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12149         * typeck.c (build_prim_array_type): Added leading comment.
12150         (build_java_array_type): Moved locals out of
12151         block. Always create the `data' field, fixed alignment to match
12152         C++.
12154 2001-02-04  Tom Tromey  <tromey@redhat.com>
12156         * expr.c (java_lang_expand_expr): Don't bother recomputing
12157         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
12158         Fixes PR java/1866.
12160 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12162         * parse.y (process_imports): Save the original name of the import
12163         for better error report.
12165 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
12167         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
12168         of macros used when compiling jvspec.c.
12169         * jvspec.c (lang_specific_driver): Link with the shared
12170         libgcc by default.
12172 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12174         * check-init.c (check_init): Call internal_error instead of fatal.
12175         * expr.c (java_lang_expand_expr): Likewise.
12176         * jcf-parse.c (get_constant): Likewise.
12177         * mangle.c (java_mangle_decl): Likewise.
12178         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
12179         (operator_string): Likewise.
12180         * check-init.c (check_init): Call abort instead of fatal.
12181         * class.c (build_class_ref): Likewise.
12182         * constants.c (write_constant_pool): Likewise.
12183         * decl.c (start_java_method): Likewise.
12184         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
12185         (java_stack_dup, encode_newarray_type): Likewise.
12186         (build_java_array_length_access): Likewise.
12187         (build_java_check_indexed_type, expand_java_pushc): Likewise.
12188         (build_java_soft_divmod, build_invokeinterface): Likewise.
12189         * java-tree.h (INNER_CLASS_P): Likewise.
12190         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
12191         (give_name_to_class, get_class_constant): Likewise.
12192         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
12193         (find_constant_index, generate_bytecode_conditional): Likewise.
12194         (generate_bytecode_insns, perform_relocations): Likewise.
12195         * lex.c (java_unget_unicode, java_lex): Likewise.
12196         * mangle.c (mangle_type, mangle_record_type): Likewise.
12197         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
12198         (finish_mangling): Likewise.
12199         * parse.h (MARK_FINAL_PARMS): Likewise.
12200         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
12201         (obtain_incomplete_type, java_complete_class): Likewise.
12202         (java_check_regular_methods, java_complete_expand_method): Likewise.
12203         (cut_identifier_in_qualified, check_deprecation): Likewise.
12204         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
12205         (java_complete_lhs, lookup_name_in_blocks): Likewise.
12206         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
12207         * typeck.c (set_local_type, parse_signature_type): Likewise.
12208         (parse_signature_string, build_java_signature): Likewise;
12209         (set_java_signature): Likewise.
12210         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
12211         * class.c (add_method): Call fatal_error instead of fatal.
12212         (build_static_field_ref): Likewise.
12213         * expr.c (build_known_method_ref, expand_invoke): Likewise.
12214         * jcf-parse.c (get_constant, jcf_parse): Likewise.
12215         * lex.c (java_new_new_lexer): Likewise.
12216         * jv-scan.c (main): Likewise.
12217         (fatal_error): Renamed from fatal.
12218         * jcf-parse.c (yyparse): Call fatal_io_error instead of
12219         pfatal_with_name.
12220         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
12221         (yyparse): Likewise.
12222         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
12223         * lex.c (java_get_line_col): Likewise.
12224         * jcf-parse.c (load_class): Make errors non-fatal.
12225         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
12227 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
12229         * jvgenmain.c (class_mangling_suffix): Remove unused string.
12230         (error): Remove unused function.
12231         (main): Don't use "__attribute__ alias" on generated class symbol.
12233 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12235         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
12236         argument.
12237         * parse.y (finish_method_declaration): Code accounting for WFLed
12238         method DECL_NAMEs deleted.
12239         (check_abstract_method_definitions): Likewise.
12240         (resolve_type_during_patch): Layout resolved type.
12241         * typeck.c (lookup_do): Removed unused local.
12243 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
12245         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
12246         * decl.c (init_decl_processing): Use integer_minus_one_node, not
12247         integer_negative_one_node.
12248         * expr.c (build_java_binop): Likewise.
12250 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
12252         * zextract.c (read_zip_archive): Read file_offset before writing
12253         zipd and consequently clobbering the header contents.
12255 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12257         * Make-lang.in: Remove all dependencies on defaults.h.
12258         * decl.c: Don't include defaults.h.
12259         * expr.c: Likewise.
12260         * parse.y: Likewise.
12262 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12264         * ChangeLog (2001-01-21): Fixed typo.
12265         * class.c (layout_class_method): Code accounting for WFLed
12266         method DECL_NAMEs deleted.
12267         * constant.c (find_methodref_index): Likewise.
12268         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
12269         * java-tree.h (DECL_FUNCTION_WFL): New macro.
12270         (struct lang_decl): New field `wfl'.
12271         (java_get_real_method_name): Prototype deleted.
12272         * mangle.c (mangle_method_decl): Code accounting for WFLed
12273         method DECL_NAMEs deleted.
12274         * parse.h (GET_METHOD_NAME): Macro deleted.
12275         * parse.y (reset_method_name): Deleted.
12276         (method_header): Set DECL_FUNCTION_WFL.
12277         (check_abstract_method_header): Code accounting for WFLed method
12278         DECL_NAMEs deleted.
12279         (java_get_real_method_name): Deleted.
12280         (check_method_redefinition): Code accounting for WFLed method
12281         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
12282         (java_check_regular_methods): Likewise.
12283         (java_check_abstract_methods): Likewise.
12284         (java_expand_classes): Don't call `reset_method_name.'
12285         (search_applicable_method_list): Use DECL_NAMEs instead of
12286         GET_METHOD_NAME.
12287         * typeck.c (lookup_do): Code accounting for WFLed method
12288         DECL_NAMEs deleted.
12290 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
12292         * lex.c (java_read_char): Check for EOF from getc first.
12294 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12296         * class.c (layout_class): Don't lay the superclass out if it's
12297         already being laid out.
12298         * jcf-parse.c (handle_innerclass_attribute): New function.
12299         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12300         handle_innerclasses_attribute.
12301         (jcf_parse): Don't load an innerclasses if it's already being
12302         laid out.
12303         * jcf-write.c (append_innerclass_attribute_entry): Static
12304         `anonymous_name' and its initialization deleted. `ocii' and `ini'
12305         to be zero for anonymous classes.
12307 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12309         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12310         necessary.
12311         * jcf-parse.c (set_source_filename): Use
12312         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12314 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12316         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12317         gets a unique asm name.
12319 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12321         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12322         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12323         if necessary.
12324         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12325         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12326         * parse.y (lookup_package_type_and_set_next): Deleted.
12327         (resolve_package): Removed unnecessary code.
12328         (find_applicable_accessible_methods_list): `finit$' can't be
12329         inherited.
12330         * verify.c (pop_argument_types): Added missing prototype.
12332 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
12334         * config-lang.in: Disable java by default.
12336 2001-01-23  Tom Tromey  <tromey@redhat.com>
12338         * gcj.texi (Copying): New node.
12339         Added copyright information.
12341 2001-01-21  Per Bothner  <per@bothner.com>
12343         Various fixes to allow compiling a compressed .jar/.zip archive.
12344         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
12345         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
12346         (struct ZipDirectory):  New field zipf points to owning ZipFile.
12347         * jcf.h (struct ZipDirectory):  Add forward declaration.
12348         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
12349         Remove seen_in_zip and zip_offset fields.
12350         (JCF_SEEN_IN_ZIP):  New macro.
12351         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
12352         * jcf-io.c:  Change all ZipFileCache to ZipFile.
12353         (read_zip_member):  New function.
12354         (open_in_zip):  Call read_zip_member.
12355         * jcf-parse.c (find_in_current_zip):  Remove function.
12356         (read_class):  Merge in find_in_current_zip functionality.
12357         Call read_zip_member if needed.
12358         (parse_zip_file_entries):  Use read_zip_member.
12359         (process_zip_dir):  Update for removed and added JCF fields.
12360         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
12362 2001-01-21  Per Bothner  <per@bothner.com>
12364         Minor optimization of static ggc roots.
12365         * jcf-parse.c (parse_roots):  New static field.
12366         (current_field, current_method, current_file_list):  Replace by macros
12367         naming fields of parse_roots.
12368         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
12369         * class.c (class_roots):  New static field.
12370         (registered_class, fields_ident, info_ident, class_list):
12371         New macros naming fields of parse_roots.
12372         (build_static_field_ref):  Don't register roots here.
12373         (layout_class):  Static field list replaced by macro class_list.
12374         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
12375         Initialize fields_ident and info_ident here.
12377 2001-01-21  Per Bothner  <per@bothner.com>
12379         * jcf-parse.c (ggc_mark_jcf):  New function.
12380         (init_jcf_parse):  Register current_jcf as ggc root.
12382 2001-01-21  Per Bothner  <per@bothner.com>
12384         * lang.c (put_decl_node):  Print method's name.
12386 2001-01-21  Per Bothner  <per@bothner.com>
12388         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
12389         (verify_jvm_instructions):  Use it, for better error messages on loads.
12391 2001-01-21  Per Bothner  <per@bothner.com>
12393         * verify.c (merge_type_state):  Still may have to merge even if
12394         LABEL_VERIFIED (label).
12396 2001-01-21  Per Bothner  <per@bothner.com>
12398         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
12399         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12401 2001-01-19  Per Bothner  <per@bothner.com>
12403         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
12404         if expeting an interface type.  Refines Tom's change of 2000-09-12.
12406 2001-01-18  Per Bothner  <per@bothner.com>
12408         * gcj.texi (Input Options): Mention .java files.
12410 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12412         * lang-options.h (-Wunsupported-jdk11): Removed.
12413         * lang.c (flag_not_overriding): Deleted.
12414         (flag_static_local_jdk1_1): Likewise.
12415         (lang_W_options): Removed "unsupported-jdk11" entry.
12416         * parse.y (java_check_methods): Removed dead code.
12418 2001-01-17  Tom Tromey  <tromey@redhat.com>
12420         Changes suggested by Per Bothner:
12421         * gcj.texi (Input Options): Don't mention input files.
12422         (Code Generation): Updated --main information.
12423         (Invoking jcf-dump): Mention that --javap is incomplete.
12424         From Alexandre Petit-Bianco:
12425         (Warnings): Don't mention -Wunsupported-jdk11.
12426         My stuff:
12427         (Compatibility): Mention JDK 1.2-ness of libraries.
12428         (Resources): Mention resources used when writing gcj.
12430 2001-01-17  Tom Tromey  <tromey@redhat.com>
12432         * gcj.texi: New file.
12433         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12434         (java.info): Depend on gcj.info.
12435         (java/gcj.dvi): New target.
12436         (java.dvi): Depend on gcj.dvi.
12437         (java.install-info): Wrote.
12439 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
12441         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12442         having called make_decl_rtl.
12444 2001-01-14  Per Bothner  <per@bothner.com>
12446         Various patches to emit better messages on verification errors.
12447         * expr.c (push_type_0):  Return error indication on stack overflow,
12448         instead of callinfg fatal.
12449         (push_type):  Now just call push_type_0 (nd fatal on overflow).
12450         (pop_type_0):  Return detailed error message (in a char** argument).
12451         (pop_type):  If pop_type_0 fails, print error message.
12452         (pop_argument_types):  Moved to verify.c.
12453         * verify.c (pop_argument_types):  Moved from expr.c.
12454         Return a (possible) error message, rather than void.
12455         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
12456         (verify_jvm_instruction):  Use new macros, improving error messages.
12457         For case OPCODE_astore use object_ptr_type_node.
12458         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
12459         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
12461         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12462         constant, return body without wrapper.  (Improves constant folding.)
12463         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
12465 2001-01-13  Per Bothner  <per@bothner.com>
12467         * expr.c (expand_java_field_op):  Assigning to a final field outside
12468         an initializer does not violate JVM spec, so should be warning, not
12469         error.  (Sun's verifier does not complain - though MicroSoft's does.)
12471 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
12473         * gjavah.c (version), jcf-dump.c (version): Update copyright year
12474         to 2001.
12476 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
12478         * parse.y (resolve_expression_name): Permit instance variables from
12479         enclosing context in super constructor call.
12480         (resolve_qualified_expression_name): Permit enclosing class's qualified
12481         "this" in super constructor call.
12483 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12485         * class.c (build_utf8_ref): Remove last argument in call to
12486         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12487         (build_class_ref): Likewise.
12488         (build_static_field_ref): Likewise.
12489         (get_dispatch_table): Likewise.
12490         (layout_class_method): Likewise.
12491         (emit_register_classes): Likewise.
12492         * constants.c (build_constant_data_ref): Likewise.
12493         * decl.c (builtin_function): Likewise.
12494         (create_primitive_vtable): Likewise.
12495         * expr.c (build_known_method_def): Likewise.
12496         (build_jni_stub): Likewise.
12497         (java_lang_expand_expr): Likewise.
12499 2001-01-10  Tom Tromey  <tromey@redhat.com>
12501         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12503 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12505         * java-tree.h (lang_printable_name_wls): New prototype.
12506         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12507         rather than `current_class' to print type name. Don't prepend type
12508         names when printing constructor names.
12509         (lang_printable_name_wls): New function.
12510         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12511         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12512         * parse.y (patch_method_invocation): Message tuned for constructors.
12513         (not_accessible_p): Grant `private' access from within
12514         enclosing contexts.
12516 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12518         All files with updated copyright when applicable.
12519         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12520         * class.c (mangle_class_field): Function removed.
12521         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12522         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12523         (build_class_ref): Call `java_mangle_class_field' instead of
12524         `mangle_class_field.'
12525         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12526         (layout_class): Call `java_mangle_decl' instead of
12527         `mangle_static_field.'
12528         (cxx_keywords): Initialized static array moved to `lex.c.'
12529         (layout_class_method): Changed leading comment. Simplified to
12530         call `java_mangle_decl.' Local `ptr' moved in for loop body.
12531         * decl.c (lang_mark_tree): Mark field `package_list.'
12532         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12533         (struct lang_type): New field `package_list.'
12534         (unicode_mangling_length): Prototype removed.
12535         (append_gpp_mangled_name, append_gpp_mangled_classtype,
12536         emit_unicode_mangled_name): Likewise.
12537         (cxx_keyword_p): New prototype.
12538         (java_mangle_decl, java_mangle_class_field,
12539         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12540         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12541         `build_expr_wfl.'
12542         * jvgenmain.c (main_method_prefix): Global variable removed.
12543         (main_method_suffix): Likewise.
12544         (do_mangle_classname): New function.
12545         (main): Call it. Format changed to accommodate new mangling scheme.
12546         * lex.c: (utf8_cmp): Conditionally prototyped.
12547         (cxx_keywords): Moved from class.c, conditionally defined.
12548         (utf8_cmp, cxx_keyword_p): Likewise.
12549         * mangle.c (obstack.h, ggc.h): Included.
12550         (mangle_field_decl): New function.
12551         (mangle_method_decl, mangle_type, mangle_pointer_type,
12552         mangle_array_type, mangle_record_type,
12553         find_compression_pointer_match, find_compression_array_match,
12554         find_compression_record_match,
12555         find_compression_array_template_match, set_type_package_list,
12556         entry_match_pointer_p, emit_compression_string, init_mangling,
12557         finish_mangling, compression_table_add, mangle_member_name): Likewise.
12558         (mangle_obstack): New global.
12559         (MANGLE_RAW_STRING): New macro.
12560         (unicode_mangling_length): Turned static.
12561         (append_unicode_mangled_name): Renamed from
12562         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
12563         replaces `obstack', removed from the parameter list.
12564         (append_gpp_mangled_name): Turned static. `mangle_obstack'
12565         replaces parameter `obstack', removed from the parameter list. Call
12566         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12567         (append_gpp_mangled_classtype): Removed.
12568         (compression_table, compression_next): New static variables.
12569         * parse.y (temporary_obstack): Extern declaration removed.
12571 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12573         * parse.y (patch_binop): Compute missing type in error situations.
12575 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
12577         * class.c (make_class_data): Push initial value for "arrayclass".
12578         * decl.c (init_decl_processing): Add new class field "arrayclass".
12580 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
12582         From patha@softlab.ericsson.se:
12583         * parse.y (switch_label): Use build, not build1, to construct
12584         DEFAULT_EXPR.
12586 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
12588         * lang.c (lang_decode_option): Change -MA to -MP.
12589         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12590         Update to new prototype; do quote targets.
12591         (jcf_dependency_write): Update.
12593 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
12595         Shorten primitive array allocation path:
12596         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12597         to create new primitive arrays.
12598         * expr.c (build_newarray): If generating native code, call
12599         soft_newarray_node with a reference to the primitive TYPE identifier
12600         instead of type_value.
12602 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
12604         Fix for PRs gcj/312 and gcj/253:
12605         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12606         dest if they arn't already.
12607         * class.c (layout_class): Call maybe_layout_super_class on
12608         superinterfaces also, but only if compiling from bytecode.
12610         Fix for PR gcj/373:
12611         * parse.y (create_class): Set ACC_STATIC if class is declared in an
12612         interface.
12614 2000-12-15  Tom Tromey  <tromey@redhat.com>
12616         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12617         set.
12619 2000-12-14  Andrew Haley  <aph@redhat.com>
12621         * boehm.c (mark_reference_fields): Change test to correctly detect
12622         bitmap overflow.
12624 2000-12-15  Andreas Jaeger  <aj@suse.de>
12626         * config-lang.in (lang_dirs): Added.
12628 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12630         * parse.y (end_artificial_method_body): Fixed undefined behavior.
12631         Credits go to rth for finding it.
12633 2000-12-13  Mike Stump  <mrs@wrs.com>
12635         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12637 2000-11-07  Tom Tromey  <tromey@cygnus.com>
12639         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12640         * lex.c (java_ignorable_control_p): Removed.
12641         (java_letter_or_digit_p): Removed.
12642         (java_start_char_p): New function.
12643         (java_read_char): Return `int', not `unicode_t'.  Changed
12644         callers.
12645         (java_read_unicode): Likewise.
12646         (java_read_unicode_collapsing_terminators): Likewise.
12647         (java_get_unicode): Likewise.
12648         (java_new_lexer): Initialize hit_eof.
12649         (java_parse_end_comment): Take `int' argument.
12650         (java_parse_doc_section): Likewise.
12651         (java_parse_escape_sequence): Don't allow backlash-newline.
12652         Return `int'.
12653         * lex.h (JAVA_DIGIT_P): Removed.
12654         (_JAVA_LETTER_OR_DIGIT_P): Removed.
12655         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12656         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12657         (JAVA_PART_CHAR_P): New macro.
12658         (UEOF): Now -1.
12659         (JAVA_CHAR_ERROR): Now -2.
12660         (java_lexer): New field `hit_eof'.
12661         * chartables.h: New file.
12662         * gen-table.pl: new file.
12664 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12665             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12667         * parse.y (java_complete_lhs): Only allow compound assignment of
12668         reference type if type is String.
12670 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12672         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12673         jcf-path.c: Likewise.
12675 2000-12-09  Anthony Green  <green@redhat.com>
12677         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12678         filestart and filename_length as int values.
12680 2000-12-07  Mo DeJong  <mdejong@redhat.com>
12682         * jcf-io.c (find_class): Correct the logic that tests to see if a
12683         .java file is newer than its .class file. The compiler was
12684         incorrectly printing a warning when file mod times were equal.
12686 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
12688         * jvgenmain.c: Use ISPRINT not isascii.
12690 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12692         * parse.y (end_artificial_method_body): Fixed typo.
12694 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12696         * parse.y (patch_method_invocation): Pick the correct enclosing
12697         context when creating inner class instances.
12698         Fixes gcj/332.
12700 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
12702         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12703         Update copyright year to 2000.
12705 2000-11-23  Anthony Green  <green@redhat.com>
12707         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12708         Move current_file_list out of yyparse and make it static.
12710         * expr.c: Declare quick_stack and tree_list_free_list as static
12711         (init_expr_processing): Register quick_stack and
12712         tree_list_free_list roots.
12714 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12716         * parse.y (build_outer_field_access): New local `decl_ctx', use
12717         it. Check for field's context and current class immediate outer
12718         context inheritance.
12719         (outer_field_access_p): Consider fields inherited from the last
12720         enclosing context.
12721         (build_access_to_thisn): Stop at the last enclosing context if
12722         necessary.
12723         Fixes gcj/367.
12725 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12727         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12729 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
12731         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12732         scratch buffer.
12734 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12736         * jv-scan.c (help): Document --complexity.
12737         (options): Added --complexity.
12738         (flag_complexity): New global.
12739         (main): Call `report'.
12740         * parse-scan.y (complexity): New global.
12741         (if_then_statement, if_then_else_statement,
12742         if_then_else_statement_nsi, switch_block_statement_group,
12743         while_expression, do_statement, for_begin, continue_statement,
12744         throw_statement, catch_clause, finally, method_invocation,
12745         conditional_and_expression, conditional_or_expression,
12746         conditional_expression): Update complexity.
12747         (reset_report): Reset complexity.
12748         (report): New function.
12750 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12752         * lex.c (yylex): Added STRICT_TK case.
12753         * parse.y (STRICT_TK): Added.
12754         * parse-scan.y (STRICT_TK): Added.
12755         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12756         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
12757         file.
12758         * keyword.h: Rebuilt.
12759         * keyword.gperf (strictfp): Added.
12761 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12763         * lex.c (yylex): Recognize floating point constants with leading
12764         0.
12766 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12768         * java-tree.h (cyclic_inheritance_report): Constify.
12769         * parse.y (cyclic_inheritance_report): Likewise.
12771 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12773         * parse.y (goal): Remove call to ggc_add_string_root.
12775 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12777         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12778         Create string in scratch buffer, then pass to build_string.
12780 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12782         * parse.y (issue_warning_error_from_context): Add
12783         ATTRIBUTE_PRINTF.
12785 2000-11-11  Anthony Green  <green@redhat.com>
12787         * jcf-parse.c (process_zip_dir): Add finput parameter.
12788         (jcf_figure_file_type): Call process_zip_dir with appropriate
12789         argument.
12791 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12793         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12794         * jcf-parse.c (jcf_figure_file_type): Likewise.
12796 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12798         * parse.y (create_new_parser_context): Use memset () instead of
12799         bzero ().
12801 2000-11-08  Tom Tromey  <tromey@cygnus.com>
12803         * gjavah.c (process_file): Only include gcj/cni.h when generating
12804         CNI stubs.
12806 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12808         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12809         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12810         instead of bzero ().
12812 2000-11-05  Tom Tromey  <tromey@cygnus.com>
12814         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12815         * lex.c (IS_ZERO): New define.
12816         (java_perform_atof): Error on floating point underflow.
12818 2000-11-04  Tom Tromey  <tromey@cygnus.com>
12820         * lex.c (java_parse_escape_sequence): Only read two octal
12821         characters if the first one is greater than 3.  Don't allow
12822         "octal" numbers to include the digits 8 or 9.
12824 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12826         * Make-lang.in (java.distdir): Remove.
12828 2000-11-03  Tom Tromey  <tromey@cygnus.com>
12830         * Make-lang.in (java.dvi): New target.
12831         Partial fix for PR other/567.
12833         * lang-options.h: Mention -Wout-of-date.
12834         * jcf-dump.c (flag_newer): New global.
12835         * gjavah.c (flag_newer): New global.
12836         * jcf-io.c (find_class): Only warn when flag_newer set.
12837         * lang.c (flag_newer): New global.
12838         (struct string_option): New declaration.
12839         (lang_W_options): New global.
12840         (process_option_with_no): New function.
12841         (lang_decode_option): Use it.
12843         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12844         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12845         `$'.
12847         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12848         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12849         * lex.c (java_read_unicode): Removed `term_context' argument.
12850         Recognize any number of `u' in `\u'.
12851         (java_read_unicode_collapsing_terminators): New function.
12852         (java_get_unicode): Use it.
12853         (java_lineterminator): Removed.
12854         (yylex): Produce error if character literal is newline or single
12855         quote.  Return if eof found in middle of `//' comment.  EOF in
12856         `//' comment is only an error if pedantic.
12857         (java_ignorable_control_p): New function.
12858         (java_parse_end_comment): Return if eof found in middle of
12859         comment.
12860         Include flags.h.
12861         * jv-scan.c (pedantic): New global.
12863 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12865         * parse.y (outer_field_access_p): Inherited fields aren't
12866         consider outer fields.
12867         (maybe_build_thisn_access_method): Use
12868         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12869         (resolve_expression_name): Trigger an error if a static field
12870         is being accessed as an outer field.
12872 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12874         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12875         Fixes gcj/365.
12877 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12879         * Make-lang.in: Move all build rules here from Makefile.in,
12880         adapt to new context.  Wrap all rules that change the current
12881         directory in parentheses.  Expunge all references to $(P).
12882         When one command depends on another and they're run all at
12883         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12884         all object-file generation rules.  Delete obsolete variables.
12886         * Makefile.in: Delete.
12887         * config-lang.in: Delete outputs= line.
12889 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12891         * parse.y (patch_method_invocation): NULLify this_arg when already
12892         inserted.
12893         (maybe_use_access_method): Handle call to methods unrelated to the
12894         current class. Fixed comment.
12895         Fixes gcj/361.
12897 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12899         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12900         scope.
12902 2000-10-24  Tom Tromey  <tromey@cygnus.com>
12904         * lex.c (java_new_lexer): Initialize new fields.  Work around
12905         broken iconv() implementations.
12906         (java_read_char): Swap bytes if required.  Use fallback decoder if
12907         required.
12908         (byteswap_init, need_byteswap): New globals.
12909         (java_destroy_lexer): Only close iconv handle if it is in use.
12910         * lex.h (java_lexer): New fields read_anything, byte_swap,
12911         use_fallback.
12912         Made out_buffer unsigned.
12914 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12916         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12917         where an enclosing context can be set on the jdep.
12918         (do_resolve_class): Fixed identation.
12920 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12922         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12924         * jcf-reader.c (peek_attribute, skip_attribute): Only define
12925         when requested.
12927         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12929         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12931 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12933         * jcf-write.c (OP1): Update `last_bc'.
12934         (struct jcf_block): Fixed indentation and typo in comments.  New
12935         field `last_bc'.
12936         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12937         follows `monitorenter'.
12938         * parse.y (patch_synchronized_statement): New local `tmp'. Call
12939         `patch_string'.
12940         Fixes gcj/232.
12942 2000-10-16  Tom Tromey  <tromey@cygnus.com>
12944         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12945         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12946         * lang-options.h: Added -MA, -MT, -MF..
12947         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12948         (DEPEND_TARGET_SET): New macro.
12949         (DEPEND_FILE_ALREADY_SET): Likewise.
12950         (init_parse): Handle new flags.
12951         * jcf.h (jcf_dependency_print_dummies): Declare.
12952         * Make-lang.in (s-java): Added mkdeps.o.
12953         * Makefile.in (BACKEND): Added mkdeps.o.
12954         (../gcjh$(exeext)): Added mkdeps.o.
12955         (../jcf-dump$(exeext)): Added mkdeps.o.
12956         * jcf-depend.c: Include mkdeps.h.
12957         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12958         add_entry): Removed.
12959         (jcf_dependency_reset): Rewrote.
12960         (dependencies): New global.
12961         (jcf_dependency_set_target): Rewrote.
12962         (jcf_dependency_add_target): Likewise.
12963         (jcf_dependency_add_file): Likewise.
12964         (munge): Removed.
12965         (print_ents): Removed.
12966         (jcf_dependency_write): Rewrote.
12967         (print_dummies): New global.
12968         (jcf_dependency_print_dummies): New function
12969         (jcf_dependency_write): Call deps_dummy_targets if required.
12971 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12973         * gjavah.c (add_class_decl): Removed unused variables `tname',
12974         `tlen' and `name_index'.
12975         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12976         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12977         in `wfl_operator' with value.
12978         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12979         (jcf_figure_file_type): Fixed identation.
12980         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12981         * parse.y (analyze_clinit_body): New function.
12982         (static_initializer:): Reset `current_static_block'.
12983         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12984         `wfl_operator' with new value.
12985         (lookup_cl): Use EXPR_WFL_FILENAME.
12986         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12987         analyze_clinit_body.
12988         (build_outer_field_access): Access to this$<n> built from
12989         current_class, not its outer context.
12990         (build_access_to_thisn): Fixed leading comment. Tidied things up.
12991         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12992         (patch_method_invocation): Use `is_static_flag' when already
12993         initialized.
12994         (patch_newarray): Removed assignment in ternary operator.
12996 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12998         * except.c (free_eh_ranges): Don't free `whole_range'.
13000 2000-10-15  Anthony Green  <green@redhat.com>
13002         * decl.c (init_decl_processing): Call init_class_processing before
13003         anything else.
13005 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13007         * check-init.c (check_init): Fixed leading comment. Use
13008         LOCAL_FINAL_P.
13009         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13010         (give_name_to_locals): Likewise.
13011         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
13012         fields in lang_decl_var.
13013         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
13014         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
13015         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
13016         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
13017         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
13018         (LOCAL_FINAL): Rewritten.
13019         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
13020         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
13021         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
13022         `init_final' fields.
13023         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
13024         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
13025         (TYPE_HAS_FINAL_VARIABLE): New macro.
13026         (struct lang_type): Added `afv' field.
13027         * parse.y (check_static_final_variable_assignment_flag): New function.
13028         (reset_static_final_variable_assignment_flag): Likewise.
13029         (check_final_variable_local_assignment_flag): Likewise.
13030         (reset_final_variable_local_assignment_flag): Likewise.
13031         (check_final_variable_indirect_assignment): Likewise.
13032         (check_final_variable_global_assignment_flag): Likewise.
13033         (add_inner_class_fields): Use LOCAL_FINAL_P.
13034         (register_fields): Handle local finals and final variables.
13035         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
13036         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13037         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
13038         on local finals.
13039         (java_complete_expand_methods): Loop to set
13040         TYPE_HAS_FINAL_VARIABLE. Call
13041         `reset_final_variable_local_assignment_flag' and
13042         `check_final_variable_local_assignment_flag' accordingly before
13043         and after constructor expansion. Call
13044         `reset_static_final_variable_assignment_flag'
13045         before expanding <clinit> and after call
13046         `check_static_final_variable_assignment_flag' if the
13047         current_class isn't an interface. After all methods have been
13048         expanded, call `check_final_variable_global_assignment_flag' and
13049         `check_static_final_variable_assignment_flag' if the current class
13050         is an interface.
13051         (maybe_yank_clinit): Fixed typo in comment.
13052         (build_outer_field_access_methods): Removed old sanity check. Use
13053         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13054         Don't create access methods for finals.
13055         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
13056         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
13057         existing DECL_INIT has been processed.
13058         (java_complete_lhs): Likewise.
13059         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
13060         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
13061         logic.
13062         (patch_assignment): Use LOCAL_FINAL_P.
13063         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
13064         DECL_INITIAL is nullified.
13065         Fixes gcj/163.
13067 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13069         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
13071         * Makefile.in (parse.c, parse-scan.c): Likewise.
13073 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
13075         * class.c (temporary_obstack): Remove.
13076         (make_class): Don't mess with obstascks.
13077         (push_class): Likewise.
13078         (set_super_info): Likewise.
13079         (add_method_1): Likewise.
13080         (add_method): Likewise.
13081         (add_field): Likewise.
13082         (build_utf8_ref): Likewise.
13083         (build_class_ref): Likewise.
13084         (build_static_field_ref): Likewise.
13085         (finish_class): Likewise.
13086         (push_super_field): Likewise.
13087         (layout_class): Likewise.
13088         (layout_class_methods): Likewise.
13089         (init_class_processing): Likewise.
13090         * constants.c (get_tag_node): Likewise.
13091         (build_constant_data_ref): Likewise.
13092         * decl.c (ggc_p): Remove.
13093         (copy_lang_decl): Use ggc_alloc.
13094         (complete_start_java_method): Don't mess with obstacks.
13095         (start_java_method): Likewise.
13096         (end_java_method): Likewise.
13097         * except.c (link_handler): Use xmalloc.
13098         (free_eh_ranges): New function.
13099         (method_init_exceptions): Use it.
13100         (add_handler): Use xmalloc.
13101         (expand_start_java_handler): Don't mess with obstacks.
13102         (prepare_eh_table_type): Likewise.
13103         (expand_end_java_handler): Likewise.
13104         * expr.c (push_value): Likewise.
13105         (create_label_decl): Likewise.
13106         (build_jni_stub): Likewise.
13107         (java_lang_expand_expr): Likewise.
13108         (note_instructions): Use xrealloc.
13109         (java_push_constant_from_pool): Don't mess with obstacks.
13110         (process_jvm_instruction): Likewise.
13111         * java-tree.h (cyclic_inheritance_report): Remove duplicate
13112         declaration.
13113         * jcf-parse.c (get_constant): Don't mess with obstacks.
13114         (read_class): Likewise.
13115         (jcf_parse): Likewise.
13116         * lex.c (expression_obstack): Remove.
13117         (java_lex): Don't use obstack_free.
13118         * parse.h (exit_java_complete_class): Don't mess with obstacks.
13119         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
13120         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
13121         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
13122         * parse.y (gaol): Add more GC roots.
13123         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
13124         (lookup_field_wrapper): Likewise.
13125         (obtain_incomplete_type): Don't mess with obstacks.
13126         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
13127         macros.
13128         (craft_constructor): Don't mess with obstacks.
13129         (safe_layout_class): Likewise.
13130         (java_complete_class): Likewise.
13131         (source_end_java_method): Likewise.
13132         (build_outer_field_access_methods): Likewise.
13133         (build_outer_method_access_method): Likewise.
13134         (maybe_build_thisn_access_method): Likewise.
13135         (build_dot_class_method_invocation): Likewise.
13136         (java_complete_tree): Likewise.
13137         (java_complete_lhs): Likewise.
13138         (do_merge_string_cste): Likewise.
13139         (patch_string_cst): Likewise.
13140         (array_constructor_check_entry): Likewise.
13141         * typeck.c (build_java_array_type): Likewise.
13142         (parse_signature_string): Likewise.
13143         (build_java_signature): Likewise.
13145 2000-10-12  Tom Tromey  <tromey@cygnus.com>
13147         Fix for PR gcj/356:
13148         * gjavah.c (add_class_decl): Don't special-case inner classes.
13149         (add_namelet): Likewise.
13151 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
13153         * java-tree.h: Constify current_encoding.
13154         * lang.c: Constify current_encoding.
13156 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
13158         * jvgenmain.c (class_mangling_suffix): Omit `.'.
13159         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
13161 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13163         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
13164         patch. Fixes gcj/340.
13166 2000-10-10  Tom Tromey  <tromey@cygnus.com>
13168         * lex.c (java_new_lexer): Initialize out_first and out_last
13169         fields.
13170         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
13172 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13174         * parse.y (pop_current_osb): New function.
13175         (array_type:): Use `dims:', changed actions
13176         accordingly. Suggested by Anthony Green.
13177         (array_creation_expression:): Used pop_current_osb.
13178         (cast_expression:): Likewise.
13179         (search_applicable_method_list): Fixed indentation.
13181 2000-10-08  Anthony Green  <green@redhat.com>
13183         * parse.y (array_type_literal): Remove production.
13184         (type_literals): Refer to array_type, not array_type_literal.
13186 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13188         Patch contributed by Corey Minyard.
13189         * decl.c (check_local_named_variable): New function.
13190         (tree check_local_unnamed_variable): Likewise.
13191         (find_local_variable): Splitted. Call check_local_{un}named_variable.
13193 2000-10-07  Anthony Green  <green@redhat.com>
13195         * class.c (layout_class): Handle case where superclass can't be
13196         layed out yet.
13198 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13200         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
13201         gperf.
13203 2000-10-05  Tom Tromey  <tromey@cygnus.com>
13205         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
13206         * jvgenmain.c (class_mangling_prefix): Removed.
13207         (class_mangling_suffix): New global.
13208         (main): Use it.
13209         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
13210         `$'.
13211         (print_method_info): Handle overrides for static and final
13212         methods.
13213         (process_file): Generate declaration for class object field.
13214         * class.c (cxx_keywords): New array.
13215         (utf8_cmp): New function.
13216         (cxx_keyword_p): New function.
13217         (layout_class_method): Mangle C++ keywords by appending `$'.
13218         (mangle_field): New function.
13219         (mangle_class_field): Use mangle_field.  Mangle class name as
13220         `class$'.
13221         (mangle_static_field): Use mangle_field.
13223 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13225         * decl.c (find_local_variable): Removed uncessary type check and
13226         fixed range check typo. From Corey Minyard.
13228 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13230         * decl.c (give_name_to_locals): New local `code_offset'. Call
13231         `maybe_adjust_start_pc'.
13232         * expr.c (note_instructions): New function.
13233         (expand_byte_code): Don't collect insn starts here.
13234         (peek_opcode_at_pc): New function.
13235         (maybe_adjust_start_pc): Likewise.
13236         * java-tree.h (maybe_adjust_start_pc): Declare.
13237         (note_instructions): Likewise.
13238         * jcf-parse.c (parse_class_file): Call `note_instructions'.
13240 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13242         * parse.y (field_access:): Fixed indentation.
13243         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
13245 2000-09-07  Tom Tromey  <tromey@cygnus.com>
13247         Fix for PR gcj/307:
13248         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
13249         JPRIMITIVE_TYPE_P, for arithmetic operators.
13250         (patch_method_invocation): Indentation fix.
13251         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
13252         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
13253         (do_unary_numeric_promotion): Cleaned up code.
13254         (valid_cast_to_p): Handle boolean correctly.
13256 2000-09-27  Tom Tromey  <tromey@cygnus.com>
13258         * lex.c (java_read_unicode): Reset bs_count when finished with
13259         `\u' sequence.
13261 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
13263         Convert to GC.
13264         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
13265         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
13266         (typeck.o): Depend on ggc.h.
13267         * class.c (add_method_1): Use GC functions for allocation.
13268         (init_class_processing): Register roots.
13269         * decl.c (ggc_p): Set to 1.
13270         (pending_local_decls): Make it static.
13271         (push_jvm_slot): Use GC functions for allocation.
13272         (init_decl_processing): Register roots.
13273         (give_name_to_locals): Use GC functions for allocation.
13274         (lang_mark_tree): New function.
13275         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
13276         functions for allocation.
13277         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
13278         * lex.c (java_lex): Use build_string, rather than replicating it
13279         inline.
13280         * parse.y (goal): Add more roots.
13281         (mark_parser_ctxt): New function.
13282         * typeck.c: Include ggc.h.
13284 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13286         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
13287         contains something else than MODIFY_EXPR.
13289 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
13291         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13292         * Makefile.in (parse.o): Depend on ggc.h.
13293         (class.o): Likewise.
13294         (constants.o): Likewise.
13295         (decl.o): Likewise.
13296         (expr.o): Likewise.
13297         (jcf-parse.o): Likewise.
13298         (jcf-write.o): Likewise.
13299         (mangle.o): Likewise.
13300         * class.c: Include ggc.h.
13301         (build_static_field_ref): Register GC roots.
13302         (layout_class): Likewise.
13303         (init_class_processing): Likewise.
13304         * constants.c: Include ggc.h.
13305         (current_constant_pool_data_ref): Remove.
13306         (tag_nodes): Move it to ...
13307         (get_tag_node): ... here.  Register GC roots.
13308         * decl.c: Include ggc.h.  Remove many global tree definitions.
13309         (throw_node): Define.
13310         (java_global_trees): Likewise.
13311         (predef_filenames): Make the size a constant.
13312         (init_decl_processing): Adjust accordingly.
13313         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
13314         * expr.c: Include ggc.h.
13315         (init_expr_processing): Register GC roots.
13316         (build_invokeinterface): Likewise.
13317         * java-tree.h: Replace extern tree declarations with macros.
13318         (java_global_trees): New variable.
13319         (java_tree_index): New enumeration.
13320         (init_jcf_parse): Declare.
13321         * jcf-parse.c: Include ggc.h.
13322         (current_class): Remove declaration.
13323         (main_class): Likewise.
13324         (all_class_list): Likewise.
13325         (predefined_filename_p): Adjust for constant size of
13326         predef_filenames.
13327         (init_jcf_parse): New function.
13328         * jcf-write.c: Include ggc.h.
13329         (generate_classfile): Register GC roots.
13330         (append_synthetic_attribute): Likewise.
13331         (append_innerclass_attribute_entry): Likewise.
13332         * lang.c: Include ggc.h.
13333         (lang_print_error): Register GC roots.
13334         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13335         with macros.
13336         * parse.y: Include ggc.h.
13337         (wfl_operator): Remove.
13338         (goal): Register GC roots.
13339         (java_pop_parser_context): Adjust for new field names.
13340         (java_parser_context_save_global): Likewse.
13341         (java_parser_context_restore_global): Likewise.
13342         (java_parser_context_suspend): Likewise.
13343         (java_parser_context_resume): Likewise.
13344         (verify_constructor_circularity): Register GC roots.
13345         (lookup_cl): Likewise.
13346         (java_reorder_fields): Likewise.
13347         (build_current_this): Likewise.
13348         (class_in_current_package): Likewise.
13349         (argument_types_convertible): Likewise.
13350         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13352 2000-09-14  Tom Tromey  <tromey@cygnus.com>
13354         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13356 2000-09-13  Tom Tromey  <tromey@cygnus.com>
13358         * jcf-parse.c: Include <locale.h>.
13359         * jv-scan.c: Include <locale.h>.
13361 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13363         * expr.c (pop_type_0): Return `Object' if trying to merge two
13364         interface types.
13365         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13366         interface types; `Object' is always a valid supertype.
13368 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13370         Fix for PR gcj/33:
13371         * jv-scan.c (help): Document --encoding.
13372         (options): Added `encoding' entry.
13373         (OPT_ENCODING): New define.
13374         (main): Handle --encoding.
13375         Include <langinfo.h> if nl_langinfo exists.
13376         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13377         --encoding.
13378         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13379         (parse_source_file): Correctly call java_init_lex.  Added `finput'
13380         argument.  Use nl_langinfo to determine default encoding.
13381         * java-tree.h (current_encoding): Declare.
13382         * parse.y (java_parser_context_restore_global): Don't restore
13383         `finput'.
13384         (java_parser_context_save_global): Don't set `finput' field.
13385         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
13386         if required.
13387         * lang.c (current_encoding): New global.
13388         (lang_decode_option): Recognize `-fencoding='.
13389         (finish_parse): Don't close finput.
13390         * parse.h (struct parser_ctxt): Removed `finput' and
13391         `unget_utf8_value' fields.  Added `lexer' field.
13392         (java_init_lex): Fixed declaration.
13393         * lex.c (java_new_lexer): New function.
13394         (java_destroy_lexer): Likewise.
13395         (java_read_char): Added `lex' argument.  Handle iconv case.
13396         (java_read_unicode): Added `lex' argument.  Count backslashes in
13397         lexer structure.
13398         (java_init_lex): Added `finput' and `encoding' arguments.  Set
13399         `lexer' field in ctxp.
13400         (BAD_UTF8_VALUE): Removed.
13401         (java_lex): Handle seeing UEOF in the middle of a string literal.
13402         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13403         (java_lexer): New structure.
13404         (UNGETC): Removed.
13405         (GETC): Removed.
13406         (DEFAULT_ENCODING): New define.
13407         (java_destroy_lexer): Declare.
13409 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13411         Fix for PR gcj/343:
13412         * lex.c (java_init_lex): Initialize java_io_serializable.
13413         * parse.y (java_io_serializable): New global.
13414         (valid_ref_assignconv_cast_p): An array can be cast to
13415         serializable.
13417 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
13419         * decl.c, expr.c: Include defaults.h if not already included.
13420         Don't define the *_TYPE_SIZE macros.
13422 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
13424         * typeck.c (build_java_array_type): Correct first parameter
13425         in ADJUST_FIELD_ALIGN invocation.
13427 2000-09-06  Tom Tromey  <tromey@cygnus.com>
13429         * lang-specs.h: Also recognize `-femit-class-files'.
13431 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13433         * verify.c (merge_types): Load the types to merge if necessary.
13435 2000-09-02  Anthony Green  <green@redhat.com>
13437         * jcf-io.c: Include zlib.h.
13438         (open_in_zip): Read compressed class file archives.
13439         * zipfile.h (ZipDirectory): Add uncompressed_size and
13440         compression_method fields.
13441         * zextract.c (read_zip_archive): Collect file compression info.
13443 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
13445         * parse.y (do_resolve_class): Also explore superclasses of
13446         intermediate enclosing contexts when searching for inner classes.
13448 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13450         * parse.y (variable_declarator_id:): Better error message.
13451         (expression_statement:): Use YYNOT_TWICE.
13452         (cast_expression:): Likewise.
13453         (assignment:): Likewise.
13455 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13457         * parse.y (do_merge_string_cste): New locals. Create new
13458         STRING_CSTs each time, use memcpy. Fixes gcj/311.
13460 2000-08-07  Hans Boehm  <boehm@acm.org>
13462         * boehm.c (mark_reference_fields): Set marking bits for all words in
13463         a multiple-word record.
13464         (get_boehm_type_descriptor): Use the procedure marking descriptor for
13465         java.lang.Class.
13467 2000-08-31  Mike Stump  <mrs@wrs.com>
13469         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13470         jcf-dump$(exeext)): Make parallel safe.
13472 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13474         * jcf-parse.c (set_source_filename): Constify a char *.
13475         * jcf-write.c (append_innerclasses_attribute,
13476         make_class_file_name): Constify a char *.  Don't recycle a
13477         variable for an unrelated purpose.
13478         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13479         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13481 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13483         * expr.c (can_widen_reference_to): Fixed indentation.
13484         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13485         * parse.y: `finit$' replaces `$finit$' in comments.
13486         (try_builtin_assignconv): Fixed leading comment.
13488 2000-08-25  Greg McGary  <greg@mcgary.org>
13490         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13492 2000-08-24  Greg McGary  <greg@mcgary.org>
13494         * lang.c (lang_decode_option): Use ARRAY_SIZE.
13495         * parse.y (BINOP_LOOKUP): Likewise.
13497 2000-08-22  Andrew Haley  <aph@cygnus.com>
13499         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13500         sign extending. Fixes gcj/321.
13501         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13502         combining to make a jlong. Fixes gcj/321.
13504 2000-08-21  Nix  <nix@esperi.demon.co.uk>
13506         * lang-specs.h: Do not process -o or run the assembler if
13507         -fsyntax-only.
13509 2000-08-16  Andrew Haley  <aph@cygnus.com>
13511         * typeck.c (build_java_array_type): Rewrite code to do array
13512         alignment.  Take into account back-end macros when aligning array
13513         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13514         user to set alignment. Fixes gcj/252 and 160.
13516 2000-08-09  Tom Tromey  <tromey@cygnus.com>
13518         * parse.y (check_abstract_method_definitions): Now return `int'.
13519         Check implemented interfaces.  Fixes PR gcj/305.
13521         * parse.y (patch_switch_statement): Disallow `long' in switch
13522         expressions.  Fixes PR gcj/310.
13524 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13526         * decl.c (finit_leg_identifier_node): New global.
13527         (init_decl_processing): Use `finit$' to initialize
13528         finit_identifier_node. Use `$finit$' to initialize
13529         finit_leg_identifier_node.
13530         * expr.c (expand_java_field_op): Use ID_FINIT_P.
13531         * java-tree.h (finit_identifier_node): Changed attached comment.
13532         (finit_leg_identifier_node): New declaration.
13533         (ID_FINIT_P): Take finit_identifier_node and
13534         finit_leg_identifier_node into account. This is a backward
13535         compatibility hack.
13537 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13539         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13540         Jan 6 2000 patch.
13541         (generate_bytecode_insns): Check `nargs' before emitting it.
13542         * verify.c (merge_type_state): Fixed typo.
13543         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13544         generate_bytecode_{conditional,insns}.
13546 2000-08-13  Anthony Green  <green@redhat.com>
13548         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13549         for -pg builds).
13551 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13553         * class.c (maybe_layout_super_class): Fixed indentation.
13554         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13555         (java_check_methods): New function declaration.
13556         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13557         instead of `str_ptr'.
13558         * jcf-write.c (generate_bytecode_insns): Emit number the of args
13559         of a `invokeinterface' at the right time.
13560         * parse.h (WFL_STRIP_BRACKET): New macro.
13561         (SET_TYPE_FOR_RESOLUTION): Use it.
13562         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13563         (check_class_interface_creation): Don't check for cross package
13564         innerclass name clashes.
13565         (method_header): Behave properly if MDECL is `error_mark_node'.
13566         (method_declarator): Return `error_mark_node' if bogus current
13567         class.
13568         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13569         (resolve_and_layout): New local `decl_type', set and used. Call
13570         java_check_methods.
13571         (java_check_methods): New method.
13572         (java_layout_classes): Use it.
13573         (resolve_qualified_expression_name): No EH check necessary in
13574         access$<n>.
13575         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13576         `case' statement.
13577         (patch_assignment): Set DECL_INITIAL on integral final local.
13579 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13581         * java-tree.h (flag_extraneous_semicolon): New extern.
13582         * lang-options.h: (-Wextraneous-semicolon): New option.
13583         * lang.c (flag_redundant): Fixed typo in leading comment.
13584         (flag_extraneous_semicolon): New global.
13585         (lang_decode_option): Set `flag_extraneous_semicolon' when
13586         -Wall. Decode `-Wextraneous-semicolon'.
13587         * parse.y (type_declaration:): Removed `SC_TK' hack, added
13588         `empty_statement' rule.
13589         (class_body_declaration): Likewise.
13590         (method_body:): Accept `;' as a method body.
13591         (static_initializer:): Removed `SC_TK' hack.
13592         (constructor_block_end:): Likewise.
13593         (empty_statement:): Report deprecated empty declaration. Fixes
13594         gcj/295
13596 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13598         * parse.y (build_dot_class_method_invocation): Changed parameter
13599         name to `type'. Build signature from `type' and convert it to a
13600         STRING_CST if it's an array.
13601         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13602         to use `ref_type' directly.
13604 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
13606         * lang-options.h: Added a comma after the last element to avoid
13607         syntax errors when other languages define additional options.
13609 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
13611         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13612         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13613         (jc1): Link with $(BACKEND).
13614         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13616 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
13618         * jvspec.c: Adjust type of second argument to
13619         lang_specific_driver, and update code as necessary.
13621         * class.c (build_dtable_decl): Initialize dummy.
13623 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13625         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13626         method bodies not to rule out discarding `<clinit>'; don't use
13627         <clinit> to initialize static fields with constant initializers.
13629 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13631         * gjavah.c (print_method_info): Added `synth' parameter. Skip
13632         synthetic methods.
13633         (method_synthetic): New global.
13634         (HANDLE_METHOD): Recognize synthetic method and tell
13635         `print_method_info' about it.
13636         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13637         processing a synthetic method.
13638         * jcf-reader.c (skip_attribute): New function.
13639         ( skip_attribute): Likewise.
13641 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13643         * parse.y (build_outer_field_access): Fixed comments.
13644         (fix_constructors): Emit the initialization of this$<n> before
13645         calling $finit$.
13646         (resolve_qualified_expression_name): Build an access to `decl' if
13647         necessary.
13649 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13651         * parse-scan.y (curent_class): Non longer const.
13652         (inner_qualifier, inner_qualifier_length): Deleted.
13653         (current_class_length): New global.
13654         (bracket_count): Fixed typo in leading comment.
13655         (anonymous_count): New global.
13656         (class_instance_creation_expression:): Handle anonymous classes.
13657         (anonymous_class_creation:): New rule.
13658         (push_class_context): Rewritten.
13659         (pop_class_context): Likewise.
13660         (INNER_QUALIFIER): Macro deleted.
13661         (report_class_declaration): call `push_class_context' when
13662         entering the function. `fprintf' format modified not to use
13663         INNER_QUALIFIER.
13664         (report_class_declaration): Assign `package_name' and
13665         `current_class' to NULL separately.
13667 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13669         * expr.c (build_invokeinterface): Call layout_class_methods on
13670         target interface.
13672 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13673             Anthony Green  <green@cygnus.com>
13674             Alexandre Petit-Bianco  <apbianco@cygnus.com>
13676         * class.c (make_class_data): Create vtable for abstract classes.
13677         (get_dispatch_table): Changed to cope with abstract classes.
13679 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13681         * parse.y (patch_method_invocation): Don't reverse the argument
13682         list when dealing with anonymous class constructors. Fixed typo in
13683         comment.
13685 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13687         * parse.y (build_alias_initializer_parameter_list): Reverse
13688         crafted list when building aliases for anonymous class
13689         constructors.
13691 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13693         * parse.y (jdep_resolve_class): Don't bother checking potential
13694         innerclass access if `decl' is NULL.
13695         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13696         WFL.
13698 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13700         * parse.c: Remove (again.)
13702 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13704         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13705         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13706         outside the `if' statement, alias to innerclass removed, `decl'
13707         used to mark the class complete.
13709 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13711         * parse.y (simple_name:): Fixed typo in error message.
13713 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13715         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13716         or its first operand can be error marks.
13718 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13720         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13721         * parse.y (method_header): Likewise.
13723 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13725         * parse.y (process_imports): Consider that one might be trying to
13726         import an innerclass. Fixes gcj/254
13728 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13730         * parse.y (find_as_inner_class): Handle the case where the
13731         enclosing context of an innerclass has been loaded as bytecode.
13733 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13735         * parse.y (simple_name:): Reject `$' in type names.
13736         (resolve_type_during_patch): Use `type' as a second
13737         argument to resolve_no_layout. Fixes gcj/257.
13739 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
13741         * parse.y (find_most_specific_methods_list): Select the only
13742         non-abstract method even if max has been set.
13743         Fixes gcj/285, gcj/298.
13745 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
13747         * lang-specs.h: Added %(jc1) to java compiler options.
13749 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13751         * .cvsignore: New file.
13753 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13755         * parse.y (not_accessible_p): Access granted to innerclasses
13756         (indirectly) extending the reference type. Fixes gcj/249.
13758 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13760         * parse.y (patch_method_invocation): Fixed comment.
13761         (maybe_use_access_method): Build this$<n>s to the context of the
13762         target method, or a type that extends it. Fixes gcj/242.
13764 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13766         * parse.c: Remove.
13768 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13770         * parse.y (fold_constant_for_init): Avoid bullish conversion.
13772 2000-07-13  Tom Tromey  <tromey@cygnus.com>
13774         * lang-specs.h: Added %{I*}.
13776 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13778         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13780 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13782         * parse-scan.c: Remove.
13784 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13786         * class.c (set_super_info): Handled protected inner classes.
13787         (common_enclosing_context_p): Bail early if arguments aren't both
13788         inner classes.
13789         (get_access_flags_from_decl): Handle private and protected inner
13790         classes.
13791         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13792         (CLASS_PROTECTED): Likewise.
13793         (struct lang_type): New bitfield `poic'.
13794         * parse.y (jdep_resolve_class): Call check_inner_class_access on
13795         inner classes only.
13796         (check_inner_class_access): Renamed arguments, added
13797         comments. Handles protected inner classes (fixes gcj/225)
13798         (not_accessible_p): Fixed comments. Avoid handling inner classes.
13800 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13802         * parse.y (resolve_qualified_expression_name): Verify qualified
13803         access to `this'. Fixes gcj/239.
13805 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13807         * jcf-write.c (generate_classfile): Don't install ConstantValue
13808         for null pointers.
13810 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13812         * parse.y (resolve_qualified_expression_name): Handle inner class
13813         access. Fixes gcj/256.
13815 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13817         * jcf-write.c (generate_classfile): Properly install the
13818         ConstantValue attribute and the initial value constant pool index
13819         on string constants.
13820         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13821         class files.
13823 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13825         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13826         construct.
13827         * parse.y (find_as_inner_class): Fixed typo.
13828         (do_resolve_class): Explore enclosing contexts when searching for
13829         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13830         (check_inner_class_access): Check `decl' which can be null in case
13831         of previous errors.
13833 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13835         * java-tree.h (java_debug_context): Declared `extern'.
13836         (safe_layout_class): Likewise.
13837         * parse.y (resolve_field_access): Field must be `static' in order
13838         to be replaced by its initial value. Added comments.
13839         (find_applicable_accessible_methods_list): Fixed typo.
13840         (find_most_specific_methods_list): Methods found in innerclasses
13841         take over methods founds in the enclosing contexts.
13842         (java_complete_tree): Loosen restrictions on the type of DECLs
13843         that can be replaced by their initialization values.
13844         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13846 2000-07-05  Tom Tromey  <tromey@cygnus.com>
13848         * Make-lang.in (PARSE_DIR): New macro.
13849         (PARSE_RELDIR): Likewise.
13850         (PARSE_C): Likewise.
13851         (PARSE_SCAN_C): Likewise.
13852         ($(PARSE_C)): New target.
13853         ($(PARSE_SCAN_C)): Likewise.
13854         (SET_BISON): New macro.
13855         (BISONFLAGS): Likewise.
13856         (JAVABISONFLAGS): Likewise.
13858 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
13860         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13861         argument on the first pass for CNI as well as JNI.
13862         (print_method_info): Set up method name on the first pass only.
13864 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13866         * parse.y (parser_qualified_classname): Removed parameter
13867         `is_static'.
13868         (create_interface): Removed first passed parameter to
13869         parser_qualified_classname.
13870         (create_class): Likewise. Don't install alias on static
13871         innerclasses. Fixes gcj/275.
13873 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13875         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13876         debugable statement with empty_stmt_node. Fixes gcj/272
13878 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13880         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13881         gcj/271.
13883 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13885         * jcf-write.c (push_long_const): Appropriately cast short negative
13886         constant to jword.
13888 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13890         * parse.y (verify_constructor_super): Use loop variable
13891         `m_arg_type' initialized with `mdecl_arg_type'.
13893 2000-06-29  Tom Tromey  <tromey@cygnus.com>
13895         * parse.y (resolve_field_access): Handle case where `type_found'
13896         is NULL.
13898 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13900         * expr.c (lookup_field): The same field can be found through two
13901         different interface. Don't declare it ambiguous in that case.
13903 2000-06-27  Tom Tromey  <tromey@cygnus.com>
13905         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
13906         follows \r, then unget it at a lower level.
13908 2000-06-26  Tom Tromey  <tromey@cygnus.com>
13910         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13911         java_complete_tree.
13913 2000-06-25  Tom Tromey  <tromey@cygnus.com>
13915         * parse.y (for_statement): Wrap expression in a WFL if it is a
13916         constant.  For PR gcj/268.
13918 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13920         * parse.y (do_resolve_class): Minor optimiztion in the package
13921         list search. Removed unnecessary test and return statement.
13922         (valid_ref_assignconv_cast_p): Order of arguments to
13923         enclosing_context_p fixed.
13925 2000-06-24  Tom Tromey  <tromey@cygnus.com>
13927         * expr.c (lookup_field): Print error and return error_mark_node if
13928         field reference is ambiguous.
13930         * parse.y (check_abstract_method_definitions): Also check if
13931         `other_method' is abstract.
13933 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13935         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13936         classes.
13937         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13938         (struct lang_type): New field `pic'.
13939         (CLASS_PRIVATE): New macro.
13940         * parse.y (check_inner_class_access): New function.
13941         (jdep_resolve_class): Call it.
13943 2000-06-23  Tom Tromey  <tromey@cygnus.com>
13945         * parse.y (patch_incomplete_class_ref): Initialize the returned
13946         class.  For PR gcj/260.
13948 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13950         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13952 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13954         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13955         Java specific checks.
13956         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13957         screened by DECL_P.
13958         * java-tree.def (CASE_EXPR): Marked 'e'.
13959         (DEFAULT_EXPR): Likewise.
13960         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13961         screened by DECL_P.
13962         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13963         Java specific checks.
13964         (generate_bytecode_insns): Test try_block for BLOCK before using
13965         BLOCK_EXPR_BODY.
13966         * parse.y (build_wfl_wrap): Added `location' argument. Set
13967         EXPR_WFL_LINECOL accordingly.
13968         (dim_expr:): Wrap constants with WFLs.
13969         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13970         (resolve_package): Check for `stmt' not being a BLOCK before
13971         building a debuggable statement with it.
13972         (make_qualified_primary): Added extra parameter to build_wfl_wrap
13973         invocation.
13974         (resolve_field_access): Make sure `decl' is a DECL before treating
13975         it as such.
13976         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13977         IDENTIFIER_NODE before treating it as such.
13978         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13979         treating it as such.
13980         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13981         to be applied only on non array types.
13983 2000-06-16  Per Bothner  <per@bothner.com>
13985         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
13986         define in terms of DECL_RESULT, as that fails when --enable-checking.
13988 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13990         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
13991         types the same in comparison.
13992         (CHECK_OP): Add static prototype.
13994 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13996         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13997         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13998         * parse.c: Rebuilt.
14000 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14002         * decl.c (create_primitive_vtable): Prototype.
14004         * jcf-write.c (generate_bytecode_insns): Initialize variable
14005         `saved_context'.
14007         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
14009 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
14011         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
14012         to track searched classes, and do not search the same class more than
14013         once. Call find_applicable_accessible_methods_list on immediate
14014         superclass, instead of search_applicable_method_list on all ancestors.
14015         Fix for PR gcj/238.
14017 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
14019         * parse.y (register_fields): Permit static fields in inner classes
14020         if they are final. Fix for PR gcj/255.
14022 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14024         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
14025         * parse.y (find_in_imports): Returned type changed to void,
14026         leading comment fixed.
14027         (register_package): New function.
14028         (qualify_and_find): Likewise.
14029         (package_declaration:): Use `register_package'.
14030         (single_type_import_declaration:): Removed local variable
14031         `node'. Added missing `;' for consistency.
14032         (type_import_on_demand_declaration:): Use `chainon' to link new
14033         entries.
14034         (lookup_field_wrapper): Lookup local variables defined in outer
14035         contexts first.
14036         (java_complete_class): Don't reverse the list of imported on demand.
14037         (do_resolve_class): Reorganized. Removed local variable
14038         `original_name'. Call `qualify_and_find' with the current package
14039         name, invoke `find_in_imports_on_demand' right after. Call
14040         `qualify_and_find' with the packages we've seen so far. Fixed
14041         operations numbering in comments.
14042         (java_expand_class): Don't reverse `package_list'.
14043         (find_most_specific_methods_list): New local variables `abstract'
14044         and `candidates'. Use them to pick the right method.
14046 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
14048         * parse.y (check_modifiers_consistency): Don't subtract out
14049         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
14051 2000-06-04  Philipp Thomas  <pthomas@suse.de>
14053         * Makefile.in (INTLLIBS): New.
14054         (LIBS): Add above.
14055         (DEPLIBS): Ditto.
14057 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14059         * class.c (get_dispatch_table): Build the vtable dummy entry list
14060         element with a null purpose. Fixed leading comment.
14061         (build_dtable_decl): Build an accurate dtable type when appropriate
14062         and use it.
14064 2000-06-02  Richard Henderson  <rth@cygnus.com>
14066         * lang.c (lang_get_alias_set): New.
14068 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14070         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
14071         before using it as the accessed field.
14073 2000-05-31  Tom Tromey  <tromey@cygnus.com>
14075         * java-tree.h (boolean_array_vtable, byte_array_vtable,
14076         char_array_vtable, short_array_vtable, int_array_vtable,
14077         long_array_vtable, float_array_vtable, double_array_vtable):
14078         Declare.
14079         * expr.c (get_primitive_array_vtable): New function.
14080         (create_primitive_vtable): New function.
14081         (java_lang_expand_expr): Enable code to statically generate
14082         arrays.
14083         * decl.c (init_decl_processing): Create primitive vtables.
14084         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
14085         short_array_vtable, int_array_vtable, long_array_vtable,
14086         float_array_vtable, double_array_vtable): Define.
14088 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
14090         * java/parse.y (find_applicable_accessible_methods_list):
14091         Don't add an uninitialized value to the list.
14093 2000-05-25  Tom Tromey  <tromey@cygnus.com>
14095         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
14096         when trying to see if field's class should be initialized.  Always
14097         initialize field's declaring class, not qualified class.
14098         For PR gcj/162.
14100         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
14101         `wfl_operator', to maybe_build_primttype_type_ref.
14102         Fixes PR gcj/235.
14104 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
14106         * parse.y (patch_method_invocation): Don't try to lookup methods
14107         in primitive types.
14109 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14111         * parse.y (resolve_field_access): Call the appropriate <clinit>
14112         before accessing the length of a static array. Craft a decl for
14113         the field while its time. Fixes PR gcj/129.
14115 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14117         * parse.y (resolve_package): Correctly set `*next' (was off by
14118         one.)
14119         (resolve_qualified_expression_name): Fixed comment.
14121 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14123         * jcf-parse.c (jcf_parse_source): Reset current_class and
14124         current_function_decl to NULL before parsing a new file.
14126 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14128         * parse.y (block_end:): If the collected block doesn't feature a
14129         statement, insert an empty statement.
14131 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14133         * parse.y (maybe_yank_clinit): New function.
14134         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
14135         end of the list of methods belonging to a class.
14136         (java_complete_expand_method): Check whether <clinit> is really
14137         necessary and expand it accordingly.
14139 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14141         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
14142         processed by the method's switch statement.
14144 2000-05-19  Tom Tromey  <tromey@cygnus.com>
14146         * java-tree.h: Added init state enum.
14147         * decl.c (emit_init_test_initialization): Initialize class
14148         initialization check variable by looking at class' state.
14150 2000-05-19  Tom Tromey  <tromey@cygnus.com>
14152         * java-tree.h (build_instanceof): Declare.
14153         (build_get_class): Declare.
14154         * parse.y (patch_binop): Use build_instanceof.
14155         * expr.c (build_instanceof): New function.  If class is final,
14156         don't make a function call.
14157         (expand_java_INSTANCEOF): Use it.
14158         (build_get_class): New function.
14160 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
14162         * jcf-write.c (generate_classfile): Scan the source_file for
14163         slashes with the right pointer variable.
14165 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
14167         * lang.c (lang_decode_option): Update -Wunused flags by calling
14168         set_Wunused.
14169         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
14171 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14173         * check_init.c (check_init): Constify local char *.
14174         * class.c (push_class): Constify local char *.
14175         * java_tree.h: Update prototypes.
14176         * jcf-io.c (open_class): Constify filename parameter and
14177         return value.
14178         (find_class): Remove redundant string copy.  Cast return from
14179         open_class.
14180         * jcf-parse.c (read_class, parse_class_file, yyparse):
14181         Constify local char *.
14182         * jcf-write.c (generate_bytecode_insns, generate_classfile):
14183         Constify local char *.
14184         * jcf.h (JCF): Constify filename and classname.
14185         (JCF_FINISH): Cast args to FREE to char * when appropriate.
14186         * lang.c (init_parse): Constify parameter and return value.
14187         * lex.c (java_get_line_col): Constify filename parameter.
14188         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
14189         * parse.y (java_parser_context_suspend,
14190         issue_warning_error_from_context, safe_layout_class): Constify
14191         local char *.
14192         * parse.c: Regenerate.
14194 2000-05-08  Tom Tromey  <tromey@cygnus.com>
14196         * expr.c (build_jni_stub): Cache the result of
14197         _Jv_LookupJNIMethod.
14199 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14201         * decl.c (predef_filenames_size): Now 7.
14202         (predef_filenames): New seventh entry.
14204 2000-05-04  Tom Tromey  <tromey@cygnus.com>
14206         * boehm.c (mark_reference_fields): Don't mark RawData fields.
14207         Keep track of when we've seen a reference field after a
14208         non-reference field.
14209         (get_boehm_type_descriptor): Handle case where we see
14210         non-reference fields but no trailing reference field.
14211         * decl.c (rawdata_ptr_type_node): Define.
14212         (init_decl_processing): Initialize rawdata_ptr_type_node.
14213         * java-tree.h (rawdata_ptr_type_node): Declare.
14215 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14217         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
14218         specifiers in calls to fprintf.
14220 2000-05-03  Andrew Haley  <aph@cygnus.com>
14222         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
14224         * javaop.h (WORD_TO_INT): New function.
14225         (IMMEDIATE_s4): Use WORD_TO_INT.
14226         * jcf.h (JPOOL_INT): Ditto.
14228         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
14229         separator.
14231 2000-04-19  Tom Tromey  <tromey@cygnus.com>
14233         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
14234         on native function.
14235         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
14236         JNI methods.
14237         * expr.c (build_jni_stub): New function.
14238         * lang-specs.h: -fjni and -femit-class-file are incompatible.
14239         * parse.c: Rebuilt.
14240         * parse.y (java_complete_expand_methods): Expand a native method
14241         and call build_jni_stub if -fjni given.
14242         * lang-options.h: Document -fjni.
14243         * lang.c (flag_jni): New global.
14244         (lang_f_options): Added `jni' entry.
14245         * java-tree.h (soft_lookupjnimethod_node,
14246         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
14247         Declare.
14248         (flag_jni): Declare.
14249         (build_jni_stub): Declare.
14250         (struct lang_decl): Added `native' flag.
14251         (METHOD_NATIVE): Redefined to use `native' field of lang specific
14252         structure.
14253         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
14254         soft_jnipopsystemframe_node): New globals.
14255         (init_decl_processing): Set them.  _Jv_InitClass only takes one
14256         argument.
14258         * java-tree.def: Put into `C' mode.
14260 2000-04-27  Tom Tromey  <tromey@cygnus.com>
14262         Fix for PR gcj/2:
14263         * expr.c (expand_invoke): Generate check to see if object pointer
14264         is null in nonvirtual invocation case.
14265         * java-tree.h (soft_nullpointer_node): Declare.
14266         * decl.c (soft_nullpointer_node): New global.
14267         (init_decl_processing): Initialize soft_nullpointer_node.
14268         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14269         or `private' methods.
14270         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14272 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14274         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14275         from <clinit>
14277 2000-04-26  Tom Tromey  <tromey@cygnus.com>
14279         * zextract.c (find_zip_file_start): New function.
14280         (read_zip_archive): Use it.
14282 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14284         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
14286 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14288         * class.c (common_enclosing_context_p): New function.
14289         * java-tree.h (common_enclosing_context_p): Added prototype.
14290         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14291         classes sharing an outer context with the current instance.
14292         * parse.y (build_access_to_thisn): Fixed leading comment.
14293         (verify_constructor_super): New local `supper_inner'. Skip
14294         enclosing context argument in the case of inner class constructors.
14295         (patch_method_invocation): Insert proper context as second
14296         parameter to pure inner class constructor super invocations.
14298 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14300         * parse.y (end_class_declaration): Reset the interface number
14301         counter.
14303 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14305         * parse.y (source_start_java_method): Deleted unnecessary code.
14306         (patch_method_invocation): Fixed comment.
14308 2000-04-24  Robert Lipe <robertlipe@usa.net>
14310         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14312 2000-04-23  Tom Tromey  <tromey@cygnus.com>
14314         * boehm.c (mark_reference_fields): Use int_byte_position.
14316 2000-04-22  Tom Tromey  <tromey@cygnus.com>
14318         * boehm.c (mark_reference_fields): Only call byte_position on
14319         non-static fields.
14321 2000-04-22  Tom Tromey  <tromey@cygnus.com>
14323         * boehm.c (mark_reference_fields): Added `last_view_index'
14324         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
14326 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
14328         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14329         * parse.y (check_class_interface_creation): Fixed comments. Select
14330         permitted modifiers for (inner) interfaces. Changed error message
14331         to report rejected modifiers used with local classes.
14333 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14335         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14336         of directly inherited type considered in scope.
14337         * parse.y (do_resolve_class): Search inherited classes for inner
14338         classes.
14340 2000-04-20  Tom Tromey  <tromey@cygnus.com>
14342         * parse.y (not_accessible_p): Use member's class, not current
14343         class, when doing inheritance check for protected reference.
14344         Fixes PR gcj/124.
14346 2000-04-20  Jason Schroeder  <shrode@subnature.com>
14348         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14350 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14352         * parse.y (lookup_field_wrapper): Search for final local aliases.
14353         (resolve_expression_name): Let lookup_field_wrapper search for
14354         final local aliases. Force the value of `name' if one is found.
14355         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14356         an expression name. Fixed comments.
14358 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14360         * parse.y (yyerror): `msg' can be null, don't use it in that case.
14362 2000-04-19  Tom Tromey  <tromey@cygnus.com>
14364         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14366 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14368         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14370 2000-04-18  Tom Tromey  <tromey@cygnus.com>
14372         PR gcj/211:
14373         * gjavah.c (utf8_cmp): Changed return value.
14374         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
14375         result.
14376         (cxx_keywords): New global.
14377         (get_field_name): Handle new result of cxx_keyword_subst.
14378         (print_method_info): Likewise.
14380 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
14382         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14383         with a newline, for CNI.
14384         (print_stub_or_jni): Print a space or newline before method name for
14385         CNI as well as JNI.
14386         (print_cxx_classname): Don't write leading "::" in CNI stub method.
14387         (process_file): Include gcj/cni.h if generating CNI stubs.
14389 2000-04-16  Tom Tromey  <tromey@cygnus.com>
14391         * gjavah.c (decompile_method): Use print_field_name.
14392         Fixes PR gcj/205.
14394 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14396         * parse.y (java_expand_classes): Reverse the package list once.
14397         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14398         reduction.
14399         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14400         the `==' and `!=' operators.
14402 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14404         * jcf-write.c (generate_bytecode_insns): At invocation time,
14405         always relate an interface method to the type of its selector.
14407 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14409         Fix for PR gcj/2:
14410         * expr.c (expand_invoke): Generate check to see if object pointer
14411         is null in nonvirtual invocation case.
14412         * java-tree.h (soft_nullpointer_node): Declare.
14413         * decl.c (soft_nullpointer_node): New global.
14414         (init_decl_processing): Initialize soft_nullpointer_node.
14415         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14416         or `private' methods.
14417         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14419 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14421         Fix for PR gcj/140:
14422         * parse.y (check_final_assignment): Recognize assignments to the
14423         `length' field of an array when generating class files.
14425 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14427         * class.c (decl_hash): Prototype removed.
14428         (decl_compare): Likewise.
14430 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14432         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14433         * parse.y (check_modifiers_consistency): Check for final/volatile
14434         clash.  Fixes PR gcj/164.
14436 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14438         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14439         made global.
14440         (java_hash_compare_tree_node): Renamed from `decl_compare, made
14441         global.
14442         (add_method_1): Use `java_hash_hash_tree_node' and
14443         `java_hash_compare_tree_node'.
14444         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14445         (java_hash_compare_tree_node): Likewise.
14446         * parse.y (find_applicable_accessible_methods_list): Create,
14447         delete and use a hash table to remember already searched interfaces.
14449 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
14451         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14452         with latest entry.
14454 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14456         * boehm.c (mark_reference_fields, set_bit): Prototype.
14457         (set_bit): Un-ANSI-fy definition.
14459         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14460         Prototype.
14462         * decl.c (emit_init_test_initialization): Likewise.
14464         * gjavah.c (jni_print_char): Likewise.
14466         * parse.y (create_new_parser_context): Likewise.
14468 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14470         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14471         patch missing hunk. Fixed indentation.
14473 2000-03-30  Tom Tromey  <tromey@cygnus.com>
14475         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14476         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14478 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14480         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14481         when negative *before* using it as an array index.
14482         * ChangeLog: Fixed typo.
14484 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14486         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14487         to 0 when it reaches -1.
14489 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14491         * jcf-parse.c (get_constant): Properly cast `num' during the
14492         invocation of `add_double'.
14493         * jcf-write.c (push_long_const): Properly cast `lo' before
14494         comparing it to short bounds.
14495         * parse-scan.y (interface_declaration:): Rule re-arrange so that
14496         `interface_body:' is reduced after the current interface is
14497         pushed.
14499 2000-03-26  Tom Tromey  <tromey@cygnus.com>
14501         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14502         Java-specific `-f' option.
14504 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14506         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14507         Adjust order of making types.
14508         Make bitsize_*_node values.
14510 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14512         * class.c (make_field_value): Use byte_position.
14513         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14514         (java_array_data_offset): Likewise.
14515         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14516         bzero call.
14518 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14520         * parse.y (check_abstract_method_definitions): New local
14521         `end_type_reached'. Make sure we also consider `end_type'.
14522         (java_check_abstract_method_definitions): Make sure we eventually
14523         consider `java.lang.Object'.
14524         (maybe_use_access_method): Don't use access method if not in the
14525         context of a pure inner class or if the method's context is right.
14526         (find_applicable_accessible_methods_list): New static flag
14527         `object_done'. Don't search abstract classes as interfaces. Fixed
14528         indentation. Fixed the `java.lang.Object' only search. Search
14529         class interface(s) first, then fully search enclosing contexts.
14530         (find_most_specific_methods_list): Pick the closest candidate when
14531         they're all abstract.
14533 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14535         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14536         properly initialize `finished_label'. Don't emit gotos for empty
14537         try statements.
14539 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14541         * except.c (emit_handlers): Clear catch_clauses_last.
14543 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14545         * parse.y (check_method_types_complete): New function.
14546         (create_class): Reset anonymous class counter only when seeing an
14547         non inner classe.
14548         (java_complete_class): JDEP_METHOD: Don't recompute signature
14549         if incomplete.
14551 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14553         * class.c (build_static_ref): Fixed indentation in comment.
14554         * java-tree.def (TRY_EXPR): Fixed typo in name.
14555         (CLASS_LITERAL): Likewise.
14556         * java-tree.h: (TYPE_DOT_CLASS): New macro.
14557         (struct lang_type): New field `dot_class'.
14558         * jcf-write.c (generate_bytecode_insns): Fixed error message.
14559         (generate_classfile): Method `class$' is synthetic.
14560         * parse.y (build_do_class_method): New function.
14561         (build_dot_class_method_invocation): Likewise.
14562         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14563         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14564         (qualify_ambiguous_name): Likewise.
14565         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14566         (build_try_statement): Fixed leading comment.
14568 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14570         * class.c (make_field_value): Properly handle sizes.
14571         (get_dispatch_vector): Use tree_low_cst and host_integerp.
14572         (layout_class_method): Count using trees.
14573         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14574         * expr.c (java_array_data_offset): Use int_bit_position.
14575         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14576         (build_invokevirtual): Use tree_low_cst and do computations with trees.
14578 2000-03-16  Tom Tromey  <tromey@cygnus.com>
14580         * lang.c (flag_hash_synchronization): New global.
14581         (lang_f_options): Added `hash-synchronization'.
14582         * lang-options.h: Mention -fhash-synchronization.
14583         * java-tree.h (flag_hash_synchronization): Declare.
14584         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14585         hash table synchronization is disabled.
14586         * decl.c (init_decl_processing): Only push `sync_info' value when
14587         hash table synchronization is disabled.
14588         * class.c (make_class_data): Only push `sync_info' field when hash
14589         table synchronization is disabled.  Removed dead code.
14591 2000-03-16  Tom Tromey  <tromey@cygnus.com>
14593         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14595 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14597         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14598         classes.
14599         * parse.y (patch_method_invocation): Handle anonymous classes
14600         creation in static context.
14602 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14604         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14605         * parse.y (resolve_qualified_expression_name): Use it.
14606         (patch_method_invocation): Likewise.
14608 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14610         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14611         depending on the type of dependency which dictates what the
14612         current class is.
14613         (unresolved_type_p): Resolved types limited to the current class.
14615 2000-03-15  Tom Tromey  <tromey@cygnus.com>
14617         * decl.c (init_decl_processing): Set type of `sync_info' to be
14618         pointer to Object.
14620         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14621         Correctly compute bit number for current slot.  Zero `high' and
14622         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
14623         mark_reference_fields.
14624         (mark_reference_fields): New function.
14626 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14628         * parse.y (register_incomplete_type): Fixed initialization of
14629         JDEP_ENCLOSING.
14631 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14633         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14634         static globals.
14635         (push_class_context, pop_class_context): New function.
14636         (class_body:): Call pop_class_context.
14637         (interface_body:): Likewise.
14638         (INNER_QUALIFIER): New macro.
14639         (report_class_declaration): Changed output format and use
14640         INNER_QUALIFIER. Call push_class_context.
14642 2000-02-14  Andrew Haley  <aph@cygnus.com>
14644         * check-init.c (check_init): Add new cases for unary and binary
14645         tree nodes.
14647 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14649         * parse.y (resolve_package): Set `next' once a type name has been
14650         progressively discovered.
14651         (resolve_qualified_expression_name): Propagate resolution only if
14652         there are remaining qualifiers. Take into account `q' might have
14653         been cleared after re-qualification.
14654         * parse.y (patch_method_invocation): New local `resolved'.
14655         Section dealing with qualified expression rewritten to use
14656         resolve_field_access.
14658 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14660         * parse.h (PUSH_CPC): Fixed indentation.
14661         (DEBUG_CPC): New macro.
14662         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14663         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14664         * parse.y (class_body_declaration:): Use
14665         SET_CPC_INSTANCE_INITIALIZER_STMT.
14666         (method_declaration:): Check for null current_function_decl.
14667         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14668         (java_parser_context_pop_initialized_field): Better handling of
14669         empty lists.
14670         (maybe_make_nested_class_name): Mark nested class name as
14671         qualified when necessary.
14672         (end_class_declaration): Don't call java_parse_context_resume when
14673         one or more error occurred.
14674         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14675         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14676         SET_CPC_INITIALIZER_STMT.
14677         (method_header): Check for inner classes declaring static methods.
14678         (resolve_qualified_expression_name): Handle situation where `this'
14679         is implied.
14681 2000-03-13  Hans Boehm <boehm@acm.org>
14683         * typeck.c (build_prim_array_type): Correctly set the high word too.
14685 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14687         * parse.y (java_complete_expand_methods): Leave <clinit> out of
14688         ordinary methods.
14689         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14690         list of methods for interfaces.
14692 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14694         * parse.y (qualify_ambiguous_name): Properly handle expressions
14695         using `null'.
14697 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14699         * parse.y (check_final_assignment): Extended to process
14700         COMPOUND_EXPR.
14701         (patch_assignment): Have check_final_assignment called only once.
14703 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14705         * java-tree.h (IS_INIT_CHECKED): New flag.
14706         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14707         * parse.y (patch_string): Call force_evaluation_order on the
14708         completed string concatenation tree.
14709         * expr.c (force_evaluation_order): Call force_evaluation_order on
14710         function's arguments too.
14712 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14714         * decl.c (emit_init_test_initialization): Mark KEY as unused.
14715         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14716         (build_anewarray): Likewise.
14717         * parse.y (patch_newarray): Likewise.
14718         * parse.c: Regenerated.
14720 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
14722         * decl.c (init_decl_processing): Added new class fields `depth',
14723         `ancestors', and `idt' to class_type_node. Use
14724         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14725         * class.c (make_class_data): Push initial values for new fields.
14726         * java-tree.h: Updated prototype for `build_invokeinterface'.
14727         * expr.c (build_invokeinterface): Changed parameters to accept
14728         `method' tree. Calculate index of `method' in its declaring
14729         interface. Build call to _Jv_LookupInterfaceMethodIdx.
14730         (expand_invoke): Call `build_invokeinterface' with new parameters.
14731         * parse.y (patch_invoke): Call `build_invokeinterface' with new
14732         parameters.
14734 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
14736         * typeck.c (lookup_do): Search superinterfaces first
14737         when looking up an interface method. From Godmar Back
14738         <gback@cs.utah.edu>
14740 2000-03-06  Tom Tromey  <tromey@cygnus.com>
14742         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14744 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14746         * java-tree.h (lookup_argument_method2): Declared.
14747         (safe_layout_class): Prototype moved from parse.h.
14748         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14749         * parse.y (java_check_regular_methods): Local `super_class' gone.
14750         Call lookup_argument_method2 instead of lookup_argument_method.
14751         Perform modifier match for methods found declared in implemented
14752         interfaces. Fixed indentation problem. Overriding/hiding error
14753         report to take place only for methods found in classes.
14754         * typeck.c (lookup_argument_method): Changed leading
14755         comment. Re-written by calling lookup_do.
14756         (lookup_argument_method2): New function.
14757         (lookup_java_method): Re-written by calling lookup_do.
14758         (lookup_do): New function.
14760 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14762         * check-init.c (check_init): Removed dead code. Handle (blank)
14763         final variables.
14764         * parse.y (declare_local_variables): New local `final_p', set it
14765         and use it to initialize LOCAL_FINAL.
14766         (check_final_assignment): Only check FIELD_DECLs.
14768 2000-02-17  Tom Tromey  <tromey@cygnus.com>
14770         * Makefile.in (JAVA_OBJS): Added boehm.o.
14771         (boehm.o): New target.
14772         * Make-lang.in (JAVA_SRCS): Added boehm.c.
14773         * java-tree.h (flag_use_boehm_gc): Declare.
14774         (get_boehm_type_descriptor): Declare.
14775         * lang.c (lang_f_options): Added `use-boehm-gc'.
14776         (flag_use_boehm_gc): New global.
14777         * lang-options.h: Added -fuse-boehm-gc.
14778         * boehm.c: New file.
14779         * class.c (get_dispatch_table): If class uses a Boehm type
14780         descriptor, put it in the vtable.
14781         (make_class_data): Removed dead code.
14783 2000-03-03  Per Bothner  <per@bothner.com>
14785         * decl.c (init_decl_processing):  Initialize sizetype properly.
14787 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14789         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14790         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14791         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14792         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14793         (jcf_parse): New local `current'. Load innerclasses seen in outer
14794         context being processed.
14795         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14796         * jcf-write.c (append_innerclasses_attribute): New function.
14797         (append_innerclasses_attribute_entry): Likewise.
14798         (get_access_flags): Handle static classes. Set anonymous and local
14799         classes to be private.
14800         (generate_classfile): Attribute count adjusted. Call
14801         append_innerclasses_attribute.
14802         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14803         PURE_INNER_CLASS_TYPE_P.
14804         * parse.y (parser_qualified_classname): New parameter `is_static',
14805         produce non qualified name accordingly.
14806         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14807         (create_interface): Added argument to parser_qualified_classname.
14808         (create_class): Added argument to parser_qualified_classname. Setup
14809         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14810         (add_inner_class_fields): Fixed indentation.
14811         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14812         (method_declarator): Fixed typo in comment.
14813         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14814         (build_current_thisn): Likewise.
14815         (patch_method_invocation): Likewise.
14817 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14819         * decl.c (current_function_decl): Move to toplev.c.
14821 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14823         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14824         (DECL_BIT_INDEX): Use underlying representation.
14825         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14827 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14829         * expr.c (build_java_ret): Pass proper type to size_binop.
14831 2000-02-25  Anthony Green  <green@cygnus.com>
14833         * expr.c (build_class_init): Mark the decl to be ignored by
14834         check_init.
14835         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14836         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14837         * class.c (init_test_hash_newfunc): New function.
14838         (decl_hash): New function.
14839         (decl_compare): New function.
14840         * decl.c (emit_init_test_initialization): New function.
14841         (complete_start_java_method): Traverse the init test hashtable,
14842         calling emit_init_test_initialization.
14843         (always_initialize_class_p): Define.
14844         * expr.c (build_class_init): Use initialization tests when
14845         emitting class initialization code.
14846         (always_initialize_class_p): Declare.
14847         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14848         1.
14849         * java-tree.h: Include hash.h.
14850         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14851         (struct lang_decl): Add init_test_table field.
14852         (init_test_hash_entry): Define.
14854 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14856         * gjavah.c (main): Avoid using `argi' to report unimplemented
14857         options.
14859 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14861         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14862         initialize locals to avoid warnings. Local `exception_type' moved
14863         into if statement.
14865 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14867         * parse.y (resolve_expression_name): Use `orig' as a second
14868         argument to resolve_field_access.
14869         (resolve_field_access): Removed unnecessary code when dealing with
14870         static fields.
14872 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14874         * class.c (push_super_field): Don't push the field twice.
14875         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14876         * parse.h (java_reorder_fields): Prototyped.
14877         * parse.y (java_reorder_fields): New function.
14878         (java_layout_class): Simplified not to worry about re-ordering.
14880 2000-02-23  Tom Tromey  <tromey@cygnus.com>
14882         * gjavah.c (print_name): In JNI case, correctly quote string.
14883         (print_method_info): Don't handle overrides in JNI mode.
14885 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14887         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14888         value type set to `boolean_type_node'.
14890 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14892         * jcf-dump.c (main): Test for correct condition after
14893         output file creation.
14895 2000-02-19  Anthony Green  <green@cygnus.com>
14897         * jcf-depend.c (add_entry): Fix test for first list entry.
14899 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14901         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14902         * constants.c (build_constants_constructor): Likewise.
14904 2000-02-19  Anthony Green  <green@cygnus.com>
14906         * jcf-depend.c (add_entry): Add entries to the end of the list.
14908 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
14910         * decl.c (INT_TYPE_SIZE): Define if necessary.
14911         (expand_java_return): Handle the case of a native integer smaller
14912         than a JVM integer.
14914 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14916         * gjavah.c (help): Use GCCBUGURL.
14917         * jv-scan.c (help): Likewise.
14918         * jcf-dump.c (help): Likewise.
14920 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14922         * jcf-write.c (generate_bytecode_insns): Don't generate empty
14923         `finally' clauses.
14925 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14927         * jcf-parse.c (load_class): Call `fatal' if no file containing
14928         the target class are found.
14930 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
14932         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14933         lex.c, lex.h, and PARSE_H to...
14934         (parse.o, parse-scan.o): ...here, respectively.
14936         * lex.c: Split out code that may trigger SIGFPE from yylex()
14937         to its own function.
14938         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14940 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14942         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14944 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14946         * parse.y (outer_field_access_p): Stop in time when outer contexts
14947         are exhausted.
14948         (resolve_qualified_expression_name): Properly qualify *everything*
14949         after a package.type to be resoled as expression names.
14950         (find_applicable_accessible_methods_list): Save/restore `class' to
14951         isolate it from a possible outer context search.
14953 2000-02-15  Tom Tromey  <tromey@cygnus.com>
14955         * gjavah.c (jni_print_char): New function.
14956         (print_full_cxx_name): Use it.
14957         (decode_signature_piece): Likewise.
14958         (print_cxx_classname): Likewise.
14960 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14962         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14963         version.o.
14964         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14966         * gjavah.c: Include version.h.
14968         * jcf-dump.c: Likewise.
14970         * jv-scan.c: Likewise.
14972 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14974         * parse.y (outer_field_access_fix): First parameter now a tree
14975         node. Check for assignment to final. First argument to
14976         build_outer_field_access_fix modified to accommodate prototype.
14977         (build_outer_field_access): Don't check for assignment to final
14978         here.
14979         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14980         possibly returned by outer_field_access_fix. Changed
14981         outer_field_access_fix's first argument.
14982         (check_final_assignment): $finit$'s context is OK.
14983         (patch_unaryop): Use node instead of its line/column value when
14984         calling outer_field_access_fix.
14986 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14988         * parse.y (interface_declaration:): No longer tagged
14989         <node>. Re-installed default action.
14990         (class_member_declaration:): Handle inner interfaces.
14991         (interface_member_declaration): Handle inner interfaces and
14992         classes.
14993         (create_interface): Push error if one seen. Suspend parsing
14994         context when processing an inner interface.
14995         (register_fields): Inner class static field limitations not to
14996         apply to inner interfaces.
14998 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15000         * jcf-parse.c (load_class): Update `java_error_count' when a
15001         class' file can't be found.
15002         (parse.y): Avoid (byte)code generation when errors seen.
15004 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15006         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
15007         decodes a valid node.
15008         (patch_binop): Handle TRUNC_DIV_EXPR.
15010 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15012         * parse.y (resolve_package): New local `acc'. Try to progressively
15013         build and guess a package and type name.
15015 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15017         * parse.y (find_applicable_accessible_methods_list): Load and
15018         layout the search class if necessary.
15019         (java_complete_tree): Keep to original type of the folded initial
15020         value.
15022 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15024         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
15025         Generate error message if circularity is detected. New static
15026         local `list'.
15027         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
15028         * jcf-write.c (generate_bytecode_insns): Very simply handle
15029         SAVE_EXPR.
15030         * parse.y (java_check_circular_reference): Use
15031         `cyclic_inheritance_report' during report, if necessary.
15032         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
15033         walking NEW_ARRAY_INIT twice.
15035 2000-02-09  Tom Tromey  <tromey@cygnus.com>
15037         * parse.y (check_class_interface_creation): Allow inner classes to
15038         be `private' or `protected', check modifiers' consistency. Prevent
15039         block local classes from bearing any modifiers.
15041 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15043         * except.c (check_start_handlers): Re-add prototype lost in last
15044         patch.
15045         (maybe_start_try): Remove excess argument to `check_start_handlers'.
15047 2000-02-09  Andrew Haley  <aph@cygnus.com>
15049         * decl.c (clear_binding_level): Remove excess initializer.
15050         (maybe_poplevels): Remove unused variable.
15051         (force_poplevels): Ditto.
15052         (struct binding_level): Add comment.
15054 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15056         * jcf-write.c (generate_classfile): Don't consider
15057         pre-initialization with reference value (use <clinit> instead.)
15058         * parse.y (java_fix_constructors): No generated constructor for
15059         interfaces.
15060         (build_outer_field_access): Removed debug message.
15061         (outer_field_expanded_access_p): Adapted to bytecode generation.
15062         (build_outer_field_access_method): Use fix_method_argument_names.
15063         (build_outer_method_access_method): Fixed indentation. Added
15064         comment. Handle access method generation for static and also void
15065         methods.
15066         (build_access_to_thisn): Inserted debug message.
15067         (maybe_build_thisn_access_method): Use fix_method_argument_names.
15068         (resolve_qualified_expression_name): Fixed comment.
15069         (not_accessible_p): Adapted to bytecode generation. Added comment.
15070         (patch_method_invocation): Added comment.
15071         (maybe_use_access_method): Fixed leading comment. Handle static
15072         methods.
15073         (java_complete_lhs): Don't shortcut handling of initialized upon
15074         declaration String type static fields when generating bytecode.
15075         (patch_unaryop): Handle outer field access when generating
15076         bytecode.
15078 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15080         * java-tree.h (FIELD_THISN): New macro.
15081         * jcf-write.c (append_synthetic_attribute): New function.
15082         (generate_classfile): Set "Synthetic" attribute on this$<n>,
15083         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
15084         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
15085         this$<n> fields.
15086         (build_outer_field_access): Turned on access functions usage and
15087         generation when compiling to bytecode.
15088         (maybe_use_access_method): Likewise.
15090 2000-01-25  Andrew Haley  <aph@cygnus.com>
15092         * java-except.h (struct eh_range): Add `expanded' field.
15093         (maybe_start_try): Add end_pc arg.
15094         (maybe_end_try): Ditto.
15095         * java-tree.h (force_poplevels): new function.
15096         * expr.c (expand_byte_code): Don't call maybe_start_try or
15097         maybe_end_try.
15098         * except.c (add_handler): Reset expanded.
15099         (expand_start_java_handler): Set expanded.
15100         (check_start_handlers): Don't expand a start handler that's
15101         already been expanded.
15102         (maybe_start_try): Add end_pc arg.  Only expand a handler which
15103         ends after end_pc.
15104         (expand_end_java_handler): call force_poplevels.
15105         (force_poplevels): new function.
15106         * decl.c (binding_level): Add start_pc of binding level.
15107         (maybe_pushlevels): Call maybe_start_try when pushing binding
15108         levels.
15109         (maybe_poplevels): Call maybe_end_try when popping binding levels.
15110         (LARGEST_PC): Define.
15111         (clear_binding_level): Use LARGEST_PC.
15113         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
15114         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
15115         (binding_depth, is_class_level, current_pc): new variables.
15116         (struct binding_level): ditto.
15117         (indent): new function.
15118         (push_jvm_slot): add debugging info.
15119         (maybe_pushlevels): ditto.
15120         (maybe_poplevels): ditto.
15121         (pushlevel): ditto.
15122         (poplevel): ditto.
15123         (start_java_method): ditto.
15124         (give_name_to_locals): comment only.
15125         * except.c (binding_depth, is_class_level, current_pc):
15126         new variables.
15127         (expand_start_java_handler): add debugging info.
15128         (expand_end_java_handler): ditto.
15130 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15132         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
15133         (print_name_for_stub_or_jni, process_file): Constify a char*.
15135 2000-02-03  Tom Tromey  <tromey@cygnus.com>
15137         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
15139 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
15141         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
15142         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
15143         defined to be 1.
15145 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15147         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
15148         * java-tree.h (TYPE_II_STMT_LIST): New macro.
15149         (struct lang_type): New field `ii_block'.
15150         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
15151         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
15152         * parse.h (struct parser_ctxt): New field `instance_initializers'.
15153         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
15154         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
15155         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
15156         macros.
15157         * parse.y (add_instance_initializer): New function.
15158         (in_instance_initializer): New static global.
15159         (class_body_declaration:): Link instance initializer block.
15160         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
15161         (array_creation_expression:): Remove unused local.
15162         (java_parser_context_push_initialized_field): Fixed leading
15163         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
15164         CPC_INSTANCE_INITIALIZER_LIST.
15165         (java_parser_context_pop_initialized_field): Likewise.
15166         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
15167         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
15168         CPC_INITIALIZER_STMT.
15169         (fix_constructors): New local `class_type'. Use it. Call
15170         add_instance_initializer.
15171         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
15172         (patch_return): Forbid return in instance initializers.
15173         (patch_throw_statement): Enforce exception handling in the context
15174         of instance initializers.
15176 2000-02-03  Tom Tromey  <tromey@cygnus.com>
15178         * Make-lang.in (java.mostlyclean): Remove executables in
15179         `mostlyclean'.
15181 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
15183         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
15184         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
15185         (java_float_finite): Convert to use union Word from javaop.h.
15186         (java_double_finite): Convert to use union DWord from javaop.h.
15188 2000-02-02  Tom Tromey  <tromey@cygnus.com>
15190         * gjavah.c (options): Added `jni' entry.
15191         (help): Document -jni.
15192         (flag_jni): New global.
15193         (process_file): Handle JNI output.  Don't print text from
15194         -prepend, -add, etc, when generating stubs.  Only remove `.class'
15195         suffix if it actually exists.
15196         (main): Create a `.c' file when run with `--jni --stubs'.  Create
15197         correct output file name with `--jni'.
15198         (print_include): Mangle header name differently in JNI case.
15199         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
15200         method list.
15201         (print_method_info): Handle JNI case.  Put signature info into
15202         method name.  Handle case when STREAM is NULL.
15203         (print_name_for_stub_or_jni): New function.
15204         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
15205         (print_cxx_classname): Handle JNI.
15206         (print_full_cxx_name): Likewise.
15207         (decode_signature_piece): Likewise.
15208         (overloaded_jni_method_exists_p): New function.
15209         (struct method_name): Added `signature' and `sig_length' fields.
15210         (HANDLE_END_FIELD): Do nothing in JNI mode.
15212 2000-02-02  Tom Tromey  <tromey@cygnus.com>
15214         * jv-scan.c: Include version.c, <getopt.h>.
15215         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
15216         (options): New array.
15217         (usage): New function.
15218         (version): New function.
15219         (main): Use getopt_long to parse command line.
15220         * jcf-dump.c: Include version.c, <getopt.h>.
15221         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
15222         OPT_JAVAP): New macros.
15223         (options): New array.
15224         (usage): Return `void'.  Changed message.
15225         (help): New function.
15226         (version): New function.
15227         (main): Use getopt_long_only to parse command line.
15228         * gjavah.c: Include <getopt.h>.
15229         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
15230         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
15231         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
15232         (options): New array.
15233         (java_no_argument): Removed.
15234         (help): Updated with missing options.
15235         (main): Use getopt_long_only to parse command line.
15236         (usage): Changed message.
15238 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15240         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
15241         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
15242         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
15243         * parse.y (array_creation_expression:): Handle anonymous arrays.
15244         (build_array_from_name): Don't set `ret_name' if null.
15245         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
15246         (qualify_ambiguous_name): Likewise.
15247         (java_complete_expand_class): Likewise.
15249 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15251         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
15252         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
15253         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
15254         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
15255         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
15256         AIPL_FUNCTION_COMPLETED_INVOCATION.
15257         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
15258         AIPL_FUNCTION_INVOCATION_READY.
15259         (AIPL_FUNCTION_DECLARATION): New enum entry.
15260         * parse.y (reorder_static_initialized): New function.
15261         (java_parser_context_pop_initialized_field): Use it.
15262         (add_inner_class_fields): Use
15263         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
15264         augmented. Install marker after last alias initializer, if any.
15265         (generate_finit): Fixed typo. Don't try to retain only the used
15266         fields.
15267         (method_header): Compute and set DECL_FUNCTION_NAP.
15268         (method_declarator): Fixed comment. Insert alias initializer in
15269         parameter list.
15270         (build_alias_initializer_parameter_list): Fixed leading
15271         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
15272         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
15273         (java_complete_expand_class): Code to retain only used aliases
15274         removed.
15275         (java_complete_expand_methods): New local `first_decl'. Generate
15276         $finit$ first, then expand the constructors, regular methods and
15277         <clinit>.
15278         (java_complete_expand_method): Don't report error on missing
15279         return statement if previously detected bogus.
15280         (fix_constructors): Don't patch constructor parameters list.
15281         (patch_method_invocation): Use new AIPL enum values. Reverse
15282         alias initializer list for anonymous classes.
15284 2000-01-30  Anthony Green  <green@redhat.com>
15286         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
15287         determine how many stack slots to pop.
15289 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15291         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15292         error handling/recovery.
15293         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15295 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15297         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
15298         FIELD_LOCAL_ALIAS_USED): New macros.
15299         (DECL_FUNCTION_NAP): New macro.
15300         (struct lang_decl): New field `nap'.
15301         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15302         (struct lang_type): New fields `finit_stmt_list' and
15303         `clinit_stmt_list'.
15304         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15305         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15306         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
15307         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
15308         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
15309         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
15310         (BUILD_THROW): Macro line separator re-indented.
15311         * parse.y (end_class_declaration): New function.
15312         (maybe_generate_pre_expand_clinit): New name for
15313         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15314         pre-expand static fields.
15315         (maybe_generate_clinit): Function deleted.
15316         (check_for_static_method_reference): Prototype's parameter list
15317         indented.
15318         (generate_finit): New name for maybe_generate_finit. Changed
15319         leading comment. Function rewritten to use
15320         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
15321         (build_alias_initializer_parameter_list): New function.
15322         (java_parser_context_pop_initialized_field): Likewise.
15323         (add_inner_class_fields): Likewise.
15324         (type_declaration:): Call end_class_declaration.
15325         (class_member_declaration:): Likewise.
15326         (formal_parameter_list:): Fixed typos.
15327         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
15328         element. Improved error handling.
15329         (block_statement:): Call end_class_declaration.
15330         (anonymous_class_creation:): Likewise.
15331         (create_anonymous_class): Fixed comments.
15332         (create_class): Call add_inner_class_fields.
15333         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15334         (method_header): Use MARK_FINAL_PARMS.
15335         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15336         (method_declarator): Propagate final argument flag.
15337         (craft_constructor): New local `artificial'. Call
15338         build_alias_initializer_parameter_list. Use
15339         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
15340         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
15341         necessary.
15342         (complete_expand_class): Get rid of unused outer context local
15343         alias fields.
15344         (java_complete_expand_methods): Fixed leading
15345         comment. Generate/pre-expand <clinit> first. Changed method
15346         expansion order to regular, $finit$, constructors, <clinit>.
15347         (java_complete_expand_method): Set current_function_decl.
15348         (fix_constructors): Fix constructor parameter list to account for
15349         outer context local alias initializers.
15350         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15351         (resolve_expression_name): Lookup outer context local aliases. New
15352         local `access', use it.
15353         (patch_method_invocation): Patch inner class ctor invocation with
15354         outer context local aliases initialization values. $finit$
15355         invocation patching now includes things generated with
15356         build_alias_initializer_parameter_list.
15357         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15358         (build_super_invocation): Likewise.
15359         (patch_assignment): Changed comment.
15361 2000-01-27  Andrew Haley  <aph@cygnus.com>
15363         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15364         (emit_if): Ditto.
15365         (emit_jsr): Ditto.
15367 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15369         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15370         concatenation.
15371         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15373         * parse.y (register_fields): Don't pass a format specifier to
15374         OBSOLETE_MODIFIER_WARNING.
15375         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15376         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15377         specifier.
15378         (check_modifiers): Change function into a macro.
15379         (check_class_interface_creation): Pass a literal format string.
15381 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15383         * buffer.h: PROTO -> PARAMS.
15384         * check-init.c: Likewise.
15385         * class.c: Likewise.
15386         * constants.c: Likewise.
15387         * convert.h: Likewise.
15388         * decl.c: Likewise.
15389         * except.c: Likewise.
15390         * expr.c: Likewise.
15391         * gjavah.c: Likewise.
15392         * java-except.h: Likewise.
15393         * java-tree.h: Likewise.
15394         * jcf-depend.c: Likewise.
15395         * jcf-dump.c: Likewise.
15396         * jcf-parse.c: Likewise.
15397         * jcf-path.c: Likewise.
15398         * jcf-reader.c: Likewise.
15399         * jcf-write.c: Likewise.
15400         * jcf.h: Likewise.
15401         * jv-scan.c: Likewise.
15402         * jvgenmain.c: Likewise.
15403         * jvspec.c: Likewise.
15404         * lang.c: Likewise.
15405         * lex.c: Likewise.
15406         * lex.h: Likewise.
15407         * parse-scan.y: Likewise.
15408         * parse.h: Likewise.
15409         * parse.y: Likewise.
15410         * typeck.c: Likewise.
15411         * verify.c: Likewise.
15412         * xref.c: Likewise.
15413         * xref.h: Likewise.
15414         * zextract.c: Likewise.
15415         * zipfile.h: Likewise.
15417 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15419         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15420         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15421         * constants.c (build_constant_data_ref): Check for cached
15422         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15423         in TYPE_CPOOL_DATE_REF.
15424         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15425         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15426         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15427         (LOCAL_FINAL): New macro.
15428         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15429         constant pool -- don't try to reuse.
15430         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15431         TYPE_LANG_SPECIFIC.
15432         (find_in_current_zip): Use TYPE_JCF.
15433         * parse.h (java_check_final): Prototype removed.
15434         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15435         (maybe_create_class_interface_decl,
15436         check_class_interface_creation): Likewise.
15437         (java_expand_finals): Function removed.
15438         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15439         (block_statement:): Fixed comment.
15440         (anonymous_class_creation:): Likewise.
15441         (check_class_interface_creation): Reversed Jan 12, 2000 extra
15442         argument patch.
15443         (check_class_interface_creation): Loosened error report on (inner)
15444         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15445         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15446         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15447         argument patch.
15448         (create_interface): Likewise.
15449         (anonymous_class_counter): New static global.
15450         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15451         patch. Fixed comments.
15452         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15453         anonymous_class_counter when declaring a toplevel class.
15454         (craft_constructor): Fixed constructor name when handling
15455         anonymous classes. Anonymous class constructors to feature hidden
15456         this$<n> parameter.
15457         (java_fix_constructors): Added comment.
15458         (java_check_final): Function removed.
15459         (java_complete_expand_methods): Fixed comment. Don't generate
15460         class data, save its outgoing constant pool instead.
15461         (verify_constructor_super): Skip anonymous class constructor
15462         hidden this$<n> parameter.
15463         (java_expand_classes): New local `saved_ctxp'. Removed call to
15464         java_expand_finals and java_check_final. Expand anonymous class
15465         constructors. Generate class data.
15466         (build_super_invocation): Skip anonymous class hidden this$<n>
15467         parameter.
15468         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15469         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15470         (set_java_signature): Likewise.
15472 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
15474         * gjavah.c: Delete ACC_VISIBILITY define.
15475         * jcf.h: Add ACC_VISIBILITY define.
15476         * parse.y: final: rule tagged <value>.
15477         (java_check_regular_methods): Use ACC_VISIBILITY define for
15478         default package access check.
15479         (local_variable_declaration_statement): Use final: rule.
15481 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
15483         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15484         (final:): New rule.
15486 2000-01-17  Tom Tromey  <tromey@cygnus.com>
15488         * gjavah.c (print_field_info): Allow non-static final fields.
15490 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15492         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15493         * parse.y (patch_anonymous_class): New function.
15494         (create_anonymous_class): Register incomplete type when the
15495         class/interface to extends/implement isn't known yet.
15496         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15497         (verify_constructor_super): Tuned error message.
15499 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15501         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15502         (ANONYMOUS_CLASS_P): New macro.
15503         (TYPE_SIGNATURE, TYPE_JCF): New macros.
15504         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15505         * parse.y (create_class): Added leading argument.
15506         (maybe_create_class_interface_decl,
15507         check_class_interface_creation): Likewise.
15508         (craft_constructor): New function.
15509         (verify_constructor_super): Added argument in prototype.
15510         (class_declaration:): Inserted leading argument.
15511         (for_begin:): Use FOR_LOOP_P.
15512         (anonymous_class_creation): Create WFL of the anonymous class to
15513         instantiate. Call build_new_invocation. Added comments.
15514         (check_class_interface_creation): Handle parameter `anonymous' in
15515         verbose mode class creation announce.
15516         (link_nested_class_to_enclosing): Exclude anonymous classes.
15517         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15518         anonymous class, even though they appear to have an enclosing
15519         context.
15520         (create_interface): Pass extra argument to
15521         check_class_interface_creation.
15522         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15523         (create_class): Call check_class_interface_creation and
15524         maybe_create_class_interface_decl with extra new argument. Don't
15525         add private this$<n> to anonymous classes.
15526         (method_declarator): Insert hidden this$<n> to anonymous class
15527         constructors.
15528         (java_fix_constructors): Deleted code creating default
15529         constructor. Call craft_constructor instead.
15530         (java_check_regular_methods): Set `saw_constructor' to 1 for
15531         anonymous classes.
15532         (fix_constructors): Pass extra argument to verify_constructor_super.
15533         (verify_constructor_super): New local `sdecl', use it. Search for
15534         matching constructor (possibly featuring arguments) in super
15535         class.
15536         (lookup_method_invoke): Craft constructor according to arguments
15537         list when dealing with anonymous class constructors.
15538         (build_super_invocation): Pass arguments to anonymous class super
15539         constructors.
15540         (search_loop): Use FOR_LOOP_P.
15541         (labeled_block_contains_loop_p): Likewise.
15543 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15545         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15546         (enclosing_context_p): New function.
15547         (get_access_flags_from_decl): Handle CLASS_STATIC.
15548         (maybe_layout_super_class): Extra first argument passed to
15549         do_resolve_class.
15550         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15551         ID_INIT_P.
15552         * decl.c (access0_identifier_node): New global.
15553         (init_decl_processing): access0_identifier_node initialized.
15554         (pushdecl): Set DECL_CONTEXT only on non type decls.
15555         * expr.c (lookup_field): Lookup inner class fields in enclosing
15556         contexts.
15557         (expand_invoke): Use ID_INIT_P.
15558         (expand_java_field_op): Use DECL_CLINIT_P.
15559         * java-tree.def (CLASS_LITERAL): New tree code.
15560         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15561         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15562         (struct lang_decl): New field `inner_access'.
15563         (enclosing_context_p): Prototyped.
15564         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15565         ID_CLINIT_P): New macros.
15566         (CLASS_STATIC): New macro.
15567         (CLASS_ACCESS0_GENERATED_P): New macro.
15568         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15569         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15570         INNER_CLASS_P): New macros.
15571         (DECL_INNER_CLASS_LIST): New macro.
15572         * jcf-parse.c (yyparse): Avoid the use of ANSI string
15573         concatenation.
15574         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15575         the shift value to int. Fixed typo in comment.
15576         * lex.c (inst_id, wpv_id): Initialize.
15577         * mangle.c (unicode_mangling_length): Take `$' into account.
15578         * parse.h (DRECOVER, RECOVER): Terminate properly.
15579         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15580         (typedef struct _jdep): New field `enclosing'.
15581         (JDEP_ENCLOSING): New macro.
15582         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15583         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15584         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15585         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15586         GET_ENCLOSING_CPC_CONTEXT): New macros.
15587         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15588         (do_resolve_class): Added extra argument in prototype.
15589         * parse.y (resolve_class): Added extra argument in prototype.
15590         (maybe_create_class_interface_decl): Likewise.
15591         (maybe_use_access_method, build_wfl_wrap): New functions.
15592         (java_complete_expand_classes, java_complete_expand_class):
15593         Likewise.
15594         (java_parser_context_push_initialized_field,
15595         java_parser_context_suspend, java_parser_context_resume):
15596         Likewise.
15597         (maybe_make_nested_class_name, make_nested_class_name,
15598         set_nested_class_simple_name_value,
15599         link_nested_class_to_enclosing, find_as_inner_class,
15600         find_as_inner_class_do, check_inner_class_redefinition,
15601         build_thisn_assign, build_current_thisn, build_access_to_thisn,
15602         maybe_build_thisn_access_method, build_outer_field_access,
15603         build_outer_field_access_methods, build_outer_field_access_expr,
15604         build_outer_method_access_method, build_new_access_id,
15605         build_outer_field_access_method, outer_field_access_p,
15606         outer_field_expanded_access_p, outer_field_access_fix,
15607         build_incomplete_class_ref, patch_incomplete_class_ref,
15608         create_anonymous_class): Likewise.
15609         (inst_id, wpv_id): New static global variables.
15610         (synchronized:): New rule, tagged <node>.
15611         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15612         rules.
15613         (anonymous_class_creation:): New rule, tagged <node>.
15614         (NEW_TK): Tagged <node>.
15615         (type_literals, array_type_literal): New rules, tagged <node>.
15616         (class_declaration:): Removed action when reducing by class_body:
15617         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15618         using GET_CPC in sub-rules.
15619         (class_member_declaration): Handle inner classes.
15620         (method_declaration): When reducing method_header:, reset
15621         current_function_decl when appropriate.
15622         (method_declarator:): Set the number of formal parameter to 0 for
15623         method declared without arguments.
15624         (constructor_declarator:): Likewise.
15625         (static_initializer:): List of elements kept in a list.
15626         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15627         use of the keyword `static' for type declarations.
15628         (block_statement:): Handle inner class declarations.
15629         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15630         type qualified `this'.
15631         (class_instance_creation_expression): Use anonymous_class_creation:
15632         to handle inner class instances creation. Handle qualified `new'.
15633         (something_dot_new): Added appropriate actions.
15634         (create_new_parser_context): New function.
15635         (java_push_parser_context, java_parser_context_save_global,
15636         java_parser_context_suspend): Use create_new_parser_context.
15637         (check_modifiers): Changed leading comment.
15638         (check_class_interface_creation): Handle interclasses.
15639         (add_superinterfaces): Fixed comment.
15640         (create_interface): Build qualified name from the raw_name instead
15641         of its matching WFL. Push the initialized fields list. raw_name added
15642         as an extra argument to maybe_create_class_interface_decl.
15643         (create_class): Build qualified name from the raw_name instead of
15644         its matching WFL. Removed assignment to current_parsed_class_un.
15645         Call PUSH_ERROR before returning an error. Suspend the current
15646         parser context when processing an inner class. Push the
15647         initialized fields list. raw_name added as an extra argument to
15648         maybe_create_class_interface_decl. Add the private this$<n>
15649         field.
15650         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15651         (register_fields): Get the class type from GET_CPC and handle
15652         previous errors.  Added code to handle the creation of static
15653         fields in inner classes. Initialized fields initialization
15654         statements kept in a list of lists.
15655         (maybe_generate_finit): Initialized fields initialization
15656         statements kept in a list of lists. Use GET_CPC.
15657         (maybe_generate_clinit): Likewise.
15658         (method_header): Use GET_CPC and GET_CPC_UN.
15659         (parser_qualified_classname): Handle inner classes.
15660         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15661         (java_fix_constructors): Hide pointer to enclosing context
15662         instance in constructor list when dealing with inner classes.
15663         (jdep_resolve_class): Call resolve_class with extra first argument
15664         JDEP_ENCLOSING.
15665         (resolve_class): Add enclosing context as a first extra argument
15666         to do_resolve_class.
15667         (do_resolve_class): Call find_as_inner_class. Handle WFLs
15668         properly.
15669         (resolve_no_layout): Extra argument added to resolve_class
15670         invocation.
15671         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15672         (java_get_real_method_name): Use GET_CPC_UN.
15673         (check_abstract_method_definitions): Use DECL_CLINIT_P.
15674         (java_check_abstract_methods): Handle static method declared in
15675         inner classes by an error.
15676         (java_check_regular_methods): Use DECL_CLINIT_P.
15677         (source_start_java_method): Also set DECL_MAX_LOCALS.
15678         (create_artificial_method): Call java_parser_context_save_global
15679         and java_parser_context_restore_global instead of saving/restoring
15680         the context by hand.
15681         (expand_start_java_method): Improved verbose mode message.
15682         (java_complete_expand_methods): Fixed leading comment. Use
15683         DECL_CLINIT_P.
15684         (fix_constructors): Added assignment to this$<n> if necessary.
15685         (java_expand_classes): Call java_complete_expand_classes instead
15686         of java_complete_expand_methods.
15687         (make_qualified_primary): Simplified.
15688         (merge_qualified_name): Optimized for missing left or right parts.
15689         (resolve_expression_name): Handle access to outer class fields from
15690         interclasses.
15691         (resolve_qualified_expression_name): New macro
15692         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15693         classes. Report error on non appropriate qualification of
15694         `new'. Handle qualified `this'.
15695         (not_accessible_p): Allow access to outer class private fields from
15696         inner classes.
15697         (patch_method_invocation): Handle method invocations through
15698         access methods and inner class constructor invocations.
15699         (find_applicable_accessible_methods_list): Search enclosing
15700         contexts of an inner class.
15701         (search_applicable_methods_list): Fixed typo.
15702         (argument_types_convertible): Handle inner class constructors'
15703         hidden outer context reference argument.
15704         (qualify_ambiguous_name): Handle qualified `this'.
15705         (java_complete_lhs): Handle use of field accessed through
15706         artificial access methods in various cases of assignments. Handle
15707         CLASS_LITERAL node.
15708         (check_final_assignment): Use DECL_CLINIT_P.
15709         (valid_ref_assignconv_cast_p): Handle the destination being an
15710         enclosing context of the source.
15711         (patch_unaryop): Handle use of field accessed through artificial
15712         access methods.
15713         (patch_return): Use DECL_CLINIT_P.
15714         (patch_throw_statement): Use DECL_CLINIT_P.
15715         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15716         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15717         ID_INIT_P.
15719 2000-01-16  Anthony Green  <green@cygnus.com>
15721         * parse.y (build_string_concatenation): Only use
15722         StringBuffer(String) shortcut if String arg is constant.
15724 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15726         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15727         the shift value to int. Fixed typo in comment.
15729 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15731         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15732         * jcf-write.c: Likewise.
15733         * parse.y: Likewise.
15734         * parse.c: Regenerate.
15736 2000-01-09  Anthony Green  <green@cygnus.com>
15738         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15739         bytecodes in the correct order.
15741 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15743         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15745 2000-01-06  Anthony Green  <green@cygnus.com>
15747         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15748         before building constant array decl.
15750 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15752         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15753         method invocation and typo in conditional expression.
15754         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15755         the appropriate NOTE_POP.
15756         * parse.y (patch_binop): Shift value mask to feature the right
15757         type.
15759 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15761         * class.c (assume_compiled, assume_compiled_node): Add static
15762         prototype.
15763         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15765         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15767         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15769         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15770         to `__modifier' to avoid stringifying it.
15772         * parse.y (verify_constructor_circularity): Don't call a variadic
15773         function with a non-literal format string.
15774         (java_check_abstract_methods): Move unreachable code inside
15775         `continue' statement.
15776         (lookup_method_invoke): Call xstrdup, not strdup.
15778         * expr.c (expand_java_field_op): Avoid the use of ANSI string
15779         concatenation.
15781         * jcf-parse.c (yyparse): Likewise.
15783         * jv-scan.c (main): Likewise.
15785 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15787         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15788         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15789         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15790         concatenation.
15792         * parse.y (synchronized, variable_redefinition_error,
15793         check_class_interface_creation, create_interface, create_class,
15794         method_header, finish_method_declaration,
15795         check_modifiers_consistency, method_declarator,
15796         complete_class_report_errors, check_abstract_method_definitions,
15797         java_check_regular_methods, check_throws_clauses,
15798         java_check_abstract_methods, read_import_dir,
15799         check_pkg_class_access, declare_local_variables, fix_constructors,
15800         cut_identifier_in_qualified, resolve_expression_name,
15801         resolve_qualified_expression_name, patch_method_invocation,
15802         java_complete_lhs, patch_assignment, try_builtin_assignconv,
15803         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15804         patch_exit_expr, patch_exit_expr, patch_switch_statement,
15805         patch_try_statement, patch_synchronized_statement,
15806         patch_throw_statement, check_thrown_exceptions,
15807         patch_conditional_expr): Likewise.
15809 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15811         * Makefile.in (LIBDEPS): Added gcc's errors.o
15812         (../jcf-dump$(exeext):): Link with gcc's errors.o
15813         (../gcjh$(exeext):): Likewise.
15814         * expr.c (expand_java_NEW): Layout the entire target type instead of
15815         laying out its methods only.
15816         (lookup_field): Layout the class after having loaded it.
15817         * java-tree.h (java_debug_context): Declared.
15818         * jcf-io.c (toplev.h): Included.
15819         (find_class): Removed assignment to jcf's outofsynch
15820         field. Force source file to be read if newer than its matching
15821         class file. Tweaked debug messages.
15822         * jcf-parse.c (jcf_out_of_synch): Deleted.
15823         (read_class): Call to jcf_out_of_synch removed.
15824         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15825         (jcf_out_of_synch): Prototype deleted.
15826         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15827         `deprecated' and `class_err': integer turned into bit-fields.
15828         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15829         * parse.y (package_list): New global.
15830         (package_declaration:): Record newly parsed package name.
15831         (extra_ctxp_pushed_p): Static global deleted.
15832         (java_parser_context_save_global): Create buffer context for the
15833         purpose of saving globals, if necessary.
15834         (java_parser_context_restore_global): Pop context pushed for the
15835         purpose of saving globals, if necessary.
15836         (java_debug_context_do): New prototype and function.
15837         (java_debug_context): Likewise.
15838         (do_resolve_class): Use already parsed package names to qualify
15839         and lookup class candidate.
15840         (java_pre_expand_clinit): Removed unnecessary local variable.
15842 1999-12-17  Tom Tromey  <tromey@cygnus.com>
15844         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
15845         fixes PR gcj/119.
15846         (process_file): Use `\n\' at end of each line in string.
15848 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15850         * expr.c (expand_invoke): Layout the loaded class before
15851         attempting to use it.
15852         (expand_java_field_op): Allow final field assignments to take
15853         place in $finit$.
15854         * typeck.c (convert): Return error_mark_node if expr is null.
15856 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15858         * class.c (class_depth): Return -1 if the class doesn't load
15859         properly.
15860         * expr.c (can_widen_reference_to): Check for errors during depth
15861         computation and return 0 accordingly.
15862         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15863         create default constructors and add an other error check.
15864         * parse.h (java_fix_constructors): Prototyped.
15865         * parse.y (java_pre_expand_clinit): Likewise.
15866         (build_super_invocation): Re-prototyped to feature one argument.
15867         (java_check_circular_reference): Directly use `current'.
15868         (java_fix_constructors): New function.
15869         (java_check_regular_methods): Don't create default constructors
15870         here, but abort if none were found.
15871         (java_complete_expand_methods): Pre-process <clinit> calling
15872         java_pre_expand_clinit.
15873         (java_pre_expand_clinit): New function.
15874         (fix_constructors): build_super_invocation invoked with the
15875         current method declaration as an argument.
15876         (build_super_invocation): Use the context of the processed method
15877         decl argument instead of current_class.
15878         * typeck.c (lookup_java_method): Take WFLs in method names into
15879         account.
15881 1999-12-14  Per Bothner  <per@bothner.com>
15883         * class.c (make_class_data): flag_keep_inline_functions to keep
15884         private methods in the method array.
15886 1999-12-15  Anthony Green  <green@cygnus.com>
15888         * check-init.c (check_init): Take into account both types of
15889         `throw's when checking for uninitialized variables.
15891 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15893         * parse.y (java_complete_lhs): Force conversion of array
15894         dimensions to int_type_node, that's what runtime's ABI expects.
15896 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15898         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15899         operand of a WFL, until the Java front-end gets fixed with regard
15900         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15902 1999-12-10  Andrew Haley  <aph@cygnus.com>
15904         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15905         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15906         expr.c (build_java_athrow): Add support for sjlj-exceptions.
15907         java-tree.h: Ditto.
15908         jcf-write.c: Ditto.
15910 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15912         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15913         before calling expand_eh_region_start and expand_start_all_catch.
15914         * except.c (expand_start_java_handler): Switch to permanent
15915         obstack before calling expand_eh_region_start.
15916         (expand_end_java_handler): Switch to permanent obstack before
15917         calling expand_start_all_catch.
15919 1999-12-5  Anthony Green  <green@cygnus.com>
15921         * decl.c (init_decl_processing): Mark throw_node as a noreturn
15922         function with side effects.
15923         (init_decl_processing): Mark all memory allocating DECLs with
15924         DECL_IS_MALLOC.
15926 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15928         * except.c (expand_end_java_handler): Call
15929         expand_resume_after_catch and end_catch_handler.
15931 1999-11-30  Anthony Green  <green@cygnus.com>
15933         * verify.c (verify_jvm_instructions): Create new return label
15934         chain if non existent (don't rely on the verified state of the jsr
15935         target.)
15937 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15939         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15940         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15942         * parse.y (patch_assignment): Removed bogus final class test on
15943         lhs when checking on whether to emit an ArrayStoreException runtime
15944         check.
15945         * expr.c (expand_java_arraystore): Likewise.
15947 1999-11-28 Anthony Green <green@cygnus.com>
15949         * decl.c (find_local_variable): Reuse single slot decls when
15950           appropriate.
15952 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15954         * jcf-parse.c (saw_java_source): Global variable removed.
15955         (read_class): Don't use `saw_java_source'. Added extra braces.
15956         (yyparse): Code setting `saw_java_source' removed.
15958 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
15960         * except.c (emit_handlers): Zero catch_clauses after emitting them.
15962 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15964         * verify.c (merge_type_state): Non verified subroutines being
15965         considered more than once to trigger passive type merge.
15967 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15969         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15970         in case of error. Error message tuned.
15972 1999-11-21  Anthony Green  <green@cygnus.com>
15974         * constants.c (find_methodref_index): Unwrap method names before
15975         inserting them in the constant pool.
15977         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15979         * class.c (assume_compiled_node): New typedef.
15980         (assume_compiled_tree): New static data.
15981         (find_assume_compiled_node): New function.
15982         (add_assume_compiled): New function.
15983         (assume_compiled): New function.
15984         * class.c (make_class_data): Use assume_compiled.
15985         (is_compiled_class): Use assume_compiled.
15987         * java-tree.h (add_assume_compiled): Declare.
15989         * lang.c (lang_decode_option): Parse new options.
15991 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15993         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15994         int_type_node: that's what `_Jv_AllocObject' expects.
15996 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15998         * parse.y (lookup_method_invoke): Use lang_printable_name to
15999         reliably build the type name during error report. Fixes PR gcj/97.
16001 1999-11-09  Tom Tromey  <tromey@cygnus.com>
16003         * jcf-path.c: Include <sys/stat.h>.
16004         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
16005         (DIR_UP): New macro.
16007 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16009         * parse.y (source_end_java_method): Resume permanent allocation,
16010         reversing Apr 27 1998 patch.
16011         (patch_string_cst): Pop obstacks after having pushed the permanent
16012         ones.
16014 1999-11-05  Tom Tromey  <tromey@cygnus.com>
16016         * class.c (finish_class): Emit inlined methods if any native
16017         methods exist in the class.  Fixes PR gcj/85.
16019 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16021         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
16022         (qualify_ambiguous_name): Likewise.
16024 1999-11-03  Godmar Back <gback@cs.utah.edu>
16026         * typeck.c: (lookup_java_method):  search all inherited
16027         interfaces when looking up interface method.
16029 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16031         * parse.y (method_header:): Issue error message for rule `type
16032         error'.
16033         (synchronized:): Error report when not using synchronized.
16035 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16037         * parse.y (resolve_qualified_expression_name): Prevent `this' from
16038         being used before the superclass constructor has been called.
16039         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
16040         instead of `CALL_THIS_CONSTRUCTOR_P'.
16042 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
16044         * check-init.c: Fix typo in comment.
16046 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16048         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
16049         and final method.
16051 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16053         * parse.y (expression_statement:): Call function to report
16054         improper invocation of a constructor.
16055         (parse_ctor_invocation_error): New function.
16057 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
16059         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
16060         remember_end_note.
16062 1999-10-21  Tom Tromey  <tromey@cygnus.com>
16064         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
16065         in generated `main'.
16067 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16069         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
16070         (qualify_ambiguous_name): Likewise.
16072 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16074         * parse.y (java_complete_tree): fold_constant_for_init to work on
16075         permanent_obstack.
16076         (java_complete_lhs): Likewise.
16077         (array_constructor_check_entry): Complete an initializer element
16078         on permanent_obstack.
16080 1999-10-19  Tom Tromey  <tromey@cygnus.com>
16082         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
16083         From Mike Moreton <mike@pillim.demon.co.uk>.
16085 1999-10-15  Greg McGary  <gkm@gnu.org>
16087         * java-tree.h (flag_bounds_check): Remove extern decl.
16088         * lang.c (flag_bounds_check): Remove global variable.
16089         (lang_f_options): Remove "bounds-check" entry.
16090         (lang_init_options): Default flag_bounds_check to "on".
16092 1999-10-14  Tom Tromey  <tromey@cygnus.com>
16094         * jvgenmain.c (usage): New function.
16095         (main): Use it.  Also, handle `-D' options.
16096         * jvspec.c (lang_specific_driver): Recognize -D.
16097         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
16099         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
16101 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16103         * jcf-dump.c (print_constant, disassemble_method): Don't call a
16104         variadic function with a non-literal format string.
16106         * parse-scan.y (report_main_declaration): Likewise.
16108         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
16110         * parse.y (read_import_dir, patch_assignment, patch_binop,
16111         patch_array_ref): Likewise.
16113         * typeck.c (build_java_array_type): Likewise.
16115         * verify.c (verify_jvm_instructions): Likewise.
16117 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16119         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
16121 1999-10-07  Anthony Green  <green@cygnus.com>
16123         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
16124         where CHECK_PUT may fail for valid reasons.
16126         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
16127         UNSAFE_PUTN): New macros.
16129 1999-10-04  Tom Tromey  <tromey@cygnus.com>
16131         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
16132         well.  Fixes Java PR gcj/59.
16133         * parse-scan.y (yyerror): Report errors.
16135 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
16137         * decl.c (insert_block): Remove unconditional `abort'.
16139 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
16141         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
16142         FUNCTION_CODE now of type int.  All callers changed.
16143         Set the builtin's DECL_BUILT_IN_CLASS.
16145 1999-09-23  Tom Tromey  <tromey@cygnus.com>
16147         * jvspec.c (lang_specific_driver): Don't read spec file if
16148         -fsyntax-only given.
16150 1999-09-22  Tom Tromey  <tromey@cygnus.com>
16152         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
16154         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
16155         (WORDS_TO_LONG): Likewise.
16156         (WORDS_TO_DOUBLE): Likewise.
16158 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16160         * jcf-write.c (RELOCATION_VALUE_0): New macro.
16161         (RELOCATION_VALUE_1): Likewise.
16162         (emit_iinc, emit_reloc, push_constant1, push_constant2,
16163         push_in_const, push_long_const): Prototyped.
16164         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
16165         (push_constant2): Likewise.
16166         (push_int_const): Cast find_constant1's integer arguments to `jword'.
16167         (find_constant_wide): Cast find_constant2's integer arguments to
16168         `jword'.
16169         (find_constant_index): Cast find_constant2's and find_constant2's
16170         integer arguments to `jword'.
16171         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
16172         (emit_switch_reloc): Use RELOCATION_VALUE_0.
16173         (emit_if): Use RELOCATION_VALUE_1.
16174         (emit_goto): Likewise.
16175         (emit_jsr): Likewise.
16176         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
16177         argument to push_long_const to HOST_WIDE_INT.
16179 1999-09-15  Andreas Schwab  <schwab@suse.de>
16181         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
16183 1999-09-20  Nick Clifton  <nickc@cygnus.com>
16185         * lang.c (lang_decode_option): Extend comment.
16187 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16189         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
16190         instead of fndecl.
16192 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16194         * gjavah.c (get_field_name, print_method_info, print_include,
16195         add_namelet): Use xmalloc, not malloc.
16197         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
16198         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
16199         NULL pointer.
16201         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
16203         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
16205         * jcf-path.c (add_entry): Likewise.
16207         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
16209         * jv-scan.c (xmalloc): Remove definition.
16211         * jvgenmain.c (xmalloc): Likewise.
16213         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
16215         * lex.c (java_store_unicode): Use xrealloc, not realloc.
16217         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
16218         concat, not xmalloc/sprintf.
16219         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
16220         (xstrdup): Remove definition.
16222         * parse.y (duplicate_declaration_error_p,
16223         constructor_circularity_msg, verify_constructor_circularity,
16224         check_abstract_method_definitions, java_check_regular_methods,
16225         java_check_abstract_methods, patch_method_invocation,
16226         check_for_static_method_reference, patch_assignment, patch_binop,
16227         patch_cast, array_constructor_check_entry, patch_return,
16228         patch_conditional_expr): Use xstrdup, not strdup.
16230         * zextract.c (ALLOC): Use xmalloc, not malloc.
16232 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16234         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
16236         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
16237         (do_spec, lang_specific_pre_link, lang_specific_driver,
16238         input_filename, input_filename_length): Don't declare.
16239         (main_class_name, jvgenmain_spec, lang_specific_driver):
16240         Constify a char*.
16241         (lang_specific_driver): All calls to the function pointer
16242         parameter now explicitly call `fatal'.
16244 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16246         * parse.y (find_applicable_accessible_methods_list): Search
16247         abstract classes as interfaces.
16249 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16251         * class.c (finish_class): We're now outside a valid method
16252         declaration. Tell the rest of gcc so.
16254 1999-09-08  Bruce Korb  autogen@linuxbox.com
16256         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
16258 1999-09-07  Tom Tromey  <tromey@cygnus.com>
16260         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
16261         java-array.h.
16262         (decode_signature_piece): Don't emit "::" in JArray<>.
16263         (print_namelet): Only print trailing `;' when printing a class.
16265 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
16267         * java-tree.h: Delete declarations for all tree nodes now moved to
16268         global_trees.
16269         * decl.c: Delete their definitions.
16271 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
16273         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
16274         * Makefile.in (OBJS): Add ggc-callbacks.o.
16275         (OBJDEPS): Likewise.
16277 1999-09-03  Tom Tromey  <tromey@cygnus.com>
16279         * parse.y (strip_out_static_field_access_decl): Return operand if
16280         it satisfies JDECL_P.
16282 1999-09-02  Tom Tromey  <tromey@cygnus.com>
16284         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
16285         Handle nested arrays, like `[[I'.
16287 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16289         * class.c (finish_class): Remove unused parameter, all callers
16290         changed.
16292         * expr.c (build_java_athrow): Change return type to void.
16293         (java_lang_expand_expr): Make sure each case in switch returns a
16294         value.
16296         * java-tree.h (finish_class): Fix prototype to take void args.
16298         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16299         (main): Issue return from main, not exit.
16301         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16303         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16305         * jv-scan.c (main): Issue return from main, not exit.
16307         * parse.y (check_abstract_method_definitions,
16308         java_check_abstract_method_definitions): Add static prototypes.
16309         (java_complete_expand_methods): Fix call to `finish_class'.
16311         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16312         and `prevpc'.
16314 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16316         * lang.c (language_string): Constify.
16318 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16320         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16321         Remove hacks for stuff which comes from libiberty.
16323         * Make-lang.in: Likewise.
16325 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
16327         * Makefile.in (xref.o): Depend on xref.c explicitly.
16329 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16331         * java-tree.h (lang_printable_name): Constify a char*.
16333         * lang.c (lang_printable_name): Likewise.
16335 1999-08-27  Jeffrey A Law  (law@cygnus.com)
16337         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16338         comments in C code.
16340 1999-08-26  Tom Tromey  <tromey@cygnus.com>
16342         * gjavah.c (print_cxx_classname): Print "::" before qualified
16343         name.
16345 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16347         * parse.y (lookup_cl): Changed leading comment. Now does its best
16348         to set the column number.
16349         (qualify_ambiguous_name): Take WFL wrappers into account.
16351 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
16353         * verify.c (verify_jvm_instructions): Don't check instruction
16354         validity beyond end of method.
16356 1999-08-25  Tom Tromey  <tromey@cygnus.com>
16358         * jvspec.c (lang_specific_driver): Correctly handle --help again.
16360 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16362         * gjavah.c (print_name, print_base_classname, utf8_cmp,
16363         cxx_keyword_subst, generate_access, name_is_method_p,
16364         get_field_name, print_field_name, super_class_name, print_include,
16365         decode_signature_piece, print_class_decls, usage, help,
16366         java_no_argument, version, add_namelet, print_namelet): Add static
16367         prototype.
16368         (print_base_classname, utf8_cmp, cxx_keyword_subst,
16369         name_is_method_p): Constify a char*.
16370         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
16371         Provide a final else clause in an if-else-if.
16372         (print_field_info): Add missing final arg in function call to
16373         `print_field_name'.
16374         (print_method_info, decompile_method, decode_signature_piece,
16375         print_c_decl, print_full_cxx_name, print_stub,
16376         print_mangled_classname, super_class_name, print_include,
16377         add_namelet, add_class_decl, print_class_decls, process_file,
16378         help): Constify a char*.
16380         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16381         push_int_const, find_constant_wide, find_constant_index,
16382         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16383         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16384         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16385         emit_if, emit_goto, emit_jsr, call_cleanups,
16386         make_class_file_name): Add static prototypes.
16387         (generate_bytecode_return, generate_bytecode_insns): Pass a
16388         NULL_PTR, not a NULL_TREE.
16390         * jv-scan.c: Include "jcf.h".
16391         (main): Declare using DEFUN macro.
16393         * jvspec.c (find_spec_file, lang_specific_pre_link,
16394         lang_specific_driver): Add prototypes.
16395         (find_spec_file): Constify a char*.
16397         * keyword.gperf (hash, java_keyword): Add prototypes.
16399         * lang.c (lang_print_error): Add static prototype.
16400         (lang_init): Prefer memcpy over bcopy to avoid casts.
16402         * lex.c (yylex): Add static prototype.
16404         * parse-scan.y: Include "lex.c" earlier.
16406         * parse.h: Remove redundant declaration for `yylex'.
16408         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16409         labeled_block_contains_loop_p): Add static prototypes.
16410         (not_accessible_p): Make static to match prototype.
16412         * verify.c (start_pc_cmp): Don't needlessly cast away const.
16414 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16416         * parse.y (check_method_redefinition): Changed leading comment.
16417         (check_abstract_method_definitions): New function.
16418         (java_check_abstract_method_definitions): New function.
16419         (java_check_regular_methods): Call it.
16420         (verify_constructor_super): Fixed indentation.
16421         (lookup_method_invoke): Likewise.
16423 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16425         * parse.y (method_header): Return a null pointer if the current
16426         class node is null.
16427         (finish_method_declaration): Return if the current function decl
16428         is null.
16429         (source_start_java_method): Likewise.
16430         (java_method_add_stmt): Likewise.
16432 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16434         * class.c (emit_register_class): Removed unnecessary call to
16435         start_sequence.
16436         * parse.y (labeled_block_contains_loop_p): Removed unused local
16437         variable.
16439 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16441         * parse.y (java_refold): Added prototype.
16443 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16445         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16446         (java_stabilize_reference): Removed unnecessary `else'.
16447         (java_complete_lhs): Set flag to remember boolean. Call
16448         java_refold. Added comments.
16449         (java_decl_equiv): New function.
16450         (binop_compound_p): Likewise.
16451         (java_refold): Likewise.
16452         (patch_unaryop): Striped static field access assigned to decl and
16453         op. Changed promotion scheme for ++/-- operators.
16454         (search_loop): New function.
16455         (labeled_block_contains_loop_p): Likewise.
16456         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16457         comment.
16458         (patch_bc_statement): Call search_loop. Fixed comment.
16460 1999-08-14  Anthony Green  <green@cygnus.com>
16462         * expr.c (java_lang_expand_expr): Mark static array data as
16463         referenced.
16465 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
16467         * jvgenmain.c (main): NUL-terminate name_obstack.
16469 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16471         * check-init.c (check_bool2_init, done_alternative): Add static
16472         prototypes.
16474         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16475         (add_method, build_utf8_ref, build_class_ref,
16476         append_gpp_mangled_type, layout_class_method): Constify a char*.
16478         * decl.c (push_promoted_type, make_binding_level): Add static
16479         prototypes.
16480         (push_promoted_type, pushdecl): Constify a char*.
16482         * except.c (find_handler_in_range, link_handler,
16483         check_start_handlers): Add static prototypes.
16485         * expr.c (process_jvm_instruction): Constify a char*.
16487         * gjavah.c (main): Constify a char*.
16489         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16490         Constify a char*.
16492         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16493         static prototypes.
16494         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16495         munge, print_ents): Constify a char*.
16497         * jcf-dump.c (disassemble_method): Constify a char*.
16498         (print_constant_pool, print_exception_table): Add static prototypes.
16499         (print_constant, print_exception_table, main, disassemble_method):
16500         Constify a char*.
16502         * jcf-io.c (find_classfile, find_class): Likewise.
16504         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16505         (set_source_filename, predefined_filename_p): Add static prototypes.
16506         (set_source_filename, get_constant, get_class_constant,
16507         find_in_current_zip): Constify a char*.
16509         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16510         static prototypes.
16511         (add_entry, add_path, jcf_path_classpath_arg,
16512         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16514         * jcf-reader.c (get_attribute, jcf_parse_preamble,
16515         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16516         jcf_parse_one_method, jcf_parse_methods,
16517         jcf_parse_final_attributes): Add static prototypes.
16518         (get_attribute): Constify a char*.
16520         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16521         jcf_dependency_add_target, jcf_path_classpath_arg,
16522         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16524         * jv-scan.c (main): Constify a char*.
16525         (gcc_obstack_init): Add prototype arguments.
16527         * jvgenmain.c (gcc_obstack_init): Likewise.
16528         (main): Constify a char*.
16530         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16531         static prototypes.
16532         (put_decl_string, lang_print_error): Constify a char*.
16533         (lang_init): Remove redundant extern prototype.
16535         * mangle.c (emit_unicode_mangled_name): Constify a char*.
16537         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16538         Add static prototypes.
16539         (get_type_from_signature): Constify a char*.
16541         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16542         Add static prototypes.
16543         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16544         (verify_jvm_instructions): Constify a char*.
16546         * xref.c (xref_flag_value): Likewise.
16548         * xref.h (xref_flag_value): Likewise.
16550         * zextract.c (makeword, makelong): Add static prototypes.
16551         (makeword, makelong): Constify a uch*.
16553 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16555         * lang.c (java_dummy_print): Constify a char*.
16556         (lang_print_error): Likewise.
16557         (lang_init): Remove redundant prototype for `print_error_function'.
16558         (lang_init_source): Likewise.
16559         (lang_identify): Constify a char*.
16561 1999-08-09  Tom Tromey  <tromey@cygnus.com>
16563         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16564         (WORDS_TO_LONG): Likewise.
16565         (WORDS_TO_DOUBLE): Likewise.
16567 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16569         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16571         * expr.c (java_stack_pop, java_array_data_offset,
16572         build_java_throw_out_of_bounds_exception, case_identity,
16573         build_java_check_indexed_type): Add static prototypes.
16574         (linenumber_table, expand_invoke, expand_java_field_op,
16575         build_primtype_type_ref, expand_byte_code): Constify a char*.
16577         * java-tree.h (build_primtype_type_ref, linenumber_table):
16578         Constify a char*.
16579         (java_lang_expand_expr): Add prototype.
16581         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
16582         `java_lang_expand_expr'.
16584         * lex.c (java_lex_error): Constify a char*.
16585         (java_get_unicode, java_read_char, java_allocate_new_line,
16586         java_unget_unicode, java_sneak_unicode): Prototype.
16588         * parse-scan.y (current_class, package_name, method_declarator,
16589         report_class_declaration, yyerror): Constify a char*.
16591         * parse.h (java_report_errors): Prototype.
16592         (yyerror): Constify a char*.
16594         * parse.y (classitf_redefinition_error, check_modifiers,
16595         parse_jdk1_1_error, lookup_package_type,
16596         lookup_package_type_and_set_next, get_printable_method_name,
16597         purify_type_name): Constify a char*.
16598         (build_super_invocation, maybe_generate_finit,
16599         verify_constructor_super, parser_add_interface,
16600         add_superinterfaces, jdep_resolve_class, note_possible_classname,
16601         java_complete_expand_methods, java_expand_finals,
16602         cut_identifier_in_qualified, java_stabilize_reference,
16603         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16604         merge_string_cste): Prototype.
16605         (single_type_import_declaration, yyerror,
16606         variable_redefinition_error, build_array_from_name,
16607         build_unresolved_array_type, check_class_interface_creation,
16608         resolve_class, complete_class_report_errors,
16609         note_possible_classname, read_import_dir,
16610         find_in_imports_on_demand, resolve_package, fix_constructors,
16611         check_deprecation, lookup_method_invoke,
16612         maybe_build_primttype_type_ref, array_constructor_check_entry):
16613         Constify a char*.
16614         (java_complete_expand_methods, java_expand_finals): Make static.
16615         (convert_narrow): Remove static prototype.
16617 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
16619         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16621 1999-08-02  Richard Henderson  <rth@cygnus.com>
16623         * decl.c: Include defaults.h instead of expr.h.
16624         * parse.y: Likewise.
16626 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
16628         * java/decl.c (start_java_method): Change all uses of
16629         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16630         Ensure expr.h is included.
16631         * java/expr.c (pop_arguments): Ditto.
16632         * java/parse.y (expand_start_java_method): Ditto.
16634 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16636         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16638 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
16640         * decl.c: Include "function.h".
16641         * except.c: Likewise.
16642         * parse.y: Likewise.
16643         * Makefile.in: Update dependencies.
16645 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16647         * expr.c (build_java_soft_divmod): Provide a default case in switch.
16648         (java_lang_expand_expr): Mark parameters `target', `tmode' and
16649         `modifier' with ATTRIBUTE_UNUSED.
16651         * gjavah.c (process_file): Add braces around ambiguous `else'.
16653         * jcf-dump.c (print_access_flags, localvar_free): Change return
16654         type to void.
16656         * parse.y (java_complete_expand_method): Initialize variable
16657         `exception_copy'.
16658         (resolve_qualified_expression_name): Likewise for `field_decl'.
16659         (patch_method_invocation): Likewise for `class_to_search'.
16660         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16661         (patch_assignment): Likewise for `lhs_type'.
16663         * verify.c (verify_jvm_instructions): Remove unused variable
16664         `caller'.
16666 1999-07-25  Richard Henderson  <rth@cygnus.com>
16668         * decl.c (va_list_type_node): New.
16670 1999-07-25  Anthony Green  <green@cygnus.com>
16672         * gjavah.c (print_stub): New function.
16673         (METHOD_IS_NATIVE): New macro.
16674         (print_mangled_classname): Make static.
16675         (HANDLE_END_FIELD): Don't emit fields during stub generation.
16676         (process_file): Perform stub generation.
16677         (HANDLE_METHOD): Don't emit class decls during stub
16678         generation.
16679         (HANDLE_END_METHOD): Take into account stub generation.
16680         (print_method_info): Handle stub generation.
16681         (print_stub): New function.
16682         (print_cxx_classname): Make signature consistant with others.
16683         (help): Describe -stubs option.
16684         (main): Create stub file.
16685         (version): Use version.c.
16686         (print_full_cxx_name): New function.
16687         (print_c_decl): Use print_full_cxx_name.
16689 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16691         * check-init.c (check_init): Handle MAX_EXPR.
16693 1999-07-15  Andrew Haley  <aph@cygnus.com>
16695         * lang.c (flag_use_divide_subroutine): New variable.
16696         * typeck.c: (convert_ieee_real_to_integer): Bounds check
16697         fp-to-integer conversion.
16698         (convert): Call convert_ieee_real_to_integer when flag_fast_math
16699         is not set.
16701         * expr.c (build_java_soft_divmod): New function.
16702         (build_java_binop): Call build_java_soft_divmod if
16703         flag_use_divide_subroutine is set.
16704         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16705         soft_lrem_node: new builtin functions.
16706         (init_decl_processing) Initialize the new builtins.
16707         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16708         soft_lrem_node: new builtin functions.
16709         (build_java_soft_divmod): New function.
16710         * parse.y: Call build_java_soft_divmod if
16711         flag_use_divide_subroutine is set.
16712         * parse.c: Rebuilt.
16714         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16715         a --specs= arg) even if not linking.
16716         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16717         -fuse-divide-subroutine
16719 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16721         * parse.y (resolve_and_layout): Check methods only once.
16722         (resolve_qualified_expression_name): Verify thrown exceptions
16723         compatibility.
16724         (check_thrown_exceptions): Reject exceptions thrown in
16725         initializer. Error message tuned.
16727 1999-07-14  Andrew Haley  <aph@cygnus.com>
16729         * expr.c (expand_expr): Do not return the last statement in a
16730         block as the block's value.
16732 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16734         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16735         CALL_EXPR, to avoid order of evaluation changes.
16737 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16739         * parse.y (qualify_ambiguous_name): Do not use
16740         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16742 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16744         * check-init.c (check_init): Handle MAX_EXPR.
16745         * expr.c (force_evaluation_order): Force method call arguments to
16746         be evaluated in left-to-right order.
16747         * parse.y (qualify_ambiguous_name): Loop again to qualify
16748         NEW_ARRAY_EXPR properly.
16750 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16752         * parse.y (patch_invoke): Resolve unresolved invoked method
16753         returned type.
16754         (qualify_ambiguous_name): STRING_CST to qualify expression for
16755         type name resolution.
16757 1999-06-24  Andrew Haley  <aph@cygnus.com>
16759         * class.c (finish_class): Whenever a deferred method is
16760         output, rescan the list of methods to see if a new candidate for
16761         output can be found.
16763 1999-06-28  Tom Tromey  <tromey@cygnus.com>
16765         * jvspec.c (lang_specific_driver): Recognize --help.
16767 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16769         * parse.y (resolve_package): Fixed bogus return statement.
16770         (patch_method_invocation): Resolve method invocation beginning with
16771         a package name qualifier.
16773 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16775         * Make-lang.in (java.stage1): Depend on stage1-start.
16776         (java.stage2): Likewise for stage2-start.
16777         (java.stage3): Likewise for stage3-start.
16778         (java.stage4): Likewise for stage4-start.
16780 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16782         * parse.y (java_complete_lhs): When doing cross referencing, don't
16783         try to keep file location on a WFL expanded as a CALL_EXPR.
16785 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16787         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16788         compiling to class file a void method with an empty method body.
16789         As a side effect, the bytecode backend will generate the
16790         appropriate `return' instruction.
16792 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16794         * parse.y (lookup_package_type_and_set_next): New function prototype.
16795         (resolve_package): Search current and imported packages.
16796         (lookup_package_type_and_set_next): New function.
16798 1999-06-22  Andrew Haley  <aph@cygnus.com>
16800         * verify.c (verify_jvm_instructions): Check for pending blocks
16801         before invalid PC test and opcode switch, not after.
16803 1999-06-21  Andrew Haley  <aph@cygnus.com>
16805         * except.c (find_handler_in_range): The upper limit for exception
16806         ranges is exclusive, not inclusive: (start <= pc < end).
16807         (link_handler): find child pointer which points to outer by
16808         searching sibling list: previous code incorrectly assumed that
16809         outer->outer->first_child must point to outer.
16810         * verify.c (verify_jvm_instructions): FIXME added to code for
16811         `athrow'.
16812         (verify_jvm_instructions): Do not assume that the last block
16813         processed in a subroutine is a block which ends with a `ret'
16814         instruction.  With some control flows it is possible that the last
16815         block ends with an `athrow'.
16817 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16819         * parse.y (qualify_ambiguous_name): Reorganized the post
16820         evaluation of non WFL leading expression nodes.
16822 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16824         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16825         CONVERT_EXPR.
16827 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16829         * parse.y (qualify_ambiguous_name): Handle qualified expression
16830         beginning with a STRING_CST.
16832 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16834         * parse.y (register_fields): Set DECL_INITIAL on both
16835         pre-initialized static and public fields.
16836         (resolve_field_access): Static field access expressions to always
16837         use pointer types.
16838         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16839         qualification. CONVERT_EXPR to be resolved as an expression name.
16840         (java_complete_lhs): Identify and access qualified final
16841         initialized field in switch statement case expression.
16842         (fold_constant_for_init): Pre-initialized field decl constant to
16843         be folded.
16845 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16847         * parse.y (note_possible_classname): Mark returned node with
16848         QUALIFIED_P only if the original class name contained a '/'.
16850 1999-06-05  Anthony Green  <green@cygnus.com>
16852         * Make-lang.in (gcjh): More parallel build fixes.
16854 1999-06-03  Mike Stump  <mrs@wrs.com>
16856         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16858 1999-06-02  Anthony Green  <green@cygnus.com>
16860         * except.c (link_handler): Chain exception handlers in order.
16862 1999-06-02  Anthony Green  <green@cygnus.com>
16864         * expr.c (expand_byte_code): Fill unreachable bytecode regions
16865         with nops and process as usual in order to always set correct EH
16866         ranges.  Emit detailed warnings about unreachable bytecodes.
16868 1999-06-02  Anthony Green  <green@cygnus.com>
16870         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16871         constant.
16873 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16875         * parse.y (lookup_field_wrapper): Unified returned value to NULL
16876           or the searched field decl.
16878 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16880         * parse.y (fold_constant_for_init): Convert numerical constant
16881         values to the type of the assigned field.
16883 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16885         * expr.c (lookup_field): Relaxed the test on class loading error
16886         detection.
16887         * parse.y (fold_constant_for_init): Enabeled old code.
16889 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16891         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16892         decide the validity of the cast of a java.lang.Cloneable reference
16893         to an array.
16894         (patch_conditional_expr): Fixed first argument passed to
16895         binary_numeric_promotion.
16897 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16899         * parse.y (qualify_ambiguous_name): Take into account that a
16900         CONVERT_EXPR might specify a type as a WFL.
16902 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16904         * parse.y (patch_assignment): Save the rhs before using it as an
16905         argument to _Jv_CheckArrayStore.
16907 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16909         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16911 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16913         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16914         floating point literal only when the exponent indicator has been
16915         parsed.
16917 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16919         * parse.y (formal_parameter:): Construct argument tree list
16920         element even if a yet unsupported final parameter was encountered.
16922 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16924         * parse.y (finish_method_declaration): Issue errors for native or
16925         abstract methods declared with a method body, as well as for non
16926         native or non abstract methods with no method body.
16928 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16930         * class.c (build_utf8_ref): Initialize variable `field'.
16932         * decl.c (init_decl_processing): Initialize variable `field'.
16934         * expr.c (build_known_method_ref): Mark parameters `method_type',
16935         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16936         (process_jvm_instruction): Likewise for parameter `length'.
16938         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16939         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16940         ATTRIBUTE_UNUSED.
16942         * parse.y (maybe_generate_clinit): Remove unused variable
16943         `has_non_primitive_fields'.
16944         (find_in_imports_on_demand): Initialize variables `node_to_use'
16945         and `cl'.
16946         (patch_binop): Likewise for variable `prom_type'.
16947         (patch_unaryop): Likewise for variable `prom_type'.
16949         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16951         * xref.c (xref_table): Add missing initializer.
16953 1999-05-14  Tom Tromey  <tromey@cygnus.com>
16955         * java-except.h (struct eh_range): Removed unused `next' member.
16956         * verify.c (verify_jvm_instructions): Call check_nested_ranges
16957         after adding all exception handlers.  Sort exception ranges in
16958         order of start PC.
16959         (struct pc_index): New structure.
16960         (start_pc_cmp): New function.
16961         * except.c (add_handler): Return `void'.  Don't call link_handler;
16962         instead construct an ordinary linked list and do range
16963         coalescing.
16964         (check_nested_ranges): New function.
16965         (link_handler): Changed interface to allow merging of eh_ranges.
16966         Split overlapping ranges.  Return `void'.
16968 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16970         * parse.y (constructor_block_end:): New rule, tagged <node>.
16971         (constructor_body:): Use `constructor_block_end' instead of
16972         `block_end'.
16974 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16976         * parse.y (statement_nsi:): Pop `for' statement block.
16977         (java_complete_lhs): Labeled blocks containing no statement are
16978         marked as completing normally.
16980 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16982         * xref.c (xref_set_current_fp): New function, defined.
16983         * xref.h (xref_set_current_fp): New function, prototyped.
16985 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16987         * check-init.c (check_init): Take into account that
16988         LABELED_BLOCK_STMT can be empty.
16990 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16992         * parse.y (java_check_regular_methods): Warning check on not
16993         overriding methods with default access in other packages does not
16994         apply to `<clinit>'.
16995         (java_complete_lhs): If block body is an empty_stmt_node, replace
16996         it by NULL_TREE. This prevents gcc from generating an irrelevant
16997         warning.
16999 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17001         * check-init.c (check_init): Removed code accepting to see things
17002         falling through default:, when doing xrefs.
17003         * java-tree.h (do_not_fold): New global variable, declared.
17004         * parse.y (do_not_fold): New global variable, defined.
17005         (java_complete_expand_method): Set `do_not_fold' to the value of
17006         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
17007         and reinstall them after them have been purged; do not check for
17008         initializations; do not issue missing return errors.
17009         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
17010         when doing xrefs.
17011         (patch_binop): Skip the fold part when doing xrefs.
17012         (build_string_concatenation): Skip the concatenation part when
17013         doing xrefs.
17014         (patch_synchronized_statement): Do not generate a try-finally when
17015         doing xrefs.
17016         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
17017         and keep the location where the throw was seen.
17018         * typeck.c (convert): When `do_not_fold' is set, do not attempt
17019         any treatment on the converted node an simply return a NOP_EXPR of
17020         the targeted type.
17021         * xref.c (xref_get_data): New function, defined.
17022         * xref.h (xref_get_data): New function, declared.
17023         (XREF_GET_DATA): Use xref_get_data.
17025 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17027         * gjavah.c (print_include): Cast the result of `strlen' to int
17028         when comparing against a signed value.
17029         (add_namelet): Likewise.
17031 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17033         * expr.c (expand_invoke): Mark parameter `nargs' with
17034         ATTRIBUTE_UNUSED.
17035         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
17037         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
17038         ATTRIBUTE_UNUSED.
17040         * jcf-reader.c (get_attribute): Cast a value to long
17041         when comparing against a signed expression.  Likewise.
17043         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
17044         HOST_BITS_PER_CHAR.
17046 1999-05-11  Andrew Haley  <aph@cygnus.com>
17048         * parse.y (source_end_java_method): If the current method contains
17049         any exception handlers, force asynchronous_exceptions: this is
17050         necessary because signal handlers in libjava may throw exceptions.
17051         * decl.c (end_java_method): Ditto.
17053 1999-05-11  Tom Tromey  <tromey@cygnus.com>
17055         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
17056         flags.
17057         * jvspec.c (THREAD_NAME): Removed.
17058         (GC_NAME): Likewise.
17059         (MATHLIB): Likewise.
17060         (WITHLIBC): Likewise.
17061         (GCLIB): Likewise.
17062         (THREADLIB): Likewise.
17063         (MATH_LIBRARY): Likewise.
17064         (lang_specific_driver): Don't add `-l' options to command line.
17065         Instead, add a single --specs option.  Recognize `-L' options and
17066         use them to search for spec file.
17067         (find_spec_file): New function.
17068         (SPEC_FILE): New define.
17070 1999-05-11  Dave Brolley  <brolley@cygnus.com>
17072         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
17073         cpplib-enabled build.
17075 1999-05-05  Per Bothner  <bothner@cygnus.com>
17077         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
17078         temporarily zero it while calling rest_of_decl_compilation.
17080         * java-tree.h (string_ptr_type_node):  Add declaration.
17081         * decl.c:  Define and initialize string_ptr_type_node.
17082         * parse.y (patch_string_cst):  Use string_ptr_type_node.
17084         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
17085         * parse.y (for_statement):  Now unconditionally exit_block.
17086         (finish_labeled_statement):  No longer exit_block if for-loop.
17087         (patch_loop_statement):  Check harder if the loop is already labeled.
17089         * parse.y (patch_initialized_static_field):  Removed function.
17090         (maybe_generate_clinit):  Removed special handling for interfaces.
17091         (java_complete_expand_methods):  Do a preliminary java_complete_tree
17092         on <clinit> to determine if it can be removed.
17093         (java_complete_expand_method):  Remove special handling for <clinit>.
17094         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
17095         optimize if we get back empty_stmt_node.
17096         For MODIFY_EXPR, re-do checking of static initializers.
17097         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
17098         For VAR_DECL, pass correct context.
17100         * verify.c (verify_jvm_instructions):  Better error messages.
17102 1999-05-03  Tom Tromey  <tromey@cygnus.com>
17104         * parse-scan.y (interface_declaration): Call
17105         report_class_declaration for interfaces.
17107 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
17109         * Makefile.in: Remove -v from bison command lines.
17111 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17113         * check-init.c (check_init): Exclude a case of error when doing
17114         xrefs.
17115         * class.c (layout_class_method): Don't generate the error message
17116         twice when compiling from source.
17117         * lang-options.h: Added `-Wredundant-modifers' and
17118         `-Wunusupported-jdk11' flags and help text.
17119         * lang.c (lang_decode_option): Added support for
17120         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
17121         flag_static_local_jdk11 and flag_redundant set accordingly.
17122         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
17123         * parse.h (EXPR_WFL_ADD_COL): New macro.
17124         (DECL_END_SOURCE_LINE): Likewise.
17125         (DECL_INHERITED_SOURCE_LINE): Likewise.
17126         * parse.y (static_ref_err): New function, prototyped.
17127         (CCB_TK): Now tagged <operator>.
17128         (class_body:): Remember the location of the closing '}' of a class
17129         definition when doing xrefs.
17130         (block:): Likewise.
17131         (block_end:): Likewise.
17132         (create_class): Remember the location of the inherited class
17133         identifier when doing xrefs.
17134         (register_fields): Added test on first operand of `init' before
17135         testing it TREE_CODE.
17136         (method_header): Store the location of the class identifier in the
17137         class decl when doing xrefs.
17138         (finish_method_declaration): Don't combine first/last method line
17139         when doing xref.
17140         (java_check_regular_methods): Warning check on not overriding
17141         methods with default access on other packages move before check on
17142         static methods. Initialization of `aflags' also moved up.
17143         (resolve_expression_name): Call static_ref_err to report the error.
17144         (static_ref_err): New function, implemented.
17145         (resolve_field_access): Returned simplified static field access
17146         when doing xrefs.
17147         (resolve_qualified_expression_name): Check for illegal use of
17148         static fields in a non static context. Call static_ref_err to
17149         report error in various places.
17150         (java_complete_tree): Do not fold initialized static fields when
17151         doing xrefs.
17152         (java_complete_lhs): Likewise.
17154 1999-04-29  Anthony Green  <green@cygnus.com>
17156         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
17157         create internal labels.
17158         (lookup_label): Ditto.
17160 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17162         * class.c (layout_class_method): Generate <clinit>'s rtl for
17163         interfaces.
17164         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
17165         for interfaces' <clinit>.
17166         * expr.c (lookup_field): Search for fields in interfaces.
17167         (expand_invoke): Fixed indentation.
17168         (expand_java_field_op): Likewise. Use IS_CLINIT.
17169         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
17170         (IS_CLINIT): New macro.
17171         * parse.y (type_declaration:): Call maybe_generate_clinit after an
17172         interface was parsed.
17173         (maybe_generate_clinit): Don't generate if the current class is an
17174         interface with only fields of primitive types.
17175         (reset_method_name): Use IS_CLINIT.
17176         (java_complete_expand_method): Expand <clinit> when it exists for
17177         interfaces. Use IS_CLINIT.
17178         (resolve_expression_name): Use DECL_CONTEXT instead of
17179         current_class to build static field references.
17180         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
17181         ARRAY_REF when doing xreferencing.
17182         (check_final_assignment): Fixed typo in leading comment. Use
17183         IS_CLINIT.
17184         (patch_array_ref): Don't fully expand array references when
17185         xreferencing.
17186         (patch_return): Use IS_CLINIT.
17187         (patch_throw_statement): Likewise.
17189 1999-04-22  Tom Tromey  <tromey@cygnus.com>
17191         * Make-lang.in (JAVA_SRCS): Added check-init.c.
17193 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17195         * decl.c (predef_filenames, predef_filenames_size): New globals
17196         (init_decl_processing): predef_filenames and predef_filenames_size
17197         initialized.
17198         * java-tree.h (predef_filenames, predef_filenames_size): Declared
17199         extern.
17200         * jcf-parse.c (predefined_filename_p): New function.
17201         (yyparse): Check that files on the command line are specified only
17202         once and issue a warning otherwise.
17203         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
17204         * parse.y (source_end_java_method): Nullify NOP method bodies, to
17205         avoid a gcc warning with -W -Wall turned on.
17206         (java_expand_classes): Abort if errors were encountered.
17207         (java_complete_lhs): If the cross reference flag is set, wrap
17208         field DECL node around a WFL when resolving expression name.
17210 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17212         * lang.c (lang_decode_option): Fixed returned value when parsing
17213         `-fxref=...' and `-Wall'.
17214         * parse.y (source_end_java_method): Do not generate code when
17215         flag_emit_xref is set.
17216         (resolve_expression_name): Do not build static field access when
17217         flag_emit_xref is set.
17218         (resolve_field_access): No special treatment on `length' when
17219         flag_emit_xref is set. Do not build qualified static field access
17220         when flag_emit_xref is set.
17221         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
17222         when flag_emit_xref is set.
17223         (patch_assignment): Do not generate array store runtime check when
17224         flag_emit_xref is set.
17225         * xref.c (xref_flag_value): Fixed function declaration
17226         indentation.
17227         (xset_set_data): New function.
17228         * xref.h (xref_set_data): Added prototype for new function.
17229         (typedef struct xref_flag_table): New field data.
17230         (XREF_GET_DATA): New macro.
17232 1999-04-19  Tom Tromey  <tromey@cygnus.com>
17234         * xref.h (enum): Removed trailing comma.
17236         * parse.y (resolve_qualified_expression_name): Added missing
17237         `break'.
17239 1999-04-15  Anthony Green  <green@cygnus.com>
17241         * gjavah.c: New prototypes for java_float_finite and
17242         java_double_finite.
17244 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17246         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
17247         references.
17249 1999-04-06  Jeffrey A Law  (law@cygnus.com)
17251         * Makefile.in (TREE_H): Add tree-check.h.
17252         (RTL_H): Add genrtl.h.
17254 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17256         * parse.y (patch_assignment): Added ArrayStoreException runtime
17257         check.
17259 1999-04-06  Per Bothner  <bothner@cygnus.com>
17261         * expr.c (pop_type_0):  New function.
17262         (pop_type):  Use pop_type_0.
17263         * java-tree.h (pop_type_0):  New declaration.
17264         * verify.c (verify_jvm_instructions):  Check return instructions.
17266         * parse.y (patch_binop):  Don't fold if non-constant and emiting
17267         class files.
17269 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17271         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
17273         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
17274         (main_jcf): Don't define.
17275         (process_file): Don't set `main_jcf'.
17277         * java-tree.h (main_jcf): Don't declare.
17279         * jcf-parse.c (main_jcf): Add static definition.
17281         * lang.c (main_jcf): Don't define.
17283 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17285         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
17287         * decl.c (copy_lang_decl): Likewise for `bcopy'.
17289         * jcf-depend.c: Include "config.h", not <config.h>.
17291         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
17292         `bcopy' to PTR.
17294         * jcf-path.c: Include "config.h", not <config.h>.
17296         * lex.c: Don't include various system header files.
17297         (java_init_lex): Cast the argument of `bzero' to PTR
17299         * parse-scan.y (java_push_parser_context): Likewise.
17301         * parse.y (java_push_parser_context): Likewise.
17302         (patch_bc_statement): Match format specifier to variable argument.
17304         * xref.c: Don't include <stdio.h>.
17306 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17308         * parse.y (struct parser_ctxt *ctxp): Now global.
17309         (declare_local_variables): Use WFL compound value for the
17310         declaration source line value, when doing cross-referencing.
17312 1999-03-31  Tom Tromey  <tromey@cygnus.com>
17314         * gjavah.c (print_field_info): Allow constants of other types.
17315         (print_include): Generate include when new name is proper prefix
17316         of already printed name.
17317         (add_namelet): Likewise.
17318         (cxx_keyword_subst): New function.
17319         (print_method_info): Use it.
17320         (print_field_name): New function.
17321         (get_field_name): New function.
17322         (print_field_info): Use get_field_name and print_field_name.
17324 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17326         * Makefile.in (keyword.h): Generate using gperf language 'C', not
17327         'KR-C', so gperf uses the `const' keyword on strings.
17329         * keyword.gperf (java_keyword): Const-ify a char*.
17331 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17333         * parse.y (patch_bc_statement): Fixed identation and a bogus
17334         `printf' format.
17336 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17338         * parse.y (patch_assignment): Allow static variables in other
17339         classes to be assigned.
17341 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17343         * class.c (maybe_add_interface): Remove unused variable
17344         `interface_binfo'.
17345         (make_class_data): Use = for assignment, not ==.  Likewise.
17346         (emit_register_classes): Remove unused variable `decl'.
17348         * lex.c: Fix comment so as not to contain an embedded `/*'.
17350         * verify.c (verify_jvm_instructions): Remove unused variable
17351         `self_type'.
17353 1999-03-27  Per Bothner  <bothner@cygnus.com>
17355         * parse.y (complete_loop_body):  Rename to finish_loop_body.
17356         (complete_labeled_statement):  Rename to finish_labeled_statement.
17357         (complete_for_loop):  Rename to finish_for_loop.
17358         (complete_method_declaration):  Rename to finish_method_declaration.
17360         * java-tree.h (continue_identifier_node):  New global node.
17361         * decl.c:  Define and initialize continue_identifier_node.
17362         * parse.y (generate_labeled_block):  Remove - no longer needed.
17363         (build_loop_body):  Use continue_identifier_node for continue block.
17364         (finish_labeled_statement):  Also do pop_labeled_block actions.
17365         (java_complete_lhs):  POP_LOOP even if error.
17366         (build_labeled_block):  Special handling for continue_identifier_node.
17367         (patch_loop_statement):  Re-organize.
17368         (patch_bc_statement):  Re-write.
17370 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17372         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17373         using a WFL compound value.
17374         * parse.y (xref.h): Include.
17375         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17376         WFL compound value.
17377         (register_fields): Set WFL compound value to lineno if doing
17378         xrefs.
17379         (java_complete_expand_method): Call expand_xref if flag_emit_xref
17380         is set.
17381         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17382         * xref.h (expand_xref): Prototype renamed from xref_generate.
17384 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17386         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17387         (GET_CURRENT_BLOCK): New macro.
17388         * parse.y (current_static_block): New global variable.
17389         (method_body:): Define action.
17390         (complete_method_declaration): Set current_function_decl to NULL
17391         when work on the current method is done.
17392         (declare_local_variables): Use GET_CURRENT_BLOCK.
17393         (java_method_add_stmt): Likewise.
17394         (java_complete_expand_method): Disable the use of `this' when
17395         expanding <clinit>.
17396         (enter_a_block): If no current method exist, use
17397         current_static_block to link static initializer blocks.
17398         (exit_block): Rewritten to use current_static_block when no current
17399         method decl exists.
17400         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17401         (patch_return): Forbid the use of `return' in static initializers.
17402         (patch_throw_statement): Fixed indentation. Issue specific error
17403         for uncaught thrown checked exception in static initializer
17404         blocks. Removed FIXME.
17406 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
17408         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17409         Link gcj from gcc.o.
17411 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17413         * parse.y (find_applicable_accessible_methods_list): When dealing
17414         with interface: ensure that a given interface or java.lang.Object
17415         are searched only once.
17417 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17419         * gjavah.c (print_c_decl): Remove unused argument `flags'.
17421         * jcf-dump.c (print_access_flags): Add braces around if-else.
17423         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17424         COMBINE_INPUTS.
17426         * lex.c (build_wfl_node): Add static prototype.
17428         * lex.h (build_wfl_node): Remove static prototype.
17430         * parse.y: Include lex.c early enough to declare everything needed.
17431         Ensure calls to `build_wfl_node' pass the proper arguments.
17432         (create_class): Remove unused variable `super_decl'.
17433         (get_printable_method_name): Initialize variable `name'.
17435 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17437         * Changelog: Fixed 1999-03-22 typos.
17438         * lang.c (lang_decode_option): Fixed typo in error string in the
17439         XARG section.
17441 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17443         * Makefile.in (JAVA_OBJS): Added entry xref.o.
17444         (xref.o): New rule.
17445         * java-tree.h (flag_emit_xref): Declared extern.
17446         * lang.c (xref.h): Included.
17447         (flag_emit_xref): New global variable.
17448         (lang_decode_option): Added support for -fxref.
17449         * xref.c: Created.
17450         * xref.h: Likewise.
17452 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
17454         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17455         linked with.
17457 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17459         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17460         $(srcdir)/../system.h and $(JAVA_TREE_H).
17461         (jcf-io.o): Depend on $(JAVA_TREE_H).
17462         (mangle.o): Likewise.
17464         * check-init.c (check_cond_init): Add static prototype.
17466         * class.c (build_java_method_type, hashUtf8String,
17467         make_field_value, get_dispatch_vector, get_dispatch_table,
17468         append_gpp_mangled_type, mangle_static_field): Likewise.
17469         (strLengthUtf8): Hide unused definition.
17470         (hashUtf8String): Const-ify.
17471         (make_field_value): Un-ANSI-fy.
17473         * constants.c: Move inclusion of jcf.h above java-tree.h.
17474         (set_constant_entry, find_class_or_string_constant,
17475         find_name_and_type_constant, get_tag_node,
17476         build_constant_data_ref): Add static prototype.
17478         * decl.c (push_jvm_slot, builtin_function,
17479         lookup_name_current_level): Likewise.
17480         (builtin_function): Const-ify.
17482         * except.c (expand_start_java_handler, expand_end_java_handler):
17483         Add static prototype.
17485         * expr.c (flush_quick_stack, push_value, pop_value,
17486         java_stack_swap, java_stack_dup, build_java_athrow,
17487         build_java_jsr, build_java_ret, expand_java_multianewarray,
17488         expand_java_arraystore, expand_java_arrayload,
17489         expand_java_array_length, build_java_monitor, expand_java_pushc,
17490         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17491         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17492         expand_compare, expand_test, expand_cond, expand_java_goto,
17493         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17494         expand_java_field_op, java_push_constant_from_pool): Likewise.
17496         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17497         (build_java_arraynull_check): Mark parameters `node' and `type'
17498         with ATTRIBUTE_UNUSED.
17499         (note_label): Likewise for parameter `current_pc'.
17500         (expand_java_call, expand_java_ret): Hide unused definition.
17502         * java-tree.h (make_class, build_constants_constructor,
17503         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17504         init_outgoing_cpool, register_class, emit_register_classes,
17505         java_layout_seen_class_methods): Prototype.
17506         (unicode_mangling_length): Const-ify.
17507         (append_gpp_mangled_name, append_gpp_mangled_classtype,
17508         emit_unicode_mangled_name, format_int, format_uint,
17509         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17510         jcf_print_utf8_replace, open_class): Prototype.
17512         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
17513         <stdio.h>.  Include tree.h/java-tree.h.
17514         (utf8_equal_string usage, process_class): Add static prototype.
17515         (open_class): Don't prototype this here.
17516         (utf8_equal_string): Match arguments to format specifiers.
17517         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17518         TABLE_SWITCH, disassemble_method): Likewise.
17520         * jcf-io.c: Include tree.h/java-tree.h.
17521         (open_class, find_classfile, jcf_print_utf8,
17522         jcf_print_utf8_replace): Const-ify.
17524         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17525         parse_class_file): Add static prototype.
17526         (find_in_current_zip): Match definition to existing static
17527         prototype.
17529         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17530         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17531         finish_jcf_block, define_jcf_label, get_jcf_label_here,
17532         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17533         write_chunks, adjust_typed_op, generate_bytecode_conditional,
17534         generate_bytecode_return, perform_relocations, init_jcf_state,
17535         init_jcf_method, release_jcf_state, generate_classfile):
17536         Add static prototype.
17537         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17538         (make_class_file_name): Const-ify.
17540         * jcf.h (find_classfile): Const-ify.
17542         * jv-scan.c (reset_report): Remove prototype.
17544         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17545         (error): Rewrite to allow varargs.
17547         * lang.c (lang_f_options): Const-ify.
17549         * lex.c (java_parse_escape_sequence): Add static prototype.
17550         (java_allocate_new_line): Match definition to existing static
17551         prototype.
17553         * mangle.c Include tree.h/java-tree.h.
17554         (unicode_mangling_length, emit_unicode_mangled_name,
17555         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17557         * parse.h (jdep_code): Remove trailing comma in enumeration.
17558         (java_get_line_col): Move prototype outside of !JC1_LITE test.
17559         (reset_report): Add prototype.
17561         * verify.c (push_pending_label, merge_types): Add static
17562         prototypes.
17564         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17566 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17568         * parse.y (find_applicable_accessible_methods_list): Extend the
17569         search to superinterfaces when relevant.
17570         (search_applicable_methods_list): New function.
17572 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17574         * class.c (unmangle_classname): Implemented stricter testing
17575         before setting the QUALIFIED_P flag on an identifier.
17577 1999-03-16  Per Bothner  <bothner@cygnus.com>
17579         * parse.y (java_complete_lhs):  Call force_evaluation_order
17580         after patch_newarray.
17581         (patch_binop):  Don't call fold if there are side effects.
17583 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17585         * parse.y (java_stabilize_reference): Use save_expr instead of
17586         building a SAVE_EXPR node.
17587         (java_complete_lhs): Patch the resulting string of the `+='
17588         operator (if necessary) and complete the RHS after having built
17589         the cast.
17591 1999-03-15  Per Bothner  <bothner@cygnus.com>
17593         * class.c (make_class):  Don't set CLASS_P here (because
17594         this function is also called by build_java_array_type).
17595         (push_class):  Set CLASS_P here instead.
17596         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
17598         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
17599         context.  If the context is class, perfer "super" over "synchronized".
17600         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
17602         * parse.y (create_class):  Don't call parser_check_super here;
17603         it is not robust.  Always wait until later.
17605         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
17606         match what JDK 1.2 does), but don't set ACC_PUBLIC.
17608 1999-03-13  Per Bothner  <bothner@cygnus.com>
17610         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
17611         * lex.h (UNGETC):  Change misleading macro.
17613 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17615         * parse.y (java_stabilize_reference): Return NODE when patching a
17616         COMPOUND_EXPR.
17617         (java_complete_lhs): Put parenthesis around truth values.
17619 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17621         * class.c (layout_class_method): Don't make rtl for interface
17622         methods.
17623         * parse.h (GET_TYPE_NAME): New macro.
17624         * parse.y (if_then_statement:): Fixed indentation.
17625         (if_then_else_statement:): Likewise.
17626         (for_statement:): Fixed spacing.
17627         (try_statement:): Fixed indentation.
17628         (create_interface): Don't force interfaces to be abstract.
17629         (method_header): Abstract methods are OK in interfaces.
17630         (declare_local_variables): Fixed typo in comment.
17631         (java_complete_expand_method): Fixed indentation.
17632         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17633         non accessible fields.
17634         (java_stabilize_reference): New function.
17635         (java_complete_lhs): Fixed indentation. Use
17636         java_stabilize_reference in compound assignment. Insert the
17637         cast. If not processing `+' fix string constants before processing
17638         binop.
17640 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17642         * constants.c (find_class_or_string_constant): Cast variable `j'
17643         to a `jword' when comparing against one.
17645         * expr.c (java_lang_expand_expr): Remove unused variables
17646         `has_finally_p' and `op0'.
17648         * gjavah.c (print_field_info): Cast a value to jint when comparing
17649         against one.  Likewise for a jlong.
17650         (add_namelet): Likewise cast a `sizeof' to an int when comparing
17651         against a signed quantity.
17653         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17654         (print_signature): Don't needlessly dereference variable `str'
17656         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17657         `max_locals' with ATTRIBUTE_UNUSED.
17658         (jcf_parse_class): Likewise for variable `index'.
17660         * parse.h (reverse_jdep_list): Remove static prototype.
17662         * parse.y (build_jump_to_finally): Remove prototype and definition.
17663         (reverse_jdep_list): Add static prototype.
17665         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17666         `assignment' and `expr_decl'.
17668         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17670 1999-03-12  Andrew Haley  <aph@cygnus.com>
17672         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17673         we'll need a directory separator and a null character.
17675 1999-03-10  Per Bothner  <bothner@cygnus.com>
17677         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
17679 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17681         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17682         interfaces.
17684 1999-03-05  Per Bothner  <bothner@cygnus.com>
17686         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
17688         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
17690         * class.c (layout_class_method):  A static method in a base class
17691         is never overridden, so treat it like it doesn't exist.
17692         However, do complain about private non-static method overriding
17693         public static method.
17695         * parse.y:  Don't set unused INITIALIZED_P flag.
17696         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
17698         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
17699         (build_array_from_name):  Re-order &index[string] to &string[index].
17701         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
17702         error_mark (it might catch more errors, but it is more likely to lose).
17704 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17706         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17707         (parse-scan.o): Depend on toplev.h.
17709         * class.c (make_method_value): Add prototype.  Make it static.
17710         Remove unused second argument, caller changed.
17712         * expr.c (java_lang_expand_expr): Remove unused variable
17713         `return_label'.
17715         * java-tree.h: Don't prototype find_in_current_zip.
17716         Add prototypes for verify_constant_pool, start_java_method,
17717         end_java_method, give_name_to_locals, expand_byte_code,
17718         open_in_zip, set_constant_value, find_constant1, find_constant2,
17719         find_utf8_constant, find_string_constant, find_class_constant,
17720         find_fieldref_index, find_methodref_index, write_constant_pool,
17721         count_constant_pool_bytes and encode_newarray_type.
17723         * jcf-dump.c: Remove unused variable `LONG_temp'.
17725         * jcf-parse.c: Include parse.h.
17726         (jcf_parse_source): Remove unused parameter, all callers changed.
17727         (jcf_figure_file_type): Add static prototype.
17728         (find_in_current_zip): Likewise.  Also remove unused parameter,
17729         all callers changed.
17730         (read_class): Initialize variable `saved_pos'.
17732         * jcf-reader.c (jcf_parse_preamble): Mark variables
17733         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17735         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17736         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17737         (java_parse_doc_section): Initialize variable `seen_star'.
17738         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17739         (java_lex_error): Mark parameters `msg' and `forward' with
17740         ATTRIBUTE_UNUSED.
17741         (java_get_line_col): Mark parameters `filename' and `line' with
17742         ATTRIBUTE_UNUSED.
17744         * parse-scan.y: Include toplev.h.
17745         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17747         * parse.h: use `struct JCF', not plain `JCF'.
17748         (java_parser_context_save_global, java_expand_classes
17749         java_parser_context_restore_global, java_parse): Add prototypes.
17751         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17752         `node'.
17754 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
17756         *  check-init.c (check_init):  COPYN takes word count, not bit count.
17758 1999-02-26  Per Bothner  <bothner@cygnus.com>
17760         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
17761         explicit build_decl.  (Avoids crash in reload when optimizing.)
17763 1999-02-25  Per Bothner  <bothner@cygnus.com>
17765         * decl.c (complete_start_java_method):  Handle synchronized method
17766         even when compiling from bytecode.
17768 1999-02-26  Tom Tromey  <tromey@cygnus.com>
17770         * gjavah.c (add_class_decl): Only generate `#include' if outer
17771         class is not the name of the class we are processing.  Correctly
17772         append `.h' in #include.
17773         (process_file): Clean up newlines around generated `#include's.
17774         (decode_signature_piece): Correctly handle inner classes.
17775         (struct include): New structure.
17776         (all_includes): New global.
17777         (print_include): New function.
17778         (add_class_decl): Use it.
17779         (process_file): Likewise.
17780         (add_class_decl): Generate include for java-array.h if array
17781         seen.
17782         (process_file): Don't generate java-array.h include.
17784         * gjavah.c (add_namelet): Check for standard package names here.
17785         (add_class_decl): Don't check for standard package names here.
17787 1999-02-25  Tom Tromey  <tromey@cygnus.com>
17789         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17790         When reading a zip file, only use strncmp if both strings are
17791         bigger than the buffer length.  Initialize `k' when looping
17792         through zip file.
17794 1999-02-24  Tom Tromey  <tromey@cygnus.com>
17796         * gjavah.c (struct namelet): New structure.
17797         (add_namelet): New function.
17798         (print_namelet): New function.
17799         (print_class_decls): Use add_namelet and print_namelet to generate
17800         namespaces and not classes.
17801         (method_printed): New global.
17802         (HANDLE_END_METHOD): Examine method_printed.
17803         (print_method_info): Set method_printed when required.  Print
17804         error if function to be ignored is marked virtual.  Handle $finit$
17805         method.
17806         (METHOD_IS_FINAL): New macro.
17807         (print_field_info): Use it.
17808         (HANDLE_METHOD): Clear method_printed.
17809         (method_pass): New global.
17810         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17811         (process_file): Do two passes over both fields and methods.
17812         (HANDLE_METHOD): Examine method_pass.
17813         (root): New global.
17814         (add_class_decl): New function.
17815         (print_class_decls): Don't scan over entire constant pool.
17817 1999-02-23  Tom Tromey  <tromey@cygnus.com>
17819         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17820         disable linking in that case.
17822 1999-02-20  Tom Tromey  <tromey@cygnus.com>
17824         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17825         not 0x1f.
17827 1999-02-21  Per Bothner  <bothner@cygnus.com>
17829         * decl.c (build_result_decl), java-tree.h:  New method.
17830         (complete_start_java_method):  Handle synchronized methods.
17831         Don't build DECL_RESULT here.  (Ordering dependency problem.)
17832         (start_java_method):  Call build_result_decl here instead  ...
17833         * parse.y (java_complete_expand_method):  ... and here.
17834         (expand_start_java_method): Don't call complete_start_java_method here.
17835         (java_complete_expand_method):  Call it here instead.
17836         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
17837         * java-tree.h:  ... here.
17839         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
17840         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
17841         for ARRAY_REF - it doesn't work when array bounds are checked.
17842         (patch_array_ref):  Handle it here instead.
17844         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
17846 1999-02-19  Per Bothner  <bothner@cygnus.com>
17848         Force left-to-right evaluation of binary operations etc.
17849         * expr.c (force_evaluation_order), java-tree.h:  New function.
17850         * parse.y (java_complete_lhs):  Pass binary operations, procedure
17851         calls, and ARRAY_REFs to force_evaluation_order.
17852         (various):  Set TREE_SIDE_EFFECTS more carefully.
17854         Tolerate random (non-UTF8) encoding in comments without complaining.
17855         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
17856         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
17858         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
17859         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
17861         * parse.y (java_complete_lhs):  Ignore an empty statement in a
17862         COMPOUND_EXPR.  Don't complain about empty statement after return.
17864 1999-02-19  Per Bothner  <bothner@cygnus.com>
17866         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
17867         in TREE_LIST - just chain the POINTER_TYPEs together.
17868         (resolve_class):  If type already resolved, return decl.
17869         After resolving, update TREE_TYPE(class_type), and name (if array).
17870         * parse.h (do_resolve_class), parse.y:  Make non-static.
17871         * class.c (maybe_layout_super_class):  Take this_class argument.
17872         Do do_resolve_class if necessary.
17873         (layout_class, layout_class_methods): Adjust calls appropriately.
17874         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17875         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
17876         * typeck.c (build_java_array_type):  Don't call layout_class.
17878 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17880         * parse.y (check_pkg_class_access): Allow private class access
17881         within the same package.
17882         (strip_out_static_field_access_decl): New function.
17883         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17884         operator argument before testing its nature.
17886 1999-02-03  Per Bothner  <bothner@cygnus.com>
17888         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
17889         (TRY_EXPR):  Simplify - it no longer has a finally clause.
17890         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
17891         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17892         * expr.c (java_lang_expand_expr):  Likewise.
17893         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
17894         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
17895         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
17896         (build_try_statement):  Remove finally parameter and handling.
17897         (build_try_finally_statement):  New function.
17898         (patch_try_statement):   No longer need to support finally clause.
17899         (try_statement):  Update grammar action rules.
17900         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
17901         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17903 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
17905         * jcf-parse.c (get_constant): Add braces around computation of 'd'
17906         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
17908 1999-02-17  Andrew Haley  <aph@cygnus.com>
17910         * class.c (build_utf8_ref): Back out broken patch which was
17911         intended to to output signatures using '.' as a separator.
17913         * class.c (make_class_data): Output signatures using '.' as a
17914         separator, rather than '/'.
17915         (mangled_classname): Likewise.
17916         (make_field_value): Likewise.
17917         (make_method_value): Likewise.
17918         * constants.c (alloc_class_constant): Likewise.
17919         * expr.c (build_invokeinterface): Likewise.
17921 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17923         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17924         of an ancient workaround.
17926 1999-02-10  Jeffrey A Law  (law@cygnus.com)
17928         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
17929         here anymore.
17931 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17933         * lex.c (yylex): Encode \0 as UTF8.
17935 1999-02-10  Tom Tromey  <tromey@cygnus.com>
17937         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17938         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17939         (libgcj_zip): Renamed.
17940         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17941         LIBJAVA_ZIP_FILE.
17942         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17944         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17945         (GC_NAME): Renamed -lgc to -lgcjgc.
17947 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17949         * lex.c (java_lang_cloneable): Initialize.
17950         * parse.y (java_lang_cloneable): New static variable.
17951         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17952         doing one more qualification round.
17953         (valid_ref_assignconv_cast_p): Reject null source or
17954         destination. Allow an array to be cast into java.lang.Cloneable.
17955         (patch_cast): Swapped two first arguments to first call to
17956         valid_ref_assignconv_cast_p.
17958 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17960         * parse.h: DECL_P renamed JDECL_P.
17961         * parse.y: DECL_P replaced by JDECL_P.
17962         (build_array_from_name): Always use pointer's type.
17963         (patch_bc_statement): Extra code to search continue target in a
17964         for loop. Fixed comments. Continue target is current loop when
17965         unlabeled.
17967 1999-02-05  Andrew Haley  <aph@cygnus.com>
17969         * class.c (make_class_data): The superclass of an interface should
17970         be null, not class Object.
17972         * lex.c (java_lex): Sign extend hex literals.
17974 1999-02-04  Andrew Haley  <aph@cygnus.com>
17976         * class.c (build_utf8_ref): Output signatures using '.' as a
17977         separator, rather than '/'.
17978         (make_class_data): Likewise.
17980 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
17982         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17983         mkstemp.o.  Get them from libiberty now.
17985 1999-02-02  Jeffrey A Law  (law@cygnus.com)
17987         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17989 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17991         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17992         from libiberty.h
17994 1999-02-02  Per Bothner  <bothner@cygnus.com>
17996         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17997         * jcf-write.c (generate_bytecode_return):  New function.
17998         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
18000         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
18001         generate special [fd]const_[01] instructions.
18003         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
18005         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
18006         handling OPCODE_lookupswitch or OPCODE_tableswitch.
18008 1999-02-01  Per Bothner  <bothner@cygnus.com>
18010         * parse.y (patch_method_invocation):  Handle calling static methods,
18011         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
18013         * parse.y (java_complete_lhs):  Don't complain about unreachable
18014         exit condition in a do-while statement.
18016 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18018         * lex.c (java_read_char): Fixed utf8 decoding.
18019         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
18020         range.
18021         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
18022         comments. Local variable `all_primitive' is gone. Broadened
18023         acceptance of `0' to floating point targets. `long' can now be
18024         widened to `double' or `float'.
18025         (valid_method_invocation_conversion_p): Added leading
18026         comment. Fixed tabulation.
18027         (build_string_concatenation): Optimize out left or right empty
18028         string constants.
18030 1999-01-28  Per Bothner  <bothner@cygnus.com>
18032         * jcf-write.c (localvar_alloc):  Only emit entry for
18033         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
18034         (generate_bytecode_insns):  Only call put_linenumber if
18035         debug_info_level > DINFO_LEVEL_NONE.
18036         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
18037         is specified, add -g1 (for compatibility wih javac).
18039 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
18041         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
18042         gjavah.o, check-init.o, jv-scan.o
18044 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18046         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
18048         * gjavah.c: Include config.h and system.h.
18050         * javaop.h (inline): Don't define, its handled by system.h.
18051         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
18052         from `inline' to `static inline'.
18054         * jcf.h (inline): Don't define, its handled by system.h.
18056         * lex.c (inline): Likewise.
18058 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
18060         * lang-specs.h: Map -Qn to -fno-ident.
18062 1999-01-29  Richard Henderson  <rth@cygnus.com>
18064         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
18066 1999-01-29  Tom Tromey  <tromey@cygnus.com>
18068         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
18069         then cast it to Object before calling `append' method.
18071 1999-01-28  Per Bothner  <bothner@cygnus.com>
18073         * check-init.c (check_bool2_init, check_bool_init, check_init):
18074         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
18075         * jcf-write.c (generate_bytecode_insns):  Likewise.
18077 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18079         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
18080         * parse.y (patch_cast): Allow a boolean to be cast into a
18081         boolean.
18083 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18085         * parse.y: (class_declaration:): Fixed indentation.
18086         (class_member_declaration:): Extra `;' after field declaration now
18087         accepted.
18088         (interface_declaration:): Removed debug messages in error reports.
18089         (patch_binop): Nodes created and returned inherit the orignal
18090         node's COMPOUND_ASSIGN_P flag value.
18091         (patch_cast): Fix cast from char to floating point.
18093 1999-01-25  Andrew Haley  <aph@cygnus.com>
18095         * except.c, java-except.h (expand_resume_after_catch): new
18096         function.
18097         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
18098         to branch back to main flow of control after a catch block.
18100 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18102         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
18103         $(srcdir)/../system.h.
18104         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
18105         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
18106         (jcf-write.o): Likewise.
18107         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18108         (mangle.o): Depend on $(srcdir)/../toplev.h.
18109         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18110         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18112         * class.c: Include output.h and parse.h.
18113         (mangled_classname): Add the `const' keyword to a char*.
18114         (find_named_method): Hide unused function definition.
18115         (build_utf8_ref): Change type of variable `c' to unsigned char.
18116         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
18117         (build_class_ref): Add the `const' keyword to a char*.
18118         (layout_class_method): Remove unused variable `buf'.
18120         * decl.c (find_local_variable): Remove unused variable `rtl'.
18121         (pushdecl): Likewise for variables `different_binding_level' and
18122         `oldglobal'.
18123         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
18124         (maybe_build_cleanup): Likewise for parameter `decl'.
18126         * except.c (expand_start_java_handler): Mark parameter `range'
18127         with ATTRIBUTE_UNUSED.
18129         * expr.c: Include except.h.
18130         (pop_type): Remove unused variable `i'.
18131         (pop_value): Likewise for variables `n_words' and `i'.
18132         (expand_java_arrayload): Likewise for variable `convert'.
18133         (java_lang_expand_expr): Likewise for variables `op0', `type',
18134         `mode', `unsignedp', `node' and `elements'.
18135         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
18136         `eh_ranges'.
18137         (process_jvm_instruction): Add a `const' qualifier to a char*.
18139         * gjavah.c (output_directory): Add the `const' keyword to a char*.
18140         (temp_directory): Likewise.
18141         (print_c_decl): Likewise.
18142         (print_method_info): Likewise.
18143         (decode_signature_piece): Likewise.
18144         (print_mangled_classname): Likewise.
18146         * java-except.h: Provide prototypes for maybe_start_try,
18147         maybe_end_try and add_handler.
18149         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
18150         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
18151         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
18152         init_expr_processing, push_super_field, init_class_processing,
18153         can_widen_reference_to, class_depth, verify_jvm_instructions,
18154         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
18155         set_local_type, merge_type_state, push_type, load_type_state,
18156         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
18157         emit_unicode_mangled_name): Add prototypes.
18159         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
18160         (print_signature_type): Use ISDIGIT, not isdigit.
18161         (print_signature): Remove unused variable `j'.
18163         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
18164         int when comparing against one.
18166         * jcf-parse.c: Include toplev.h.
18168         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
18169         (localvar_free): Remove unused variable `i'.
18170         (generate_bytecode_conditional): Likewise for variable `kind'.
18172         * jv-scan.c: Include config.h and system.h.  Remove redundant
18173         OS header and gansidecl.h includes.
18174         (warning): Add the `const' keyword to a char*.  Also add
18175         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
18176         __STDC__, when determining whether to use ANSI-isms.
18177         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
18178         (xmalloc): Don't redundantly prototype here.
18179         (main): Remove unused parameter `envp'.  Also fix the arguments
18180         passed to function `fatal' to match the format specifier.
18182         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
18184         * mangle.c: Include toplev.h.
18185         (emit_unicode_mangled_name): Declare parameter `len'.
18187         * parse.y (parse_warning_context): Add the `const' keyword to a
18188         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
18189         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
18190         (issue_warning_error_from_context): Add the `const' keyword to
18191         a char*.
18192         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
18193         not `__STDC__' for whether to use ANSI-isms.
18195         * typeck.c (incomplete_type_error): Mark parameters `value' and
18196         `type' with ATTRIBUTE_UNUSED.
18197         (parse_signature_type): Use ISDIGIT, not isdigit.
18199         * verify.c (check_pending_block): Add the `const' keyword to a char*.
18200         (verify_jvm_instructions): Likewise.  Remove unused variables
18201         `field_name' and `default_val'.
18203         * zextract.c: Include config.h and system.h.  Remove redundant
18204         OS header includes.
18206         * zipfile.h: Prototype `read_zip_archive'.
18208 1999-01-21  Andrew Haley  <aph@cygnus.com>
18210         * typeck.c (convert): Allow conversions to void type: some
18211         optimizations in gcc do this.
18213 1999-01-21  Andrew Haley  <aph@cygnus.com>
18215         * typeck.c (convert_ieee_real_to_integer): New function.
18216         (convert): When not using fast-math and using hardware fp, convert
18217         an IEEE NaN to zero.
18219 1999-01-18  Andrew Haley  <aph@cygnus.com>
18221         * parse.y (patch_binop): Do a type conversion from signed to
18222         unsigned and then back to signed when a ">>>" is found.
18224 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18226         * java-tree.h: (check_for_initialization): Added prototype.
18227         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
18228         * parse.y (do_resolve_class): Removed unused locals.
18229         (read_import_dir): Likewise.
18230         (resolve_qualified_expression_name): Array creation
18231         expressions are valid primary expressions.
18232         (qualify_ambiguous_name): Likewise.
18233         (patch_synchronized_statement): Removed unused local.
18235 1999-01-17  Jeffrey A Law  (law@cygnus.com)
18237         * Makefile.in (zextract.o): Add dependencies.
18239         * Makefile.in: Do not put ^Ls at the start of a line.
18241 1999-01-15  Per Bothner  <bothner@cygnus.com>
18243         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
18244         sub-type the result of the call that gets the exception value.
18246         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
18247         don't call finish_class.
18249         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
18250         clear found before continuing.
18252         * verify.c (verify_jvm_instructions):  On an array load, allow
18253         and handle top of stack to be TYPE_NULL.
18255         * gjavah.c (generate_access):  Translate Java package private or
18256         protected access to C++ public, but with a comment.
18258 1999-01-13  Andrew Haley  <aph@cygnus.com>
18260         * expr.c (generate_name): Name prefix changed to avoid clashes
18261         with assembler temp labels.
18263         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
18264         MODIFY_EXPR.  Without this, code for the assignment may not be
18265         generated at all and the synchronized statement will read an
18266         uninitialized variable.
18268 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18270         * class.c (maybe_layout_super_class): Fixed returned value.
18271         * lex.c: Added 1999 to the copyright.
18272         (java_init_lex): Initialize java_lang_imported.
18273         * lex.h: Added 1999 to the copyright.
18274         * parse.h: Added 1999 to the copyright.
18275         (REGISTER_IMPORT): Fixed typo in trailing macro.
18276         (CURRENT_OSB): New macro.
18277         (struct parser_ctxt): New fields osb_depth, osb_limit.
18278         * parse.y (java_lang_id): New global variable.
18279         (type_import_on_demand_declaration): Don't import java.lang.* twice.
18280         (array_creation_expression:): Use CURRENT_OSB.
18281         (dims:): Uses a stack to keep track of array dimensions.
18282         (cast_expression:): Use CURRENT_OSB.
18283         (find_expr_with_wfl): Return NULL if node found doesn't meet the
18284         conditions.
18285         (register_fields): Fixed typos in comment.
18286         (check_method_redefinition): Fixed comment indentation.
18287         (java_check_regular_methods): Set saved found wfl to NULL after
18288         having reinstalled it in the previously found DECL_NAME.
18290 1999-01-10  Richard Henderson  <rth@cygnus.com>
18292         * gjavah.c (java_float_finite): Use a union to do type punning.
18293         (java_double_finite): Likewise.
18295 1999-01-09  Per Bothner  <bothner@cygnus.com>
18297         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
18298         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18299         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
18300         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
18301         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18302         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
18304 1999-01-08  Per Bothner  <bothner@cygnus.com>
18306         * check-init.c (check_init):  If compiling to native, we don't
18307         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
18309 1999-01-08  Tom Tromey  <tromey@cygnus.com>
18311         * parse-scan.y (variable_declarator_id): Set or increment
18312         bracket_count.
18313         (bracket_count): New global.
18314         (formal_parameter): Handle case where bracket pairs trail variable
18315         declarator id.
18317 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
18319         * jcf-parse.c (yyparse): variable len changed from a char to an
18320         int to prevent overflow.
18322 1999-01-06  Per Bothner  <bothner@cygnus.com>
18324         * java-tree.h:  Declare read_class.
18325         * jcf-parse.c (read_class):  New function.
18326         (load_class):  Now just call read_class.
18328         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
18329         * jcf-parse.c (parse_source_file):  Declare save_error_count,
18330         which is needed by java_parse_abort_on_error macro,
18331         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
18333         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
18334         constructor, if initializing a static field.
18335         (patch_new_array_init):  Set TREE_CONSTANT if it is.
18336         * expr.c (java_lang_expand_expr):  For a static array constructor
18337         of primitive elements, allocate the array itself statically.
18338         Disabled until we can set the vtable field statically.
18340         * check-init.c:  New file.  Checks for definite assignment.
18341         * Makefile.in (JAVA_OBJS):  Add check-init.o.
18342         * parse.y (java_complete_expand_method): Call check_for_initialization.
18343         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
18345 1999-01-06  Graham <grahams@rcp.co.uk>
18347         * parse.y : include system.h instead of including
18348         standard headers directly with the exception of <dirent.h>.
18350 1999-01-06  Per Bothner  <bothner@cygnus.com>
18352         * lex.h:  Moved static function declarations to lex.c,
18353         to shut up some -Wall warnings.
18354         * lex.c:  Static function declarations moved here.
18355         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
18357 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18359         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18361 1998-12-22  Per Bothner  <bothner@cygnus.com>
18363         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
18364         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
18366         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
18367         (localvar_alloc):  Change return type to void,
18368         (emit_unop):  Remove unused variable size.
18370         * jcf-write.c (struct jcf_block):  Add new union.
18371         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
18372         (call_cleanups):  New functions.
18373         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
18374         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
18375         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18376         * lang.c (lang_init):  Call using_eh_for_cleanups.
18377         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
18378         completing operands to patch_synchronized_statement.
18379         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18380         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18381         WITH_CLEANUP_EXPR instead of TRY_EXPR.
18383 1998-12-20  John F. Carr  <jfc@mit.edu>
18385         * Make-lang.in: Comment out control-Ls; they upset some makes.
18387 1998-12-18  Tom Tromey  <tromey@cygnus.com>
18389         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18390         consistently.
18392 1998-12-17  Tom Tromey  <tromey@cygnus.com>
18394         * parse.y (DIR_SEPARATOR): New define.
18395         (check_class_interface_creation): Use it.
18397         * parse-scan.y (report_main_declaration): Recognize
18398         `java.lang.String' in argument to main.
18400 1998-12-16  Per Bothner  <bothner@cygnus.com>
18402         * parse.y (create_interface):  Remove bogus test.
18404 1998-12-16  Per Bothner  <bothner@cygnus.com>
18406         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
18407         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
18409 1998-12-16  Tom Tromey  <tromey@cygnus.com>
18411         * parse-scan.y (qualified_name): Use correct sprintf format.
18413 1998-12-15  Tom Tromey  <tromey@cygnus.com>
18415         * gjavah.c (print_field_info): Changed how most negative number is
18416         printed.
18418 1998-12-14  Per Bothner  <bothner@cygnus.com>
18420         * parse.y (fold_constant_for_init):  New function.
18421         (resolve_expression_name):  Don't replace static final
18422         constant-initialized fields by its value.
18423         (java_complete_lhs):  New.  Same as java_complete_tree, except does
18424         not replace static final constant-initialized fields by their values.
18425         (register_fields):  If there is an initializer, set DECL_INITIAL and
18426         MODIFY_EXPR_FROM_INITIALIZATION_P.
18427         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
18428         Only call patch_initialized_static_field if
18429         MODIFY_EXPR_FROM_INITIALIZATION_P.
18430         (patch_initialized_static_field):  If not valid constant, clear
18431         DECL_INITIAL.
18433         * parse.y (lookup_field_wrapper):  Fix thinko.
18435         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
18436         set and restore global lineno.
18438 1998-12-14  Tom Tromey  <tromey@cygnus.com>
18440         * gjavah.c (print_field_info): If value to print is the smallest
18441         value of its size, then print as hex to avoid later warnings from
18442         C++ compiler.
18444 1998-12-14  Tom Tromey  <tromey@cygnus.com>
18446         * gjavah.c (decompile_method): Decompile `return null'.
18447         (process_file): Generate `#pragma interface'.
18448         (method_declared): New global.
18449         (print_method_info): Set it.
18450         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18451         (print_method_info): Handle abstract methods.
18453 1998-12-13  Per Bothner  <bothner@cygnus.com>
18455         * parse.y (patch_method_invocation):  If class_decl is null
18456         (e.g. an array type), use original type.
18458         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
18459         errors about uncaught exception from clone (of array, specifically).
18461 1998-12-13  Tom Tromey  <tromey@cygnus.com>
18463         * gjavah.c (decompile_method): Handle all types of `return'
18464         opcode.  Decompile `return this' and `return'.
18465         (method_access): New global.
18466         (print_method_info): Set it.
18467         (decompile_method): Don't decompile a synchronized method.
18469 1998-12-13  Tom Tromey  <tromey@cygnus.com>
18471         * jcf-reader.c (jcf_parse_one_method): Recognize
18472         HANDLE_END_METHOD.
18473         * gjavah.c (HANDLE_END_METHOD): New macro.
18474         (HANDLE_CODE_ATTRIBUTE): New macro.
18475         (decompile_method): New function.
18476         (print_method_info): Don't print `;\n' at end of function decl.
18477         Include java-opcodes.h.
18478         (decompiled): New global.
18480 1998-12-12  Per Bothner  <bothner@cygnus.com>
18482         * class.c (build_class_ref):  Handle PRIMTYPE.class if
18483         flag_emit_class_files.
18484         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
18485         if flag_emit_class_files.
18486         * parse.y (java_complete_tree):  Pre-liminary support for
18487         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18489         * parse.y (patch_synchronized_statement):   Don't call monitorexit
18490         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
18492         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
18494         * zipfile.h (opendir_in_zip):  New declaration.
18495         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
18496         (opendir_in_zip):  New function, using code from open_in_zip.
18497         (open_in_zip):  Call opendir_in_zip.
18498         (find_class):  Remove no-longer-used do_class_file parameter,
18499         but add source_ok parameter.  Change logic so if we find a .java file,
18500         we don't look for .class in later classpath emtries.
18501         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
18502         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
18503         * gjavah.c: Update call to find_class.
18504         * jcf-dump.c:  Likewise.
18506         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
18507         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
18508         nothing if body is empty_stmt_node.
18509         Various little fixes so SP gets correctly adjusted.
18510         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18511         For CALL_EXPR, test if static first.
18512         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
18513         such as the ones we create for Object and Class.
18514         Set and restore current_function_decl.
18515         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18516         (note_possible_classname):  New function.
18517         (read_import_entry):  Removed.  Merged with read_import_dir.
18518         (read_import_dir):  Don't call find_class - that only gives us
18519         the first classpath entry having the needed package.
18520         Use the struct buffer data structure from buffer.h.
18521         (read_import_dir, find_in_imports_on_demand):  The remembered
18522         class names now use '.' (not '/') as package separator.
18524         * parse.y (java_complete_expand_methods):  Call write_classfile
18525         here, and not in java_expand_classes (which only gets first class).
18527 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18529         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
18530         (register_fields):  If a static fields has an initializer, just
18531         chain it on ctxp->static_initialized, and handle later.
18532         (java_complete_expand_methods):  Force <clinit> first.
18533         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
18534         - it's already been completed.
18535         (patch_initialized_static_field):  New function.
18536         (java_complete_field):  Call it.
18538 1998-12-12  Per Bothner  <bothner@cygnus.com>
18540         * expr.c (encode_newarray_type, build_new_array):  New functions.
18541         * java-tree.h:  Declare build_new_array.
18542         * jcf-write.c (patch_newarray):  Use build_new_array.
18544         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
18545         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
18547         * parse.y (patch_new_array_init):  Re-organize.
18548         Now is passed the actual array (pointer) type of the value.
18549         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18550         (patch_array_constructor):  Removed - merged into patch_new_array_init.
18551         (java_complete_tree):  Update patch_new_array_init.
18553         * jcf-write.c (find_constant_index):  New function.
18554         (generate_bytecode_insns):  Use find_constant_index.
18555         (generate_classfile):  Use find_constant_index for ConstantValue.
18557 1998-12-11  Tom Tromey  <tromey@cygnus.com>
18559         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18560         * decl.c (init_decl_processing): Renamed dtable -> vtable.
18561         * class.c (make_class_data): Renamed dtable -> vtable, and
18562         dtable_method_count -> vtable_method_count.
18564 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18566         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18567         global variables, initialized.
18568         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18569         Declared new global variables.
18570         * lex.c (java_lex): Return long_zero_node, float_zero_node,
18571         double_zero_node, integer_zero_node upon direct matching.
18572         * parse.y (purify_type_name): Added function prototype.
18573         (duplicate_declaration_error_p): Consider new_type as potentially
18574         being a incomplete type. Use purify_type_name on type string.
18575         (method_header): saved_type: unused variable removed. Don't figure
18576         return type if method name is invalid.
18577         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18578         processed by patch_unaryop.
18579         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18580         increment/decrement node into its original type after binary
18581         numeric promotion on its operands.
18583 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18585         * parse.y (array_initializer:): Array init operand is NULL_TREE
18586         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18587         now an error. Fixed indentation problems.
18588         (patch_string): Handle error_mark_node as an argument.
18589         (patch_new_array_init): Fixed indentation problems.
18590         (array_constructor_check_entry): Removed check on null wfl_value.
18591         Return an error if wfl_value's walk returns an error.
18593 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18595         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18596         * lex.c (java_lex): Remember column position before advancing one
18597         token. Retain location information on OCB_TK.
18598         * lex.h (typedef struct java_lc): Added new field.
18599         * parse.h (GET_SKIP_TYPE): New macro.
18600         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18601         * parse.y (build_new_array_init, patch_new_array_init,
18602         patch_array_constructor, maybe_build_array_element_wfl,
18603         array_constructor_check_entry): New function prototypes.
18604         (switch_block:): Tagged <node>.
18605         (OCB_TK): Tagged <operator>.
18606         (array_initializer:): Installed actions.
18607         (variable_initializer): Build location information on element if
18608         necessary.
18609         (switch_statement:): Fixed indentation typo.
18610         (switch_block:): Redefined default action.
18611         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18612         (patch_assignment): Removed duplicate code.
18613         (maybe_build_array_element_wfl, build_new_array_init,
18614         patch_new_array_init, patch_array_constructor,
18615         array_constructor_check_entry): New functions.
18617 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18619         * parse.y (array_initializer): Tagged <node>.
18620         (variable_initializer:): Use default rule.
18621         (array_initializer:): Defined actions.
18622         (variable_initializers:): Likewise.
18623         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18624         non-static field accesses.
18625         (patch_invoke): Fixed indentation typo.
18626         (java_complete_tree): Likewise.
18627         (build_labeled_block): Changed leading comment. Generate an error
18628         in case of duplicate loop labels.
18629         (patch_conditional_expr): Patch results of string concatenation
18630         operations.
18632 1998-12-06  Per Bothner  <bothner@cygnus.com>
18634         * constants.c (find_methodref_index):  When the class is an interface,
18635         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18637         * decl.c (finit_identifier_node):  Use "$finit$", rather than
18638         "<finit>" (which Sun's verifier rejects).
18639         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
18640         (generate_field_initialization_code):  Removed.
18641         (fix_constructors)  Don't add call to $finit$ here (wrong order).
18642         (patch_method_invocation):  Add $finit$ call here.
18644         * java-tree.h (CALL_USING_SUPER):  New macro.
18645         * parse.y (patch_invoke):  Remove im local variable.
18646         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
18647         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
18648         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
18650         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
18652         * parse.y (java_complete_tree):  Don't complain about unreachable
18653         statement if it is empty_stmt_node.
18655         * jcf-write.c (find_constant_wide):  New function.
18656         (push_long_const):  Use find_constant_wide.
18658         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
18659         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
18660         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18661         Emit invokeinterface when calling an interface method.
18662         Emit invokespecial also when calling super or private methods.
18664         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
18666 1998-12-06  Per Bothner  <bothner@cygnus.com>
18668         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
18670 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18672         * java-tree.h (java_layout_seen_class_methods): New function
18673         prototype.
18674         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18675         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18676         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18677         * parse.y (method_declarator:): Defined action.
18678         (issue_warning_error_from_context): input_filename saved, set to
18679         the appropriate value and restored after java_error is called.
18680         (build_unresolved_array_type): Fixed comment.
18681         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18682         (method_header): Deal with return type the same way type are
18683         handled for fields and method's parameters and local variables
18684         types are handled.
18685         (check_method_redefinition): Removed extra CR.
18686         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18687         (java_layout_seen_class_methods): New function.
18688         (java_layout_classes): Call java_layout_seen_class_methods.
18690 1998-12-03  Per Bothner  <bothner@cygnus.com>
18692         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
18694 1998-12-03  Per Bothner  <bothner@cygnus.com>
18696         * jcf-dump.c (main):  Fix error message.
18697         * jcf-path.c (add_entry):  Style fix.
18699 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18701         * class.c (layout_class_method): Call build_java_argument_signature
18702         on constructors too.
18703         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18704         (patch_method_invocation): Define a primary when resolving an
18705         expression name. Augmented comment on code checking illegal `this'
18706         usage. Loosened it test by accepting NEW_CLASS_EXPR.
18708 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18710         * class.c (layout_class_method): Don't report error on non-static
18711         overriding static if the method is private.
18712         * java-tree.h (finish_class): Prototype added.
18713         * lex.c (java_get_line_col): Handle col argument -2 value.
18714         * parse.h: All static method declarations moved to parse.y.
18715         * parse.y: Now contains all static method declarations previously
18716         found in parse.h.
18717         (find_expr_with_wfl, missing_return_error,
18718         unreachable_stmt_error): New functions.
18719         (java_get_real_method_name): Identify constructors bearing class
18720         names in source code compiled classes only.
18721         (java_complete_expand_methods): Call missing_return_error.
18722         (invocation_mode): Private methods invoked as static methods.
18723         (java_complete_tree): Call unreachable_stmt_error.
18725 1998-12-01  Tom Tromey  <tromey@cygnus.com>
18727         * Makefile.in (+target): Removed.
18728         (+xmake_file): Likewise.
18729         (+tmake_file): Likewise.
18730         (.NOEXPORT): Removed duplicate.
18732 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18734         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18736         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
18738         * jvgenmain.c: Remove the xmalloc prototype, we get it from
18739         libiberty.h.  Provide an xmalloc definition.
18741         * jvspec.c: Remove the xmalloc prototype.
18743         * parse-scan.y: Include config.h and system.h.  Don't include
18744         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
18745         Provide an xstrdup definition.
18747 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
18749         * jcf-path.c (add_entry): Recognize ".jar" too.
18750         * lang-specs.h: Likewise.
18752 1998-11-26  Per Bothner  <bothner@cygnus.com>
18754         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
18755         soft_monitorenter_node, soft_monitorexit_node, throw_node.
18757         * jcf-write.c (generate_bytecode_insns):
18758         Handle pre/post-increment/decrement of long.
18760         * jcf-write.c (generate_bytecode_insns):
18761         Handle missing exception handler (finally for synchronized).
18763 1998-11-25  Per Bothner  <bothner@cygnus.com>
18765         * java-tree.h (end_params_node):  Declare global.
18766         * decl.c (end_params_node):  New global.
18767         (init_decl_processing, start_java_method):  Use end_params_node for
18768         end of list of parameter types.  Follows correct gcc conventions.
18769         * expr.c (pop_argument_types, pop_arguments):  Likewise.
18770         * lang.c (put_decl_node):  Likewise.
18771         * typeck.c (various places):  Likewise.
18772         * class.y (various places):  Likewise.
18773         * parse.y (various places):  Likewise.
18775         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
18776         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
18778         * class.c:  Add #include flags.h, remove no-longer needed declaration.
18780         * class.c (layout_class_method):  Remove commented-out code, re-format.
18781         Don't add vtable entry (or index) for private methods.
18782         * expr.c (expand_invoke):  A private method is implicitly final.
18783         * class.c (make_class_data):  If inlining or optimizing,
18784         skip private methods.
18786         * class.c (finish_class):  New function.  Calls existing methods,
18787         but alls emits deferred inline functions.
18788         * jcf-parse.c (parse_class_file):  Call finish_class.
18789         * parse.y (java_complete_expand_methods):  Likewise.
18791         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
18793         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
18795 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
18797         * jcf-write.c (generate_bytecode_conditional): Fix typo.
18799 1998-11-24  Per Bothner  <bothner@cygnus.com>
18801         * (generate_classfile): Always write class access flag with
18802         ACC_SUPER set.
18804 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18806         * class.c (maybe_layout_super_class): New function.
18807         (layout_class): Reorganized. Loop on class methods dispatched into
18808         a new function. Call maybe_layout_super_class.
18809         (layout_class_methods, layout_class_method): New functions.
18810         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18811         class.
18812         (expand_invoke): Likewise.
18813         * java-tree.h (all_class_list): New global variable declared.
18814         (layout_class_methods, layout_class_method): New function
18815         prototypes.
18816         (LAYOUT_SEEN_CLASS_METHODS): New macro.
18817         * jcf-parse.c (all_class_list): New global variable.
18818         (load_class): Extended what class_or_name can be. Use parser
18819         context mechanism to save globals before calling jcf_parse.
18820         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18821         is set on the file name.
18822         (jcf_parse): Layout class methods when Object is loaded, otherwise
18823         record class in all_class_list for delayed method layout.
18824         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18825         * lang.c (put_decl_node): Decode <init> into the decl context
18826         class name.
18827         * lex.c (java_allocate_new_line): Use xmalloc.
18828         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18829         pointers, not TREE_LIST elements.
18830         (struct parser_ctxt): Fixed comment indentations, added comments
18831         and reordered some fields.
18832         (java_check_methods): Function prototype removed.
18833         * parse.y (java_push_parser_context): Use xmalloc.
18834         (java_parser_context_restore_global): Pop extra pushed ctxp only
18835         when there's nothing next.
18836         (maybe_create_class_interface_decl): Fixed comment, add new
18837         created class decl to all_class_list.
18838         (method_header): Use GET_REAL_TYPE on argument's types.
18839         (method_declarator): Use GET_REAL_TYPE, change type to the real
18840         type in TREE_LIST dependency node. Build argument list with the
18841         real type.
18842         (create_jdep_list): Use xmalloc. Removed allocation error message.
18843         (obtain_incomplete_type): Fixed leading comment. Broadened
18844         incoming argument meaning.
18845         (register_incomplete_type): Use xmalloc. Removed allocation error
18846         message.
18847         (safe_layout_class): Fixed leading comment.
18848         (jdep_resolve_class): Reversed if statement condition and switch
18849         if and else bodies.
18850         (resolve_and_layout): Fixed leading comment. Broadened incoming
18851         argument meaning.
18852         (complete_class_report_errors): New local variable name, for
18853         clarity. purify_type_name used for all error cases.
18854         (java_get_real_method_name): Stricter check on constructors.
18855         (java_check_regular_methods): Reverse methods list only if not
18856         already laid out. Layout artificial constructor.
18857         (java_check_methods): Deleted.
18858         (source_start_java_method): Obtain incomplete type for patchable
18859         method arguments.
18860         (java_layout_classes): Fixed leading comment. Use
18861         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18862         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18863         before returning. Fixed comments.
18864         (java_expand_classes): Check for errors up front.
18865         (patch_method_invocation): Class to search is resolved and laid
18866         out.
18868 1998-11-24  Per Bothner  <bothner@cygnus.com>
18870         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
18872         * javaop.h (int8):  Removed - not used.
18873         (jbyte):  Redefine portably with correct signedness.
18875         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
18877         * jcf-write.c (generate_bytecode_insns):  Fix typo
18878         OPCODE_getstatic to OPCODE_getfield.
18880         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
18881         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
18882         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18884 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18886         * jcf-parse.c (jcf_parse_source): Function returned type is
18887         void. Added prototype.
18888         (jcf_parse): Function returned type is void.
18889         (yyparse): Remove call to fclose on the last parsed file.
18891         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18893 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18895         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18896         (layout_class): Cope with methods featuring WFL in decl names.
18897         * decl.c (unqualified_object_id_node): New global variable,
18898         initialized.
18899         (build_decl_no_layout): Removed.
18900         * expr.c (build_primtype_type_ref): Handle Double.
18901         (java_lang_expand_expr): Fixed indentations.
18902         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18903         (flag_wall, flag_redundant, flag_not_overriding,
18904         flag_static_local_jdk1_1, unqualified_object_id_node): Global
18905         variable declarations.
18906         (build_decl_no_layout): Removed prototype.
18907         (java_get_real_method_name): Added prototype.
18908         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18909         (java_parse_abort_on_error): Macro now just returns.
18910         * jcf-parse.c (jcf_parse_source): Check fclose returned
18911         value. Call emit_register_classes if java_report_errors returns
18912         zero.
18913         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18914         flag_static_local_jdk1_1): New integer flags.
18915         (lang_decode_option): New flags set here.
18916         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18917         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18918         the flag_redundant variable.
18919         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18920         when parsing java.lang.Object class.
18921         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18922         NULL_TREE to build.
18923         (resolve_qualified_expression_name): Fixed indentation.
18924         (patch_array_ref): Changed prototype.
18925         (not_initialized_as_it_should_p): Prototype removed.
18926         (java_report_errors): Added function prototype.
18927         * parse.y (formal_parameter:): Changed error message for not yet
18928         supported final parameters.
18929         (class_type_list:): Set both PURPOSE and VALUE of created
18930         TREE_LIST to be class_type.
18931         (primary_no_new_array:): Handle class literals on primitive types.
18932         (parse_warning_context): Reinstalled correct force_error and
18933         do_warning flags setups.
18934         (java_report_errors): Changed prototype. Return java_error_count
18935         value.
18936         (variable_redefinition_error): Consider treating variable type as
18937         a fake pointer.
18938         (create_interface): Warn about redundant abstract modifier if
18939         flag_redundant is set. Changed error message.
18940         (lookup_field_wrapper): Save/restore globals before/after looking
18941         up field.
18942         (duplicate_declaration_error_p): Consider treating declaration
18943         type as a fake pointer.
18944         (register_fields): Extract real type from dependency node. Check
18945         for duplicate field declaration after type adjustment. Use
18946         DECL_INITIAL to store static final initialized values.
18947         (method_header): Extract real function type from dependency node.
18948         (check_abstract_method_header): Use GET_METHOD_NAME.
18949         (obtain_incomplete_type): Layout fake pointer type.
18950         (safe_layout_class): Don't try to check for methods before layout.
18951         (java_complete_class): Don't check for correct throws clause
18952         elements inheritance here.
18953         (resolve_and_layout): Broadened name parameter meaning.
18954         (reset_method_name): Use GET_METHOD_NAME.
18955         (java_get_real_method_name): New function.
18956         (java_check_regular_methods): Don't check methods in
18957         java.lang.Object.  Verify lineage of throws clause elements. Use
18958         flag_no_overriding in warning report.
18959         (check_throws_clauses): Don't check if class was from
18960         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18961         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18962         (declare_local_variables): Use flag_static_local_jdk1_1 to report
18963         warning on unsupported final local variables. Use build_decl
18964         instead of build_decl_no_layout. Get real local variable type from
18965         dependency node.
18966         (source_start_java_method): Get real parameter type from
18967         dependency node. Call build_decl instead of build_decl_no_layout.
18968         (java_layout_classes): Reverse tree and layout type and class as
18969         required. Mark class as loaded when done.
18970         (resolve_field_access): Fixed indentation. Restricted condition
18971         leading to static field access code generation. Set field_type
18972         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18973         (resolve_qualified_expression_name): Initialize type_found to
18974         null. Handle static field resolved during qualification. Fixed
18975         layout on non primitive field decl types.
18976         (not_accessible_p): Fixed typo in comment.
18977         (patch_method_invocation): Resolve and layout class to search from
18978         type.
18979         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18980         layout non primitive type, if necessary. Make method node only to
18981         report errors.
18982         (find_applicable_accessible_methods_list): Consider WFL'ed method
18983         decl names. Fixed indentation.
18984         (argument_types_convertible): Resolve and layout target type if
18985         necessary.
18986         (java_complete_tree): Fixed indentation problems. Rewrote
18987         CALL_EXPR thrown exceptions check. Re-installed further processing
18988         of the assignment in certain cases.
18989         (patch_assignment): Call maybe_build_primttype_type_ref to perform
18990         inlining on class literals.
18991         (valid_builtin_assignconv_identity_widening_p): Cope with constant
18992         0 literal.
18993         (valid_method_invocation_conversion_p): Likewise.
18994         (patch_string): Temporary disable forbidden use of `this' in
18995         explicit constructor invocations when doing string concatenation
18996         within their scope.
18997         (patch_unaryop): Added comment. Reinstalled code to disable
18998         further check on assignment operation with cast expression RHS.
18999         (patch_switch_statement): Fixed indentation.
19000         (build_try_statement): Call build_decl instead of
19001         build_decl_no_layout.
19002         (patch_synchronized_statement): Likewise.
19003         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
19004         IS_UNCHECKED_EXPRESSION_P.
19005         (check_thrown_exceptions_do): Changed leading comment. Resolve and
19006         layout argument exception type.
19007         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
19008         of IS_UNCHECKED_EXPRESSION_P.
19010 1998-11-18  Anthony Green  <green@cygnus.com>
19012         * jcf-parse.c (yyparse): Open class file in binary mode.
19014 1998-11-15  Per Bothner  <bothner@cygnus.com>
19016         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
19018         * jcf-write.c (perform_relocations):  Move check out one loop.
19020 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
19022         * Make-lang.in: Fix reference to srcdir.
19023         * jv-scan.c: Add missing xmalloc prototype.
19024         * jvgenmain.c: Ditto.
19026 1998-11-15  Per Bothner  <bothner@cygnus.com>
19028         * decl.c (error_mark_node), java-tree.h:  New global.
19029         * parse.y:  Use empty_stmt_node instead of size_zero_node.
19030         (build_if_else_statement):  If missing else, use empty_stmt_node.
19032         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
19033         (java_complete_expand_method):  Complain if return is missing.
19034         (java_check_regular_methods):  Comment out incorrect error check.
19035         (not_accessible_p):  Fix incorrect handling of protected methods.
19036         (patch_method_invocation):  Pass correct context to not_accessible_p.
19037         (find_applicable_accessible_methods_list):  Likewise.
19038         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
19039         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
19040         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
19041         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
19043         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
19044         (push_int_const):  Remove reundant NOTE_PUSH.
19045         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
19046         (- case SWITCH_EXPR):  Fix code generation bug.
19047         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
19048         (generate_classfile):  More robust for abstract methods.
19050 1998-11-15  Anthony Green  <green@cygnus.com>
19052         * Makefile.in: jv-scan and jvgenmain all require libiberty.
19053         * Make-lang.in: Ditto.
19055         * jv-scan.c: Remove xmalloc and xstrdup definitions.
19056         * jvgenmain: Ditto.
19058 1998-11-15  Per Bothner  <bothner@cygnus.com>
19060         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
19062         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
19064 1998-11-14  Per Bothner  <bothner@cygnus.com>
19066         Allow uses of interface types to verify.  This is not really
19067         type-safe, but it matches what Sun does, and is OK as long as
19068         there are appropriate run-time checks.
19069         * verify.c (merge_types):  If merging two interface types,
19070         just set the result to java.lang.Object.
19071         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
19073 1998-11-13  Tom Tromey  <tromey@cygnus.com>
19075         * gjavah.c (main): Handle --output-class-directory argument.
19076         * jvspec.c (lang_specific_driver): Translate `-d' into
19077         -foutput-class-dir.
19078         * jcf.h (jcf_write_base_directory): Declare.
19079         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
19080         * lang-options.h: Mention -foutput-class-dir.
19081         * jcf-write.c (jcf_write_base_directory): New global.
19082         (make_class_file_name): Put generated .class file into `-d'
19083         directory, or into source directory if -d not given.  Function now
19084         static.
19085         (write_classfile): Free class file name.  Handle case where class
19086         file name is NULL.
19087         (DIR_SEPARATOR): New macro.
19088         Include <sys/stat.h>
19090         * Makefile.in (prefix): New macro.
19092 1998-11-12  Per Bothner  <bothner@cygnus.com>
19094         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
19095         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
19096         here (done in patch_invoke instead).
19097         (case_identity):  Moved here from parse.y.
19099         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
19100         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
19101         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
19102         so they can be efficiently scanned without recursion.
19103         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
19104         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
19105         in BLOCK iteratively, rather than recursively.
19107         * parse.y (do_unary_numeric_promotion):  New function.
19108         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
19110         * parse.y (patch_newarray):  Various fixes.
19112         Re-do handling of switch statements (for proper block scoping).
19113         * parse.y:  Add just a single block for the enture switch block,
19114         but don't create any "case blocks".
19115         (group_of_labels):  Rmeoved unneeded non-terminal.
19116         CASE_EXPR and DEFAULT_EXPR are added to current block.
19117         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
19118         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
19119         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
19120         * parse.y (wfl_operator, print_int_node): Make non-static.
19121         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
19122         as part of recursive scan of block.
19123         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
19124         (patch_switch_statement):  Most tests move dinto java_complete_tree.
19126         * parse.y:  Make various production be non-typed (void).
19127         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
19128         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
19129         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
19131         * jcf-write.c (struct jcf_handler):  New type.
19132         (struct jcf_switch_state):  New type.
19133         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
19134         (alloc_handler, emit_unop, emit_reloc):  New functions.
19135         (adjust_typed_op):  Add extra parameter ("max type" offset).
19136         (emit_switch_reloc, emit_case-reloc):  New function.
19137         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
19138         (generate_bytecode_insns):  Support REAL_CST, switch statements,
19139         exception handling, method calls, object/array creation, and more.
19141         * class.c:  Remove some unused variables.
19142         * constants.c (find_string_constant):  New function.
19143         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
19144         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
19145         if flag_emit_class_files.
19147 1998-11-12  Tom Tromey  <tromey@cygnus.com>
19149         * jcf-io.c (find_class): Added explanatory comment.
19151         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
19152         trailing slash to `.zip' entries.
19154         * jvspec.c (lang_specific_driver): Correctly handle case where
19155         GC_NAME not defined.
19157 1998-11-11  Tom Tromey  <tromey@cygnus.com>
19159         * jvspec.c (GC_NAME): New define.
19160         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
19161         if required.
19162         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
19164 1998-11-11  Per Bothner  <bothner@cygnus.com>
19166         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
19168 1998-11-11  Tom Tromey  <tromey@cygnus.com>
19170         * jcf-dump.c (main): Correctly recognize `--'-style long options.
19172 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19174         * class.c (is_compiled_class): Call safe_layout_class for class
19175         compiled from source.
19176         * conver.h (convert_to_integer, convert_to_real,
19177         convert_to_pointer): Added prototypes.
19178         * decl.c (init_decl_processing): Non longer push the decls of
19179         `methodtable', `constants', `Class', `Field', `dispatchTable'
19180         `jexception' and `Method'.
19181         * expr.c (build_invokeinterface): New function.
19182         (expand_invoke): static variable CLASS_IDENT now in
19183         build_invokeinterface. Use build_invokeinterface.
19184         (expand_java_field_op): Moved code to inline
19185         java.lang.PRIMTYPE.TYPE into a function.
19186         (build_primtype_type_ref): New function.
19187         * java-tree.def (INSTANCEOF_EXPR): New tree code.
19188         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
19189         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
19190         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
19191         (DECL_LOCAL_STATIC_VALUE): New macro.
19192         (build_invokeinterface, build_primtype_type_ref): New function
19193         prototypes.
19194         (java_parse_abort_on_error): Macro rewritten.
19195         * jcf-parse.c (current_method): Add comment to declaration.
19196         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
19197         Function prototypes fixed.
19198         (jcf_parse_source): push/pop parser context. save/restore global.
19199         (parse_source_file): Fixed leading comment. Now take a
19200         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
19201         classes and pop the parser context anymore.
19202         (yyparse): Push parser context, save globals, parse the source
19203         file, restore globals and pop the parser context when processing a
19204         source file.
19205         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
19206         * lex.c (java_parse_doc_section): New function.
19207         (java_lex): Call java_parse_doc_section when appropriate. Build an
19208         operator around INSTANCEOF_TK.
19209         * lex.h (java_lineterminator, java_sprint_unicode,
19210         java_unicode_2_utf8, java_lex_error, java_store_unicode):
19211         Prototypes rewritten.
19212         (java_parse_escape_sequence, java_letter_or_digit_p,
19213         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
19214         java_read_unicode, java_store_unicode, java_read_char,
19215         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
19216         Added function prototypes.
19217         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
19218         define.
19219         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
19220         New macros
19221         (struct parser_ctxt): New fields: deprecated,
19222         current_parsed_class_un, gclass_list.
19223         (fix_method_argument_names, issue_warning_error_from_context,
19224         resolve_package, lookup_package_type): New function prototypes.
19225         (resolve_expression_name): Fixed function prototype.
19226         (find_applicable_accessible_methods_list): Fixed indentation, added
19227         extra argument in prototype.
19228         (check_final_assignment, build_null_of_type, check_deprecation,
19229         check_method_redefinition, reset_method_name,
19230         java_check_regular_methods, java_check_abstract_methods,
19231         maybe_build_primttype_type_ref): New function prototype.
19232         * parse.y (conver.h): Include.
19233         (INSTANCEOF_TK): Tagged <operator>.
19234         (single_type_import_declaration): Use REGISTER_IMPORT macro.
19235         (relational_expression:): Build binop for instanceof.
19236         (java_push_parser_context): Remember ctxp->gclass_list across
19237         contexts.
19238         (java_pop_parser_context): Simply return if no context
19239         exists. Remember gclass_list across contexts.
19240         (issue_warning_error_from_context): New function.
19241         (parse_error_context): Don't setup ctxp->elc here. Call
19242         issue_warning_error_from_context instead.
19243         (parse_warning_context): Likewise.
19244         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
19245         setup. Link new class/interface to ctxp->gclass_list.
19246         (add_superinterfaces): Register interface as incomplete if not
19247         loaded.
19248         (create_class): Remember class unqualified name in
19249         ctxp->current_parsed_class_un. Check class deprecation.
19250         (register_fields): Check field deprecation. Remember static final
19251         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
19252         processing INIT.
19253         (method_header): New local variable ORIG_ARG. Use unqualified
19254         current class name for check on constructor errors. Promote return
19255         type if of record type. Argument list fix moved in
19256         fix_method_argument_names, called here. Check method deprecation.
19257         (fix_method_argument_names): New function.
19258         (method_declarator): Promote record typed arguments.
19259         (safe_layout_class): Check class methods before layout.
19260         (java_complete_class): Compute field layout when patched.
19261         (do_resolve_class): Try to load class after having it renamed
19262         after the package name.
19263         (get_printable_method_name): Use DECL_CONTEXT.
19264         (reset_method_name): New function.
19265         (check_method_redefinition): Use reset_method_name.
19266         (java_check_regular_methods): New local variable
19267         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
19268         names for error report. Check for compile-time error when method
19269         found has default (package) access.
19270         (java_check_abstract_methods): Now takes an interface DECL node as
19271         an argument. Also reinstall real name on unchecked
19272         overriding/hiding methods for error report.
19273         (java_check_methods): Fixed leading comment. Get classes to verify
19274         from ctxp->gclass_list. Use CHECK_METHODS macro and set
19275         CLASS_METHOD_CHECKED_P on class verification.
19276         (lookup_java_method2): Get real method name if necessary.
19277         (find_in_imports): Don't check package class access here.
19278         (resolve_package, lookup_package_type): New functions.
19279         (java_layout_classes): Fixed leading comment. Take classes to be
19280         laid out from ctxp->gclass_list.
19281         (java_complete_expand_methods): Don't expand native and abstract
19282         methods.
19283         (java_expand_classes): New function.
19284         (resolve_expression_name): Use additional argument ORIG.  Retrieve
19285         values of static final field of primitive types.
19286         (resolve_field_access): Handles static final field of promotive
19287         type.
19288         (resolve_qualified_expression_name): Handle STRING_CST as
19289         primaries and package name resolution. Check deprecation on found
19290         decls. Set where_found and type_found on non static field resolved
19291         during qualification. Layout non primitive field decl types.
19292         (check_deprecation): New function.
19293         (maybe_access_field): Simplified.
19294         (patch_method_invocation_stmt): Local variable CLASS_TYPE
19295         removed. Reverse method's argument when primary is a type. Don't
19296         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19297         instead. Include abstract class in the list of class searchable
19298         for constructors. Use DECL_CONTEXT of found method for access
19299         checks. Check method deprecation.
19300         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
19301         converting arguments. Handle INVOKE_INTERFACE.
19302         (lookup_method_invoke): Search constructor using existing
19303         infrastructure (don't rely on lookup_java_constructor anymore).
19304         (find_applicable_accessible_methods_list): Extra argument flag
19305         LC. Now include constructor in the search.
19306         (qualify_ambiguous_name): Conditional expression are primaries.
19307         (not_initialized_as_it_should_p): static final are always
19308         initialized.
19309         (java_complete_tree): Pass extra NULL argument to
19310         resolve_expression_name. Stricter test to carry on patching
19311         assignments. New case for INSTANCEOF_EXPR.
19312         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19313         (check_final_assignment, maybe_build_primttype_type_ref): New
19314         functions.
19315         (patch_assignment): Detect resolved static finals and carry normal
19316         assignment error check on them. Inline PRIMTYPE.TYPE read access.
19317         (try_builtin_assignconv): Access constant 0 on all primitive
19318         types.
19319         (valid_builtin_assignconv_identity_widening_p): Accept identical
19320         types. Accept all promoted type on int type.
19321         (valid_ref_assignconv_cast_p): Accept a null pointer to be
19322         assigned to a reference.
19323         (valid_method_invocation_conversion_p): Accept to check null
19324         pointers.
19325         (build_binop): Merge declaration and initialization of local
19326         variable BINOP.
19327         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
19328         numeric types. Improved validity test for qualify operators on
19329         references.
19330         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
19331         and PREINCREMENT_EXPR. Also detect resolved static finals of a
19332         primitive type and issue the appropriate error message.
19333         (resolve_type_during_patch): Mark class loaded when resolved.
19334         (patch_cast): Allow null to be cased to reference types.
19335         (build_null_of_type): New function.
19336         (patch_array_ref): Handle array on references correctly.
19337         (patch_return): Removed unused local variable MODIFY. Force
19338         boolean to be returned as integers. Allows null to be returned by
19339         a function returning a reference.
19340         * typeck.c (convert_to_integer, convert_to_real,
19341         convert_to_pointer): Prototypes moved to convert.h
19342         (lookup_argument_method): Use method real name, if necessary.
19344 1998-10-30  Tom Tromey  <tromey@cygnus.com>
19346         * class.c (build_class_ref): Changed name of primitive classes to
19347         start with `_Jv_'.
19349         * class.c (make_class_data): Renamed fields: nmethods to
19350         method_count, method_count to dtable_method_count.  Always set
19351         `state' field to 0.
19352         * decl.c (init_decl_processing): Likewise.
19354 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19356         * class.c (layout_class): Don't mangle <finit>, produce
19357         __finit<class> instead. Don't verify artificial methods.
19358         * decl.c (finit_identifier_node): New declared global.
19359         (init_decl_processing): finit_identifier_node initialized.
19360         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19361         * java-tree.h (finit_identifier_node): Declared as extern.
19362         (struct lang_decl): New field called_constructor.
19363         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19364         (CLASS_HAS_FINIT_P): New macro.
19365         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19366         explicit constructor invocation.
19367         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19368         CALL_SUPER_CONSTRUCTOR_P): New macros.
19369         (write_classfile): Added prototype.
19370         * jcf-parse.c (jcf_parse_source): Parse and remember for
19371         generation if the file was seen on the command line.
19372         (parse_source_file): Don't write the class file here.
19373         (yyparse): Loop on files rewritten. Set current_jcf.
19374         (parse_zip_file_entries): Parse class file only if it was found.
19375         * lang.c (init_parse): Don't open command line provided filename
19376         here.
19377         (lang_parse): Don't set main_jcf anymore.
19378         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19379         (JCONSTRUCTOR_CHECK): New macro.
19380         (JBSC_TYPE_P): New macro.
19381         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19382         (COMPLETE_CHECK_OP_2): New macro.
19383         (struct parse_ctxt): New field explicit_constructor_p.
19384         (check_class_interface_creation): Fixed prototype indentation.
19385         (patch_method_invocation_stmt): Prototype reflects added argument.
19386         (patch_invoke): Likewise.
19387         (complete_method_declaration, build_super_invocation,
19388         verify_constructor_circularity,
19389         build_this_super_qualified_invocation, get_printable_method_name,
19390         patch_conditional_expr, maybe_generate_finit, fix_constructors,
19391         verify_constructor_super, create_artificial_method,
19392         start_artificial_method_body, end_artificial_method_body,
19393         generate_field_initialization_code): New function prototypes.
19394         * parse.y: Fixed leading comment
19395         (constructor_header:, constructor_body:, block_end:): Rules tagged
19396         <node>.
19397         (type_declaration:): Call maybe_generate_finit.
19398         (method_declaration:): Action for method_body: placed in new
19399         function complete_method_declaration, called here.
19400         (constructor_declaration:): Defined actions. Removed leading
19401         FIXME.
19402         (constructor_header:): New rule with action.
19403         (constructor_body:): Rule rewritten using block_begin: and
19404         block_end:. Defined actions.
19405         (constructor_declarator:, explicit_constructor_invocation:):
19406         Defined actions.
19407         (block:): Use new rules block_begin: block_end:.
19408         (block_begin:, block_end:): New rules and actions.
19409         (block_statements:): Fixed error message for explicit
19410         constructors.
19411         (method_invocation:): Call build_this_super_qualified_invocation
19412         if primary is `this' or `super' was seen.
19413         (conditional_expression:): Action defined.
19414         (extra_ctxp_pushed_p): New static global flag.
19415         (java_parser_context_save_global): Create parser context if
19416         necessary. Use extra_ctxp_pushed_p to remember it.
19417         (java_parser_context_restore_global): Pop extra parser context if
19418         one exists.
19419         (build_array_from_name): Array on primitive types are marked
19420         loaded.
19421         (register_fields): Restore new name in field initializer
19422         expression if type was altered. Non static fields initialized upon
19423         declaration marked initialized.
19424         (maybe_generate_finit): New function.
19425         (maybe_generate_clinit): Use create_artificial_method,
19426         start_artificial_method_body, end_artificial_method_body. Generate
19427         debug info for enclosed initialization statements.
19428         (method_header): Fixed leading comment. Check constructor
19429         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19430         accordingly.
19431         (complete_method_declaration, constructor_circularity_msg,
19432         verify_constructor_circularity): New functions.
19433         (get_printable_method_name): New function.
19434         (check_method_redefinition): Don't rename <finit> methods. Fix
19435         declared constructor names. Error message for
19436         constructors modified.
19437         (java_check_regular_methods): Local variable seen_constructor
19438         renamed saw_constructor. Skip verification on constructors. Create
19439         default constructor with create_artificial_method.
19440         (java_check_methods): Removed unnecessary empty line.
19441         (create_artificial_method, start_artificial_method_body,
19442         end_artificial_method_body): New functions.
19443         (java_layout_classes): Changed leading comment. Reverse fields
19444         list if necessary. Always layout java.lang.Object if being
19445         defined.
19446         (java_complete_expand_methods): Verify constructor circularity.
19447         (java_complete_expand_method): Call fix_constructor on
19448         constructors.  Local variable no_ac_found removed. Restore
19449         bindings if method body expansion failed.
19450         (fix_constructors, verify_constructor_super,
19451         generate_field_initialization_code): New function.
19452         (java_expand_classes): Fixed leading comment. Write class file
19453         here.
19454         (resolve_expression_name): Check for illegal instance variable
19455         usage within the argument scope of an explicit constructor
19456         invocation.
19457         (resolve_qualified_expression_name): Pass extra from_super flag
19458         when invoking patch_method_invocation_stmt. New case for
19459         conditional expression when used as a primary. Check for error
19460         when acquiring super.
19461         (patch_method_invocation_stmt): Added extra argument super. New
19462         local variable is_static_flag. Set class_to_search according to
19463         the nature of the constructor invocation. Don't add `this'
19464         argument when expanding NEW_CLASS_EXPR. Check for illegal method
19465         invocation within the argument scope of explicit constructor
19466         invocation. Set is_static according to is_static_flag. Provide
19467         extra `super' argument to patch_invoke invocation.
19468         (patch_invoke): New argument from_super. Loop on arguments
19469         indentation fixed. Pass from_super to invocation_mode. New switch
19470         case INVOKE_SUPER. Fixed error message in switch default case.
19471         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19472         value.
19473         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19474         (lookup_method_invoke): Fixed prototypes in candidates list. Error
19475         message takes constructors into account.
19476         (find_applicable_accessible_methods_list): Fixed indentation.
19477         (qualify_ambiguous_name): Take explicit constructor invocation
19478         into account. Deal with a conditional expression as a primary to
19479         a method call.
19480         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19481         case. Added extra argument to patch_method_invocation_stmt.
19482         Register calls made to explicit constructor `this'. Don't call
19483         save_expr in ARRAY_REF case when emitting class files. Check for
19484         illegal use of this when expanding explicit constructor invocation
19485         arguments.
19486         (complete_function_arguments): Set and reset parser context
19487         explicit_constructor_p field value when appropriate.
19488         (build_super_invocation, build_this_super_qualified_invocation):
19489         New functions.
19490         (patch_assignment): Fixed typo.
19491         (patch_unaryop): Check on final fields occurs only when a decl
19492         exits.
19493         (patch_return): Take constructors into account.
19494         (patch_conditional_expr): New function.
19495         * typeck.c (build_java_signature): Removed unnecessary empty line.
19497 1998-10-28  Jeffrey A Law  (law@cygnus.com)
19499         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19501 1998-10-28  Tom Tromey  <tromey@cygnus.com>
19503         * decl.c (init_decl_processing): Renamed fields.
19504         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19505         interface_len, msize fields.
19507         * class.c (make_class_data): Removed subclass_head and
19508         subclass_next fields.
19509         * decl.c (init_decl_processing): Removed subclass_head and
19510         subclass_next fields.
19512 1998-10-28  Jeffrey A Law  (law@cygnus.com)
19514         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19515         * mangle.c (emit_unicode_mangled_name): Similarly.
19517 1998-10-26  Nick Clifton  <nickc@cygnus.com>
19519         * jcf-parse.c (get_constant): Place braces around code to compute
19520         'd' when REAL_ARITHMETIC is not defined.
19522 1998-10-25  H.J. Lu  (hjl@gnu.org)
19524         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19525         dependency.
19527 1998-10-23  Tom Tromey  <tromey@cygnus.com>
19529         * lang-specs.h: `.zip' files are input to jc1.
19531 1998-10-22  Per Bothner  <bothner@cygnus.com>
19533         * jvspecs.c:  Add (but don't enable) support for combining multiple
19534         .class and .java input filenames to a single jc1 invocation.
19535         Add support for -C flag (copile to .class files).
19536         Translate -classpath and -CLASSPATH arguments.
19537         * lang-specs.h:  Don't set %2 spec.
19539 1998-10-22  Tom Tromey  <tromey@cygnus.com>
19541         * jcf-path.c (add_entry): Don't add trailing separator if entry is
19542         a .zip file.
19543         (add_path): Don't add trailing separator to non-empty path
19544         elements.
19546         * lang.c (lang_decode_option): Check for -fclasspath and
19547         -fCLASSPATH before examining other `-f' options.
19549         * java-tree.h (finalize_identifier_node): Don't declare.
19550         * class.c (make_class_data): Don't push "final" field.
19551         * decl.c (init_decl_processing): Don't push "final" field.
19552         (finalize_identifier_node): Removed.
19553         (init_decl_processing): Don't set finalize_identifier_node.
19555         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19557 1998-10-11  Anthony Green  <green@cygnus.com>
19559         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19560         (JV_SCAN_SOURCES): New macro.
19561         (JCF_DUMP_SOURCES): Likewise.
19562         (jcf-dump$(exeext)): New target.
19563         (jv-scan$(exeext)): New target.
19565 1998-10-22  Tom Tromey  <tromey@cygnus.com>
19567         * Makefile.in (LEX): Removed.
19568         (LEXFLAGS): Likewise.
19569         (SET_BISON): New macro.
19570         (BISON): Removed.
19571         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
19572         spurious diffs in parse.c.
19573         ($(PARSE_SCAN_C)): Likewise.
19574         (PARSE_DIR): New macro.
19575         (PARSE_C): Use it.
19576         (PARSE_SCAN_C): Likewise.
19577         (PARSE_RELDIR): New macro.
19579         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19581         * jcf-io.c (find_class): Use saw_java_source to determine when to
19582         look for `.java' file.
19583         * jcf-parse.c (saw_java_source): New global.
19584         (yyparse): Set it if `.java' file seen.
19586         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19587         (GCJH_SOURCES): Likewise.
19588         * Makefile.in (datadir): New macro.
19589         (libjava_zip): Likewise.
19590         (JAVA_OBJS): Added jcf-path.o.
19591         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19592         (../gcjh$(exeext)): Likewise.
19593         (jcf-path.o): New target.
19594         * java-tree.h (fix_classpath): Removed decl.
19595         * jcf-parse.c (fix_classpath): Removed.
19596         (load_class): Don't call fix_classpath.
19597         * parse.y (read_import_dir): Don't call fix_classpath.
19598         * lex.h: Don't mention classpath.
19599         * lex.c (java_init_lex): Don't initialize classpath.
19600         * jcf-io.c (classpath): Removed global.
19601         (find_class): Use jcf_path iteration functions.  Correctly search
19602         class path for .java file.
19603         (open_in_zip): New argument `is_system'.
19604         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
19605         classpath-related options.
19606         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19607         and -I.
19608         (lang_init): Call jcf_path_init.
19609         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19610         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
19611         Correctly put braces around second string in each entry.
19612         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
19613         classpath-related options.
19614         (help): Updated for new options.
19615         * jcf.h: Declare functions from jcf-path.c.  Don't mention
19616         `classpath' global.
19617         * jcf-path.c: New file.
19619         * jcf-depend.c: Include jcf.h.
19621         * jcf-write.c (localvar_alloc): Returns `void'.
19622         (localvar_free): Removed unused variable.
19624         * lang.c (OBJECT_SUFFIX): Define if not already defined.
19625         (init_parse): Use OBJECT_SUFFIX, not ".o".
19627 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19629         * class.c (emit_register_classes): Renamed from
19630         emit_register_class.
19631         * java-tree.h (emit_register_classes): Prototype renamed from
19632         emit_register_class.
19633         * jcf-parse.c (yyparse): Call emit_register_classes once before
19634         returning.
19635         * parse.y (java_expand_classes): No longer register classes.
19637 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19639         * class.c (is_compiled_class): New local variable
19640         seen_in_zip. Identify classes found in currently compiled source
19641         file(s).
19642         * decl.c (complete_start_java_method): Fixed typo.
19643         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19644         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19645         (CLASS_P): Moved around.
19646         (java_parse_abort_on_error): Macro moved from jcf-parse.c
19647         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19648         java-tree.h
19649         (jcf_parse_source): Changed leading comment. Removed unnecessary
19650         fclose and CLASS_FROM_SOURCE_P marking.
19651         (parse_source_file): New local variables remember_for_generation
19652         and filename. Mark parsed file name identifier node. Removed block
19653         executed when parse_only was null. Set remember_for_generation.
19654         Use it as an argument to java_pop_parser_context.
19655         (yyparse): New local variables several_files, list, next node and
19656         current_file_list. Split ampersand separated file names into
19657         current_file_list. Iterate through the list and parse accordingly.
19658         * parse.h (java_pop_parser_context): New function prototype.
19659         * parse.y (ctxp_for_generation): New static global variable.
19660         (java_pop_parser_context): New argument generate. Link popped ctxp
19661         to ctxp_for_generation list accordingly.
19662         (java_complete_expand_methods): Fixed indentation.
19663         (java_expand_classes): New function.
19665 1998-10-17  Per Bothner  <bothner@cygnus.com>
19667         * Makefile.in:  Link with libiberty.a instead of memmove.o.
19669 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19671         * lex.c (setjmp.h): No longer included.
19672         * lex.h (setjmp.h): Included.
19673         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19674         (duplicate_declaration_error_p): Renamed from
19675         duplicate_declaration_error.
19676         (build_array_from_name): New function prototype.
19677         * parse.y (setjmp.h): No longer included.
19678         (variable_declarator_id): Define action.
19679         (build_array_from_name): New function.
19680         (duplicate_declaration_error_p): Renamed from
19681         duplicate_declaration_error.  Fixed leading comment.
19682         (register_fields): Main `for' loop reorganized. Uses
19683         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19684         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19685         build_array_from_name.
19686         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19687         types.
19688         (read_import_dir): Don't try to skip `.' and `..'.
19689         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19690         build_array_from_name. Main `for' loop reorganized.
19691         (resolve_qualified_expression_name): When building access to a
19692         field, use the type where the field was found, not its own type.
19693         (maybe_access_field): Use field DECL_CONTEXT if the type where the
19694         field was found is null.
19695         (qualify_ambiguous_name): Sweep through all successive array
19696         dimensions.
19698 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19700         * java-tree.h (pop_labeled_block, lang_printable_name,
19701         maybe_add_interface, set_super_info, get_access_flags_from_decl,
19702         interface_of_p, inherits_from_p, fix_classpath,
19703         complete_start_java_method, emit_handlers, init_outgoing_cpool,
19704         make_class_data, register_class, alloc_name_constant): New
19705         function prototypes.
19706         * lang.c (lang_decode_option): Set argc argument unused. Fixed
19707         indentation. Added cast to remove warning.
19708         (lang_printable_name): Set v argument unused.
19709         (lang_print_error): Added argument to lang_printable_name call.
19710         (java_dummy_print, print_lang_decl, print_lang_type,
19711         print_lang_identifier, lang_print_xnode): All argument marked
19712         unused.
19713         * lex.c (java_unget_unicode): Removed unnecessary argument.
19714         (java_allocate_new_line): Unused local variable is gone.
19715         (java_read_char): Added parenthesis in expressions to remove
19716         warnings.  Added final return statement.
19717         (java_read_unicode): Added parenthesis in expression to remove
19718         warning.
19719         (java_parse_end_comment): Fixed java_unget_unicode invocation.
19720         (java_parse_escape_sequence): Likewise.
19721         (java_lex): Unused local variables are gone. Fixed
19722         java_unget_unicode invocation.
19723         * lex.h (set_float_handler): Prototype added when JC1_LITE not
19724         defined.
19725         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19726         lang_printable_name invocation in macro.
19727         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19728         Likewise.
19729         (duplicate_declaration_error): Suppressed unused argument in
19730         prototype.
19731         (identical_subpath_p): Function declaration is gone.
19732         (patch_invoke): Suppressed unused argument in prototype.
19733         (patch_cast, build_labeled_block, check_thrown_exceptions):
19734         Likewise.
19735         * parse.y (setjmp.h): Included
19736         (toplev.h): Likewise.
19737         (field_declaration:): Suppressed unused local
19738         (label_decl:): Fixed build_labeled_block invocation.
19739         (java_pop_parser_context): Put extra parenthesis around assignment
19740         in if.
19741         (yyerror): Suppressed unused local variables.
19742         (variable_redefinition_error): Fixed lang_printable_name
19743         invocation.
19744         (create_interface): Suppressed unused local variables.
19745         (create_class): Likewise.
19746         (duplicate_declaration_error): Suppressed unused argument. Fixed
19747         lang_printable_name invocation.
19748         (register_fields): Suppressed unused local variable. Fixed
19749         duplicate_declaration_error invocation.
19750         (method_header): Suppressed unused local variable.
19751         (method_declarator, parser_check_super): Likewise.
19752         (java_complete_class): Suppressed unused local variable. Fixed
19753         fatal error message.
19754         (complete_class_report_errors): Added default: in switch.
19755         (java_check_regular_methods): Fixed lang_printable_name
19756         invocations.
19757         (check_throws_clauses): Likewise.
19758         (java_check_abstract_methods): Suppressed unused local
19759         variable. Fixed lang_printable_name invocation.
19760         (read_import_entry): Added supplemental return statement.
19761         (read_import_dir): Suppressed unused local variables.
19762         (check_pkg_class_access, declare_local_variables): Likewise.
19763         (source_start_java_method): Suppressed unused extern variable
19764         declarations
19765         (expand_start_java_method): Suppressed unused extern and local
19766         variable declarations.
19767         (java_complete_expand_methods): Likewise.
19768         (java_complete_expand_method): Suppressed unused local variables.
19769         (make_qualified_name): Likewise.
19770         (resolve_qualified_expression_name): Added default: in
19771         switch. Fixed lang_printable_name invocation.
19772         (class_instance_creation_expression): Added parenthesis around
19773         expressions.
19774         (patch_method_invocation_stmt): Fixed lang_printable_name and
19775         patch_invoke invocations.
19776         (check_for_static_method_reference): Fixed lang_printable_name
19777         invocation.
19778         (patch_invoke): Suppressed unused arguments and local variables.
19779         (lookup_method_invoke): Suppressed unused local variables.
19780         (qualify_ambiguous_name): Added default: in switch.
19781         (identical_subpath_p): Function removed.
19782         (patch_assignment): Suppressed unused local variables. Suppressed
19783         unnecessary if statement. Fixed lang_printable_name invocations.
19784         (try_builtin_assignconv): Fixed lang_printable_name invocations.
19785         (valid_ref_assignconv_cast_p): Parenthesis around
19786         expression. Suppressed unused local variables.
19787         (build_binop): Suppressed unused local variables. fixed
19788         lang_printable_name invocations.
19789         (string_constant_concatenation): Suppressed unused local
19790         variables.
19791         (patch_unaryop): Fixed lang_printable_name invocation.
19792         (patch_cast): Suppressed unnecessary argument. Fixed
19793         lang_printable_name invocation.
19794         (patch_array_ref): Fixed lang_printable_name invocation.
19795         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19796         (build_labeled_block): Suppressed unused argument.
19797         (generate_labeled_block): Fixed build_labeled_block invocation.
19798         (build_loop_body): Suppressed unused local variables.
19799         (patch_loop_statement): Likewise.
19800         (patch_exit): Fixed lang_printable_name invocation.
19801         (patch_switch_statement): Likewise.
19802         (case_identity): First argument marked unused.
19803         (patch_try_statement): Fixed lang_printable_name invocations.
19804         (patch_synchronized_statement, patch_throw_statement): Likewise.
19805         (check_thrown_exceptions): Fixed check_thrown_exceptions and
19806         lang_printable_name invocations.
19807         (check_thrown_exceptions_do): Suppressed unused argument.
19809 1998-10-14  Tom Tromey  <tromey@cygnus.com>
19811         * jcf-write.c (write_classfile): Add output class file as target.
19812         * lang-options.h: Added -MD, -MMD, -M, and -MM.
19813         * jcf.h: Added declarations for dependency-tracking functions.
19814         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19815         * lang.c (lang_decode_option): Recognize -MD and -MMD.
19816         (finish_parse): Call jcf_dependency_write.
19817         (dependency_tracking): New global.
19818         (DEPEND_SET_FILE): New define.
19819         (DEPEND_ENABLE): New define.
19820         (init_parse): Enable dependency tracking if required.
19821         Include "flags.h".
19822         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19823         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19824         (../gcjh$(exeext)): Likewise.
19825         (jcf-depend.o): New target.
19826         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19827         (GCJH_SOURCES): Likewise.
19828         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
19829         dep_name argument.
19830         (find_classfile): Added dep_name argument.
19831         (find_class): Compute name of dependency.
19832         (open_in_zip): Call jcf_dependency_add_file.
19833         * gjavah.c (output_file): No longer global.
19834         (usage): Don't mention "gjavah".
19835         (help): Likewise.
19836         (java_no_argument): Likewise.
19837         (version): Likewise.
19838         (main): Recognize and handle -M family of options.
19839         (print_mangled_classname): Return is void.
19840         (process_file): Handle case where output is suppressed.
19841         (HANDLE_END_FIELD): Likewise.
19842         (HANDLE_METHOD): Likewise.
19843         * jcf-depend.c: New file.
19845 1998-10-13  Jeffrey A Law  (law@cygnus.com)
19847         * java-tree.def: Add missing newline at EOF.
19849 1998-10-13  Tom Tromey  <tromey@cygnus.com>
19851         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19852         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
19853         function.
19854         Include <config.h> and "system.h".
19855         (disassemble_method): Undefine RET to avoid clash with
19856         config/i386/i386.h.
19858 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19860         * decl.c (runtime_exception_type_node, error_exception_type_node):
19861         New global variables.
19862         (init_decl_processing): Initialized.
19863         * expr.c (java_lang_expand_expr): Set caught exception type to
19864         null if catch handler argument doesn't exit.
19865         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19866         tree codes.
19867         * java-tree.h (runtime_exception_type_node,
19868         error_exception_type_node): Global variables declared.
19869         (DECL_FUNCTION_THROWS): New macro.
19870         (DECL_FUNCTION_BODY): Modified comment.
19871         (DECL_SPECIFIC_COUNT): Likewise.
19872         (struct lang_decl): New field throws_list.
19873         (IS_UNCHECKED_EXPRESSION_P): New macro.
19874         * lex.c (java_lex): Generate location information for THROW_TK.
19875         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19876         EXCEPTIONS_P): New macros.
19877         (enum jdep_code): New value JDEP_EXCEPTION.
19878         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19879         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19880         PATCH_METHOD_RETURN_ERROR): New macros.
19881         (patch_method_invocation_stmt): Added new argument to prototype.
19882         (patch_synchronized_statement, patch_throw_statement,
19883         check_thrown_exceptions, check_thrown_exceptions_do,
19884         purge_unchecked_exceptions, check_throws_clauses): New function
19885         prototypes.
19886         * parse.y Fixed typo in keyword section.
19887         (throw:): Rule tagged <node>.
19888         (THROW_TK): Keyword tagged <operator>.
19889         (method_header:): Last argument to call to method_header passed
19890         from throws: rule.
19891         (throws:, class_type_list:, throw_statement:,
19892         synchronized_statement:, synchronized:): Defined actions.
19893         (method_header): New local variable current. Register exceptions
19894         from throws clause.
19895         (java_complete_tree): Complete and verify exceptions from throws
19896         clause.
19897         (complete_class_report_errors): Error message on exceptions not
19898         found
19899         (java_check_regular_methods): Fixed typo. Shortcut on private
19900         overriding methods. Changed error message on method
19901         redefinition. Check for throws clause compatibility.
19902         (check_throws_clauses): New function.
19903         (java_check_abstract_methods): Use DECL_NAME for wfl or current
19904         method. Changed error message on method redefinition.
19905         (currently_caught_type_list): New static variable.
19906         (java_complete_expand_methods): Purge unchecked exceptions from
19907         throws clause list. Call PUSH_EXCEPTIONS before walk and
19908         POP_EXCEPTIONS after.
19909         (resolve_qualified_expression_name): Pass new argument as NULL to
19910         patch_method_invocation_stmt.
19911         (patch_method_invocation_stmt): New argument ref_decl. Invoke
19912         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19913         argument list when appropriate. Use new argument if non null to
19914         store selected method decl.
19915         (patch_invoke): Convert if necessary args of builtin types before
19916         forming CALL_EXPR. Argument list no longer reversed here.
19917         (invocation_mode): Treat final methods as static methods.
19918         (java_complete_tree): New cases for THROW_EXPR: and
19919         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19920         function call.
19921         (complete_function_arguments): No more RECORD_TYPE
19922         conversion. Function parameter nodes no longer saved.
19923         (valid_ref_assignconv_cast_p): Avoid handling null type.
19924         (patch_binop): Fixed null constant reference handling.
19925         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19926         BUILD_THROW macros.
19927         (patch_try_statement): Fixed comments. Record caught types in
19928         list, push the list, expand try block and pop the list.
19929         (patch_synchronized_statement, patch_throw_statement,
19930         check_thrown_exceptions, check_thrown_exceptions_do,
19931         purge_unchecked_exceptions): New functions.
19932         * typeck.c (lookup_argument_method): Allow WFL in place of method
19933         DECL_NAME during method definition check
19935 1998-10-09  Tom Tromey  <tromey@cygnus.com>
19937         * gjavah.c (decode_signature_piece): New function.
19938         (print_c_decl): Use it.  Added `name_override' argument.
19939         (print_method_info): Use name_override argument to print_c_decl.
19940         (seen_fields): Removed.
19941         (print_field_info): Don't update seen_fields.
19942         (struct method_name): New structure.
19943         (method_name_list): New global.
19944         (print_method_info): Add new method to list of methods.
19945         (name_is_method_p): New function.
19946         (print_field_info): If field name has same name as method, then
19947         change field name.
19948         (process_file): Parse methods before fields.
19949         (field_pass): New global.
19950         (HANDLE_END_FIELD): Take field_pass into account.
19952 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19954         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19955         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19957 1998-10-03  Anthony Green  <green@cygnus.com>
19959         * jvspec.c: Fix bug in jvgenmain_spec patch.
19961 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19963         * Makefile.in (lang.o:): Install dependency on java-tree.def.
19964         * decl.c (soft_exceptioninfo_call_node): New global variable.
19965         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19966         takes extra integer argument. soft_exceptioninfo_call_node
19967         initialized.
19968         * except.c (java_set_exception_lang_code): New function
19969         (method_init_exceptions): Called here.
19970         (prepare_eh_table_type): New function.
19971         (expand_end_java_handler): Called here.
19972         * expr.c (build_java_throw_out_of_bounds_exception): Now features
19973         one argument. Modified generation of call to
19974         soft_badarrayindex_node to use new argument.
19975         (build_java_arrayaccess): Pass faulty index value to
19976         build_java_throw_out_of_bounds_exception.
19977         (generate_name): New function.
19978         (java_lang_expand_expr): New local variables node, current,
19979         has_finally_p. Expand TRY_EXPR node.
19980         (process_jvm_instruction): Replace top of the stack with thrown
19981         object reference when entering exception handler.
19982         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19983         specific tree codes.
19984         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19985         global.
19986         (DECL_SPECIFIC_COUNT): New macro.
19987         (prepare_eh_table_type, java_set_exception_lang_code,
19988         generate_name): New function declarations.
19989         (match_java_method): Declaration deleted.
19990         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19991         macros.
19992         * lex.c (TRY_TK, CATCH_TK): Generate location information.
19993         * parse.h (redefinition_error, refine_accessible_methods_list,
19994         can_cast_to_p): Function declaration removed.
19995         (classitf_redefinition_error, variable_redefinition_error,
19996         parse_jdk1_1_error, find_applicable_accessible_methods_list,
19997         find_most_specific_methods_list, argument_types_convertible,
19998         enter_a_block, valid_builtin_assignconv_identity_widening_p,
19999         valid_cast_to_p, valid_method_invocation_conversion_p,
20000         try_reference_assignconv, add_stmt_to_compound,
20001         build_jump_to_finally, build_tree_list, patch_try_statement,
20002         java_get_catch_block): New function declarations.
20003         * parse.y (string_buffer_type): Global variable deleted.
20004         (group_of_labels, catches, catch_clause, catch_clause_parameter,
20005         finally): Rules tagged <node>.
20006         (TRY_TK, CATCH_TK): Token tagged <operator>.
20007         (class_body_declaration:, class_member_declaration:,
20008         formal_parameter:, explicit_constructor_invocation:,
20009         interface_member_declaration:, constant_declaration:,
20010         primary_no_new_array:, class_instance_creation_expression:,
20011         array_creation_expression:): Issue error on unsuported JDK1.1
20012         features.
20013         (try_statement:, catches:, finally:): Define actions.
20014         (catch_clause_parameter): New rule.
20015         (catch_clause:): Use new rule catch_clause_parameter.
20016         (parse_jdk1_1_error): New function.
20017         (redefinition_error): Renamed classitf_redefinition_error.
20018         (variable_redefinition_error): New function.
20019         (check_class_interface_creation): Call
20020         classitf_redefinition_error.
20021         (java_complete_tree): Added error message on JDEP_TYPE: case.
20022         (complete_class_report_errors): Fixed indentation.
20023         (declare_local_variables): Call variable_redefinition_error.
20024         (source_end_java_method): Call java_set_exception_lang_code and
20025         emit_handlers where appropriate.
20026         (java_method_add_stmt): Call add_stmt_to_block.
20027         (add_stmt_to_block): New function.
20028         (lookup_method_invoke): Fixed outside comment. new local variable
20029         candicates.  Call find_applicable_accessible_methods_list and
20030         find_most_specific_methods_list when searching for a
20031         method. Modified error report to list possible candidates when
20032         applicable.
20033         (find_applicable_accessible_methods_list,
20034         find_most_specific_methods_list, argument_types_convertible): New
20035         function.
20036         (refine_accessible_methods_list): Function deleted.
20037         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
20038         expr (if applicable) before calling patch_array_ref.
20039         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
20040         (enter_block): Fixed comment.
20041         (enter_a_block): New function.
20042         (patch_assignment): Reorganized. Call try_reference_assignconv for
20043         references. Call valid_cast_to_p instead of can_cast_to_p.
20044         (try_reference_assignconv,
20045         valid_builtin_assignconv_identity_widening_p): New functions.
20046         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
20047         (valid_cast_to_p, valid_method_invocation_conversion_p): New
20048         functions.
20049         (build_string_concatenation): Don't resolve StringBuffer.
20050         (patch_cast): Fixed inverted arguments.
20051         (patch_array_ref): Code to save array expr deleted. Call
20052         valid_cast_to_p instead of can_cast_to_p.
20053         (generate_labeled_block): Call generate_name.
20054         (build_jump_to_finally, build_try_statement, java_get_catch_block,
20055         patch_try_statement): New functions.
20056         * typeck.c (match_java_method): Function deleted.
20058 1998-10-02  Anthony Green  <green@cygnus.com>
20060         * jvspec.c: jvgenmain_spec uses different temporary file names.
20062 1998-10-02  Anthony Green  <green@cygnus.com>
20064         * jvspec.c (lang_specific_driver): Fail if user specifies
20065         --main= when not linking.
20067 1998-09-28  Tom Tromey  <tromey@cygnus.com>
20069         * class.c (make_class_data): Push value for `thread' field.
20070         * decl.c (init_decl_processing): Added `thread' field to class.
20072         * class.c (add_field): Always make static fields externally
20073         visible.
20075 1998-09-26  Anthony Green  <green@cygnus.com>
20077         * expr.c (build_java_athrow,
20078         build_java_throw_out_of_bounds_exception, expand_invoke,
20079         build_newarray, expand_java_multianewarray, build_java_monitor):
20080         Update comments to reflect _Jv_* function names.
20082 1998-09-25  Per Bothner  <bothner@cygnus.com>
20084         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
20085         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
20086         * parse.y (expand_start_java_method):  Likewise.
20088 1998-09-24  Per Bothner  <bothner@cygnus.com>
20090         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
20092         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
20093         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
20094         * expr.c:  Remove no-longer-needed calls to promote_type.
20095         * decl.c (give_name_to_locals):  Liekwise.
20096         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
20097         * parse.y:  Add/remove promote_type calls as appropriate.
20098         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
20099         (parse_signature_string):  Likewise.
20100         (build_java_array_type):  Fix for now signature convenions.
20102         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
20104 1998-09-23  Tom Tromey  <tromey@cygnus.com>
20106         * class.c (init_class_processing): libjava function renamed to
20107         _Jv_RegisterClass.
20109 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20111         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
20112         * java-tree.def: Fixed DEFTREECODE third argument.
20113         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
20114         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
20115         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
20116         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20117         JAVA_THIS_EXPR): Now replaced by tree code definitions.
20118         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
20119         * lang.c (java_tree_code_type, java_tree_code_length,
20120         java_tree_code_name): New arrays.
20121         (lang_init): Append Java tree node definitions to Gcc ones.
20122         * lex.c (expression_obstack): Declared as extern when JC1_LITE
20123         defined.
20124         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
20125         wfl_to_string.
20126         (java_lex): Allow declaration of empty string constants. Retain
20127         location information on CASE_TK and DEFAULT_TK.
20128         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
20129         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
20130         Modified to be more robust.
20131         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
20132         (build_new_invocation, try_builtin_assignconv,
20133         patch_switch_statement, string_constant_concatenation,
20134         build_string_concatenation, patch_string_cst, patch_string,
20135         java_expand_switch): New function declarations.
20136         * parse.y: Rules related to switch and EH tagged <node>.
20137         (label_id): Set to NULL_TREE
20138         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
20139         tree nodes.
20140         (this_or_super:): Fixed indentation.
20141         (statement:, statement_nsi:, statement_without_trailing_substatement:,
20142         statement_expression:): Removed call to RULE on all sub-rules.
20143         (switch_expression:, switch_labels:): New rules.
20144         (switch_statement:, switch_block:, switch_block_statement_groups:,
20145         switch_block_statement_group:, switch_labels:, switch_label:):
20146         Defined actions.
20147         (throw_statement:, synchronized_statement:, try_statement:):
20148         Defined temporary actions.
20149         (class_instance_creation_expression:): Call
20150         build_new_invocation. Fixed indentation.
20151         (field_access): Fixed indentation.
20152         (method_invocation): Likewise.
20153         (make_qualified_primary): Use THIS_EXPR.
20154         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
20155         resolving from SUPER, set *type_found.
20156         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
20157         (java_complete_tree): Removed unused local variable `location'. Case
20158         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
20159         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
20160         on MODIFY_EXPR: and all binary operator tree code cases. Removed
20161         STRING_CST: case. default: checks for patchable strings.
20162         (complete_function_arguments): Transform string constant or
20163         crafted StringBuffer if necessary.
20164         (build_method_invocation): Fixed comments.
20165         (build_new_invocation): New function.
20166         (patch_assignment): Call try_builtin_assignconv to figure a valid
20167         assignment conversion between builtin types.
20168         (try_builtin_assignconv): New function.
20169         (build_binop): Use URSHIFT_EXPR directly to call build.
20170         (operator_string): Use UNARY_PLUS_EXPR.
20171         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
20172         operator.
20173         (do_merge_string_cste, merge_string_cste,
20174         string_constant_concatenation, build_string_concatenation,
20175         patch_string, patch_string_cst): New function.
20176         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
20177         (patch_unaryop): Likewise. New test of valid ++/-- operands.
20178         (build_newarray_node): Use NEW_ARRAY_EXPR.
20179         (build_this): Use THIS_EXPR.
20180         (build_return): Enable debug information on return statement.
20181         (build_if_else_statement): Likewise.
20182         (complete_labeled_statement): Fixed related comment.
20183         (build_loop_body): Fixed comment.
20184         (build_bc_statement): Enable debug information on break/continue
20185         statements.
20186         (patch_bc_statement): Fixed typos. Handle SWITCH statement
20187         context.
20188         (patch_switch_statement, case_identity, java_expand_switch): New
20189         functions.
20191 1998-09-21  Per Bothner  <bothner@cygnus.com>
20193         * buffer.h (BUFFER_INIT):  New macro.
20194         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
20195         Pass (struct jcf_partial *state) to most functions.
20196         (jcf_block, jcf_relocation):  New types.
20197         Support labels, branches, conditionals, loops.
20199 1998-09-21  Tom Tromey  <tromey@cygnus.com>
20201         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
20203 1998-09-21  Per Bothner  <bothner@cygnus.com>
20205         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
20206         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
20207         not integer_type_node (INT_TYPE_SIZ bits).
20209         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
20211         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
20212         * jcf-dump.c (print_exception_table):  New function.
20213         (disassemble_method):  Better handling of wide instructions.
20214         Make more robust for bad input.
20216 1998-09-30  Jeffrey A Law  (law@cygnus.com)
20218         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
20219         FreeBSD.
20221 1998-09-17  Jeffrey A Law  (law@cygnus.com)
20223         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
20225 1998-09-17  Tom Tromey  <tromey@cygnus.com>
20227         * Makefile.in ($(PARSE_H)): Removed target.
20229 1998-09-17  Jeffrey A Law  (law@cygnus.com)
20231         * Makefile.in (JAVA_OBJS): Add memmove.o
20232         (memmove.o): New target & rules.
20234 1998-09-15  Tom Tromey  <tromey@cygnus.com>
20236         * expr.c (expand_invoke): Don't generate a call to the class init
20237         code.
20239 1998-09-14  Jeffrey A Law  (law@cygnus.com)
20241         * Makefile.in: Add many missing dependencies.
20242         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
20243         as appropriate.
20244         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
20245         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
20247 1998-09-11  Per Bothner  <bothner@cygnus.com>
20249         * decl.c (complete_start_java_method):  If method is static (and
20250         not private) call _Jv_InitClass.
20251         * expr.c (expand_invoke):  Don't call build_class_init.
20253         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
20255 1998-09-10  Jeffrey A Law  (law@cygnus.com)
20257         * Make-lang.in (GCJ): Define before using.
20259 1998-09-09  Jeffrey A Law  (law@cygnus.com)
20261         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
20262         losing due to namespace pollution in GNU getopt.h
20264 1998-09-09  Tom Tromey  <tromey@cygnus.com>
20266         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
20267         (java.all.cross): Likewise.
20268         (java.rest.encap): Likewise.
20270 1998-09-08  Jeffrey A Law  (law@cygnus.com)
20272         * gjavah.c (print_class_decls): Fix thinko in arglist
20273         * jcv-io.c (find_classfile): Similarly.
20275 1998-09-07  Jeffrey A Law  (law@cygnus.com)
20277         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
20279 1998-09-05  Tom Tromey  <tromey@cygnus.com>
20281         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
20282         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
20283         * Makefile.in (PARSE_C): New macro.
20284         (PARSE_H): Likewise.
20285         (PARSE_SCAN_C): Likewise.
20286         ($(PARSE_C)): Target renamed from parse.c.
20287         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
20288         (clean): Remove parse-scan.c as well.
20289         (parse.o): Depend on $(PARSE_C).
20291 1998-09-05  Anthony Green  <green@cygnus.com>
20293         * README, license.terms: Removed.
20295         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20296         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20297         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20298         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20299         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20300         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20301         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20302         and Java trademark attribution.
20304 1998-09-04  Tom Tromey  <tromey@cygnus.com>
20306         * Makefile.in: Use gcjh, not gjavah.
20307         * config-lang.in (stagestuff): Use gcjh, not gjavah.
20308         * Make-lang.in: Changed gjavah to gcjh everywhere.
20310 1998-09-03  Per Bothner  <bothner@cygnus.com>
20312         * gjavah.c:  Support new -prepend -add -append flags.
20313         (print_method_info):  Method is not virtual if class is final.
20315 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20317         * jv-scan.c: Fixed copyright assignment.
20318         * keyword.gperf: Likewise.
20319         * keyword.h: Likewise.
20320         * lex.c: Fixed copyright assignment.
20321         (java_lex): Push unicode back when parsing '<'.
20322         * lex.h: Fixed copyright assignment.
20323         * parse-scan.y: Likewise.
20324         * parse.h: Fixed copyright assignment.
20325         (build_debugable_stmt, complete_for_loop): New function prototypes.
20326         * parse.y: Fixed copyright assignment.
20327         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
20328         size_zero_node when completing a loop with no exit condition.
20329         (for_statement_nsi:): Define action.
20330         (for_init:, for_update:): Return size_zero_node when empty.
20331         (declare_local_variables): Call build_debugable_stmt.
20332         (build_debugable_stmt): New function.
20333         (build_loop_body): Build debugable statement around loop
20334         condition part.
20335         (complete_loop_body): Take into account the debugable statement
20336         around the EXIT_EXPR.
20337         (complete_loop_body): New function.
20338         (patch_exit_expr): Fixed condition inversion.
20340 1998-09-02  Tom Tromey  <tromey@cygnus.com>
20342         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20343         name of thread define.
20344         * jvspec.c (THREAD_NAME): New macro.
20345         (GCLIB): Likewise.
20346         (THREADLIB): Likewise.
20347         (lang_specific_driver): Recognize attempt to link with thread
20348         library or gc library.  Recognize -ljava on command line so it
20349         isn't linked against more than once.
20351 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20353         * parse-scan.y (report_main_declaration): Name of the class
20354         containing `main' can be a qualified name.
20356 1998-08-31  Tom Tromey  <tromey@cygnus.com>
20358         * config-lang.in: Changed gjavac to gjc everywhere.
20359         * Make-lang.in: Changed gjavac to gjc everywhere.
20361 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20363         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20364         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20365         and install the files.
20366         * Makefile.in (JAVA_OBJS_LITE): New variable.
20367         (compiler:): Now include jv-scan as a dependency.
20368         (../jv-scan$(exeext), parse-scan.c): New targets.
20369         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20370         * config-lang.in (compilers): Removed gcj, gjavah from the list.
20371         * jcf-parse.c (parse_source_file): Call java_layout_classes and
20372         check for errors even if parse_only.
20373         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20374         defined.
20375         (yylex): New function. Uses java_lex body.
20376         (java_lex): Removed commented out statement. Remove local variable
20377         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20378         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20379         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20380         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20381         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20382         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20383         where appropriate.
20384         (java_lex_error): Empty if JC1_LITE is defined.
20385         (java_get_line_col): Return 0 if JC1_LITE is defined.
20386         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20387         SET_MODIFIER_CTX): Moved into the section containing the macros
20388         conditionally defined by JC1_LITE.
20389         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20390         argument if JC1_LITE is defined.
20391         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20392         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20393         is defined.
20394         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20395         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20396         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20397         to different values according to JC1_LITE.
20398         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20399         declared if JC1_LITE set.
20400         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20401         defined if JC1_LITE not set.
20402         (struct parser_ctx): Reorganized and skip the jc1 front end part
20403         if JC1_LITE set.
20404         (java_layout_classes): New function definition.
20405         (java_push_parser_context, java_init_lex, yyparse, yylex,
20406         yyerror): Prototype always declared. All other static function
20407         prototypes declared only if JC1_LITE is not set.
20408         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20409         declared in parse.h.
20410         (java_layout_classes): New function.
20411         (java_complete_expand_methods): No longer layout the class here.
20412         * parse-scan.y: New file.
20413         * jv-scan.c: New file.
20415 1998-08-25  Tom Tromey  <tromey@cygnus.com>
20417         * gjavah.c (main): Handle -friend option.
20418         (friend_specs): New global.
20419         (generate_access): Handle friend_specs.
20420         (process_file): Likewise.
20421         (MAX_FRIENDS): New macro.
20422         (friend_count): New global.
20423         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
20424         Changed all callers.
20426 1998-08-24  Per Bothner  <bothner@cygnus.com>
20428         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
20429         (main):  Handle processing all the entries of a named .zip archive.
20430         * jcf-io.c (jcf_trim_old_input):  New function.
20431         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
20433 1998-08-24  Per Bothner  <bothner@cygnus.com>
20435         * lang.c (flag_assume_compiled):  Make default be on.
20437 1998-08-21  Per Bothner  <bothner@cygnus.com>
20439         * jcf-dump.c:  Add bunches of flags to control output more.
20440         (process_class):  New function;  support printing more than one class.
20441         (main): Support new --print-main and --javap flags.
20442         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
20443         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
20445 1998-08-20  Per Bothner  <bothner@cygnus.com>
20447         Change mangling of dispatch table to match C++ vtable (w/thunks).
20448         * class.c (build_dtable_decl), java-tree.h:  New function.
20449         (make_class_data):  Call it.
20450         * decl.c (init_decl_processing):  Likewise.
20452 1998-08-19  Warren Levy  <warrenl@cygnus.com>
20454         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20455         soft_anewarray; adjust args passed.
20456         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20457         match _Jv_NewObjectArray.
20459 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20461         * decl.c (push_labeled_block, pop_labeled_block): New functions.
20462         * expr.c (loopup_label): Call create_label_decl.
20463         (create_label_decl): New function.
20464         (java_lang_expand_expr): Call expand_start_bindings with argument
20465         set to zero.
20466         * java-tree.h Added space after PROTO in function declarations
20467         when necessary.
20468         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20469         (create_label_decl, push_labeled_block): New function
20470         declarations.
20471         * lex.c (label_id): Initialize.
20472         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20473         switch.
20474         * parse.h Added space after PROTO in function declarations when
20475         necessary.
20476         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20477         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20478         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20479         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20480         macros.
20481         (struct parser_ctxt): New fields current_loop,
20482         current_labeled_block.
20483         (build_if_else_statement, patch_if_else_statement,
20484         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20485         generate_labeled_block, complete_labeled_statement,
20486         build_bc_statement, patch_bc_statement, patch_loop_statement,
20487         build_new_loop, build_loop_body, complete_loop_body): New function
20488         declarations.
20489         * parse.y (java_warning_count): New global variable.
20490         (label_id): New static variable.
20491         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20492         (block:): Return size_zero_node when block is empty.
20493         (empty_statement:): Return size_zero_node.
20494         (statement:): Implement supplemental action when for_statement: is
20495         reduced.
20496         (label_decl:): New rule.
20497         (labeled_statement:): Rewritten using label_decl. Actions
20498         implemented.
20499         (labeled_statement_nsi:): Likewise.
20500         (if_then_statement): Actions implemented.
20501         (while_expression): New rule.
20502         (while_statement:): Rewritten using while_expression. Actions
20503         implemented.
20504         (while_statement_nsi:): Likewise.
20505         (do_statement_begin:): New rule.
20506         (do_statement:): Rewritten using do_statement_begin. Actions
20507         implemented.
20508         (for_statement:): Rewritten using for_begin. Actions implemented.
20509         (for_statement_nsi:): Likewise.
20510         (for_header:, for_begin:): New rules.
20511         (for_init:): Actions implemented.
20512         (statement_expression_list:, break_statement:,
20513         continue_statement:): Likewise.
20514         (yyerror): Count number of issued warning(s).
20515         (java_report_errors): Report error(s) and/or warning(s).
20516         (java_complete_class): Use build_java_argument_signature to
20517         recompute completed method signature.
20518         (java_check_regular_methods): New locals method_wfl and aflags.
20519         Use method_wfl instead of lookup_cl during error reports. Fixed
20520         indentation and modified some error messages. Use
20521         lang_printable_name in method instead of the DECL_NAME. New code
20522         to issue warnings on methods not overriding corresponding methods
20523         private to a different package.
20524         (java_method_add_stmt): Call add_stmt_to_compound.
20525         (add_stmt_to_compound): New function.
20526         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20527         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20528         (build_if_else_statement, patch_if_else_statement,
20529         build_labeled_block, generate_labeled_block,
20530         complete_labeled_statement, build_new_loop, build_loop_body,
20531         complete_loop_body, patch_loop_statement, build_bc_statement,
20532         patch_bc_statement, patch_exit_expr): New functions.
20533         * typeck.c (build_java_signature): Build argument signature before
20534         enclosing it in between parenthesis.
20536 1998-08-17  Warren Levy  <warrenl@cygnus.com>
20538         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20539         (JAVA_OBJS): Added reminder comment
20541 1998-08-13  Nick Clifton  <nickc@cygnus.com>
20543         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20544         be interpreted as a long long.
20546 1998-08-13  Warren Levy  <warrenl@cygnus.com>
20548         * decl.c (init_decl_processing): Use _Jv_InitClass, not
20549         soft_initialise_class.  Use _Jv_NewMultiArray, not
20550         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
20551         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
20552         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
20553         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20555 1998-08-12  Per Bothner  <bothner@cygnus.com>
20557         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20558         length_identifier_node):  New global tree node constants.
20559         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
20560         Replace uses by super_identifier_node etc.
20561         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
20563         * parse.y (resolve_field_access):  Don't special-case ".length" if
20564         flag_emit_class_files.
20565         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
20566         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
20567         and ARRAY.length.
20569 1998-08-11  Per Bothner  <bothner@cygnus.com>
20571         * decl.c (init_decl_processing): Remove unused method_type_node fields.
20572         * class.c (make_method_value):  Remove init for removed fields.
20574         * class.c (layout_class):  Use build_java_argument_signature.
20575         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
20577         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
20578         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
20579         (build_java_signature):  Don't use push_java_argument_signature.
20581         * typeck.c (lookup_argument_method):  New function.
20582         * parse.y (java_check_regular_methods):  Use lookup_argument_method
20583         instead of lookup_java_method2 followed by lookup_java_method.
20585         * parse.y (check_method_redefinition):  Minor optimization.
20587         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
20588         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20590 1998-08-10  Tom Tromey  <tromey@cygnus.com>
20592         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20593         c-pragma.o.
20595         * gjavah.c (java_float_finite): Use K&R-style definition.
20596         (java_double_finite): Likewise.
20597         (generate_access): Now returns void.  Changed all callers.
20598         (last_access_generated): Removed.
20599         (process_file): Only make a single pass over the .class file.
20601 1998-07-29  Per Bothner  <bothner@cygnus.com>
20603         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
20604         for compatibility for G++ (with -fvtable-thunks).
20605         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
20607         * gjavah.c (process_file):  Use public inheritance for super-class.
20609 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20611         * lex.c (java_init_lex): Initialize ctxp->package.
20612         * parse.h (struct parser_ctxt): package and package_len replaced
20613         by tree package, an identifier node. Field method_decl_list is
20614         gone. Fixed comments.
20615         (lookup_field_wrapper, merge_qualified_name, not_accessible,
20616         class_in_current_package): New function prototypes.
20617         * parse.y (array_type:): Set class loaded flag on primitive type
20618         arrays.
20619         (package_declaration:): Assign ctxp->package to the
20620         identifier node.
20621         (method_invocation:): Handle invocation of method qualified by
20622         `super'.
20623         (single_type_import_declaration:): Removed ambiguity check.
20624         (java_pop_parser_context): New local variable `next'. Reset and
20625         set IMPORT_CLASSFILE_NAME flags on current and previous import
20626         list.
20627         (java_accstring_lookup): Use new local macro COPY_RETURN.
20628         (lookup_field_wrapper): New function.
20629         (parser_qualified_classname): Use merge_qualified_name.
20630         (parser_check_super_interface): Broaden error message.
20631         (do_resolve_class): Check for qualified class name in the current
20632         compilation unit if appropriate.
20633         (process_imports): Check for already defined classes.
20634         (check_pkg_class_access): Got rid of call to
20635         get_access_flags_from_decl.
20636         (java_complete_expand_methods): Call safe_layout_class based on
20637         the current class size.
20638         (make_qualified_primary): Build a WFL qualification on primary if
20639         none exists.
20640         (merge_qualified_name): New function.
20641         (make_qualified_name): Use merge_qualified_name.
20642         (resolve_expression_name): Use safe_lookup_field.
20643         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20644         (resolve_qualified_expression_name): Likewise. Check on resolved
20645         element accessibility.
20646         (not_accessible_p, class_in_current_package): New functions.
20647         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20648         (patch_method_invocation_stmt): Merged common pieces. Check
20649         accessibility of invoked method.
20650         (check_for_static_method_reference): Add returned type in error
20651         message.
20652         (invocation_mode): Get rid of bogus check on PRIVATE methods.
20653         (refine_accessible_methods_list): Merged two conditions in test.
20654         (java_complete_class): Sanity check on stabilize_ref gone.
20655         * zextract.c (read_zip_archive): Cast lseek second argument to long.
20657 1998-07-28  Per Bothner  <bothner@cygnus.com>
20659         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
20661 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20663         * gjavah.c (F_NAN): Removed.
20664         (F_NAN_MASK): New macro.
20665         (F_POSITIVE_INFINITY): Removed.
20666         (F_NEGATIVE_INFINITY): Likewise.
20667         (java_float_finite): Rewrote.
20668         (D_NAN_MASK): Renamed.
20669         (java_double_finite): Rewrote.
20670         (D_POSITIVE_INFINITY): Removed.
20671         (D_NEGATIVE_INFINITY): Likewise.
20673         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20674         If verbose, print underlying representation of value in hex.
20676 1998-07-24  Per Bothner  <bothner@cygnus.com>
20678         * buffer.h, buffer.c:  New files.
20679         * Makefile.in (JAVA_OBJS):  Add buffer.o.
20681         Support locals variables and writing their debug entries to .class.
20682         * jcf-write.c:  Simplify some by user new buffer type.
20683         (vode_buffer_grow):  Removed.
20684         (struct localvar_info):  New type.
20685         (localsvars, localvartable):  New buffers.
20686         (localvar_alloc, localvar_free):  New functions.
20687         (generate_bytecode_insns):  Handle local variables.
20688         (generate_classfile):  Write LocalVariableTable attribute.
20690 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20692         * jcf-io.c (open_in_zip): Check the zipfile magic number.
20693         * zipfile.h (ZIPMAGIC): New macro.
20695 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20697         * Makefile.in (gjavah.o): Updated dependencies.
20698         (jcf-dump.o): Likewise.
20699         (all.indirect): Use ../gjavah.
20700         (../gjavah$(exeext)): Likewise.
20701         (clean): Don't remove gjavah.
20702         (clean): Remove parse.c, not java/parse.c.
20703         * Make-lang.in (java): Added gjavah.
20704         (gjavah$(exeext)): New target.
20705         (GJAVAH_SOURCES): New macro.
20706         (java.all.build): Added gjavah.
20707         (java.all.cross): Likewise.
20708         (java.rest.encap): Likewise.
20709         * config-lang.in (compilers, stagestuff): Added gjavah.
20711 1998-07-23  Tom Tromey  <tromey@cygnus.com>
20713         * gjavah.c (java_float_finite): New function.
20714         (java_double_finite): Likewise.
20715         (F_POSITIVE_INFINITY): New macro.
20716         (F_NEGATIVE_INFINITY): Likewise.
20717         (F_NAN): Likewise.
20718         (D_POSITIVE_INFINITY): Likewise.
20719         (D_NEGATIVE_INFINITY): Likewise.
20720         (D_NAN): Likewise.
20721         (print_field_info): Use java_float_finite and java_double_finite.
20723 1998-07-23  Per Bothner  <bothner@cygnus.com>
20725         * parse.y (method_header):  Name "this" implicit argument.
20727 1998-07-22  Per Bothner  <bothner@cygnus.com>
20729         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
20730         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
20731         (put_linenumber):  New function.
20732         (generate_bytecode_insns, generate_classfile):  Write line numbers.
20734 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20736         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20737         (lookup_name, build_known_method_ref, build_class_init,
20738         build_invokevirtual, invoke_build_dtable, match_java_method,
20739         build_field_ref, pushdecl_force_head, build_java_binop,
20740         binary_numeric_promotion, build_decl_no_layout,
20741         build_java_arrayaccess, build_newarray, build_anewarray,
20742         build_java_array_length_access, build_java_arraynull_check): New
20743         extern function prototypes.
20744         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20745         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20746         java-tree.h.
20747         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20748         to NULL
20749         * jcf.h (jcf_out_of_synch): New extern function prototype.
20750         * parse.h: Static/global function implemented in parse.y
20751         prototyped and declarations moved at the end of the file.
20752         (DECL_P): Check that the argument isn't null.
20753         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20754         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20755         (QUAL_DECL_TYPE): New macro.
20756         (PARAMS): Macro definition removed.
20757         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20758         (return_statement:): Call build_return.
20759         (field_access:): Call make_qualified_primary in sub rule.
20760         (method_invocation:): Build method invocation and call
20761         make_qualified_primary when processing primaries.
20762         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20763         get_type_from_signature.
20764         (java_check_regular_method): Extra integer 0 argument when calling
20765         lookup_java_method2.
20766         (lookup_java_interface_method2): Extra method DECL argument when
20767         calling lookup_java_interface_method2.
20768         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20769         COMPOUND_EXPR node.
20770         (java_complete_expand_method): Layout current class iff not
20771         already done. Don't process interface's methods.
20772         (java_complete_expand_method): Use super class only if it
20773         exists. Use current class otherwise.
20774         (make_qualified_primary): New function.
20775         (resolve_expression_name): Process qualified expression or
20776         expression from primary the same way.
20777         (resolve_expression_name): Two last arguments to
20778         resolve_field_access are now NULL_TREEs.
20779         (resolve_field_access): New variable is_static. Local field must
20780         be DECLs. is_static computed on field DECLs only. Append code in
20781         where_found to the field access if necessary. Use QUAL_DECL_TYPE
20782         to initialize field_type.
20783         (resolve_qualified_expression_name): New local variable,
20784         previous_call_static and is_static. Handle primaries with function
20785         calls, casts, array references and `this'. `super' now handled as
20786         `(super_class)this'. Use is_static to clarify boolean expressions.
20787         Added code to handle case where a proper handle is required to
20788         access a field. Use QUAL_DECL_TYPE where applicable.
20789         (maybe_access_field): New function.
20790         (patch_method_invocation_stmt): New arguments primary, where,
20791         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20792         deleted. Use `where' as a type to search from if specified. Check
20793         for static method reference where forbidden. Append primary or
20794         current_this to the argument list if not calling constructor nor
20795         static methods.
20796         (check_for_static_method_reference): New function.
20797         (patch_invoke): Layout the class on which new is done if
20798         necessary.
20799         (lookup_method_invoke): Changed format to report errors on
20800         methods.
20801         (qualify_ambiguous_name): New local variable this_found. Now
20802         handle things from primaries. Method call are considered
20803         expression names.
20804         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20805         changed into NULLs.
20806         (not_initialized_as_it_should_p): Comply with the new DECL_P.
20807         (java_complete_tree): New case fo RETURN_EXPR. Process function
20808         call arguments in separate function.
20809         (complete_function_arguments): New function.
20810         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20811         anymore.
20812         (patch_assignment): Take the return function slot into account as
20813         a RHS. Distinguish assignment from a return.
20814         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20815         when checking methods in interfaces.
20816         (resolve_type_during_patch): NULL argument to unresolve_type_p
20817         instead of NULL_TREE.
20818         (patch_newarray): Fixed typo in comment.
20819         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20820         (build_return, patch_return): New functions.
20821         * typeck.c (lookup_java_constructor): Fixed typo in comment.
20823 1998-07-21  Per Bothner  <bothner@cygnus.com>
20825         * constants.c (find_name_and_type_constant, find_fieldref_index,
20826         find_methodref_index):  New methods.
20827         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
20828         just return given method.  Also, rename to build_known_method_ref.
20829         (expand_invoke):  Rename call to build_invoke_non_interface.
20830         * java-tree.h, parse.h:  Update prototype.
20831         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
20832         (such as expand_expr_stmt) if flag_emit_class_files.
20833         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20834         STACK_TARGET, IGNORE_TARGET):  New macros.
20835         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
20836         (generate_bytecode_insn):  New function to generate method's bytecode.
20837         (generate_classfile):  Node generate Code attribute for a method.
20838         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20839         push_long_const, field_op, adjust_typed_op, maybe_wide):
20840         New functions used by generate_bytecode_insn.
20842         * typeck.c (signature_include_return):  Remove variable.
20843         (push_java_argument_signature, build_java_argument_signature):  New.
20844         (build_java_signature):  Use push_java_argument_signature.
20845         * parse.y:  Use build_java_argument_signature instead of fiddling
20846         with signature_include_return.
20848 1998-07-17  Tom Tromey  <tromey@cygnus.com>
20850         * gjavah.c (print_c_decl): Always generate JArray<>* for array
20851         types.
20853         * Makefile.in (all.indirect): Added gjavah$(exeext).
20854         (gjavah$(exeext)): Added $(exeext).
20855         (clean): Likewise.
20857 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20859         * class.c (layout_class): Call to java_layout_parsed_class replace
20860         by safe_layout_class.
20861         * expr.c (build_java_array_length_access): Removed static storage
20862         class in the function definition.
20863         (build_java_arraynull_check): Likewise.
20864         Also fixed typos in two comments.
20865         * lex.c (java_init_lex): Initialize static global kw_length.
20866         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20867         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20868         java_lex_error.
20869         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20870         * parse.h (resolve_no_layout): New static function declaration.
20871         (get_identifier_in_static): Declaration removed.
20872         (java_layout_parsed_class): Function name declaration changed to
20873         safe_layout_class.
20874         (build_newarray_node, patch_newarray, resolve_type_during_patch,
20875         not_initialized_as_it_should_p, build_this): New static function
20876         declarations.
20877         (pushdecl_force_head, build_java_binop, int_fits_type_p,
20878         binary_numeric_promotion, stabilize_reference,
20879         build_decl_no_layout, build_java_arrayaccess): Extern function
20880         declarations moved into their own section.
20881         (build_newarray, build_anewarray, build_java_array_length_access,
20882         build_java_arraynull_check): New extern function declarations.
20883         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20884         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20885         fake tree codes.
20886         (CALL_CONSTRUCTOR_P): New macro.
20887         * parse.y (kw_length): New static global tree node.
20888         (return_statement): Tagged <node>.
20889         (RETURN_TK): Tagged <operator>.
20890         (variable_declarator_id:): Build variable declaration with an
20891         empty initialization value if a syntax error was found in the
20892         initialization part of the variable declaration.
20893         (statement_without_trailing_substatement:): return_statement: now
20894         uses the default rule.
20895         (return_statement:): Temporarily fixed to return NULL_TREE.
20896         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20897         (class_instance_creation_expression:): Class creation rules now
20898         call build_method_invocation upon reduction.
20899         (array_creation_expression:): Rules call build_newarray_node upon
20900         reduction.
20901         (dim_exprs:): Build a list of dimension expressions.
20902         (dim_expr:): Store location of the OSB_TK in the dimension
20903         expression node.
20904         (method_invocation:): Added a new error rule.
20905         (build_unresolved_array_type): WFL argument may also be an array
20906         on a primitive type. Name of the argument changed to reflect this.
20907         (method_declarator): Insert argument type at the beginning of the
20908         argument type list and later reverse the list.
20909         (unresolved_type_p): Argument 'returned' may be optionally
20910         NULL_TREE.
20911         (java_layout_class_from_source): Function renamed
20912         safe_layout_class.
20913         (resolve_and_layout): Now call resolve_no_layout and
20914         safe_layout_class.
20915         (resolve_no_layout): New function.
20916         (purify_type_name): New function.
20917         (complete_class_report_errors): Call purify_type_name during error
20918         report on a type not found.
20919         (process_imports): error_found local variable doesn't need to be
20920         initialized to zero.
20921         (declare_local_variables): New local type_wfl. Fixed typo in error
20922         message. type_wfl assigned to unresolved type and used to register
20923         incomplete type. Build a WFL around the variable initialization
20924         statement so that debug info can be generated on it.
20925         (source_start_java_method): Reverse argument list after they've
20926         been processed.
20927         (current_this): New static global variable.
20928         (java_complete_expand_methods): Set current_this when appropriate.
20929         (resolve_expression_name): Build correct static and non static
20930         field access bearing a simple name.
20931         (resolve_field_access): Resolve the length field of arrays. Handle
20932         f.m() cases.
20933         (patch_method_invocation_stmt): Set the type of the method
20934         invocation to error_mark_node. This value is later overridden by a
20935         valid type, if any. Don't handle qualified constructor invocation
20936         as qualified method invocation. Call lookup_method_invoke with its
20937         new flag. It's no longer necessary to access the selected method
20938         as the value of a tree list. Handle constructor invocation.
20939         (patch_invoke): Reverse argument list when invoking non interface
20940         methods. Insert call to new as the first argument of the
20941         constructor.
20942         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20943         defined within a final class. Return INVOKE_STATIC if the invoked
20944         method is a constructor.
20945         (lookup_method_invoke): New lc argument is a flag to indicate a
20946         constructor lookup. Now handle constructor lookup. Choose the most
20947         specific method in case several were matching the invocation
20948         requirements. Return a method decl instead of a tree list featuring
20949         one single method decl element.
20950         (refine_accessible_methods_list): New lc flag argument to
20951         indicate that a constructor is being looked up.
20952         (not_initialized_as_it_should_p): New function.
20953         (java_complete_tree): Now process fake tree codes
20954         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20955         save_expr on resolved function call arguments. Case on
20956         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20957         (patch_assignment): LHS can be a field access expression. When
20958         dealing with reference, lhs_type is the promoted type of the
20959         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20960         applicable.
20961         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20962         (patch_binop): Use not_initialized_as_it_should_p where
20963         applicable.
20964         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20965         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20966         where applicable.
20967         (resolve_type_during_patch): New function.
20968         (patch_cast): Call resolve_type_during_patch to resolve type and
20969         report error accordingly.
20970         (patch_array_ref): Use not_initialized_as_it_should_p where
20971         applicable. Array base expression is saved before being
20972         used. Promote the type of an array elements if it contains non
20973         builtin types.
20974         (build_newarray_node, patch_newarray, build_this): New functions.
20976 1998-07-16  Tom Tromey  <tromey@cygnus.com>
20978         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20979         increment it in `for' statement.
20980         (print_field_info): If number is inf or nan, don't print it.
20981         (print_method_info): If method name is `delete', just ignore it.
20982         (print_c_decl): Special-case jstringArray.
20984         * gjavah.c (help): New function.
20985         (no_argument): New function.
20986         (usage): Changed text.
20987         (main): Rewrote argument handling.  Now handles -v, --help,
20988         --version.
20989         (version): New function.
20990         (found_error): New global.
20991         (main): Return found_error.
20992         (generate_access): Set found_error.
20993         (print_c_decl): Likewise.
20995 1998-07-15  Tom Tromey  <tromey@cygnus.com>
20997         * gjavah.c (print_c_decl): Don't print "," when examining field.
20998         Skip type name when looking at "[L" types.
20999         (process_file): Now static.
21000         (generate_access): Now returns int.
21001         (last_access_generated): New global.
21002         (process_file): Clear last_access_generated; make multiple passes
21003         over the class.
21004         (print_field_info): Just return if generate_access returns true.
21005         (print_method_info): Likewise.  Also, allow <init> functions to
21006         pass through.
21007         (print_c_decl): Added is_init argument.  Print constructors
21008         properly.
21009         (print_cxx_classname): Use UTF8_GET to extract characters from
21010         string.
21011         (print_base_classname): New function.
21012         (print_class_decls): New function.
21013         (process_file): Use it.
21014         (utf8_cmp): New function.
21016 1998-07-13  Nick Clifton  <nickc@cygnus.com>
21018         * lang-options.h: Format changed to match changes in gcc/toplev.c
21019         to implement a --help option.
21021 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
21023         * decl.c (init_decl_processing): Revert change to dtable_type.
21025 1998-07-09  Per Bothner  <bothner@cygnus.com>
21027         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
21029 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
21031         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
21033         * lang.c (lang_init): Default flag_exceptions to 1, without
21034         checking to see if it's 2 first.
21036 1998-07-08  Jeffrey A Law  (law@cygnus.com)
21038         * constants.c: Include "system.h".
21039         * decl.c: Likewise.
21040         * lang.c (flag_new_exceptions): Get via extern now.
21041         (lang_init_options): New functions.  Turn on flag_new_exceptions.
21043 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21045         * lex.c (java_lex): Return 0 when we see an invalid character in
21046         the input.
21048         * lex.c (java_read_char): Specify extra argument when calling
21049         java_lex_error.
21050         (java_read_unicode, java_parse_end_comment,
21051         java_parse_escape_sequence): Likewise,
21052         (java_lex): Specify extra argument when calling
21053         java_lex_error. Test that IDs are beginning with a legal character
21054         for IDs. Handle invalid characters with an error message and a
21055         call to java_lex_error.
21056         (java_lex_error): Adjust column position by new argument
21057         `forward'. Issue an error even if in the middle of reporting an
21058         other error.
21060 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
21062         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
21063         we don't explicitly put a null pointer when we're copying it.
21065 1998-07-07  Tom Tromey  <tromey@cygnus.com>
21067         * gjavah.c (print_cxx_classname): New function.
21068         (super_class_name): Likewise.
21069         (print_super_fields): Removed.
21070         (in_super): Removed.
21071         (print_field_info): Never generate #defines.
21072         (print_c_decl): Changed generated types to match JNI.  No longer
21073         print class name before method name.
21074         (print_method_info): Print "static" before static methods.
21075         Print "virtual" before non-final methods.
21076         (usage): Use exit(1), not exit(-1).
21077         (main): Likewise.
21078         (print_field_info): Use %.17g to print a double.
21079         (last_access): New globals.
21080         (process_file): Initialize last_access.
21081         (usage): Now static.
21082         (ACC_VISIBILITY): New define.
21083         (generate_access): New function.
21084         (print_field_info): Call it.
21085         (print_method_info): Likewise.  Also, generate information for all
21086         methods, not just native methods.  Return void.
21087         (print_c_decl): Return void.
21088         (print_field_info): Return void.
21090 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21092         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
21093         processing the jc1 grammar file. Prefix bison functions and
21094         variables with java_.
21095         (parse.c): Dependencies on parse.h and lex.h
21096         * expr.c (build_java_arrayaccess): Function now global.
21097         * java-tree.h: Comment reorganized to carry on previous
21098         classification effort.
21099         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
21100         RESOLVE_TYPE_NAME_P): New flags on WFLs.
21101         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
21102         java_parse (new prefix java_ generated by bison).
21103         (java_layout_parsed_class, java_register_parsed_class): Function
21104         call removed.
21105         (yyparse): Removed unnecessary call to init_outgoing_cpool.
21106         * lex.c (static tree wfl_op): Variable deleted.
21107         (java_init_lex): Initialize kw_super and kw_this. Initialize more
21108         ctxp fields to NULL_TREE.
21109         (java_lex): No longer create WFL for operators. Filename caching
21110         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
21111         created as STRING_CST and later expanded. Removed extra argument
21112         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
21113         and SUPER.
21114         (build_wfl_node): Removed code in comments.
21115         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
21116         store token and location data in the current bison token.
21117         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
21118         static/extern function declaration at the beginning of the file.
21119         (struct qualification): Data structure definition deleted.
21120         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
21121         (qualify_ambiguous_name): Function declaration modified. Function
21122         now returns nothing.
21123         (build_array_ref, patch_array_ref, make_qualified_name,
21124         resolve_qualified_expression_name, maybe_generate_clinit,
21125         resolve_field_access): New static function declarations.
21126         (build_java_arrayaccess): New extern function declaration.
21127         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
21128         (CALL_EXPR_PRIMARY): Macro deleted.
21129         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
21130         (struct parser_ctxt): Field initialized_final
21131         removed. non_static_initialized, static_initialized: New fields.
21132         * parse.y (static tree kw_super, static tree kw_this): New global
21133         static.
21134         (%union): tree wfl field of operator member replaced by int
21135         location. WFLs are non longer created for operators.
21136         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
21137         (qualified_name:): Now calls make_qualified_name to build the
21138         identifier.
21139         (type_declaration:): Consider generating <clinit> when class
21140         parsing completed.
21141         (variable_declarator:): Directly build an assignment node when the
21142         variable is initialized when declared.
21143         (this_or_super:): Build a WFL and set current location when THIS
21144         or SUPER are parsed.
21145         (expression_statement:): Wrap statement around a WFL.
21146         (primary_no_new_array:): Fixed typo. Changed value returned by
21147         THIS_TK because of its new type (temporary).
21148         (dim_exprs:): Temporary fix because of OSB_TK's new type.
21149         (field_access:): Build qualified name with SUPER.
21150         (method_invocation:): Fixed returned value because of SUPER's new
21151         type.
21152         (array_access:): Use OSB_TK location information.
21153         (post_increment_expression:, post_decrement_expression:,
21154         unary_expression:, pre_increment_expression:,
21155         pre_decrement_expression:, unary_expression_not_plus_minus:,
21156         cast_expression:, multiplicative_expression:,
21157         additive_expression:, shift_expression:, relational_expression:,
21158         equality_expression:, and_expression:, exclusive_or_expression:,
21159         inclusive_or_expression:, conditional_and_expression:,
21160         conditional_or_expression:, assignment:): Use new location/token
21161         information available on operators.
21162         (create_class): Set super_decl_type to NULL_TREE when processing
21163         java.lang.Object.
21164         (register_fields): Field initialization is now a MODIFY_EXPR
21165         node. Chain initialization code to the matching lists (according
21166         to the field declaration modifiers).
21167         (maybe_generate_clinit): New function.
21168         (method_header): Don't set method's DECL_NAME to a WFL when adding
21169         methods to java.lang.Object.
21170         (resolve_and_layout): Now can return NULL_TREE if the type
21171         resolution fails. Otherwise, return the class DECL instead of its
21172         TYPE.
21173         (check_method_redefinition): Don't patch method DECL_NAME if it
21174         belongs to java.lang.Object.
21175         (process_imports): Simply assign error_found to the value returned
21176         by check_pkg_class_access.
21177         (declare_local_variables): Don't use their init statements (if
21178         any) when parsing error were previously found. Reuse MODIFY_EXPR
21179         build during parsing as an init statement.
21180         (java_method_add_stmt): Now return the current method body.
21181         (java_layout_parsed_class, java_register_parsed_class): Functions
21182         removed.
21183         (java_complete_expand_methods): Initialize the constant pool on a
21184         per class basis. Layout the classes before expanding their method
21185         bodies. Don't try expand artificial constructor code if error were
21186         found. Make the classes data and register them if no error were
21187         found.
21188         (java_complete_expand_method): Retrieve an artificial constructor
21189         argument list before entering its body. Assign the top block to
21190         the artificial constructor function body and set types of declared
21191         blocks and compound statements to void. Walk method body if not an
21192         artificial constructor.
21193         (make_qualified_name, cut_identifier_in_qualified): New functions.
21194         (resolve_expression_name): Fixed comments. Save/restore the
21195         current class CLASS_LOADED_P flag value. Build non qualified
21196         static field access and handle qualified expression names.
21197         (resolve_field_access, resolve_qualified_expression_name): New
21198         functions.
21199         (patch_method_invocation_stmt): Use the new expression resolution
21200         scheme, calling resolve_field_access when the function call is
21201         resolved as an expression.
21202         (qualify_ambiguous_name): Function rewritten to work on qualified
21203         expression produced by make_qualified_name.
21204         (java_complete_tree): Promote type when function's argument are
21205         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
21206         the assignment to discover further errors if RHS is a expression
21207         name that fails to evaluate. Declare LHS initialized even though
21208         the assignment failed. Don't use the location variable and removed
21209         extra argument in patch function calls. Now handle the ARRAY_REF
21210         case and build internal string representation when STRING_CSTs are
21211         walked.
21212         (build_method_invocation): Don't wrap function call around a WFL.
21213         (build_assignment): Likewise. Use the operator location
21214         information.
21215         (patch_assignment): Handle array access LHSs. Handle error
21216         provenance, resulting in a better error report.
21217         (build_binop): Use op_location from operator as binop location
21218         information.
21219         (build_unaryop, build_incdec, build_cast): Likewise.
21220         (patch_binop): Extract location information from the node. Fixed
21221         typo in error message.
21222         (patch_unary_op): Extract location information from the node.
21223         (build_array_ref, patch_array_ref): New functions.
21225 1998-07-01  Tom Tromey  <tromey@cygnus.com>
21227         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
21228         match _Jv_IsInstanceOf.
21229         * decl.c (init_decl_processing): Use _Jv_NewArray, not
21230         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
21232 1998-06-30  Tom Tromey  <tromey@cygnus.com>
21234         * decl.c (init_decl_processing): Functions are now named
21235         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
21237 1998-06-29  Per Bothner  <bothner@cygnus.com>
21239         * java-tree.h (load_class):  Add prototype.
21240         * class.c (is_compiled_class):  Add missing arg to load_class.
21241         * expr.c (expand_java_NEW):  Call load_class.
21242         * parse.y (process_import):  Removed bogus use of void return value.
21244 1998-06-25  Per Bothner  <bothner@cygnus.com>
21246         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
21247         Function name is "_Jv_Throw" instead of "soft_athrow".
21248         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
21249         Function name is "_Jv_AllocObject" instead of "soft_new".
21250         Takes an extra parameter (object size).
21251         * expr.c:  Update calls.
21253 1998-06-24  Per Bothner  <bothner@cygnus.com>
21255         * lex.c (java_get_line_col):  Handle end-of-file.
21256         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
21258 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
21260         * lang.c (lang_init): Make -fexceptions the default.
21261         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
21262         exception handling is not turned on.
21264 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
21266         * lang.c (flag_new_exceptions): Make this this default.
21267         * decl.c (end_java_method): Call emit_handlers.
21268         * except.c (method_init_exceptions): Set language code and version.
21269         (expand_start_java_handler): Enable exception, and call
21270         expand_eh_region_start.
21271         (expand_end_java_handler): Enable exception, and set up catch blocks.
21272         (emit_handlers): New routine to generate the saved handlers.
21273         * java-except.h (emit_handlers): Add prototype.
21275 1998-06-12  Per Bothner  <bothner@cygnus.com>
21277         We used to have three different representations of the constant pool:
21278         the CPool structure, the tree_constant_pool, and the constructures
21279         used to build the Class object (which may need class and string
21280         constants) in compiled code.  None were appropriate for compiling
21281         to .class files, so I did a major overhaul.
21283         First, the tree_constant_pool array was removed.  Things were
21284         modified to the CPool structure in the JCF could be used.
21285         Second, a "capacity" field was added to the CPool, and functions
21286         written to search for a matching constant, adding one if not found.
21287         The code that generated the Class object was changed to use a CPool.
21288         The actual TREE_LISTs used to build the CONSTRUCTORs used for
21289         the static Class object are now only in build_constants_constructor.
21290         Finally, I wrote code which can generate a .class file (including its
21291         constant pool) from the RECORD_TYPE of a class.  This is a big step
21292         on the way to compiling Java source into .class files.
21294         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
21295         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
21297         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21298         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
21299         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21300         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21301         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
21302         (lang_type):  Removed constant_pool field.
21303         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
21304         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21305         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
21306         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21308         * constants.c (current_constant_pool_tags, current_constant_pool_data,
21309         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21310         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
21311         (set_constant_entry, find_constant1, find_constant2,
21312         find_class_constant, count_constant_pool_bytes, write_constant_pool,
21313         find_utf8_constant, find_class_or_string_constant):  New functions.
21315         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
21316         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
21317         (give_name_to_class, get_class_constant):  Likewise.
21318         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
21319         (get_name_and_type_constant, get_ref_constant):  Removed.
21320         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
21321         * parse.y:  Don't save/restore tree_constant_pool.
21322         * verify.c (verify_jvm_instructions):  Update for new approach.
21323         * expr.c (expand_invoke, expand_java_field_op): Likewise.
21325         * lang-options.h:  Added -femit-class-file, -femit-class-files.
21326         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
21327         (lang_f_options):  Added "emit-class-file(s)".
21329         * expr.c (build_java_arrayaccess):  Generate more efficient array
21330         bounds checking, by using unsigned compare.
21332         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
21334 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21336         * parse.h: New comment on the handling of unresolved type
21337         identifiers. JDEPs are now part of the jdep_code enum.
21338         (typedef struct jdep): Now use enum jdep_code or int, depending on
21339         availability. Both are narrowed down to an 8 bits bitfield.
21340         (CALL_EXPR_PRIMARY): Fixed comment.
21342 1998-06-10  Tom Tromey  <tromey@cygnus.com>
21344         * Make-lang.in (java): Added gjavac and jvgenmain.
21345         (java.start.encap): Depend on gjavac.
21346         (java.rest.encap): Depend on jvgenmain.
21348         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21349         (JAVA_CROSS_NAME): Likewise.
21350         (java.all.build): Depend on jvgenmain and gjavac.
21351         (java.all.cross): Depend on jvgenmain and gjavac-cross.
21352         (jvgenmain$(exeext)): New target.
21353         (java.install-common): Wrote.
21354         * config-lang.in (compilers, stagestuff): Added gjavac and
21355         jvgenmain.
21357 1998-06-10  Dave Brolley  <brolley@cygnus.com>
21359         * lang.c (lang_decode_option): New argc/argv interface.
21361 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21363         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21364         * decl.c (build_decl_no_layout): New function.
21365         * expr.c (java_lang_expand_expr): Layout declarations found in
21366         blocks before they're pushed.
21367         * jcf-parse.c (load_class): Save current line when parsing class
21368         file.
21369         (parse_source_file): Register class before expanding their
21370         methods.
21371         * lang.c (put_decl_node): Produce `null' when `void *' is
21372         processed.
21373         * lex.c (static tree wfl_op): New static global, for error report
21374         on casts.
21375         (java_init_lex): wfl_operator and wfl_op initialized
21376         here. Filename caching added for wfl_op. Return wfl_op when `(' is
21377         parsed.
21378         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21379         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21380         build_unresolved_array_type): New static function definitions.
21381         (build_decl_no_layout): New extern function declared.
21382         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21383         faulty modifier exists.
21384         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21385         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21386         (UNARY_PLUS_EXPR): New fake operator.
21387         (struct parser_ctxt): New field osb_number.
21388         * parse.y (static tree wfl_operator): New static WFL for operator
21389         bound error messages.
21390         (DECR_TK, INCR_TK): Moved.
21391         (OP_TK): Tagged <operator>.
21392         (array_type:): Now call build_unresolved_array_type.
21393         (dim_expr:): Count the number of '[' seen.
21394         (post_increment_expression, post_decrement_expression,
21395         pre_increment_expression, pre_decrement_expression,
21396         unary_expression_not_plus_minus, unary_expression:): Actions are
21397         now building the corresponding unary expressions.
21398         (cast_expression:): Actions are now building cast expressions.
21399         (build_unresolved_array_type): New function.
21400         (create_interface): Reset the number of declared interfaces.
21401         (create_class): Likewise.
21402         (method_header): Methods declared within the scope of an interface
21403         are now implicitly set public and abstract.
21404         (java_complete_class): Variable's and parameter's type are patched
21405         with a promoted type.
21406         (declare_local_variables): Resolved non builtin types are promoted
21407         before being used to build a variable decl. Removed type patch
21408         posted on variable initialization statement.
21409         (source_start_java_method): Use build_decl_no_layout to build the
21410         decl of a parameter of incomplete type.
21411         (java_register_parsed_class): Process interfaces too. Call
21412         rest_of_decl_compilation on each processed class declarations.
21413         (java_complete_expand_methods): Don't attempt to expand things in
21414         interfaces.
21415         (java_complete_tree): Process CONVERT_EXPR, even though it always
21416         has a type. Propagate error_mark_node to node's type too. Promote
21417         method's call argument type and return error_mark_node if
21418         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21419         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21420         handle unary operator nodes.
21421         (build_assignment): Added comment.
21422         (print_int_node): New function.
21423         (patch_assignment): New second argument. New error handling. Use
21424         print_int_node. Handle references. Use can_cast_to_p to issue
21425         different error message according to the context and check upon
21426         the initialization of the RHS.
21427         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21428         (operator_string): Handle more operators.
21429         (patch_binop): No longer use a function static
21430         wfl_operator. Improved error message on shift distance.
21431         (build_unaryop, build_incdec, build_cast, patch_unaryop,
21432         patch_cast): New functions.
21434 1998-06-05  Per Bothner  <bothner@cygnus.com>
21436         * jvspec.c:  New file.
21437         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
21439         * java-tree.h (identifier_subst):  Add declaration.
21441 1998-06-04  Tom Tromey  <tromey@cygnus.com>
21443         * jvgenmain.c (main): Generate call to JvRunMain.
21445         * class.c (make_class_data): Push value for "sync_info" field.
21446         * decl.c (init_decl_processing): Push "sync_info" field.
21448 1998-06-03  Per Bothner  <bothner@cygnus.com>
21450         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
21451         Java (source) name, not signature.
21452         Set TYPE_ALIGN to (at least) that of element_type.
21454 1998-06-02  Per Bothner  <bothner@cygnus.com>
21456         * class.c:  Moved classname-mangling-rekated code to ...
21457         * mangle.c:  ... this new file.
21458         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
21459         * Makefile.in:  Update for above changes.
21461 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21463         * expr.c (truthvalue_conversion): Convert integer and floating
21464         point value to their truth value.
21465         * lex.c (java_lex): Handle the `null' literal.
21466         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21467         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21468         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21469         New macros.
21471         * parse.y: Reorganization/documentation on token declaration.
21472         (binop_lookup[]): New added new tree codes.
21473         (relational_expression): Build corresponding binary operators.
21474         (equality_expression, conditional_and_expression,
21475         conditional_or_expression): Likewise.
21476         (java_complete_class): Fix crash in debug message.
21477         (java_complete_tree): Check initialization of method call
21478         arguments. Further bogus node evaluation to detect more error
21479         during assignments. Handles more binary operators.
21480         (patch_assignment): Use DECL_P.
21481         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21482         code.
21483         (operator_string): Handle more case. Compacted source.
21484         (patch_binop): Changed function comment. Checking for
21485         uninitialized first operand takes the compound assignment into
21486         account and uses DECL_P. Checking for uninitialized second operand
21487         delayed to routine's end. Use macros to issue type bound error
21488         messages and issue messages on both operands if their types are
21489         different. Force fixed type into node. Handle all binary
21490         operators.
21492 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21494         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21495         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21496         build operator node and return tokens.
21497         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21498         * parse.h (java_complete_tree): Changed returned type in prototype.
21499         (build_method_invocation, build_assignment, patch_assignment,
21500         patch_binop): New static function declarations.
21501         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21502         BUILD_EXPR_WFL): New macros.
21503         * parse.y (enum tree_code binop_lookup[]): New static for token to
21504         TREE_CODE lookup.
21505         (%union): Parser union has new sub-structure `operator'.
21506         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21507         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21508         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21509         ASSIGN_ANY_TK): Tokens tagged `operator'.
21510         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21511         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21512         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21513         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21514         (assignment_operator:): Rule tagged `operator'.
21515         (expression_statement:): Re-installed default rule.
21516         (method_invocation:): Sub rules call build_method_invocation.
21517         (postfix_expression:): Don't attempt to resolve name here. Just
21518         return an ID.
21519         (multiplicative_expression:): Sub-rules build corresponding binop
21520         expression node.
21521         (additive_expression:, shift_expression:, and_expression:,
21522         exclusive_or_expression:, inclusive_or_expression:): Likewise.
21523         (assignment:): Sub rule invoke build_assignment.
21524         (assignment_operator:): Default rules on sub rules.
21525         (force_error): Added documentation on this variable.
21526         (declare_local_variables): Build initialization calling
21527         build_assignment.
21528         (expand_start_java_method): Removed unused rtx declaration. Mark
21529         arguments as already initialized.
21530         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21531         (java_complete_expand_methods): Don't process next method if
21532         completion of the previous one triggered errors.
21533         (java_complete_expand_method): Call source_end_java_method if no
21534         error were found during completion.
21535         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21536         locals declaratilon. Handle names found within a class. Return
21537         error_mark_node when things aren't found.
21538         (patch_method_invocation_stmt): Return error_mark_node on failures.
21539         (patch_invoke): Removed unused local. Return the correct node.
21540         (java_complete_tree): Now returns a value. The BLOCK section binds
21541         local identifiers and the type of a BLOCK is now void. Assign the
21542         result of operand completion on COMPOUND_EXPR. Assign the
21543         encapsulated node of a WFL to the result of its completion, except
21544         when the node is an identifier. Now handle MODIFY_EXPR and several
21545         binary operators. Return error_mark_node on errors.
21546         (build_method_invocation, build_assignment, patch_assignment,
21547         build_binop, operator_string, patch_binop): New functions.
21548         * typeck.c (binary_numeric_promotion): New function.
21550 1998-05-21  Per Bothner  <bothner@cygnus.com>
21552         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
21553         Replace most uses of ident_subst by identifier_subst.
21555         * class.c (push_class_static_dummy_field):  Removed function.
21556         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
21557         instead of looking got "class" static field.  Create that decl here.
21558         (class_identifier_node):  Removed;  no longer needed.
21559         (init_class_processing):  Don't init class_identifier_node.
21560         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
21561         Do nreverse 0 times (instead of twice) for Object and Class.
21562         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21564 1998-05-20  Per Bothner  <bothner@cygnus.com>
21566         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
21567         while initializing linenumber_count and linenumber_table.
21568         Do it before init_function_start (which calls emit_line_note).
21569         * expr.c (expand_byte_code):  Don't need to clear lineno here.
21571 1998-05-18  Tom Tromey  <tromey@cygnus.com>
21573         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21574         then mangle number as _N_.
21576         * class.c (mangle_class_field): New function.
21577         (build_class_ref): Set assembler name of class reference using
21578         mangle_class_field.
21579         (push_class_static_dummy_field): Likewise.
21581 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
21583         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21584         of assigning to TREE_CODE.  The latter method exploits a feature
21585         of GCC that is not ANSI compliant.
21587 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21589         * decl.c (pushdecl_force_head): New function.
21590         (pushlevel): Removed conditional printf.
21591         (complete_start_java_method): Don't enter local variable scope if
21592         function is compiled from source code.
21593         * expr.c: parse.h now included
21594         (java_lang_expand_expr): New function.
21595         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21596         printf. Terminate buffer when doing directories.
21597         * jcf-parse.c (parse_source_file): Call lang_init_source before
21598         parsing and before code generation.
21599         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21600         use printf if the macro is defined.
21601         * lang.c (lang_init): Install lang_expand_expr hook on
21602         java_lang_expand_expr.
21603         (java_dummy_print): New function.
21604         (lang_init_source): New function.
21605         * lex.c (java_lex): Remember location of an opening brace at the
21606         second nesting level.
21607         (java_is_eol): Unget character seen after a CR if it is EOF.
21608         * parse.h: Now includes lex.h
21609         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21610         printf if the macro is defined.
21611         (expand_start_java_method, build_expr_block, enter_block,
21612         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21613         New static function declarations.
21614         (pushdecl_force_head): New extern function declaration.
21615         (INCOMPLETE_TYPE_P): New macro.
21616         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21617         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21618         BLOCK_EXPR_ORIGIN): New macros.
21619         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21620         DECL_SOURCE_LINE_LAST): New macros.
21621         (struct parser_ctxt): Removed field current_method_decl, redundant
21622         with the field current_function_decl. Added fields
21623         first_ccb_indent1 and pending_block.
21624         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21625         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21626         tagged <node>
21627         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21628         (compilation_unit:): Cosmetic on sub rule.
21629         (type_declaration:): Cosmetic on sub rules. Added an error rule.
21630         (variable_initializer:): Installed default rule on expression:.
21631         (method_declaration:): method_header: starts a new
21632         method. method_body: installs the function body, absorbs blocks
21633         emitted for temporary variable scopings, pops function's body block
21634         and merges function's last statement lineno in DECL_SOURCE_LINE.
21635         (method_body:): Installed default rules.
21636         (block:): Call enter_block when an opening brace is seen.  Absorb
21637         scoping blocks and call exit_block when a closing brace is seen.
21638         (block_statement:): Cosmetic changes.
21639         (method_invocation:): Create WFL around CALL_EXPR node.
21640         (patch_stage): Added comment around definition.
21641         (method_header): Try to use first_ccb_indent1 as the first line of
21642         the method, so BP debug info are emitted at the first opening
21643         brace of the function. If the function has no body, use the
21644         location of the function's name. Override currently defined method
21645         name with the matching WFL so we can point redefinition errors
21646         using the location where the function's name was declared.
21647         (check_abstract_method_header): Interprets DECL_NAME as an
21648         identifier or as a WFL, accordingly.
21649         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21650         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21651         location and name information out of it and reinstall DECL_NAME to
21652         its original identifier node value.
21653         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21654         function's source code).
21655         (read_import_dir): Test the value returned by find_class and issue
21656         a fatal accordingly.
21657         (declare_local_variables): Push a new block for the scope of the
21658         new variable(s) if code has been already generated at that nesting
21659         level. Pinpoint redefinition errors using the variable id
21660         WFLs. Generate initialization code if necessary. If the variable
21661         type is incomplete, register a patch on its decl.
21662         (source_start_java_method): Rewritten. Define a new block for the
21663         function's parameters. Build parameter decl out of function's
21664         arguments and register them for a patch if their types are
21665         incomplete.
21666         (expand_start_java_method): Includes the part of
21667         source_start_java_method that was pushing the parameter decls and
21668         completing the method start code.
21669         (source_end_java_method): Removed call the expand_end_bindings and
21670         poplevel (already taken care of). Reinstall function's arguments
21671         and get function's last line of code before calling
21672         expand_function_end.
21673         (java_method_add_stmt): New comment before the function's
21674         code. Complement the second operand of the current COMPOUND_EXPR
21675         if necessary.
21676         (java_complete_expand_methods): Don't generate debug info on line
21677         zero when expanding a generated constructor.
21678         (java_complete_expand_method): Set start and end line numbers for
21679         a artificially generated constructor to one and manually call
21680         enter_block and exit_block when defining it. For all methods:
21681         expand function's start calling the new expand_start_java_method
21682         and invoke java_complete_tree on the effective method's body, if
21683         any.
21684         (resolve_expression_name): Now use lookup_name_in_blocks to search
21685         local variable decls and print out an error when variables are
21686         undefined.
21687         (patch_method_invocation_stmt): Inserted comment before the
21688         function's code.
21689         (lookup_method_invoke): Chain method's arguments using chainon
21690         with the current arg list as a second argument. Inserted missing
21691         IDENTIFIER_POINTER when reporting an error on methods not found.
21692         (refine_accessible_methods_list): Don't retain constructors.
21693         (patch_arguments): Function removed.
21694         (java_complete_tree): Inserted comment before the function's
21695         code. New case for BLOCKs. Moved the WFL case a bit
21696         further. Complete function's arguments.
21697         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21698         maybe_absorb_scoping_blocks): New functions.
21700 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21702         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21703         previously set.
21704         * jcf-parse.c (parse_source_file, java_error_count): New forward
21705         and extern declarations.
21706         (java_parse_abort_on_error): Macro moved.
21707         (jcf_parse_source): fatal called if fopen fails. Now calls
21708         parse_source_file.
21709         (parse_source_file): New parse_only parameter. Reflects the
21710         elimination of the second pass.
21711         (yyparse): parse_source_file called with argument set to 0.
21712         * jcf.h (JCF_ZERO): Sets java_source to zero.
21713         * lex.c (java_init_lex): pass argument is gone. Function modified
21714         to be called once during the analysis of a file.
21715         (java_unget_unicode): Fixed typo in fatal message.
21716         (java_get_line_col): Likewise.
21717         (java_lval): Likewise. String literals no longer built during
21718         second pass.
21719         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21720         account.
21721         * parse.h (MODIFIER_WFL): New macro.
21722         (parse_check_super, parser_check_super_interface): Now return int.
21723         (parser_chain_incomplete_item, not_builtin_p,
21724         complete_method_decl): Declarations removed.
21725         (build_method_invocation_stmt, build_invoke): Renamed using the
21726         `patch' instead of `build'
21727         (register-incomplete_type, obtain_incomplete_type,
21728         java_complete_tree, java_complete_expand_method,
21729         unresolved_type_p, create_jdep_list): New function declarations.
21730         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21731         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21732         (jdep): New typedef on new struct _jdep.
21733         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21734         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21735         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21736         JDEP_RESOLVED_P): New macros.
21737         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21738         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21739         JDEP_VARIABLE): New enum values and jdep kinds.
21740         (jdeplist): New typedef on struct _jdeplist.
21741         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21742         macros.
21743         (CALL_EXPR_PRIMARY): New macro.
21744         (struct parser_ctxt): Fields java_pass, current_method_decl,
21745         method_decl_list deleted. New field jdeplist.
21746         (INCOMPLETE_P): Macro deleted.
21747         * parse.y (single_type_import_declaration:): Removed pass switch.
21748         (type_import_on_demand_declaration): Likewise.
21749         (field_declaration:): Removed pass switch on all sub rules.
21750         (class_declaration:): Call the complete_class_decl removed on
21751         class_body rules.
21752         (method_declaration:): Removed second pass switch. No longer chain
21753         methods decl when method_header reduced.
21754         (method_header:): Sub rules no longer depend on pass switch.
21755         (method_declarator:): Likewise.
21756         (method_body:): Likewise.
21757         (abstract_method_declaration:): Likewise.
21758         (block_statement:): Likewise.
21759         (local_variable_declaration:): Likewise.
21760         (argument_list:): Likewise.
21761         (method_invocation:): Likewise. Call to build_method_invocation_stmt
21762         removed. Partial CLASS_EXPR tree node built instead.
21763         (postfix_expression:): Removed pass switch on all sub rules.
21764         (java_pop_parser_context): Free classd_list content.
21765         (yyerror): Call obstrack_grow0 to finalize error message.
21766         (check_class_interface_creation): Comment modified to reflect new
21767         returned value meaning. Removed second pass switch. Return 1 if an
21768         error was found, 0 otherwise. Adjust pointer on filename if a
21769         leading path separator was found.
21770         (maybe_create_class_interface_decl): Removed first pass switch
21771         when linking the class decl to the class_list. Install a new
21772         jdep_list for the class.
21773         (add_superinterfaces): List of unresolved interfaces is
21774         gone. Unresolved interfaces are directly added to the current
21775         dependencies list.
21776         (create_interface): Second pass shortcut removed.
21777         ctpx->modifier_ctx access through MODIFIER_WFL.
21778         (create_class): Second pass shortcut removed. Call to
21779         register_incomplete_type replaces the call to
21780         parser_chain_incomplete_item.
21781         (complete_class_decl): Function removed.
21782         (duplicate_declaration_error): New way of retrieving redeclared
21783         item type.
21784         (register_fields): Call to lookup_modifier_cl replaced by
21785         MODIFIER_WFL. New way of handling unresolved type, using
21786         unresolved_type_p and obtain_incomplete_type.
21787         register_incomplete_type replaces call to parser_chain_incomplete_item.
21788         (patch_stage): New static global variable.
21789         (method_header): New way of handling unresolved type, using
21790         unresolved_type_p and obtain_incomplete_type. patch_stage used to
21791         indicates that the method decl needs to be patched.
21792         (check_abstract_method_header): Call to lookup_modifier_cl
21793         replaced by MODIFIER_WFL.
21794         (method_declarator): Incomplete argument type are registered
21795         calling register_incomplete_type. Patch on the declared method is
21796         issued in that case.
21797         (unresolved_type_p): New function.
21798         (parser_check_super_interface): New comment to reflect function's
21799         modified returned type (int). Function and has a new argument
21800         this_wfl. Call to parse_error_context uses this_wfl instead of
21801         relying on lookup_cl.
21802         (parser_check_super): Comment reflects function's new returned
21803         type (int). Function returns nonzero value on error.
21804         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21805         register_incomplete_type, jdep_resolve_class): New functions to
21806         handle incomplete types in declarations.
21807         (java_complete_class): Rewritten to work with the new incomplete
21808         type handling scheme.
21809         (complete_class_report_errors): Likewise.
21810         (complete_method_decl): Removed: it jobs is now handled by
21811         java_complete_class.
21812         (do_resolve_class): Class loaded in not already loaded and not
21813         found in Java source code.
21814         (java_check_regular_methods, java_check_abstract_methods): Don't
21815         call complete_method_decl anymore.
21816         (lookup_modifier_cl, not_builtin_p): Functions deleted.
21817         (read_import_dir): Got rid of the pass number dependency.
21818         (declare_local_variables): New handling of unresolved types (patch
21819         issued).
21820         (source_start_java_method): New parameter level. Function called
21821         with level set to 1 when argument types are potentially
21822         unresolved.  Called to complete the job with level set to 2 once
21823         types are complete.
21824         (source_end_java_method): Call to permanent_allocation
21825         removed. Waiting to be replaced by a more suitable obstack
21826         management.
21827         (java_complete_expand_methods, java_complete_expand_method,
21828         java_expand_finals): New functions.
21829         (build_method_invocation_stmt): Renamed
21830         patch_method_invocation_stmt. Extracts function call expression
21831         (wfl) and arguments (args) from CALL_EXPR tree operands.
21832         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21833         call. Patch the function and argument operand of the CALL_EXPR
21834         tree argument.
21835         (patch_argument, java_complete_tree): New functions.
21837 1998-04-20  Per Bothner  <bothner@cygnus.com>
21839         Recover from missing fields and methods (i.e. error instead of fatal).
21840         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
21841         * expr.c (expand_invoke):  Recover from missing method.
21842         (expand_java_field_op):  Recover from missing field.
21843         Inline references to java.lang.{Integer,Char,...}.TYPE.
21844         * typeck.c (get_type_from_signature), java-tree.h:  New function.
21845         * class.c (add_method):  Use get_type_from_signature.
21846         (build_class_ref):  Handle a class that was not found.
21847         * typeck.c (convert):  Handle conversion to pointers (for convenience).
21848         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
21849         instead of lookup_field to handle missing fields.
21851         * jcf-parse.c (process_zip_dir):  Set java_source.
21853 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
21855         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21857 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21859         * jcf-parse.c (load_class): Don't change input_filename before
21860         calling jcf_parse_source (but still do it before calling
21861         jcf_parse).
21862         (jcf_parse_source): Assign input_filename after having saved the
21863         parser context.
21864         * lex.c (java_init_lex): Chain a WFL node to the import on demand
21865         list. ctxp->modifier_ctx zeroed according to its new
21866         definition. ctxp->filename initialized. Removed
21867         JAVA_MODIFIER_CTX_UNMARK.
21868         (java_unget_unicode): Update the character based column position.
21869         (java_allocate_new_line): ref_count not used anymore. Always free
21870         ctxp->p_line. Initialize c_line->char_col to 0.
21871         (java_get_unicode): Update the character based column position.
21872         (java_lex): Use ctxp->elc to store current position in source
21873         file, at the beginning of the parsed token. Set modifier_ctx entry
21874         corresponding to the parse modifier to a WFL node. Return a WFL
21875         node when an identifier is parsed.
21876         (java_lex_error): Now uses ctxp->elc to store current position in
21877         source.
21878         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21879         * lex.h (build_wfl_node): New function definitions.
21880         (struct java_line): ref_count and next fields are gone. New field
21881         char_col.
21882         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21883         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21884         (JAVA_COLUMN_DELTA): New macro.
21885         (java_lc): New typedef on new struct _java_lc.
21886         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21887         (parse_error_context, parse_warning_context): Changed prototypes.
21888         (java_get_line_col): Added as an available global function.
21889         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21890         (IC_DECL): Replaced by macro IC_TYPE
21891         (DEPEND_WFL): New macro.
21892         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21893         wrong modifier.
21894         (exit_java_complete_class): Removed a commented out statement.
21895         (struct parser_ctxt): Added comments on fields. modifier_ctx is
21896         now an array of tree nodes. Deleted fields line_list and
21897         e_line. New field elc, to replace e_line.
21898         * parse.y (array_type:): Build WFL node.
21899         (qualified_name:): Build a single WFL node out of two. Retain
21900         the location information of the first node in the resulting node.
21901         (package_declaration:): Use package name as a WFL node
21902         (single_type_import_declaration:): Use imported name as a WFL node.
21903         (type_import_on_demand_declaration:): Use root of the imported
21904         packages as a WFL node.
21905         (field_declaration:): Removed unused local variable cl.
21906         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21907         (yyerror): New static elc. Removed static error_line, error_pos.
21908         New local code_from_source. Save ctxp->elc into elc at the first
21909         pass. Call java_get_line_col to get a string of the line where
21910         the error occurred.
21911         (debug_line): Removed static function.
21912         (parse_error_context, parse_warning_context): Parameter cl is now
21913         a WFL node. Use its value to initialize ctxp->elc.
21914         (redefinition_error): Parameter cl is now a WFL node.
21915         (parse_add_interface): New parameter wfl. No longer call
21916         lookup_cl, use wfl instead.
21917         (check_class_interface_creation): Parameter cl is now a WFL node.
21918         (maybe_create_class_interface_decl): Likewise.
21919         (add_superinterfaces): New function.
21920         (create_interface): Removed local cl, node, super_decl,
21921         super_decl_type.  Function now uses id as a WFL node. Better
21922         warning/error report on obsolete or forbidden mix of
21923         modifiers. Now calls add_superinterfaces to register interfaces.
21924         (create_class): Removed local cl, node. Local variable id is used
21925         as a WFL node. Better error report on forbidden modifier
21926         mix. Uses add_superinterfaces to register interfaces.
21927         (find_field): Argument cl is now a WFL node. Now store the WFL
21928         node of a fields that needs to be checked for their
21929         initialization.
21930         (method_header): Local variable node non longer used. Local
21931         variable id replaces cl.
21932         (check_modifiers_consistency): Local variable cl is now a WFL
21933         node.
21934         (method_declarator): Local variable cl replaced by parameter id.
21935         (parser_qualified_name): Now uses parameter name as a WFL node.
21936         (parser_check_super_interface): New parameter wfl, for achieve
21937         greater accuracy during error reports.
21938         (parser_chain_incomplete_item): New parameter named location. Used,
21939         along the decl, to construct the incomplete item node.
21940         (java_complete_class): resolve_class now uses WFL node extracted
21941         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21942         where appropriate.
21943         (complete_method_decl): Unresolved function's argument types are WFL.
21944         (resolve_class): Parameter cl is now a WFL node.
21945         (resolve_and_layout): Likewise.
21946         (do_resolve_class): Likewise. Try first to use cl and then do the
21947         lookup on the decl when calling check_pkg_class_access.
21948         (complete_class_report_errors): Use IC_TYPE in place of
21949         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21950         instead of doing a lookup over the decl.
21951         (java_check_final): Use WFL info from field tree list.
21952         (lookup_cl): Rewritten and returns a statically defined WFL node.
21953         (lookup_modifier_cl): Now uses information from WFL nodes.
21954         (process_imports): Likewise.
21955         (read_import_dir): name and cl arguments replaced by a single WFL
21956         node. Function modified accordingly.
21957         (find_in_imports_on_demand): Now uses WFL node.
21958         (check_pkg_class_access): cl argument is now a WFL node.
21959         (declare_local_variables): Fixed to use WFL nodes.
21960         (resolve_expression_name): Likewise.
21961         (build_method_invocation_stmt): name_combo argument renamed
21962         wfl. Function modified to use WFL nodes.
21963         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21964         (lookup_method_invoke): cl is now a WFL node. Added missing
21965         IDENTIFIER_POINTER to class type decl name.
21967 1998-04-14  Dave Brolley  <brolley@cygnus.com>
21969         * lang.c (init_parse): Now returns char* containing the filename.
21971 1998-04-10  Per Bothner  <bothner@cygnus.com>
21973         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
21975         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
21976         * class.c (make_class_data):  If flag_assume_compiled, initial class
21977         state is CSTATE_PREPARED; make superclass and interfaces direct
21978         references, rather than constant pool indexes.
21980 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21982         * parser.y: Include flags.h. Removed debug variable pl.
21983         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21984         (block:): Likewise.
21985         (labeled_statement_nsi:): Generate debug info when reducing
21986         expression_statement:.
21987         (check_pkg_class_access): get_access_flags_from_decl invocation
21988         fixed for new CLASS_* flags location.
21989         (source_end_java_method): Save/restore parser context when
21990         entering/leaving this routine. Restore lineno to its right value
21991         before calling expand_end_bindings.
21992         (build_method_invocation_stmt): build_invoke called with the
21993         current line information.
21994         (build_invoke): New argument cl. Wrap the function call around a
21995         wfl node.
21996         (refine_accessible_methods_list): Changed comment, removed
21997         unnecessary code.
21998         * parse.h: Fixed typo in comments.
21999         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
22000         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
22001         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
22002         parser_ccb_indent.
22003         * lex.c (java_lex): Record the last closing curly bracket of a
22004         function.
22005         * jcf-parse.c (jcf_parse_source): Now calls
22006         java_check_methods. Clarified comment, fixed typo.
22008 1998-04-09  Dave Brolley  <brolley@cygnus.com>
22010         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
22011         (finish_parse): Expose for non USE_CPPLIB builds.
22013 1998-04-08  Jeffrey A Law  (law@cygnus.com)
22015         * lang.c (lang_print_xnode): New function.
22017 1998-04-03  Per Bothner  <bothner@cygnus.com>
22019         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
22020         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
22021         used to build a class's dispatch table.
22022         (make_class_data):  Generate dispatch table if flag_assume_compiled.
22023         Set dtable of class object to address of class_dtable_decl.
22025         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
22026         be volatile and have side effects - generates better code.
22028         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
22029         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
22031         * expr.c (expand_invoke):  If class is final, method is
22032         effectively final, so can call it directly.
22034         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
22036         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
22038 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22040         * parse.y (build_method_invocation_stmt): Removed extra argument
22041         to build_invoke.
22043 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22045         * expr.c (dtable_indent): Now static global.
22046         (expand_invoke): Now call invoke_build_dtable and
22047         build_invokevirtual.
22048         (invoke_build_dtable, build_invokevirtual): New functions.
22049         * jcf-io.c (find_class): Defer issuing a warning by setting
22050         jcf->outofsynch to 1.
22051         * jcf-parse.c (jcf_out_of_synch): New function.
22052         (load_class): Test this_jcf.outofsynch flag and call
22053         jcf_out_of_synch accordingly.
22054         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
22055         comment indentation.
22056         * lex.c (java_get_unicode): Fixed code indentation.
22057         (java_lex): Create string literal. Fixed typo. Removed several
22058         premature obstack_free.
22059         * parse.h: New enums for name resolution and invocation mode.
22060         (struct qualification): New data structure.
22061         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
22062         (do_resolve_class, build_method_invocation_stmt,
22063         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
22064         debug_line, identical_subpath_p, invocation_mode,
22065         refine_accessible_methods_list, build_invoke,
22066         lookup_method_invoke): New functions declared.
22067         (build_invokevirtual, invoke_build_dtable, match_java_method,
22068         build_field_ref, jcf_out_of_synch): New references to external
22069         functions.
22070         (struct parse_ctxt): Removed artificial_constructor field.
22071         * parse.y: (array_type:): Type defined for this rule.
22072         (class_type:): Installed default rule for interface_type:.
22073         (array_type:): Now build Java array type.
22074         (qualified_name:): Now use obstack_grow0.
22075         (method_declaration:): Skip the artificial constructor added to
22076         the list, if any.
22077         (abstract_method_declaration:): Execute the code only during pass 1.
22078         (block:): Installed default rule in block_statements:.
22079         (block_statement:): Add the statement to the method during pass 2.
22080         (statement_expression): Installed default rule for
22081         method_invocation:.
22082         (argument_list:): Added code to build the argument list.
22083         (method_invocation:): Added call to create the method invocation
22084         node.
22085         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
22086         (debug_line): New function for debug.
22087         (complete_class_decl): No longer do something during pass 1.
22088         (method_header): Use BUILD_PTR_FROM_NAME.
22089         (parser_qualified_classname): Use obstack_grow0. Removed bogus
22090         obstack_free.
22091         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
22092         function's main comment.
22093         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
22094         classes.
22095         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
22096         (resolve_class): Now works with arrays.
22097         (do_resolve_class, resolve_and_layout): New functions.
22098         (java_check_regular_methods): Reverse method list before and after
22099         having processed it. No longer set ctxp->artificial_constructor.
22100         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
22101         accordingly. Fixed typo in issued error message. Now use
22102         obstack_grow0.
22103         (find_in_imports_on_demand): Now use obstack_grow0.
22104         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
22105         (source_end_java_method): Call expand_expr_stmt instead of
22106         expand_expr. Calls it before calling expand_function_end.
22107         (java_method_add_stmt): Do nothing if errors were found during
22108         parsing.
22109         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
22110         (build_method_invocation_stmt, build_invoke, invocation_mode,
22111         lookup_method_invoke, refine_accessible_methods_list,
22112         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
22113         New functions.
22114         * typeck.c (build_java_signature): Properly end method signature
22115         if return type skipped.
22116         (match_java_method): New function.
22118 1998-03-16  Per Bothner  <bothner@cygnus.com>
22120         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
22122 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22124         * expr.c (build_invoke_non_interface): New function.
22125         (methods_ident, ncode_ident): Now static globals.
22126         (expand_invoke): Use build_invoke_non_interface.
22127         * java-tree.h (struct lang_decl): New field function_decl_body.
22128         (DECL_FUNCTION_BODY): New macro.
22129         * jcf-parse.c (jcf_parse_source): Deeper check before setting
22130         CLASS_FROM_SOURCE_P.
22131         (parse_source_file): Fixed typos. Call java_layout_parsed_class
22132         before starting pass 2. Call to java_generate_parsed_class replaced
22133         by java_register_parsed_class.
22134         * lex.c: Fixed typo in header. Some line width related formating.
22135         * lex.h: Some line width related formating.
22136         * parse.h (source_end_java_method, resolve_expression_name,
22137         complete_class_decl, maybe_create_class_interface_decl,
22138         check_class_interface_creation): New static function declarations.
22139         (java_layout_parsed_class, java_method_add_stmt): New function
22140         declarations.
22141         (struct parser_ctxt): Field mark_class_generate removed. New
22142         fields class_list and artificial_constructor.
22143         * parse.y: Fixed typo in header.
22144         (class_declaration:): Call complete_class_decl when class body
22145         parsed.
22146         (method_declaration:): Call source_end_java_method in pass 2 when
22147         the method body is defined.
22148         (postfix_expression:): Do expression name resolution on sub-rule
22149         name during pass 2.
22150         (create_class, create_interface): Merged common pieces.
22151         (check_class_interface_creation, maybe_create_class_interface_decl):
22152         New functions.
22153         (complete_class_decl): New function.
22154         (register_fields): Fixed line width related typo.
22155         (method_header): Correctly skip first argument when fixing
22156         argument line. Changed the loop.
22157         (java_check_circular_reference): Now use ctxp->class_list.
22158         (java_complete_class): Removed start/stop marking.
22159         (java_check_regular_methods): Now takes a class decl as an
22160         argument.  Add default constructor if none were encountered.
22161         (java_check_methods): Now use ctxp->class_list. Changed call to
22162         java_check_regular_methods.
22163         (source_start_java_method): Set DECL_ARG_TYPE for each function
22164         arguments.
22165         (source_end_java_method, java_method_add_stmt): New functions.
22166         (java_generate_parsed_class): No longer exists.
22167         (java_layout_parsed_class, java_register_parsed_class): New functions.
22168         (resolve_expression_name): New function.
22170 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22172         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
22173         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
22174         until pass initializations are done. Call read_import_dir with
22175         pass set to 0.
22176         * parse.h: (lookup_modifier_cl): New function declared.
22177         (INTERFACE_FIELD_MODIFIERS): New macro.
22178         (OBSOLETE_MODIFIER_WARNING): New macro.
22179         * parse.y: (register_fields): Class type and current field name in
22180         local variables. Check modifier(s) if adding field(s) to an interface.
22181         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
22182         and report errors using the faulty modifier line context.
22183         (lookup_modifier_cl): New function.
22184         (read_import_dir): Detect and report default import processing
22185         failure.
22187 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
22189         Add a pair of -fassume-compiled/-fno-assume-compiled options.
22190         * class.c (is_compiled_class): Return 1 after making sure it
22191         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
22192         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
22193         * java-tree.h (flag_assume_compiled): Add decl.
22194         * lang.c (lang_f_options): Add the flag.
22195         (flag_assume_compiled): Add decl, default to 0.
22197 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22199         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
22200         (is_compiled_class): Likewise.
22201         (layout_class): Likewise.
22202         (layout_class): Detect and lay out classes defined in source code.
22203         (interface_of_p, add_interface_do, may_add_interface): New
22204         function.
22205         (add_interface): Now use add_interface_do.
22206         (add_method_1): New function.
22207         (add_method): Now use add_method_1.
22208         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
22209         (complete_start_java_method): New function.
22210         (start_java_mehod): Now call complete_start_java_method.
22211         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
22212         (expand_invoke): Likewise and fixed typo.
22213         *gjava.c: (print_super_field): Use new argument to find_class
22214         DO_CLASS_FILE.
22215         (main): Likewise.
22216         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
22217         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
22218         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
22219         IDENTIFIER_NODE.
22220         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
22221         (add_method_1, push_class): New prototypes.
22222         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
22223         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
22224         directory where the class was found.
22225         (find_class): New argument DO_CLASS_FILE. Function find_class
22226         modified accordingly.
22227         *jcf-parse.c: (fix_class_path): New function.
22228         (load_class): Use new VERBOSE argument. load_class now finds and
22229         loads/parses .class/.java files. Save read_state of current_jcf
22230         if necessary.
22231         (java_parser_abort_on_error): New macro.
22232         (jcf_parse_source, parse_source_file): New function.
22233         (jcf_parse): Fixed typo.
22234         (yyparse): Call parse_source_file () only.
22235         (process_zip_dir): Fixed typo, fix zdir->filename_length when
22236         writing the real class name back in the zip directory entry.
22237         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
22238         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
22239         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
22240         (find_class): Prototype fixed.
22241         *lex.c: Added 1998 time stamp.
22242         Removed all static global variables, moved into the parser
22243         context data structure.. Now include unistd.h if SEEK_SET not
22244         defined.
22245         (java_init_lex): Rewritten.
22246         (java_sneak_unicode): Modified current unicode access in current line.
22247         (java_unget_unicode): Likewise.
22248         (java_allocate_new_line): New allocation management.
22249         (java_read_char): Modified access and storage of unget_utf8_value.
22250         New way of processing current unicode.
22251         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
22252         (java_get_unicode): Now use the parser context.
22253         (java_lineterminator): Likewise.
22254         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
22255         of the reentrant parser implementation. Function now use the
22256         parser context data structure and java_lval. Fixed production of
22257         the float and double constant "out of range" error message. Fixed
22258         obstack use. Return integer value when hitting a modifier. Now
22259         return type for TRUE, FALSE and other predefined types. Return
22260         identifier as a TREE_LIST list containing the current line context
22261         as the TREE_VALUE sub-node.
22262         (java_unicode_2_utf8): Fixed typo in declaration.
22263         (java_lex_error): Now use the parser context data structure.
22264         *lex.h: Added 1998 time stamp.
22265         (struct java_line): New fields ref_count and next.
22266         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
22267         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
22268         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
22269         *parse.h: Added 1998 time stamp.
22270         (java_parse_source_file): Renamed from parse_source_file.
22271         (YYERROR_NOW, YYNOT_TWICE): Fixed.
22272         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
22273         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
22274         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
22275         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
22276         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
22277         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
22278         (struct parser_ctxt): New data structure to keep the parser context.
22279         *parse.y: Added 1998 time stamp, got rid of static global variables.
22280         (java_error_count, ctxp): New global variables.
22281         (%union): New value field.
22282         (numeric_type, integral_type): Rules removed.
22283         (primitive_type): Rule defined to handle integral, float, double and
22284         boolean types.
22285         (qualified_name, package_declaration,
22286         single_type_import_declaration, type_import_on_demand_declaration,
22287         modifiers, class_declaration, super, interfaces,
22288         interface_type_list, class_body, field_declaration,
22289         field_declaration, variable_declarators, variable_declarator,
22290         variable_declarator_id, method_declaration, method_header,
22291         formal_parameter_list, formal_parameter, method_body, block,
22292         static, interface_declaration, extends_interfaces,
22293         abstract_method_declaration, local_variable_declarators): Rules now
22294         define actions.
22295         (force_error, do_warning): New global statics.
22296         (push_parser_context, parser_context_save_global,
22297         parser_context_restore_global, pop_parser_context): New functions.
22298         (yyerror): Now uses the global parser context. Fixed use of obstack.
22299         (parse_error, parse_error_context, parse_warning_context,
22300         java_accstring_lookup, redefinition_error, check_modifiers,
22301         parser_add_interface, create_interface, create_class, find_field,
22302         duplicate_declaration_error, register_fields, method_header,
22303         check_modifiers_consistency, check_abstract_method_header,
22304         method_declarator, parser_qualified_classname,
22305         parser_check_super_interface, parser_check_super,
22306         parser_chain_incomplete_item, java_check_circular_reference,
22307         layout_class_from_source, java_complete_class,
22308         complete_method_decl, resolve_class, complete_class_report_errors,
22309         java_check_final, check_method_redefinition,
22310         java_check_regular_methods, java_check_abstract_methods,
22311         java_check_methods, lookup_java_interface_method2,
22312         lookup_java_method2, lookup_cl, find_name_in_single_imports,
22313         process_imports, find_in_imports, read_import_entry,
22314         read_import_dir, find_in_imports_on_demand,
22315         check_pkg_class_access, not_builtin_p, declare_local_variables,
22316         source_start_java_method, java_generate_parsed_class): New
22317         functions.
22318         *typeck.c: (signature_include_return): New global variable.
22319         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
22320         to add the function returned type in the signature.
22322 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
22324         * jcf-io.c (open_in_zip): Use strncmp and LEN.
22326 1998-01-29  Dave Brolley  <brolley@cygnus.com>
22328         * Make-lang.in (java.info): Added.
22329         (java.install-info): Added
22331 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
22333         * Makefile.in (clean): Also remove java/parse.c.
22335 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
22337         Add a pair of -fbounds-check/-fno-bounds-check options.
22338         * lang.c (lang_decode_option): Add code to grok arguments.
22339         (flag_bounds_check): Add decl.
22340         (lang_f_options): New array w/ the option in it.
22341         * java-tree.h (flag_bounds_check): Add decl.
22342         * lang-options.h: New file.
22343         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22344         of a static macro value.
22345         (JAVA_ARRAY_EXCEPTION): Delete macro.
22347 1998-01-23  Per Bothner  <bothner@cygnus.com>
22349         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
22350         * expr.c (build_anewarray):  Add missing promote_type.
22352 1998-01-22  Per Bothner  <bothner@cygnus.com>
22354         Add array types with known length to optimize bounds checking.
22355         * typeck.c (build_java_array_type):  Take length parameter.
22356         (java_array_type_length, build_prim_array_type):  New functions.
22357         * java-tree.h:  Update for new functions.
22358         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22359         * class.c:  Use build_prim_array_type.
22360         * expr.c (can_widen_reference_to):  Handle known-length array types.
22361         (verify_jvm_instructions):  Keep track of integer push instructions
22362         followed by newarray/anewarray, so we can build known-length arrays.
22363         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
22364         (java_array_data_offset):  New function.
22365         (build_java_array_length_access):  New function.  Optimize if constant.
22366         (build_java_arrayaccess):  Constant fold bounds check.
22367         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
22368         (build_newarray, build_anewarray):  New functions.
22369         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
22370         * verify.c (merge_types):  Handle known-lengh array types.
22372 1998-01-19  Per Bothner  <bothner@cygnus.com>
22374         * expr.c (expand_byte_code):  Fix performace bug, which caused
22375         searching linenumber_table to be linear rather than constant.
22377 1997-12-12  Per Bothner  <bothner@cygnus.com>
22379         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
22381         * decl.c, java-tree.h (soft_fmod_node):  New global.
22382         * decl.c (init_decl_processing):  Define __builtin_fmod.
22383         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
22384         using __builtin_fmod.
22386 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22388         * keyword.h: New file, output of keyword.gperf as processed by
22389         gperf.
22390         * lex.c (java_lex_init): Initialize java_error_flag.
22391         * parse.c (YYERROR_NOW): Uses java_error_flag.
22392         * parse.y: New static java_error_flag. Useless definition of
22393         buffer_error gone.
22394         * parse.y (java_error): Portable error recovery using
22395         java_error_flag (not yet completely tuned).
22397 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
22399         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22401 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22403         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22404         (parse.c, lex.c, keyword.h): New rules for Java source code
22405         front-end.
22406         * parse.c: Renamed into jcf-parse.c.
22407         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22408         * keyword.gperf: New file, Java keywords.
22409         * parse.y: New file, Java language grammar.
22410         * parse.h: New file, Java language grammar definitions.
22411         * lex.c: New file, Java language lexer.
22412         * lex.h: New file, Java language lexer definitions.
22414 1997-12-03  Per Bothner  <bothner@cygnus.com>
22416         * decl.c (clinit_identifier_node), java-tree.h:  New global.
22417         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
22418         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
22419         * expr.c (expand_java_field_op):  Check for invalid assignment
22420         to final field.
22422         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
22424 1997-10-27  Per Bothner  <bothner@cygnus.com>
22426         * verify.c (verify_jvm_instructions):  When processing a handler,
22427         attempt to set the current_subr to the right value.
22428         (More complicated code combines Sep 17 and Oct 22 versions.)
22430 1997-10-24  Per Bothner  <bothner@cygnus.com>
22432         * class.c (push_class):  Figure out (guess) name of source file.
22433         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
22434         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
22435         (parse_class_file):  Change return type from int to void.
22436         Call debug_start_source_file/debug_end_source_file.
22438         * expr.c (build_java_binop):  Fix masking 2nd operand.
22439         * decl.c (init_decl_processing):  Set sizetype first.
22441 1997-10-22  Per Bothner  <bothner@cygnus.com>
22443         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
22444         (Revert Sep 17 change.)
22446 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22448         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22449         .class extension in their name and fix thing so we don't process
22450         them parse_zip_file_entries().
22451         (parse_zip_file_entries): Cleaned unused local variables.
22453 1997-10-20  Per Bothner  <bothner@cygnus.com>
22455         * expr.c (can_widen_reference_to):  Allows equal array element types.
22456         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
22457         * jcf-dump.c (RET):  Get (and print) index.
22459         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22460         Promote element type to POINTER_TYPE.
22462 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22464         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22465         find_in_current_zip, jcf_figure_file_type): Moved from
22466         jcf-reader.c to parse.c.
22467         * zextract.c: (read_zip_archive): takes file_comment_length possible
22468         field into account.
22470 1997-10-20  Per Bothner  <bothner@cygnus.com>
22472         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
22474         * verify.c (merge_types):  Handle array types even better ...
22476 1997-10-17  Per Bothner  <bothner@cygnus.com>
22478         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
22480         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
22481         * class.c (make_class_data):  Don't build fields_decl if no fields.
22482         When building fields_decl, skip if DECL_ARTIFICIAL.
22484         * expr.c (java_stack_swap):  Update stack_type_map.
22485         * verify.c (merge_types):  Handle array types better.
22487 1997-10-15  Per Bothner  <bothner@cygnus.com>
22489         * class.c (add_field):  Don't promote short integral fields to
22490         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22491         * expr.c (push_value):  Promote and convert short integral values.
22493         * decl.c, java-tree.h (integer_two_node):  New constant node.
22494         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
22496 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22498         * class.c (append_gpp_mangled_type): Use function argument
22499         unpromoted type to generate mangled name.
22501 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22503         * constants.c (build_constant_data_ref): Now uses current_class
22504         instead of main_class.
22505         (build_constants_constructor): Now uses current_class instead of
22506         main_class.
22507         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22508         of the global variable SeepZipFiles done here.
22509         * zextract.c (read_zip_archive): extra_field optional field taken
22510         into account while computing the position of the class file in the
22511         archive.
22512         * verify.c (verify_jvm_instructions): Use current_jcf to search
22513         the constant pool.
22514         * parse.c (load_class): First search for the class to load in the
22515         current zip file. Saves current_jcf (restored before returning
22516         from that function). Don't call JCF_FINISH in the class was found
22517         in the current ZIP file.
22518         (jcf_parse): If the class was found in the current ZIP file, save
22519         its tree_constant_pool (for later reuse).
22520         (parse_class_file): New function. Process each method defined in
22521         the current class and record the class as to be later registered.
22522         (yyparse): Rewritten. Figure the type of the current file and switch
22523         accordingly.
22524         * lang.c: New global variable current_jcf.
22525         (lang_init): Removed compiling_from_source test (done later, in
22526         yyparse). Removed call the jcf_parse ().
22527         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22528         (typedef struct JCF): New fields seen_in_zip (to mark a class found
22529         in the current ZIP file) and zip_offset (offset to the class data in
22530         the current zip file).
22531         * jcf-reader.c: zipfile.h included.
22532         localToFile: New ZipFileCache static global variable
22533         (parse_zip_file_entries): New function. Browse the current ZIP
22534         file directory and process each class found.
22535         (process_zip_dir): New function. Register each class found in the
22536         ZIP file directory. The class aren't parsed but a valid JCF is
22537         link to each of them.
22538         (find_in_current_zip): New function. Search for a class in the
22539         current ZIP file directory. If found, prepare the class so that it
22540         can be loaded.
22541         (jcf_figure_file_type): New function. Examine the file structure
22542         to figure a class file, a ZIP file. If none of these categories are
22543         matched, a source file is assumed.
22544         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22545         SeenZipFile: New global variable.
22546         (open_in_zip): Use zipmember's length to accelerate the search for
22547         a member. If zipmember was NULL and zip file successfully read,
22548         return 0.
22549         * java-tree.h: New global variable current_jcf declared.  Added
22550         declaration for current_constant_pool_tags, current_constant_pool_data,
22551         current_constant_pool_length, current_constant_pool_data_ref.
22552         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22553         store the JCF of classes seen in a zip file) and tree *constant_pool
22554         (to save a loaded class constant pool). current_class declared here.
22555         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22556         retrieve method_ref_constant.
22557         (PUSHC): java_push_constant_from_pool now uses current_jcf.
22558         (OBJECT): get_class_constant now uses current_jcf.
22559         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22560         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22561         (expand_invoke): Now uses current_class instead of main_class
22562         (build_class_init): Now uses current_class instead of main_class
22563         * class.c: New static global variable registered_class.
22564         (register_class): New function.
22565         (emit_register_class): Modified to use registered_class instead of
22566         main_class
22567         (is_compiled_class): Now take into account class seen in the archive.
22569 1997-10-06  Per Bothner  <bothner@cygnus.com>
22571         * except.h:  Renamed to: java-except.h.
22572         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
22573         * except.c:  Add semi-working (commented out) implementation.
22575         * expr.c (expand_iinc):  Add needed flush_quick_stack.
22576         * parse.c (set_source_filename):  New function.
22577         (give_name_to_class):  Set input_filename from package.classname.java.
22579         * jcf-io.c (find_class):  Don't look first in ".".
22581 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22583         * zextract.c (read_zip_archive): Now takes into account the
22584         extra_field field.
22585         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22587 1997-09-20  Per Bothner  <bothner@cygnus.com>
22589         * constants.c, java-tree.h (build_internal_class_name):  New function.
22590         (alloc_class_constant):  Re-implement using build_internal_class_name.
22591         * class.c (make_class_data):  Likewise.
22592         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
22594 1997-09-17  Per Bothner  <bothner@cygnus.com>
22596         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
22597         to NULL before pushing an exception handler target.
22599         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
22600         (java_stack_swap, java_stack_dup):  Re-write to be safe from
22601         clobbering registers.
22602         (build_class_init):  New function.
22604 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22606         * typeck.c (build_java_array_type): Temporary use
22607         permanent_obstack to create the array 'length' field.
22608         * expr.c (lookup_label): Temporay use permanent_obstack to create
22609         label if not found.
22610         * class.c (push_super_field): Tempory use permanent_obstack.
22612 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22614         * typeck.c (type_for_mode): Now handles double_type_node and
22615         float_type_node.
22616         * verify.c (verify_jvm_instructions): The instruction following
22617         the wide bytecode is checked. OPCODE_ret added to the list of
22618         wide.
22620 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22622         * class.c (make_class): Temporary use permanent_obstack. Set the
22623         class CLASS_P field to 1.
22624         (push_class): Temporary use permanent_obstack.
22625         (set_super_info): Temporary use permanent_obstack.
22626         (add_method): Temporary use permanent_obstack, set
22627         METHOD_TRANSIENT().
22628         (add_field): Temporary use permanent_obstack. Sets
22629         FIELD_VOLATILE() and FIELD_TRANSIENT().
22630         (build_class_ref): Temporary use permanent_obstack if the class
22631         isn't compiled.
22632         (build_static_field_ref): Temporary use permanent_obstack when
22633         creating field's rtl.
22634         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22635         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22636         and fields. Function finalized, as far as flag handling.
22637         (push_class_static_dummy_field): Temporary use permanent_obstack.
22638         (emit_register_class): Force generation of class registration at
22639         -O3 or deeper.
22640         * decl.c (end_java_method): Call permanent_allocation() before
22641         returning.
22642         * expr.c (can_widen_reference_to): Added comment to interface
22643         handling, fixed typo.
22644         (lookup_field): Now uses CLASS_P() to correct FIXME
22645         (expand_invoke): Verification on public && !static &&
22646         !abstract moved into soft_lookupinterfacemethod (kaffe).
22647         Use Object class dtable if objectref is an array when expanding
22648         invokeinterface.
22649         (java_push_constant_from_pool): Temporary use permanent_obstack
22650         for CONSTANT_string
22651         * parse.c (get_ref_constant): Temporary use permanent_obstack to
22652         create constant references.
22653         (get_constant): Temporary use permanent_obstack to create constant.
22654         (load_class): Temporary use permanent_obstack to load class.
22655         (jcf_parse): Temporary use permanent_obstack to perform class
22656         layout.
22657         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22658         (build_java_signature): Temporary use permanent_obstack.
22659         * verify.c: (verify_jvm_instruction): removed unnecessary verification
22660         on ACC_SUPER flag.
22661         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22662         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22663         (CLASS_P): Defined
22665 1997-09-11  Per Bothner  <bothner@cygnus.com>
22667         * class.c (append_gpp_mangled_type):  Fix typo.
22668         (emit_register_class):  Use main_class to get class object, rather
22669         than looking for no-longer-existing static decl starting with _CL.
22670         * typeck.c (parse_signature_type):  Promote array element type
22671         if it is a RECORD_TYPE.
22673 1997-09-10  Per Bothner  <bothner@cygnus.com>
22675         * class.c (push_class_static_dummy_field):  New function.
22676         (mangle_static_field):  New. Do G++-style mangling of static fields.
22677         (layout_class):  Mandle static fields here, not in add_field.
22678         (build_class_ref):  The class object is now a dummy static field.
22679         * decl.c (find_local_variable):  Look for best, instead of first match.
22680         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
22681         (build_java_athrow):  Don't check here if exception is Throwable.
22682         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
22683         (TYPE_USED):  Removed.  No longer used ...
22684         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
22685         * verify.c (push_pending_label):  New function.
22686         (push_pending_block):  Renamed to check_pending_block.
22687         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
22688         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
22689         re-checking possible handlers) after a store (less wasted work).
22690         Check for null handler (finally) before calling add_handler.
22691         Various changes to (finally?) correctly handle try/finally.
22693 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
22695         * class.c: Include stdio.h.
22697 1997-09-04  Per Bothner  <bothner@cygnus.com>
22699         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22700         to make sure class is initialized before static/special invoke.
22702         * verify.c (verify_jvm_instructions):  On a store instruction,
22703         call find_local_variable to force pre-allocation of decl and rtx.
22704         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
22706 1997-09-03  Per Bothner  <bothner@cygnus.com>
22708         * class.c (build_class_ref):   Strip off "promoted_" if need be.
22709         (make_field_value): Call build_java_signature when needed.
22710         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
22711         * expr.c (build_java_athrow):  Don't push_value of exception.
22712         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22713         match specification of [fd]cmp[lg] for NaNs.
22714         (expand_byte_code):  Add support for exception handler ranges.
22715         * except.c:  Add skeleton for EH code-generation.
22716         * verify.c (merge_types):  Treat all promoted integral types as equal.
22717         * constants.c (build_constants_constructor):  To force creation of
22718         current_constant_pool_data_ref, call build_constant_data_ref.
22720         * javaop.def (lload):  Fix typo.
22721         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
22723 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
22725         * parse.c: Don't include function.h.
22727 1997-08-27  Per Bothner  <bothner@cygnus.com>
22729         * except.[ch]:  New files.
22730         * Makefile.in (JAVA_OBJS):  Add except.o
22731         * expr.c:  Temporary warning about unimplemented exceptions.
22732         * verify.c:  Verify exception handlers.
22734         * jcf-dump.c (disassemble_method):  Print exception table.
22736 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22738         * expr.c (verify_jvm_instructions): Started a thorough
22739         verification of invoke* bytecodes.
22740         (expand_byte_code): flush quick stack if PC is the target of a
22741         branch.  and undef RET (conflicting with config/i386/i386.h).
22742         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22743         used.
22744         (expand_invoke): Now handles invokeinterface and do more
22745         verification according to the bytecode.
22746         (lookup_field): Don't try to load the class if processing
22747         dtable_type.
22748         (can_widen_reference_to): Now handles interfaces.
22749         * decl.c (init_decl_processing): New global variable
22750         soft_lookupinterfacemethod_node, declared in java-tree.h.
22751         Call set_super_info on string_type_node.
22752         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22753         defined.
22754         * class.c (set_super_info): Fills the CLASS_* flags according to
22755         access_flags.
22756         (get_access_flags_from_decl): Handles all class flags.
22758 1997-08-26  Per Bothner  <bothner@cygnus.com>
22760         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
22761         * parse.c (yyparse):  Check for abstract method, and missing code.
22762         * expr.c (expand_byte_code):  Change interface.
22763         * lang.c (put_decl_node):  Print promoted types prettier.
22764         * verify.c (verify_jvm_instruction):  Change interface.
22765         Partial support for scanning exception table.
22766         For load instructions, handle promoted integral types.
22768 1997-08-21  Per Bothner  <bothner@cygnus.com>
22770         * verify.c:  New file, with contents moved from expr.c.
22771         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
22772         * typeck.c (is_array_type_p):  Moved here from expr.c.
22773         * java-tree.h:  Add some now-needed function declarations.
22774         * Makefile.in (JAVA_OBJS): Added verify.o.
22776 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22778         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22779         METHOD_ABSTRACT flag.
22781         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22782         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22783         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22785         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22786         variables.
22787         (start_java_method): Hook for SYNCHRONIZED methods.
22789         * expr.c (build_java_jsr, build_java_ret): New functions
22790         (JSR,PRE): New macros
22791         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22792         (verify_jvm_instructions): tableswitch, lookupswitch,
22793         monitorenter, monitorexit, goto_w: verified.
22794         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22795         (build_java_monitor): New function.
22796         (MONITOR_OPERATION): Modified to call build_java_monitor()
22797         (verify_jvm_instructions): Started a thorough verification of
22798         invoke* bytecodes.
22800 1997-08-19  Per Bothner  <bothner@cygnus.com>
22802         Support verification of jsr/ret subroutines (used for try/finally).
22803         * decl.c (return_address_type_node):  New type node.
22804         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22805         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22806         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
22807         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22808         TYPE_USED):  New macros for special types in type_map.
22810         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
22811         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
22812         BCODE_JUMP_TARGET.
22813         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
22815         * expr.c (can_widen_reference_to):  New function.
22816         (pop_type):  Use it.
22817         (merge_type_state):  Support handling start of subroutine.
22818         (push_pending_block):  Return char* error message, instead of calling
22819         fatal on an error.  Also handle subroutines.
22820         (verify_jvm_instructions):  Handle errors from push_poending_block.
22821         Support jsr and ret instructions.
22823 1997-08-19  Per Bothner  <bothner@cygnus.com>
22825         * jcf-io.c (find_classfile):  Fix thinko.
22826         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
22828 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
22830         * Makefile.in (BISON): Remove.
22832 1997-08-07  Per Bothner  <bothner@cygnus.com>
22834         * Makefile.in:  Convert to autoconf.
22835         * config-lang.in (outputs):  Added java/Makefile.
22837         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22838         Rename cc1java to jc1.
22840         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
22841         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
22843         * class.c (class_depth):  Do load_class if needed.
22845         Mostly better verification.
22846         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
22847         (init_decl_processing):  Change return type of soft_checkcast.
22848         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
22849         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22850         lang_print_error):  New functions.
22851         (lang_init):  Set global hook print_error_function to lang_print_error.
22852         * expr.c:  In the type_map ptr_type_node is only used for null now.
22853         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
22854         (merge_types):  Dererence pointer to record types before comparing.
22855         (decode_newarray_type, merge_types):  On error just return NULL.
22856         (build_java_binop):  Add preliminary implementation (with warning)
22857         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22858         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
22859         (expand_compare, expand_java_goto, expand_java_call):  Don't
22860         push_pending_block, since that only makes sense when verifying.
22861         (merge_type_state):  Different return codes.
22862         (push_pending_block):  A block may need to be verified more than once.
22863         (expand_byte_code):  Warn about unused code at code generation time.
22864         (verify_jvm_instruction):  Changed logic, since code may need to be
22865         re-verified if type-state has changed.  Also, better error handling.
22866         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22867         Improve newarray, anewarray, ?aload, athrow,
22868         * java-tree.h (LABEL_CHANGED):  New macro.
22870 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22872         * decl.c (soft_athrow_node): New global variable initialized.
22873         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22874         * typeck.c (convert): Added support for REAL_TYPE.
22875         (convert_to_char): New function.
22876         (convert): Handle CHAR_TYPE.
22877         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22878         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22879         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22880         promoted type.
22881         (verify_jvm_instructions): Added break a the end of bogus unop: label.
22882         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22883         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22884         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22885         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22886         to Use The Right Things.
22887         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22888         compatible with INT. BOOLEAN is made equivalent to BYTE.
22889         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22890         OPCODE_ifnonnull): Now supported.
22891         (build_java_athrow): New function.
22893 1997-08-04  Per Bothner  <bothner@cygnus.com>
22895         Rename method name <init> to match G++ (and fix mangling).
22896         * class.c (layout_class):  Replace method name of <init> by class name.
22897         (make_method_value):  Do inverse renaming of constructor from <init>.
22898         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
22899         * typeck.c (lookup_java_constructor):  New function.
22900         * expr.c (expand_invoke):  If method_name is <init>, call
22901         lookup_java_constructor to find constructor.
22903         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
22905 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22907         * parse.c (get_class_constant): Modified to handle array "classes"
22908         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22909         wide type.
22910         (convert): Modified to handle real type.
22911         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22912         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22913         variables declared.
22914         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22915         soft_multianewarray, soft_newarray_node, soft_throw_node): New
22916         global variables initialized.
22917         (find_local_variable): Handles the case of a pointer
22918         (end_java_method): Restore the use of one more scope
22919         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22920         build_java_array_length_access, expand_java_arrayload,
22921         expand_java_arraystore, expand_java_array_length,
22922         expand_java_multianewarray, expand_java_anewarray,
22923         build_java_check_indexed_type, is_array_type_p,
22924         build_java_throw_out_of_bound_exception): New functions.
22925         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22926         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22927         OPCODE_<t>aload): Implemented code for verification.
22928         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22929         ARRAY_NEW_MULTI): Macro defined.
22930         (CONVERT): Modified to invoke convert().
22931         (case OPCODE_aload2): Fixed index typo from 2 to 1.
22933 1997-07-31  Per Bothner  <bothner@cygnus.com>
22935         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
22936         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
22937         (make_class_data):  Field name needs '/' as package prefix.
22938         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
22940 1997-07-25  Per Bothner  <bothner@cygnus.com>
22942         Implement debug information for local variables.
22943         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22944         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22945         DECL_LOCAL_SLOT_CHAIN):  New macros.
22946         (struct lang_decl_var):  New type.
22947         * parse.c (give_name_to_locals):  Move to decl.c.
22948         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
22949         (start_java_method):  Re-write parameter handling.
22950         (pending_local_decls):  New global variable.
22951         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
22952         (find_local_variable):  Accept pc so we can skips decls not in range.
22953         (struct binding_level):  Add end_pc field.
22954         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22955         (various):  Change so current pc gets passed to find_local_variable.
22957         * decl.c (init_decl_processing):  Re-arrange fields in
22958         class_type_node and and method_type_node to match kaffe 0.9.1.
22959         * class.c (make_method_value, make_class_data):  Update
22960         initializations to match.
22962 1997-07-16  Per Bothner  <bothner@cygnus.com>
22964         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22965         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
22966         (push_super_field):  New function.
22967         (make_class_data):  Handle inheritance of class static initializer.
22968         (layout_class):  New name mangling.
22969         * constants.c (build_constant_data_ref):  Init type of data array
22970         to a one-element array.
22971         (build_constants_constructor):  Set DECL_SIZE from complete array type.
22972         * decl.c:  Rename class_type, object_type etc to class_type_node,
22973         object_type_node etc.  Make former inherit from latter.
22974         * expr.c (expand_invoke):  Add cast of function address.
22975         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
22976         * parse.c (yyparse):  Don't call layout_class here.
22977         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
22979 1997-06-14  Per Bothner  <bothner@cygnus.com>
22981         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
22982         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
22983         (alloc_class_constant):  New.
22984         * expr.c (expand_invoke):  Make sure method's class is initialized.
22985         * class.c (interits_from_p, emit_register_class):  New functions.
22986         * parse.c (yyparse):  Call emit_register_class.
22988 1997-06-09  Per Bothner  <bothner@cygnus.com>
22990         * constants.c:  New file, to handle constant pool.
22991         * Makefile.in (JAVA_OBJS):  Add constants.o.
22992         * decl.c (init_decl_processing):  Update, fix, finish various structs.
22993         (pushdecl_top_level):  New.
22994         * parse.c (layout_class):  Moved to class.c.
22995         * expr.c (java_push_constant_from_pool):  New function.
22996         * class.c (build_class_ref):  Make work fully
22997         (make_class_data):  Emit super-class, constant pool, interface vector.
22999 1997-06-03  Per Bothner  <bothner@cygnus.com>
23001         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
23002         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
23003         * class.c (class_depth):  New function.
23004         (lookup_named_class):  Replaced by new function lookup_class.
23005         * decl.c (object_type_node, string_type_node):  New.
23006         Remove various types that we no longer need.
23007         * expr.c (verify_jvm_instructions):  New separate verifier pass.
23008         (push_type, pop_type):  New functions for verifier.
23009         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
23010         (expand_byte_code):  Simplify, since we assume already verified.
23011         (expand_invoke):  Now mostly works.
23012         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
23013         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
23014         * parse.c:  Wait to allocate class object until we know its name.
23015         (layout_class):  Calculate DECL_VINDEX for each virtual method.
23016         * typeck.c (get_array_type):  Rename to ...
23017         (build_java_array_type):  ... and provide working implementation.
23018         (build_java_signature):  New function - build Java signature of type.
23019         (set_java_signature):  New function - cache signature with type.
23020         (lookup_java_method):  New function.
23022 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
23024         * class.c (ident_subst):  Take extra SUFFIX parameter.
23025         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
23026         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
23027         (build_class_ref):  Actually implement.
23028         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
23029         * decl.c (builtin_function):  New.
23030         (init_decl_processing):  Update for current Kaffe.  Declare some
23031         builtin Kaffe functions.
23032         * expr.c (build_address_of):  New.
23033         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
23034         Renamed (from expand_java_new etc), and added working implementations.
23035         (build_field_ref):  Now also handle static fields.
23036         (expand_invoke):  Implement invokestatic, and start implement rest.
23037         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
23038         * javaop.def:  Rename invokevirt -> invokevirtual.
23039         * lang.c (use_handles):  Removed.
23040         * parse.c:  Add support for ConstantValue attribute.
23041         Handle nested loading of a class.  (JPOOL_UTF):  New.
23043 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
23045         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
23047 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
23049         * Make-lang.in (java.install-man):  New empty rule.
23050         * typeck.c (set_local_type):  New function.
23051         * expr.c (STORE_INTERNAL):  Call find_local_variable,
23052         not find_stack_slot.  Call set_local_type.
23054 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
23056         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
23057         and building RECORD_TYPE CONSTRUCTORs.
23058         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
23060         * lang.c (use_handles):  Change the default to 0.
23061         * decl.c:  Define and build class_type, field_type, utf8const_type.
23062         * class.c (make_class_data, make_field_value,
23063         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
23064         hashUtf8String, strLengthUtf8, mangled_classname:
23065         Functions to build reflective data structures.
23066         * parse.c (yyparse):  Call make_class_data.
23068         * jcf-io.c (open_class, find_classfile):  New functions.
23069         * jcf-dump.c:  Support reading classfile from explicitly-named
23070         class file (without CLASSPATH searching).
23072 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
23074         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
23075         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
23076         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
23077         (get_constant):  Now trivial for CONSTANT_Utf8.
23079         * jcf.h:  Make NEW_CPOOL the default.
23080         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
23082 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
23084         New directory.
23087 Copyright (C) 1996-2015 Free Software Foundation, Inc.
23089 Copying and distribution of this file, with or without modification,
23090 are permitted in any medium without royalty provided the copyright
23091 notice and this notice are preserved.