Account for prologue spills in reg_pressure scheduling
[official-gcc.git] / gcc / java / ChangeLog
bloba366113ec026aef608d9180772b6783b8186f2ec
1 2014-10-22  Alan Modra  <amodra@gmail.com>
3         * mangle.c (finish_mangling): Cast result of obstack_base to (char *).
4         * typeck.c (build_java_argument_signature): Likewise.
5         (build_java_signature): Likewise.
7 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
9         * class.c: Adjust include files.
10         * resource.c: Likewise.
12 2014-10-15  Evgeny Stupachenko  <evstupac@gmail.com>
14         PR target/63536
15         * lang.c (java_print_error_function): Add check on NULL function
16         context.
18 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
20         * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
21         hash_table instead of hashtab.
23 2014-10-07  Marek Polacek  <polacek@redhat.com>
25         * jvgenmain.c (main): Provide declarations for JvRunMain{,Name}.
27 2014-07-08  Mark Wielaard  <mjw@redhat.com>
29         * builtins.c (putVolatile_builtin): Use build_qualified_type
30         instead of build_type_variant.
31         (getVolatile_builtin): Likewise.
32         (build_classdollar_field): Likewise.
34 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
36         * jcf-io.c: Adjust.
38 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
40         * java/class.c (build_utf8_ref): Update handling for section names
41         that are no longer trees.
42         (emit_register_classes_in_jcr_section): Update.
44 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
46         * class.c (build_utf8_ref): Use set_decl_section_name.
47         (emit_register_classes_in_jcr_section): Likewise.
48         (emit_register_classes_in_jcr_section): Likewise.
50 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
52         * class.c (add_method_1): Adjust.
53         (java_treetreehash_new): Likewise.
54         * constants.c (set_constant_entry): Likewise.
55         (cpool_for_class): Likewise.
56         * decl.c (make_binding_level): Likewise.
57         (java_dup_lang_specific_decl): Likewise.
58         * expr.c (add_type_assertion): Likewise.
59         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
60         (lang_decl): don't use variable_size gty attribute.
61         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust.
62         (lang_type): Don't use variable_size gty attribute.
63         * jcf-parse.c (java_parse_file): Adjust.
64         (process_zip_dir): Likewise.
65         * jcf.h: Remove usage of variable_size gty attribute.
66         * jcf-reader.c (jcf_parse_constant_pool): Adjust.
67         (jcf_parse_bootstrap_methods): Likewise.
69 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
71         * constants.c (set_constant_entry): Adjust.
73 2014-05-06  Richard Sandiford  <r.sandiford@uk.ibm.com>
75         * boehm.c (mark_reference_fields): Don't update the mask when
76         setting pointer_after_end.
78 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
79             Mike Stump  <mikestump@comcast.net>
80             Richard Sandiford  <rdsandiford@googlemail.com>
82         * boehm.c: Include wide-int.h.
83         (mark_reference_fields): Use a wide_int mask.
84         (get_boehm_type_descriptor): Use wide-int interfaces.
85         * expr.c: Include wide-int.h.
86         (build_newarray): Remove bogus "== INTEGER_CST".
87         (expand_java_pushc): Use real_from_integer.
88         (build_field_ref): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
89         * jcf-parse.c: Include wide-int.h.
90         (get_constant): Use wide-int interfaces.
92 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
94         Update copyright years
96 2014-01-02  Tobias Burnus  <burnus@net-b.de>
98         * jcf-dump.c (version): Update copyright notice dates.
99         * gcj.texi: Bump @copying's copyright year.
101 2013-12-19  Jakub Jelinek  <jakub@redhat.com>
103         PR other/59545
104         * class.c (hashUtf8String): Compute hash in unsigned type.
105         * javaop.h (WORD_TO_INT): Avoid signed integer overflow.
107 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
109         * java-gimplify.c: Add required include files from gimple.h.
111 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
113         * class.c (maybe_layout_super_class): Update comment.
114         * decl.c (java_add_stmt): Remove use of input_filename macro.
115         * jcf-parse.c (set_source_filename): Remove use of
116         input_filename macro.
117         (parse_class_file): Remove use of input_line and input_filename
118         macros.
119         (java_parse_file): Remove use of input_filename macro.
121 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
123         * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
124         throughout.
126 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
128         * class.c, expr.c: Replace host_integerp (..., 0) with
129         tree_fits_shwi_p throughout.
131 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
133         * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
135 2013-11-14  Diego Novillo  <dnovillo@google.com>
137         * builtins.c: Include stor-layout.h.
138         Include stringpool.h.
139         * class.c: Include stringpool.h.
140         Include stor-layout.h.
141         Include varasm.h.
142         * constants.c: Include stringpool.h.
143         Include stor-layout.h.
144         * decl.c: Include stor-layout.h.
145         Include stringpool.h.
146         Include varasm.h.
147         * except.c: Include stringpool.h.
148         Include stor-layout.h.
149         * expr.c: Include stringpool.h.
150         Include stor-layout.h.
151         * jcf-parse.c: Include stringpool.h.
152         * mangle.c: Include stringpool.h.
153         * resource.c: Include stringpool.h.
154         Include stor-layout.h.
155         * typeck.c: Include stor-layout.h.
156         Include stringpool.h.
157         * verify-glue.c: Include stringpool.h.
159 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
161         * java-gimplify.c: Include gimplify.h.
163 2013-11-07  Jeff Law  <law@redhat.com>
165         * builtins.c (initialize_builtins): Provide __builtin_trap.
167 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
169         Patch autogenerated by refactor_symtab.py from
170         https://github.com/davidmalcolm/gcc-refactoring-scripts
171         revision 58bb219cc090b2f4516a9297d868c245495ee622
173         * decl.c (java_mark_decl_local): Update for conversion of symtab types
174         to a true class hierarchy.
176 2013-10-14  David Malcolm  <dmalcolm@redhat.com>
178         * lang.c (java_handle_option): Update for introduction of
179         gcc::dump_manager.
181 2013-09-25  Tom Tromey  <tromey@redhat.com>
183         * Make-lang.in (jvspec.o): Remove.
184         (CFLAGS-java/jvspec.o): New variable.
185         ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o
186         (java/jvspec.o-warn): Rename from jvspec.o-warn.
187         (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o)
188         (java/class.o, java/constants.o, java/decl.o, java/except.o)
189         (java/expr.o, java/jcf-depend.o, java/jcf-parse.o)
190         (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o)
191         (java/resource.o java/typeck.o, java/win32-host.o)
192         (java/verify-glue.o, java/verify-impl.o, java/zextract.o)
193         (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove.
195 2013-09-25  Tom Tromey  <tromey@redhat.com>
197         * Make-lang.in (jvspec.o): Don't use subshell.
199 2013-06-05  Jan Hubicka  <jh@suse.cz>
201         * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
202         instead of mark_decl_referenced.
204 2013-05-29  Jan Hubicka  <jh@suse.cz>
206         * decl.c (java_mark_decl_local): Update for new symtab flags.
208 2013-05-22  Matthias Klose  <doko@ubuntu.com>
210         * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
212 2013-05-16  Jason Merrill  <jason@redhat.com>
214         * Make-lang.in (jc1$(exeext)): Use link mutex.
216 2013-05-06  Jakub Jelinek  <jakub@redhat.com>
218         PR libgcj/57074
219         * class.c (emit_symbol_table): Use array type of the
220         right size for the_syms_decl and its DECL_INITIAL, instead
221         of symbols_array_type.  Set TREE_TYPE (the_syms_decl) to it.
222         (emit_assertion_table): Use array type of the right size
223         for table_decl and its DECL_INITIAL.
225 2013-04-15  Gerald Pfeifer  <gerald@pfeifer.com>
227         * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
228         (Resources): Adjust reference to Mauve.
229         Remove link to java.sun.com.
230         Refer to GCC, not gcc.
232 2013-04-09  Richard Biener  <rguenther@suse.de>
234         * expr.c (build_java_binop): Pass a type to build_int_cst.
236 2013-03-22  Kai Tietz  <ktietz@redhat.com>
238         * lang.c (put_decl_node): Don't iterate over end_params_node.
240 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
242         * jcf-dump.c (version): Update copyright notice dates.
244 2012-11-16  Diego Novillo  <dnovillo@google.com>
246         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
248         * boehm.c: Use new vec API in vec.h.
249         * class.c: Likewise.
250         * constants.c: Likewise.
251         * decl.c: Likewise.
252         * expr.c: Likewise.
253         * java-tree.h: Likewise.
254         * jcf-parse.c: Likewise.
255         * resource.c: Likewise.
256         * verify-glue.c: Likewise.
258 2012-11-15  Jan Hubicka  <jh@suse.cz>
260         * builtins.c (define_builtin): Accept ECF flags and
261         use set_call_expr_flags.
262         (initialize_builtins): Update.
264 2012-10-01  Lawrence Crowl  <crowl@google.com>
266         * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
267         (JCFDUMP_OBJS): Add dependence on hash-table.o.
268         (jcf-io.o): Add dependence on hash-table.h.
269         * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
271 2012-09-24  Lawrence Crowl  <crowl@google.com>
273         * decl.c (java_init_decl_processing): Change to new double_int API.
274         * jcf-parse.c (get_constant): Likewise.
275         * boehm.c (mark_reference_fields): Likewise.
276         (get_boehm_type_descriptor): Likewise.
278 2012-07-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
280         * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
281         (bootstrap_method): Likewise for the bootstrap_arguments field.
283 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
285         * java-gimplify.c: Include dumpfile.h instead of tree-dump.h
286         * Make-lang.in: Fix dependencies.
288 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
290         * java-tree.h (force_evaluation_order): Remove prototype.
291         * expr.c (force_evaluation_order): Remove unused function.
293 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
295         * decl.c: Do not include libfuncs.h.
296         * class.c: Do not include defaults.h.
297         * jvgenmain.c: Likewise.
298         * magnle.c: Likewise.
299         * Make-lang.in (decl.o): Fix dependencies.
301 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
303         * verify.h: Do not include system.h and coretypes.h here.
304         * verify-impl.c: Include them here instead.
306 2012-07-05  Uros Bizjak  <ubizjak@gmail.com>
308         * jcf-io.c (read_zip_member): Initialize d_stream.
310 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
312         * resource.c: Do not include output.h.
314 2012-05-21  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
316         PR java/52815
317         * class.c (emit_register_classes_in_jcr_section): Revise placement
318         of #ifdef JCR_SECTION_NAME.
320 2012-04-22  Jan Hubicka  <jh@suse.cz>
322         * class.c (build_utf8_ref): Do not mark varpool node as needed.
324 2012-04-20  Jan Hubicka  <jh@suse.cz>
326         * class.c (make_local_function_alias): Do not mark symbol referenced.
328 2012-04-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
330         * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
331         results to long to match formats.
333 2012-04-11  Andrew Haley  <aph@redhat.com>
335         * jcf-reader.c (jcf_parse_bootstrap_methods): Add
336         ATTRIBUTE_UNUSED.
338 2012-04-11  Andrew Haley  <aph@redhat.com>
340         * jcf.h (bootstrap_method): New.
341         (BootstrapMethods): New.
342         (JCF): Add BootstrapMethods.
343         (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
344         * jcf-reader.c (jcf_parse_bootstrap_methods): New.
345         (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
346         and InvokeDynamic.
347         (jcf_parse_bootstrap_methods): New.
348         * javaop.def (invokedynamic): New opcode.
349         * jcf-parse.c (get_constant): An unknown constant type should not
350         be an internal error, but a fatal one.  Make it so.
351         * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
352         (HANDLE_END_BOOTSTRAP_METHODS): New.
353         (print_constant): Handlers for MethodHandle, MethodType, and
354         InvokeDynamic.
356 2012-04-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
358         * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
359         Clear TREE_READONLY.
361 2012-03-29  Steven Bosscher  <steven@gcc.gnu.org>
363         PR java/52730
364         * class.c (emit_register_classes_in_jcr_section): New function.
365         (emit_Jv_RegisterClass_calls): New function, split out from ...
366         (emit_register_classes): ... here. Reorganize.  Do not call
367         output_constant.
369 2012-01-23  Andreas Schwab  <schwab@linux-m68k.org>
371         * lang.c (java_init_options_struct): Set
372         frontend_set_flag_trapping_math.
374 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
376         * jcf-dump.c (version): Update copyright notice dates.
378 2011-12-03  Matthias Klose  <doko@ubuntu.com>
380         * expr.c (SPECIAL_WIDE): Fix typo in message.
382 2011-11-23  Jeffrey A Law  (law@cygnus.com)
384         * lang.c (java_init_options_struct): Disable optimizations
385         which assume a NULL pointer dereference will cause a fault.
387 2011-11-07  Richard Henderson  <rth@redhat.com>
389         * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
390         (compareAndSwapLong_builtin): Likewise.
391         (compareAndSwapObject_builtin): Likewise.
392         (VMSupportsCS8_builtin): Likewise.
394 2011-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
396         * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
398 2011-10-15  Tom Tromey  <tromey@redhat.com>
399             Dodji Seketeli  <dodji@redhat.com>
401         * jcf-parse.c (set_source_filename): Adjust to the new map API.
403 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
405         * class.c (build_static_field_ref): Delete old interface with two
406         parallel arrays to hold standard builtin declarations, and replace
407         it with a function based interface that can support creating
408         builtins on the fly in the future.  Change all uses, and poison
409         the old names.  Make sure 0 is not a legitimate builtin index.
410         * decl.c (java_init_decl_processing): Ditto.
411         * except.c (compareAndSwapLong_builtin): Ditto.
412         (compareAndSwapObject_builtin): Ditto.
413         (putVolatile_builtin): Ditto.
414         (define_builtin): Ditto.
415         (check_for_builtin): Ditto.
416         * expr.c (rewrite_arglist_getcaller): Ditto.
417         (expand_java_field_op): Ditto.
419 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
421         * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
422         New.
423         (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
424         rules.
426 2011-08-18  Peter Collingbourne  <peter@pcc.me.uk>
428         * expr.c (expand_invoke) Use the type of the method rewrite
429         target.
431 2011-08-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
433         * jcf-dump.c (print_constant): Cast first frexp arg.
435 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
437         * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
439 2011-07-19  Richard Guenther  <rguenther@suse.de>
441         * builtins.c (static): Use fold_build_pointer_plus.
442         * class.c (make_class_data): Likewise.
443         (build_symbol_entry): Likewise.
444         * except.c (build_exception_object_ref): Likewise.
445         * expr.c (build_java_arrayaccess): Likewise.
446         (build_field_ref): Likewise.
447         (build_known_method_ref): Likewise.
448         (build_invokevirtual): Likewise.
450 2011-07-06  Richard Guenther  <rguenther@suse.de>
452         * decl.c (java_init_decl_processing):
453         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
455 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
457         * builtins.c: Add sync_ or SYNC__ to builtin names.
458         * expr.c: Add sync_ or SYNC__ to builtin names.
460 2011-06-07  Richard Guenther  <rguenther@suse.de>
462         * decl.c (java_init_decl_processing): Call build_common_nodes,
463         build_common_nodes_2 at the beginning.  Remove then duplicate
464         initializations.
466 2011-06-07  Richard Guenther  <rguenther@suse.de>
468         * decl.c (java_init_decl_processing): Properly initialize
469         size_type_node.
471 2011-05-30  Joern Rennecke  <joern.rennecke@embecosm.com>
473         PR middle-end/46500
474         * expr.c: Include "tm.h" .
476 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
478         * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
479         * expr.c (build_jni_stub): Likewise.
481 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
483         * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
484         of prefix.o.
486 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
488         * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
489         version.o.
490         (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
491         (JVGENMAIN_OBJS): Remove errors.o and intl.o.
492         (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
493         * jcf-dump.c: Include diagnostic.h.
494         (main): Initialize diagnostics.
495         * jvgenmain.c: Include diagnostic.h.
496         (main): Initialize diagnostics.
498 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
500         * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
502 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
504         * java-tree.h (global_bindings_p): Adjust prototype.
505         * decl.c (global_bindings_p): Return bool.
507 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
509         * expr.c (expand_java_switch): Call build_case_label.
510         (expand_java_add_case): Likewise.
512 2011-04-29  Richard Guenther  <rguenther@suse.de>
514         PR middle-end/48819
515         * constants.c (build_constants_constructor): Use ptr_type_node for
516         temp.
518 2011-04-20  Jim Meyering  <meyering@redhat.com>
520         * jcf-parse.c (java_parse_file): Remove useless if-before-free.
522 2011-04-18  Jim Meyering  <meyering@redhat.com>
524         * jcf-parse.c: Fix typo in comment.
526 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
528         * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
530 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
532         * java-tree.h (union lang_tree_node): Check for TS_COMMON before
533         calling TREE_CHAIN.
535 2011-04-11  Martin Jambor  <mjambor@suse.cz>
537         * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
538         cgraph_node and handle returned NULL.
540 2011-03-25  Kai Tietz  <ktietz@redhat.com>
542         * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
543         instead of strcmp.
544         (set_source_filename): Likewise.
545         * win32-host.c (jcf_open_exact_case): Likewise.
547 2011-03-21  Kai Tietz  <ktietz@redhat.com>
549         PR target/12171
550         * lang.c (java_attribute_table): Adjust table.
552 2011-02-13  Joseph Myers  <joseph@codesourcery.com>
554         * jvspec.c (jvgenmain_spec): Remove %{a*}.
556 2011-01-21  Kai Tietz  <kai.tietz@onevision.com>
558         PR bootstrap/47215
559         * decl.c (java_init_decl_processing): Remove
560         va_list_type_node related type initializations.
562 2011-01-11  Kai Tietz  <kai.tietz@onevision.com>
564         PR bootstrap/47215
565         * decl.c (java_init_decl_processing): Initialize
566         long_integer_type_node.
568 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
570         PR bootstrap/47215
571         * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
573 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
575         * decl.c (java_init_decl_processing): Setup va_list_type_node.
577 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
579         * jcf-dump.c (version): Update copyright notice dates.
581 2010-12-15  Dave Korn  <dave.korn.cygwin@gmail.com>
583         * decl.c (java_init_decl_processing): Initialise integer_three_node.
584         * lang.c (put_decl_node): Handle nested function decls.
586 2010-12-07  Joseph Myers  <joseph@codesourcery.com>
588         * jcf-parse.c: Don't include assert.h.
589         (java_parse_file): Use gcc_assert.
591 2010-12-03  Joseph Myers  <joseph@codesourcery.com>
593         * lang.opt (static-libgcj): New option.
595 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
597         * jcf-parse.c: Don't include toplev.h.
598         * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
600 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
602         * boehm.c: Don't include toplev.h.
603         * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
605 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
607         * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
608         verify-glue.c: Don't include toplev.h.
609         * Make-lang.in: Dependencies for above files changed to remove
610         toplev.h.
612 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
614         * boehm.c: Include "config.h" instead of <config.h>.
615         * builtins.c: Don't include <stdarg.h>.
616         * class.c: Don't include "stdio.h".
617         (O_BINARY): Don't define here.
618         * jcf-depend.c: Don't include <assert.h>.
619         (jcf_dependency_set_dep_file, jcf_dependency_init,
620         jcf_dependency_write): Use gcc_assert.
621         * jcf-io.c (O_BINARY): Don't define here.
622         * jcf-path.c: Don't include "tm.h".
623         (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
624         * resource.c: Don't include "stdio.h".
625         (O_BINARY): Don't define here.
626         * verify-impl.c: Don't include <stdio.h>.
628 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
630         * jcf-parse.c (java_parse_file): Take no arguments.
631         * java-tree.h (java_parse_file): Update prototype.
633 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
634             Andrew Haley  <aph@redhat.com>
636         PR java/46386
637         * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
639 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
641         * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
642         * lang.c (java_handle_option): Take location_t parameter.
644 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
646         * expr.c (expand_java_field_op): Use %' in diagnostic.
647         * jcf-parse.c (java_parse_file): Use %' in diagnostics.
648         * jvspec.c (lang_specific_driver): Use %' in diagnostic.
649         * lang.c (java_post_options): Use %' in diagnostics.
651 2010-11-06  Joern Rennecke  <amylaar@spamcop.net>
653         PR middle-end/46314
654         * class.c: Include target.h.
655         (make_local_function_alias):
656         Use targetm.asm_out.generate_internal_label.
657         * expr.c (lookup_label, generate_name): Likewise.
659 2010-11-03  Joern Rennecke  <joern.rennecke@embecosm.com>
661         PR bootstrap/44335
662         * jfc-parse.c (target.h): Include.
663         (handle_constant): Use targetm.words_big_endian and
664         targetm.float_words_big_endian.
665         (get_constant): Use targetm.float_words_big_endian.
667 2010-10-13  Richard Henderson  <rth@redhat.com>
669         * lang.c (java_eh_personality): Update call to
670         build_personality_function.
672 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
674         * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
675         options.h.
677 2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
679         * decl.c (java_init_decl_processing): Use build_function_type_list
680         instead of build_function_type.
681         * jcf-parse.c (java_emit_static_constructor): Likewise.
682         * builtins.c (initialize_builtins): Likewise.
684 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
686         * lang.c (java_init_options_struct): New.  Split out from
687         java_init_options.
688         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
690 2010-10-04  Andi Kleen <ak@linux.intel.com>
692         * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
693         Add + to build rule.
695 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
697         * lang.opt: Don't use VarExists.
699 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
701         * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
702         flag_force_classes_archive_check, flag_redundant, flag_newer,
703         flag_use_divide_subroutine, flag_use_atomic_builtins,
704         flag_use_boehm_gc, flag_hash_synchronization,
705         flag_check_references, flag_optimize_sci, flag_indirect_classes,
706         flag_indirect_dispatch, flag_store_check,
707         flag_reduced_reflection): Remove.
708         * jcf-dump.c (flag_newer): Remove.
709         * jcf.h (quiet_flag): Remove.
710         * parse.h (quiet_flag): Remove.
712 2010-09-28  Richard Henderson  <rth@redhat.com>
714         * lang.c: Include "target.h".
715         (java_eh_personality): Use targetm.except_unwind_info.
716         * Make-lang.in (lang.o): Update deps.
718 2010-09-27  Andrew Haley  <aph@redhat.com>
720         PR java/45773
721         * jvgenmain.c (main): Fix arg processing.
723 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
725         * jvspec.c (lang_specific_driver): Handle OPT__help instead of
726         OPT_fhelp.
727         * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
728         -dependencies, -encoding, -extdirs, -include-directory,
729         -include-directory=, -output-class-directory,
730         -output-class-directory=, -resource, -resource=,
731         -user-dependencies): New.
733 2010-09-16  Richard Guenther  <rguenther@suse.de>
735         * jcf-parse.c (current_file_list): Remove.
736         (java_parse_file): Use build_translation_unit_decl.  Adjust.
738 2010-09-03  Joseph Myers  <joseph@codesourcery.com>
740         * lang.opt (d): New.
742 2010-09-03  H.J. Lu  <hongjiu.lu@intel.com>
744         PR java/45504
745         * jvgenmain.c (main): Check "-D XXX=YYY".
747 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
749         * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
751 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
753         * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
754         fCLASSPATH=): Mark as Java options and as aliases.
755         * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
756         (lang_specific_driver): Don't handle options marked as aliases.
757         * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
759 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
761         * Make-lang.in (jvspec.o): Update dependencies.
762         * jvspec.c: Include opts.h.
763         (PARAM_ARG): Remove.
764         (find_spec_file): Do not add leading -specs=.
765         (lang_specific_driver): Use cl_decoded_option structures.
766         * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
767         extdirs, fmain=, s-bc-abi): New options.
769 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
771         * class.c: Use FOR_EACH_VEC_ELT.
772         * expr.c: Likewise.
773         * jcf-parse.c: Likewise.
774         * resource.c: Likewise.
776 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
778         * lang.opt (MD_, MMD_, version): Mark RejectDriver.
780 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
782         * class.c (build_utf8_ref): Fix code formatting from previous commit.
784 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
786         * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
788 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
790         * lang.c (java_handle_option): Update prototype and return value
791         type.
793 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
795         * lang.c (java_option_lang_mask): New.
796         (java_init_options): Update prototype.
797         (LANG_HOOKS_OPTION_LANG_MASK): Define.
799 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
801         * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
802         * boehm.c: Likewise.
803         * class.c: Likewise.
804         * decl.c: Likewise.
805         * expr.c: Likewise.
806         * jcf-parse.c: Likewise.
807         * typeck.c: Likewise.
808         * verify-glue.c: Likewise.
810 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
812         * boehm.c: Include diagnostic-core.h in every file that includes
813         toplev.h.
814         * class.c: Likewise.
815         * constants.c: Likewise.
816         * decl.c: Likewise.
817         * except.c: Likewise.
818         * expr.c: Likewise.
819         * jcf-parse.c: Likewise.
820         * mangle.c: Likewise.
821         * mangle_name.c: Likewise.
822         * resource.c: Likewise.
823         * typeck.c: Likewise.
824         * verify-glue.c: Likewise.
826 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
828         PR bootstrap/44825
829         * class.c (make_class_data): Cast result of VEC_length calls to int.
831 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
833         * constants.c (build_constants_constructor): Use build_constructor
834         instead of build_constructor_from_list.
835         * class.c (make_method_value): Likewise.
836         (get_dispatch_table): Likewise.
837         (make_class_data): Likewise.
838         (emit_indirect_register_classes): Likewise.
839         (emit_symbol_table): Likewise.
840         (add_assertion_table_entry): Likewise.
841         (emit_assertion_table): Likewise.
842         (make_field_value): Use build_constructor_single instead of
843         build_constructor_from_list.
845 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
847         * java-tree.h (struct lang_type) [catch_classes]: Change type to a
848         VEC.
849         * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
850         instead of tree_cons.
851         * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
852         (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
854 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
856         * lang.c: Do not include except.h
857         * except.c: Likewise.
858         (doing_eh): New, moved from except.c (in gcc/) but removed the
859         do_warning flag.
860         (maybe_start_try): Update doing_eh call.
861         * Make-lang.in: Update dependencies.
863 2010-06-23  Anatoly Sokolov  <aesok@post.ru>
865         * decl.c (java_init_decl_processing): Use double_int_to_tree instead
866         of build_int_cst_wide.
867         * boehm.c (set_bit): Remove.
868         (mark_reference_fields): Use double_int type for 'mask' argument.
869         Use double_int_setbit instead of set_bit.
870         (get_boehm_type_descriptor): Use double_int_setbit instead of
871         set_bit. Use double_int_to_tree instead of build_int_cst_wide.
873 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
875         * gcj.texi: Move to GFDL version 1.3.  Fix copyright years.
877 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
879         * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
881         * jcf-parse.c (java_parse_file): Likewise.
882         (process_zip_dir): Likewise.
884         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
885         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
887         * expr.c (add_type_assertion): Likewise.
889         * decl.c (make_binding_level): Likewise.
890         (java_dup_lang_specific_decl): Likewise.
892         * constants.c (set_constant_entry): Likewise.
893         (cpool_for_class): Likewise.
895         * class.c (add_method_1): Likewise.
896         (java_treetreehash_new): Likewise.
898         * java-tree.h (struct lang_type): Add variable_size GTY option.
899         (struct lang_decl): Likewise.
901         * jch.h (struct cpool_entry): Likewise.
903         * java-tree.h (java_treetreehash_create): Remove parameter ggc.
905         * except.c (prepare_eh_table_type): Update
906         java_treetreehash_create call.
908         * class.c (add_method_1): Update java_treetreehash_create call.
909         (java_treetreehash_create): Remove parameter gc.  Use
910         htab_create_ggc.
912 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
914         * jvspec.c (lang_specific_driver): Use GCC-specific formats in
915         diagnostics.
917 2010-05-30  Steven Bosscher  <steven@gcc.gnu.org>
919         * except.c: Include tm.h.
921 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
923         * jvspec.c (lang_specific_driver): Use fatal_error instead of
924         fatal.  Use warning instead of error for warnings.
926 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
928         * expr.c (get_symbol_table_index): Add spaces in expression.
930 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
932         * java-tree.h (method_entry): Declare.  Declare VECs containing it.
933         (struct lang_type): Change type of otable_methods, atable_methods, and
934         itable_methods to VECs.  Fix comment for atable_methods.
935         (emit_symbol_table): Take a VEC instead of a tree.
936         (get_symbol_table_index): Take a VEC * instead of a tree *.
937         * class.c (add_table_and_syms): Take a VEC instead of a tree.
938         (emit_symbol_table): Update for changed parameter type.
939         * expr.c (get_symbol_table_index): Likewise.
941 2010-05-27  Steven Bosscher  <steven@gcc.gnu.org>
943         * buildings.c: Pretend to be a backend file by undefining
944         IN_GCC_FRONTEND (still need rtl.h here).
946 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
948         * java-tree.h (struct lang_decl_func): Change type of throws_list
949         field to a VEC.
950         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
951         of DECL_FUNCTION_THROWS.
952         * class.c (make_method_value): Likewise.
954 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
956         * class.c (utf8_decl_list): Delete.
957         (build_utf8_ref): Remove references to it.
958         * java-tree.h (all_class_list): Delete.
959         (predef_filenames): Delete.
960         (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
961         Delete.
962         * jcf-parse.c (parse_roots): Decrease size to 2.
963         (current_file_list): Convert to a VEC.
964         (all_class_list): Declare.
965         (jcf_parse): Adjust for new type of all_class_list.
966         (java_layout_seen_class_methods): Likewise.
967         (predefined_filenames): Declare.
968         (add_predefined_file): Use it.
969         (predefined_filename_p): Likewise.
970         (java_parse_file): Adjust for new type of current_file_list.
972 2010-05-25  Jakub Jelinek  <jakub@redhat.com>
974         * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
975         for interfaces.
977         PR debug/43260
978         * java-tree.h (pending_static_fields): New extern declaration.
979         (java_write_globals): New prototype.
980         * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
981         * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
982         of a static field push it into pending_static_fields vector.
983         * class.c (pending_static_fields): New variable.
984         (add_field): If static field is not DECL_EXTERNAL, push it into
985         pending_static_fields vector.
986         (java_write_globals): New function.
988 2010-05-24  Nathan Froyd  <froydnj@codesourcery.com>
990         * expr.c (quick_stack): Change type to a VEC.  Update comment.
991         (tree_list_free_list): Delete.
992         (flush_quick_stack): Update for quick_stack type change.
993         (push_value): Likewise.
994         (pop_value): Likewise.
996 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
998         * java-gimplify.c: Do not include tm.h, toplev.h.
999         * typeck.c: Do not include tm.h.
1000         * mangle_name.c: Do not include tm.h.
1001         * jcf-dump.c: Do not include tm.h, ggc.h.
1002         * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
1003         * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
1004         and timevar.h.
1005         * jcf-parse.c: Do not include tm.h and tm_p.h.
1006         * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
1007         target.h, and expr.h.
1008         * except.c: Do not include tm.h, rtl.h, function.h.
1009         * builtins.c: Do not include convert.h.  Explain why RTL headers
1010         have to be included here.
1011         * verify-glue.c: Do not include tm.h.
1012         * jcf-depend.c: Do not include tm.h.
1013         * jcf-reader.c: Include ggc.h.
1014         * jcf-io.c: Do not include tm.h, toplev.h.
1015         * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
1016         gimple.h.
1017         * lang.c: Do not include rtl.h, expr.h.
1018         * Make-lang.in: Update dependencies.
1020 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
1022         * jcf-parse.c: Include bitmap.h.
1023         * Make-lang.in: Update dependencies.
1025 2010-05-20  Jakub Jelinek  <jakub@redhat.com>
1027         PR debug/43521
1028         * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
1029         PARM_DECL.
1031 2010-05-19  Anatoly Sokolov  <aesok@post.ru>
1033         * jcf-parse.c (get_constant): Use double_int_to_tree instead of
1034         build_int_cst_wide_type.
1036 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
1038         * expr.c (pop_arguments): Fix use of undeclared variable.
1040 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
1042         * expr.c (expand_java_multianewarray): Use build_call_vec instead of
1043         build_call_list.
1044         (pop_arguments): Return a VEC instead of a tree.  Take a method type
1045         rather than a list of argument types.
1046         (rewrite_rule): Change signature. of rewrite_arglist member.
1047         (rewrite_arglist_getcaller): Update signature.
1048         (rewrite_arglist_getclass): Likewise.
1049         (maybe_rewrite_invocation): Update for rewrite_arglist change.
1050         (build_known_method_ref): Take a VEC instead of a tree.
1051         (invoke_build_dtable): Likewise.
1052         (expand_invoke): Update calls to pop_arguments.  Use build_call_vec
1053         instead of build_call_list.
1054         (build_jni_stub): Use build_call_vec instead of build_call_list.
1055         * java-tree.h (maybe_rewrite_invocation): Update declaration.
1056         (build_known_method_ref): Likewise.
1057         (invoke_build_dtable): Likewise.
1059 2010-05-14  Nathan Froyd  <froydnj@codesourcery.com>
1061         PR 44103
1062         * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
1063         vector.  Move call to build_constructor...
1064         (FINISH_RECORD_CONSTRUCTOR): ...here.  Add necessary arguments.  Clear
1065         TREE_CONSTANT on the constructor.
1066         (PUSH_SUPER_VALUE): Change first argument to a vector.
1067         (PUSH_FIELD_VALUE): Likewise.
1068         * resource.c (compile_resource_data): Update calls to above macros.
1069         * constants.c (build_constants_constructor): Likewise.
1070         * class.c (build_utf8_ref): Likewise.
1071         (make_field_value): Likewise.
1072         (make_method_value): Likewise.
1073         (add_table_and_syms): New function.
1074         (make_class_data): Call it.  Update calls to above macros.
1075         (build_symbol_table_entry): New function.
1076         (build_symbol_entry): Call it.  Update calls to above macros.
1077         (emit_symbol_table): Likewise.
1078         (make_catch_class_record): Update calls to above macros.
1079         (build_assertion_table_entry): New function.
1080         (add_assertion_table_entry): Call it.
1081         (emit_assertion_table): Likewise.
1083 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1085         PR 40989
1086         * lang.c (java_handle_option): Add argument kind.
1088 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1090         * decl.c (java_init_decl_processing): Remove argument in call to
1091         initialize_sizetypes
1093 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
1095         * exception.cc (_Jv_Throw): Avoid set but not used warning.
1096         * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
1097         sizeof to avoid set but not used warnings.
1099 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
1101         * lang.c (java_post_options): Constify variable "dot".
1103         * jcf-parse.c (set_source_filename): Constify variable "dot".
1104         (load_class): Constify variable "separator".
1105         Use get_identifier_with_length.
1107         * jvspec.c (lang_specific_driver): Constify two variables named "p".
1109 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
1111         * jcf-dump.c (version): Update copyright notice dates.
1113 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
1115         * jvspec.c (lang_specific_driver): Remove unused
1116         saw_verbose_flag variable.
1117         * jcf-dump.c (main): Remove unused general_purpose_bits
1118         variable.
1119         * builtins.c (initialize_builtins): Remove unused float_ftype_float
1120         variable.
1121         * expr.c (java_stack_pop): Remove unused val variable.
1122         (build_jni_stub): Remove unused res_type variable.
1123         * verify-impl.c (check_field_constant): Remove unused len variable.
1125 2009-10-20  Joel Dice <dicej@mailsnare.net>
1127         PR java/28474
1128         * mangle_name.c (append_unicode_mangled_name): Fix mangling
1129         of names with multiple underscores and "U".
1130         (unicode_mangling_length): Likewise.
1132 2009-10-03  Simon Baldwin  <simonb@google.com>
1134         * config-lang.in (lang_dirs): Remove zlib.
1136 2009-09-28  Richard Henderson  <rth@redhat.com>
1138         * builtins.c (initialize_builtins): Update call to
1139         build_common_builtin_nodes.
1140         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
1142 2009-09-14  Richard Henderson  <rth@redhat.com>
1144         * builtins.c (initialize_builtins): Update call to
1145         build_common_builtin_nodes.
1146         * decl.c (java_init_decl_processing): Don't call
1147         default_init_unwind_resume_libfunc.
1148         * except.c: Include tree-iterator.h.
1149         (build_exception_object_var): New.
1150         (build_exception_object_ref): Use it.
1151         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
1152         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
1153         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
1155 2009-09-13  Richard Guenther  <rguenther@suse.de>
1156         Rafael Avila de Espindola  <espindola@google.com>
1158         * decl.c (do_nothing): Remove.
1159         (java_init_decl_processing): Do not set lang_eh_runtime_type.
1160         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
1161         * lang.c (java_eh_personality): New.
1162         (java_eh_personality_decl): Likewise.
1163         (LANG_HOOKS_EH_PERSONALITY): Define.
1165 2009-09-03  Diego Novillo  <dnovillo@google.com>
1167         * lang.c (lang_hooks): Remove const qualifier.
1169 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
1171         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
1172         type.
1174 2009-09-01  Richard Guenther  <rguenther@suse.de>
1176         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
1177         * java-tree.h (java_mark_addressable): Likewise.
1178         * typeck.c (java_mark_addressable): Likewise.
1180 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1182         * Make-lang.in (java.install-pdf): Install gcj.pdf in
1183         $(pdfdir)/gcc, alongside the other manuals.
1185 2009-08-12  Andrew Haley  <aph@redhat.com>
1187         * builtins.c (compareAndSwapInt_builtin): Use
1188         flag_use_atomic_builtins.
1189         (compareAndSwapLong_builtin): Likewise.
1190         (compareAndSwapObject_builtin): Likewise.
1191         * jvspec.c: Add flag_use_atomic_builtins.
1192         * gcj.texi: Likewise.
1193         * java-tree.h: Likewise.
1194         * lang.opt: Likewise.
1196 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
1198         PR debug/40990
1199         * lang.c (put_decl_node): Outputs different level of information
1200         depending on the verbosity level.
1202 2009-07-31  Andrew Haley  <aph@redhat.com>
1204         PR java/40867
1205         * decl.c (java_replace_references): Set EXPR_LOCATION on all
1206         generated expressions.
1207         (binding_level.loc): new field.
1208         (clear_binding_level): Initialize loc.
1209         (set_input_location): New function.
1210         (pushlevel): Set new binding_level.loc.
1211         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1212         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1213         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1215 2009-07-17  Richard Guenther  <rguenther@suse.de>
1217         PR c/40401
1218         * java-gimplify.c (java_genericize): Do not gimplify here.
1219         But replace all local references.
1220         (java_gimplify_expr): Do not replace local references here.
1221         (java_gimplify_modify_expr): Likewise.
1222         * jcf-parse.c (java_parse_file): Do not finalize the CU or
1223         optimize the cgraph here.
1224         * decl.c (java_replace_reference): Make static.
1225         (java_replace_references): New function.
1226         (end_java_method): Clear base_decl_map.
1227         * java-tree.h (java_replace_references): Declare.
1228         (java_replace_reference): Remove.
1230 2009-07-14  Taras Glek  <tglek@mozilla.com>
1231             Rafael Espindola  <espindola@google.com>
1233         * Make-lang.in (java.install-plugin): New target for
1234         installing plugin headers.
1236 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1238         * class.c: Replace %J by an explicit location. Update all calls.
1240 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1242         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1244 2009-06-29  Andrew Haley  <aph@redhat.com>
1246         PR java/40590
1247         * java-tree.h (cxx_keyword_p): New declaration.
1248         * mangle_name.c (utf8_cmp): Move here from mangle.c.
1249         (cxx_keywords): Likewise.
1250         (cxx_keyword_p): Likewise.
1251         (MANGLE_CXX_KEYWORDS): New macro.
1252         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1253         (append_gpp_mangled_name): Likewise.
1254         * mangle.c: Move code to mangle_name.c.
1255         (mangle_member_name): Don't call cxx_keyword_p.
1257 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
1259         * java-gimplify.c (java_gimplify_block): New argument to
1260         build_empty_stmt.
1261         * expr.c (force_evaluation_order): Same.
1262         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1263         * class.c: Same.
1264         * decl.c: Same.
1265         * jcf-parse.c: Same.
1266         * constants.c: Same.
1267         * resource.c: Same.
1268         * except.c: Same.
1269         * builtins.c: Same.
1270         * expr.c: Same.
1271         * java-tree.h (PUSH_FIELD): Add location field.
1273 2009-06-09  Ian Lance Taylor  <iant@google.com>
1275         * verify.h: Remove extern "C".
1277 2009-06-07  Ian Lance Taylor  <iant@google.com>
1279         * jcf-parse.c (handle_constant): Change local variable 'kind' to
1280         unsigned int.
1282 2009-06-01  Ian Lance Taylor  <iant@google.com>
1284         * jcf-io.c (find_class): Use CONST_CAST.
1286 2009-05-27  Ian Lance Taylor  <iant@google.com>
1288         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1289         $(LINKER).
1290         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1292 2009-05-26  Ian Lance Taylor  <iant@google.com>
1294         * Make-lang.in (jvspec.o): Use $(COMPILER).
1295         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1296         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1298 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
1300         * Make-lang.in (GCJ): Renamed to...
1301         (XGCJ): ... this.
1303 2009-04-27  Ian Lance Taylor  <iant@google.com>
1305         * builtins.c (java_builtins): Add casts to enum type.
1306         * verify-impl.c (check_class_constant): Add cast to enum type.
1307         (check_constant, check_wide_constant): Likewise.
1309 2009-04-27  Richard Guenther  <rguenther@suse.de>
1311         PR java/38374
1312         * constants.c (build_constants_constructor): Retain the old
1313         pointer type as valid TYPE_POINTER_TO after patching the
1314         type of the constant pool decl.
1316 2009-04-24  Ian Lance Taylor  <iant@google.com>
1318         * jcf-parse.c (handle_constant): Add cast to enum type.
1320 2009-04-21  Taras Glek <tglek@mozilla.com>
1322         * builtins.c: Update GTY annotations to new syntax
1323         * decl.c: Likewise
1324         * java-tree.h: Likewise
1325         * jcf.h: Likewise
1326         * lang.c: Likewise
1328 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
1330         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1331         license notices.
1333 2009-04-18  Ian Lance Taylor  <iant@google.com>
1335         * verify-impl.c (verify_instructions_0): Add cast to enum type.
1337 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
1339         * builtins.c (compareAndSwapLong_builtin,
1340         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1341         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1343 2009-03-31  Richard Guenther  <rguenther@suse.de>
1345         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1346         the first operand of binary and comaprison expressions.
1348 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
1350         PR rtl-optimization/323
1351         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1352         Give an error for -fexcess-precision=standard for processors where
1353         the option is significant.
1355 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1357         * lang.opt: Unify help text for -Wdeprecated.
1359 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
1361         * jcf-dump.c (version): Update copyright notice dates.
1363 2009-01-16  Richard Guenther  <rguenther@suse.de>
1365         PR tree-optimization/38835
1366         PR middle-end/36227
1367         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1369 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
1371         PR bootstrap/38262
1372         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1374 2008-11-04  Andrew Haley  <aph@redhat.com>
1376         PR java/37068
1377         * jcf-parse.c (java_emit_static_constructor): Don't call
1378         cgraph_build_static_cdtor.  Rewrite.
1380 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
1382         * Make-lang.in (check-java-subtargets): New target.
1384 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
1386         PR target/35483
1387         * Make-lang.in (class.o): Depend on $(TM_P_H).
1388         (expr.o): Same.
1389         * class.c: Include tm_p.h.
1390         * expr.c: Include tm_p.h.
1392 2008-10-14  Andrew Haley  <aph@redhat.com>
1394         * constants.c (build_constant_data_ref): Make sure we only build
1395         one copy of the decl for the constant pool.
1397 2008-09-22  Andrew Haley  <aph@redhat.com>
1399         * expr.c (rules): Add new rule for
1400         gnu.java.lang.VMCPStringBuilder.toString.
1401         (rewrite_rule.new_classname): New field.
1402         (maybe_rewrite_invocation): Use new_classname field instead of
1403         DECL_CONTEXT (*method_p).
1404         Allow rewrite_arglist to be NULL.
1406 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1408         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1409         (java_get_callee_fndecl): Kill.
1411 2008-09-17  Jan Hubicka  <jh@suse.cz>
1413         PR c++/18071
1414         * class.c (add_method_1): Do not initialize DECL_INLINE.
1415         (make_local_function_alias): Likewise.
1416         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1417         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1419 2008-09-09  Richard Guenther  <rguenther@suse.de>
1421         * decl.c (build_result_decl): Remove no longer applicable
1422         promotion.
1424 2008-09-05  David Daney  <ddaney@avtrex.com>
1426         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1428 2008-08-21  David Daney  <ddaney@avtrex.com>
1430         * class.c (make_class_data): Don't add field_index when
1431         flag_reduced_reflection set.
1433 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
1435         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1437 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1439         PR 28875
1440         * lang.c (java_handle_option): Replace set_Wunused with
1441         warn_unused.
1443 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1445         * gcj.texi: Update copyright years.  Do not list GPL as
1446         Invariant Section.
1448 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
1450         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1451         from ctype's sizes.
1453         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1454         alignment.
1456 2008-07-29  Jan Hubicka  <jh@suse.cz>
1458         * lang.c (java_post_options): Remove handling of flag_no_inline.
1460 2008-07-28  Richard Guenther  <rguenther@suse.de>
1462         Merge from gimple-tuples-branch.
1464         2008-07-18  Richard Guenther  <rguenther@suse.de>
1466         * expr.c: Include tree-iterator.h.
1467         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1469         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
1471         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1472         * expr.c: Same.
1474         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
1476         * java-gimplify.c (java_gimplify_expr): Same.
1477         (java_gimplify_modify_expr): Same.
1478         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1480         2008-05-02  Diego Novillo  <dnovillo@google.com>
1482         * expr.c (build_java_throw_out_of_bounds_exception): Fix
1483         mixed declarations and code.
1485         2008-05-02  Doug Kwan  <dougkwan@google.com>
1487         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1488         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1490         2008-02-19  Diego Novillo  <dnovillo@google.com>
1492         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1494         * java-gimplify.c (java_gimplify_self_mod_expr): Change
1495         gimple_seq arguments to gimple_seq *.  Update all users.
1497         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
1499         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1500         sequences.
1501         (java_gimplify_self_mod_expr): Same.
1502         * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1503         sequences.
1505 2008-07-24  Jan Hubicka  <jh@suse.cz>
1507         * java/decl.c: Include cgraph.h
1508         (end_java_method): Remove non-unit-at-a-time code.
1509         (java_mark_decl_local): Likewise; sanity check that we don't touch
1510         finalized nodes.
1512 2008-07-15  Jan Hubicka  <jh@suse.cz>
1514         * lang.c (java_init_options): Enable unit-at-a-time by default.
1516 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1518         * Make-lang.in (jvspec.o): Fix dependencies.
1520 2008-07-06  Tom Tromey  <tromey@redhat.com>
1522         * Make-lang.in (java/parse.o-warn): Remove.
1523         (java/jcf-io.o-warn): Remove.
1525 2008-07-05  Tom Tromey  <tromey@redhat.com>
1527         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
1528         (compare_path): Remove.
1529         (java_or_class_file): Likewise.
1530         (memoized_dirlist_entry): Likewise.
1531         (memoized_dirlist_hash): Likewise.
1532         (memoized_dirlist_lookup_eq): Likewise.
1533         (memoized_dirlists): Likewise.
1534         (caching_stat): Likewise.
1535         (find_class): Use stat.
1536         * jcf.h (JCF_USE_SCANDIR): Remove.
1538 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
1540         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1541         doc/rebuild-gcj-db.1
1542         (java.uninstall): Likewise.
1543         (java.maintainer-clean): Likewise.
1544         (aot-compile.pod): New rule.
1545         (rebuild-gcj-db.pod): New rule.
1546         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1547         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1549 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1551         * Make-lang.in (java/jcf-io.o-warn): New.
1553 2008-06-24  Tom Tromey  <tromey@redhat.com>
1555         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1556         * expr.c (add_type_assertion): Rename argument.
1557         (build_java_arrayaccess): Don't name variable 'throw'.
1558         (ARRAY_NEW_MULTI): Don't name variable 'class'.
1559         * jcf-io.c (find_class): Don't name variable 'class'.
1560         * mangle.c (compression_table_add): Don't name variable 'new'.
1561         * constants.c (cpool_for_class): Rename argument.
1562         (alloc_constant_fieldref): Likewise.
1563         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1564         'class'.
1565         (read_class): Likewise.
1566         (parse_zip_file_entries): Likewise.
1567         (process_zip_dir): Likewise.
1568         * decl.c (java_mark_class_local): Rename argument.
1569         * class.c (GEN_TABLE): Use type_name, not typename.
1570         (gen_indirect_dispatch_tables): Likewise.
1571         (add_field): Rename argument.
1572         (is_compiled_class): Likewise.
1573         (safe_layout_class): Likewise.
1574         (emit_assertion_table): Likewise.
1575         * typeck.c (has_method): Rename argument.
1577 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1579         * class.c (ident_subst, mangled_classname, unmangle_classname,
1580         gen_indirect_dispatch_tables, add_method_1,
1581         build_fieldref_cache_entry, make_local_function_alias,
1582         layout_class, java_treetreehash_find, java_treetreehash_new,
1583         split_qualified_name): Fix for -Wc++-compat.
1584         * constants.c (set_constant_entry, cpool_for_class): Likewise.
1585         * decl.c (make_binding_level, java_dup_lang_specific_decl,
1586         start_java_method): Likewise.
1587         * except.c (prepare_eh_table_type): Likewise.
1588         * expr.c (type_assertion_hash, note_instructions): Likewise.
1589         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1590         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1591         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1592         Likewise.
1593         * jcf-parse.c (reverse, java_read_sourcefilenames,
1594         annotation_grow, rewrite_reflection_indexes, java_parse_file,
1595         process_zip_dir): Likewise.
1596         * jcf-path.c (add_entry, add_path, jcf_path_init,
1597         jcf_path_extdirs_arg): Likewise.
1598         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1599         * jvgenmain.c (do_mangle_classname): Likewise.
1600         * lang.c (put_decl_string): Likewise.
1601         * verify-impl.c (make_state_copy, make_state, add_new_state):
1602         Likewise.
1604 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1606         * gcj.texi: Expand TABs, remove whitespace from blank lines.
1608 2008-06-14  Tom Tromey  <tromey@redhat.com>
1610         PR java/36247:
1611         * class.c (build_class_ref): Initialize this_classdollar when
1612         needed.
1614 2008-05-23  Andrew Haley  <aph@redhat.com>
1616         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1617         pathname of source file.
1619 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
1621         * jcf-dump.c (print_constant): Use
1622         HOST_LONG_LONG_FORMAT.
1624 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
1626         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1627         DECL_PURE_P.
1629 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1631         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1632         (build_classdollar_field): Don't set TREE_INVARIANT.
1633         (get_dispatch_table): Don't set TREE_INVARIANT.
1634         (make_class_data): Don't set TREE_INVARIANT.
1635         (build_symbol_entry): Don't set TREE_INVARIANT.
1636         (emit_symbol_table): Don't set TREE_INVARIANT.
1637         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1638         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1639         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1640         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1642 2008-04-03  Tom Tromey  <tromey@redhat.com>
1644         * Make-lang.in (java_OBJS): New variable.
1646 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
1648         * java-tree.h (insert_block): Kill.
1649         * decl.c (insert_block): Kill.
1651 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
1653         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1654         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1655         gpl.texi.
1657 2008-03-27  Tom Tromey  <tromey@redhat.com>
1659         * Make-lang.in: Revert automatic dependency patch.
1661 2008-03-25  Tom Tromey  <tromey@redhat.com>
1663         * Make-lang.in: Removed most explicit .o targets.
1664         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
1665         ($(GCJ)$(exeext)): Update.
1666         (JAVA_OBJS): New variable.
1667         (JCFDUMP_OBJS): Reformat.
1668         (java_OBJS): New variable.
1669         (java/jvspec.o-warn): Update.
1670         (java/parse.o-warn): Remove.
1671         (JAVA_TREE_H): Remove.
1672         (java/jcf-io.o): Reduce to variable setting.
1673         (ALL_CPPFLAGS): Likewise.
1675 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
1677         * mangle.c (java_mangle_decl): Remove dead check.
1679 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
1681         * jcf-parse.c (java_parse_file): Assert binding levels are
1682         left in order.
1683         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1684         Delete.
1686 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
1688         * jcf-dump.c (version): Update copyright notice dates.
1690 2008-02-29  Tom Tromey  <tromey@redhat.com>
1692         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1693         method.
1694         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1696 2008-02-26  Tom Tromey  <tromey@redhat.com>
1698         * lang.c (java_post_options): Remove conditional.
1699         * expr.c (expand_byte_code): Remove old location code.
1700         * jcf-parse.c (set_source_filename): Remove old location code.
1701         (give_name_to_class): Likewise.
1702         (jcf_parse): Likewise.
1703         (duplicate_class_warning): Likewise.
1704         (parse_class_file): Likewise.
1705         (java_parse_file): Likewise.
1706         * decl.c (finish_method): Remove old location code.
1707         * class.c (push_class): Remove old location code.
1709 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1711         PR other/35107
1712         * Make-lang.in (jc1): Add $(GMPLIBS).
1714 2008-01-23  David Daney  <ddaney@avtrex.com>
1716         * class.c (hide)  Rename to...
1717         (java_hide_decl) ... this throughout, and make public.
1718         * resource.c (Jr_count): Remove.
1719         (compile_resource_data): Call java_mangle_resource_name to generate
1720         decl name.  Make resource decl public and hidden.
1721         * mangle.c (java_mangle_resource_name): New function.
1722         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1723         functions.
1725 2008-01-04  Andrew Haley  <aph@redhat.com>
1727         PR java/17779
1728         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1729         C90.
1731 2008-01-03  Andrew Haley  <aph@redhat.com>
1733         PR java/17779
1734         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1735         we're about to re-layout the type.
1737 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
1739         * lang.c (java_classify_record): Don't return
1740         RECORD_IS_INTERFACE for now.
1742 2007-12-18  Andrew Haley  <aph@redhat.com>
1744         PR java/27643
1745         * jcf-parse.c (java_parse_file): Remove call to
1746         java_mark_class_local.
1747         (parse_class_file): Reinstate call to java_mark_class_local here.
1748         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1749         already set, call java_mangle_decl() and make_decl_rtl() to
1750         rewrite its name as a hidden alias.
1752 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1754         PR debug/7081
1755         * lang.c (java_classify_record): New.
1756         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1758 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1760         PR 34081/C++
1761         * decl.c (finish_method): Pass 'false' for the new
1762         allocate_struct_function parameter.
1764 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1766         * expr.c (build_jni_stub): Use the computed jni func type for
1767         variable meth.
1769 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1771         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1773 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1775         * expr.c (type_assertion_hash): Hash type uids rather than
1776         tree pointers.
1778 2007-11-17  David Daney  <ddaney@avtrex.com>
1779             Andrew Haley  <aph@redhat.com>
1781         * constants.c (build_constants_constructor):  Use POINTER_SIZE
1782         insead of BITS_PER_WORD in big-endian work around.
1784 2007-11-07  Tom Tromey  <tromey@redhat.com>
1786         PR java/34019:
1787         * gcj.texi (Input Options): Add missing noun.
1789 2007-11-02  Tom Tromey  <tromey@redhat.com>
1791         PR java/33765:
1792         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1793         * zipfile.h (ZIPEMPTYMAGIC): New define.
1795 2007-11-01  Tom Tromey  <tromey@redhat.com>
1797         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1798         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1799         (java/jcf-io.o): Depend on zipfile.h.
1801 2007-10-17  Richard Guenther  <rguenther@suse.de>
1803         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1804         dependencies.
1806 2007-10-03  Andrew Haley  <aph@redhat.com>
1808         PR java/33639
1809         * class.c (mangled_classname): Detect and replace illegal
1810         characters in assembly language symbols.
1811         (gen_indirect_dispatch_tables): Call mangled_classname() on
1812         the type.
1814 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1816         * lang.c (java_print_error_function): Add third argument.
1818 2007-09-15  Tom Tromey  <tromey@redhat.com>
1820         * java-tree.h (struct lang_decl_func) <function_decl_body>:
1821         Remove.
1822         <init_final>: Likewise.
1823         * lang.c (java_dump_tree): Update.
1824         * java-tree.h (DECL_FUNCTION_BODY): Remove.
1826 2007-09-11  Jan Hubicka <jh@suse.cz>
1828         * decl.c (java_expand_body): Kill.
1829         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1831 2007-09-06  Tom Tromey  <tromey@redhat.com>
1833         * jcf-parse.c (parse_class_file): Re-enter the current file.
1835 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
1837         * boehm.c (mark_reference_fields): Move misaligned pointer check
1838         after JREFERENCE_TYPE_P test
1840 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
1842         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1843         if pointer is misaligned.
1845 2007-09-06  Tom Tromey  <tromey@redhat.com>
1847         * lang.c (java_post_options): Update.
1848         * jcf-parse.c (set_source_filename): Update.
1849         (give_name_to_class): Update.
1850         (jcf_parse): Update.
1851         (duplicate_class_warning): Update.
1852         (parse_class_file): Update.
1853         (java_parse_file): Update.
1854         * expr.c (expand_byte_code): Update.
1856 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1858         * decl.c (finish_method): Use set_cfun.
1860 2007-09-04  Andrew Haley  <aph@redhat.com>
1862         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1863         when using the ARM EABI.
1865 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1867         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1869 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1871         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1872         CONST_CAST.
1873         * jcf.h (JCF_FINISH): Likewise.
1875 2007-08-28  Tom Tromey  <tromey@redhat.com>
1877         * Make-lang.in (java.tags): Don't tag '*.y' files.
1879 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1881         * lang.c (java_decl_ok_for_sibcall): Likewise.
1883 2007-08-21  Paul Brook  <paul@codesourcery.com>
1884             Nathan Sidwell  <nathan@codesourcery.com>
1885             Mark Mitchell  <mark@codesourcery.com>
1886             Joseph Myers  <joseph@codesourcery.com>
1888         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
1889         date.
1891 2007-08-20  Richard Guenther  <rguenther@suse.de>
1893         * lang.c (java_tree_inlining_walk_subtrees): Remove.
1894         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1896 2007-08-17  Tom Tromey  <tromey@redhat.com>
1898         * typeck.c (find_method_in_interfaces): Update.
1899         * jcf-parse.c (load_class): Update.
1900         * java-gimplify.c (java_gimplify_component_ref): Removed.
1901         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
1902         arguments.
1903         (java_gimplify_expr): Update.
1904         * decl.c (java_init_decl_processing): Update.
1905         * class.c (set_constant_value): Update.
1906         (make_class_data): Update.
1907         (finish_class): Update.
1908         (build_static_field_ref): Update.
1909         (is_compiled_class): Update.
1910         (maybe_layout_super_class): Update.
1911         (layout_class): Update.
1912         (layout_class_method): Update.
1913         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1914         (lang_decl_var) <am, final_iud, cif>: Removed fields.
1915         (lang_decl_func) <init_calls_this>: Removed field.
1916         (lang_type) <dot_class, verify_method>: Removed fields.
1917         (FIELD_NESTED_ACCESS): Removed.
1918         (FIELD_NESTED_ACCESS_P): Removed.
1919         (DECL_FIELD_FINAL_IUD): Removed.
1920         (DECL_LOCAL_FINAL_IUD): Removed
1921         (LOCAL_FINAL_P): Removed.
1922         (FINAL_VARIABLE_P): Removed.
1923         (CLASS_FINAL_VARIABLE_P): Removed.
1924         (DECL_BIT_INDEX): Removed.
1925         (DECL_INIT_CALLS_THIS): Removed.
1926         (FIELD_LOCAL_ALIAS): Removed.
1927         (FIELD_LOCAL_ALIAS_USED): Removed.
1928         (FIELD_THISN): Removed.
1929         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1930         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1931         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1932         (TYPE_DOT_CLASS): Removed.
1933         (TYPE_VERIFY_METHOD): Removed.
1934         (ID_CLASSDOLLAR_P): Removed.
1935         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1936         Removed.
1937         (classdollar_identifier_node): Removed.
1938         (TYPE_UNKNOWN): Removed.
1939         (CLASS_FROM_SOURCE_P): Removed.
1940         * expr.c (build_jni_stub): Update.
1941         (force_evaluation_order): Update.
1942         (build_java_empty_stmt): Update.
1943         (build_class_init): Update.
1944         (java_stack_swap): Update.
1945         (build_jni_stub): Update.
1947 2007-08-17  Tom Tromey  <tromey@redhat.com>
1949         * java-tree.h (LABEL_TYPE_STATE): Removed.
1950         (load_type_state): Removed.
1951         (LABEL_PC): Removed.
1952         (LABEL_VERIFIED): Removed.
1953         (type_states): Declare.
1954         * expr.c (type_states): New global.
1955         (load_type_state): Now static.  Use type_states.  Changed
1956         argument.
1957         (lookup_label): Don't set LABEL_PC.
1958         (expand_byte_code): Don't use LABEL_VERIFIED.
1959         (note_instructions): Initialize type_states.
1960         * verify-glue.c (vfy_note_stack_depth): Rewrote.
1961         (vfy_note_stack_type): Use type_states.
1962         (vfy_note_local_type): Likewise.
1964 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1966         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1967         * jcf.h (JCF_FINISH): Likewise.
1969 2007-07-31  Nick Clifton  <nickc@redhat.com>
1971         * java-gimplify.c: Change copyright header to refer to version 3
1972         of the GNU General Public License and to point readers at the
1973         COPYING3 file and the FSF's license web page.
1974         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1975         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1976         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1977         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1978         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1979         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1980         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1982 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1984         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1986 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1988         * lang.c (java_get_callee_fndecl): Constify.
1990 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1992         * mangle.c (set_type_package_list): Constify.
1993         * verify-glue.c (vfy_make_string): Delete.
1994         * verify.h (vfy_make_string): Likewise.
1996 2007-07-26  Tom Tromey  <tromey@redhat.com>
1998         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1999         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
2000         EXIT_BLOCK_LABELED_BLOCK): Likewise.
2001         * lang.c (java_tree_inlining_walk_subtrees): Update.
2002         (java_dump_tree): Likewise.
2003         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
2004         Remove.
2005         * decl.c (push_labeled_block, pop_labeled_block): Remove.
2006         * java-gimplify.c (java_gimplify_labeled_block_expr,
2007         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
2008         (java_gimplify_expr): Update.
2010 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2012         * class.c (java_treetreehash_hash, java_treetreehash_compare):
2013         Constify.
2014         * expr.c (type_assertion_eq): Likewise.
2015         * jcf-io.c (compare_path): Likewise.
2016         * jcf-parse.c (cmpstringp): Likewise.
2017         * verify-impl.c (get_one_type, compute_argument_types,
2018         compute_return_type): Likewise.
2020 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2022         PR target/32462
2023         PR libgcj/32465
2024         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
2026 2007-07-12  Richard Guenther  <rguenther@suse.de>
2028         * expr.c (expand_java_return): RETURN_EXPR has void type.
2029         (build_jni_stub): Likewise.  Use a comparison against zero
2030         for null-pointer test in COND_EXPR.
2031         (build_field_ref): Build POINTER_PLUS_EXPR with correct
2032         type.  Convert result instead.
2033         (build_invokevirtual): Likewise.
2035 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
2037         PR 32617
2038         * lang.c (java_init): Remove setting of force_align_functions_log.
2039         * class.c (add_method_1): Set DECL_ALIGN of non-static method
2040         to cope with ptrmemfunc_vbit_in_pfn.
2042 2007-07-03  David Daney  <ddaney@avtrex.com>
2044         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
2045         include path.
2046         (doc/gcj.dvi): Same.
2047         (doc/gcj.pdf): Same.
2048         (java/index.html): Same.
2050 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
2052         * class.c (make_class_data): Build the index in sizetype.
2053         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
2054         adding to a pointer type.
2055         (build_symbol_entry): Likewise.
2056         * expr.c (build_java_arrayaccess): Likewise.
2057         (build_field_ref): Likewise.
2058         (build_known_method_ref): Likewise.
2059         (build_invokevirtual): Likewise.
2060         * except.c (build_exception_object_ref): Do a
2061         NEGATIVE and then a POINTER_PLUS_EXPR instead
2062         of a MINUS_EXPR.
2064 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
2066         * typeck.c (java_signed_type): Remove.
2067         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2068         * java-tree.h (java_signed_type): Remove.
2070 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
2072         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
2073         (print_constant): Likewise.
2075 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
2077         * expr.c (build_java_binop): Use unsigned_type_for instead of
2078         java_unsigned_type.
2079         * java-tree.h (java_unsigned_type): Remove.
2080         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2081         * typeck.c (java_unsigned_type): Remove.
2083 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2085         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
2086         instead of checking GIMPLE_STMT_P in chain_next.
2088 2007-04-06  Colin Walters  <walters@redhat.com>
2090         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
2091         * jcf-io.c (open_class): Copy 'filename'.
2093 2007-04-03  Andrew Haley  <aph@redhat.com>
2095         * jvgenmain.c (main): Change main to use class$, not class$$.
2096         (do_mangle_classname): Likewise.
2097         * class.c (hide): New function.
2098         (add_field): Hide everything that shouldn't be visible outside a
2099         DSO.
2100         (build_static_class_ref): Likewise.
2101         (build_classdollar_field): Likewise.
2102         (make_class_data): Likewise.
2103         (layout_class_method): Likewise.
2104         * expr.c (special_method_p): New function.
2106         * class.c (push_class): Don't bogusly guess the source filename.
2107         * jcf-parse.c (give_name_to_class): Don't set input_location from
2108         DECL_ARTIFICIAL decls.
2110 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
2112         * typeck.c (java_signed_or_unsigned_type): Removed.
2113         (java_signed_type): use get_signed_or_unsigned_type instead of
2114         java_signed_or_unsigned_type.
2115         (java_unsigned_type): Ditto.
2116         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
2117         * java-tree.h (java_signed_or_unsigned_type): Removed.
2119 2007-03-26  Tom Tromey  <tromey@redhat.com>
2121         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
2122         (java.maintainer-clean): Likewise.
2123         (java.install-man): Likewise.
2124         (.INTERMEDIATE): Removed grmiregistry.pod.
2125         (grmiregistry.pod): Removed.
2126         * gcj.texi (Invoking gcjh): Removed.
2127         (Invoking gjnih): Likewise.
2128         (Invoking grmiregistry): Likewise.
2129         (direntry): Updated.
2130         (Top): Likewise.
2131         (which-gcj): Removed.
2133 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2135         * Make-lang.in: Add install-pdf target as copied from
2136         automake v1.10 rules.
2138 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
2140         * gcj.texi: Standardize title page.
2142 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2144         * class.c: Fix a comment typo.
2146 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2147             Brooks Moses  <brooks.moses@codesourcery.com>
2148             Lee Millward  <lee.millward@codesourcery.com>
2150         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
2151         of build3.
2152         (BUILD_MONITOR_EXIT): Likewise.
2154         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
2155         (java_gimplify_modify_expr): Likewise.
2157         * class.c (cache_this_class_ref): Use build_call_expr.
2158         (build_static_field_ref): Likewise.
2159         (emit_indirect_register_classes): Likewise.
2160         (emit_register_classes): Likewise.
2162         * resource.c (write_resource_constructor): Use build_call_expr.
2164         * builtins.c (builtin_creator_function): Change interpretation of
2165         the second parameter to be the whole CALL_EXPR instead of the arglist.
2166         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
2167         (min_builtin): Likewise.
2168         (abs_builtin): Likewise.
2169         (java_build_function_call_expr): Likewise.
2170         (convert_real): Likewise.
2171         (UNMARSHAL3): Likewise.
2172         (UNMARSHAL4): Likewise.
2173         (UNMARSHAL5): Likewise.
2174         (build_arglist_for_builtin): Delete.  Fix callers to use
2175         build_call_expr instead.
2176         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
2177         accessors.
2178         (compareAndSwapInt_builtin): Likewise.
2179         (compareAndSwapLong_builtin): Likewise.
2180         (compareAndSwapObject_builtin): Likewise.
2181         (putVolatile_builtin): Likewise.
2182         (getVolatile_builtin): Likewise.
2183         (VMSupportsCS8_builtin): Likewise.
2184         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
2185         instead of arglist.
2187         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
2188         (build_java_throw_out_of_bounds_exception): Likewise.
2189         (java_check_reference): Likewise.
2190         (build_java_arraystore_check): Likewise.
2191         (build_newarray): Likewise.
2192         (build_anewarray): Likewise.
2193         (expand_java_multinewarray): Use build_call_list instead of build3.
2194         (build_java_monitor): Use build_call_nary instead of build3.
2195         (java_create_object): Likewise.
2196         (expand_java_NEW): Likewise.
2197         (build_instanceof): Likewise.
2198         (expand_java_CHECKCAST): Likewise.
2199         (build_java_soft_divmod): Likewise.
2200         (build_java_binop): Likewise.
2201         (build_field_ref): Likewise.
2202         (build_class_init): Likewise.
2203         (rewrite_arglist_getcaller): Use build_call_expr.
2204         (build_invokeinterface):  Use build_call_nary instead of build3.
2205         (expand_invoke): Use build_call_list instead of build3.
2206         (build_jni_stub): Use build_call_nary, build_call_list, or
2207         build_call_expr instead of build3.
2208         (expand_java_field_op): Use build_call_expr instead of build3.
2209         (force_evaluation_order): Use new CALL_EXPR accessors.
2211         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2213 2007-02-15  David Daney  <ddaney@avtrex.com>
2215         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2216         (java.maintainer-clean):Add gc-analyze.1.
2217         (.INTERMEDIATE): Add gc-analyze.pod.
2218         (gc-analyze.pod): New rule.
2219         (java.install-man): Install gc-analyze.1
2220         * gcj.texi: Add new section for the gc-analyze program.
2222 2007-02-07  Andrew Haley  <aph@redhat.com>
2224         * class.c (uncache_this_class_ref): New.
2225         * expr.c (build_jni_stub): Initialize the class.
2226         (expand_byte_code): Call uncache_this_class_ref after generating
2227         code.
2229 2007-02-06  Tom Tromey  <tromey@redhat.com>
2231         PR java/30714:
2232         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2234 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
2236         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2238 2007-02-02  Andrew Haley  <aph@redhat.com>
2240         * expr.c (expand_byte_code): Call cache_this_class_ref() and
2241         cache_cpool_data_ref().
2242         Set TYPE_CPOOL_DATA_REF.
2243         (cache_cpool_data_ref): New function.
2244         * constants.c (build_ref_from_constant_pool): Remove special-case
2245         code for flag_indirect_classes.
2246         (build_constant_data_ref): Move special-case code for
2247         flag_indirect_classes here from build_ref_from_constant_pool.
2248         * decl.c (finish_method): Move class initialization from here to
2249         cache_this_class_ref.
2250         * class.c (cache_this_class_ref): New function.
2251         (build_class_ref): Use this_classdollar for the ouput class.
2253 2007-02-02  David Daney  <ddaney@avtrex.com>
2255         * class.c (is_compiled_class): Move check to avoid reloading
2256         current class.
2257         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2258         already set.
2260 2007-02-01  Andrew Haley  <aph@redhat.com>
2262         PR java/30641
2263         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2265 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
2267         * class.c, jcf-parse.c: Fix comment typos.
2269 2007-01-30  Tom Tromey  <tromey@redhat.com>
2271         * gcj.texi (Strings): Fix documentation for JvNewString.
2273 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2275         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2276         typos.
2278 2007-01-30  Ben Elliston  <bje@au.ibm.com>
2280         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2282 2007-01-29  Tom Tromey  <tromey@redhat.com>
2284         PR java/30607:
2285         * jvspec.c (lang_specific_driver): Handle separate -I argument.
2286         * lang.opt (-I): Add 'Separate'.
2288 2007-01-29  Andrew Haley  <aph@redhat.com>
2290         * class.c (add_method_1): Mark fndecl as external unless we are
2291         compiling it into this object file.
2293 2007-01-24  Andrew Haley  <aph@redhat.com>
2295         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2296         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2298 2007-01-22  Andrew Haley  <aph@redhat.com>
2300         * builtins.c (VMSupportsCS8_builtin): New function.
2302 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
2304         PR java/30454
2305         * jcf-io.c (opendir_in_zip): Close the file
2306         and free zipf before returning after an error.
2308 2007-01-16  Tom Tromey  <tromey@redhat.com>
2310         * java-tree.def: Added copyright header.
2312 2007-01-15  Tom Tromey  <tromey@redhat.com>
2314         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2315         case.
2316         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2317         Removed case.
2318         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2319         (EXPR_WFL_NODE): Likewise.
2320         (EXPR_WFL_LINECOL): Likewise.
2321         (EXPR_WFL_FILENAME): Likewise.
2322         (EXPR_WFL_LINENO): Likewise.
2323         (build_expr_wfl, expr_add_location): Don't declare.
2324         (build_unknown_wfl): Removed.
2325         (EXPR_WFL_FILENAME_NODE): Removed.
2326         (EXPR_WFL_COLNO): Removed.
2327         (EXPR_WFL_SET_LINECOL): Removed.
2328         (DECL_FUNCTION_WFL): Removed.
2329         (DECL_FIELD_FINAL_WFL): Removed.
2330         (struct lang_decl_func) <wfl>: Removed field.
2331         <called_constructor>: Likewise.
2332         <inner_access>: Likewise.
2333         (struct lang_decl_var) <wfl>: Removed field.
2334         (DECL_CONSTRUCTOR_CALLS): Removed.
2335         (DECL_FUNCTION_ACCESS_DECL): Likewise.
2336         (DECL_FUNCTION_INNER_ACCESS): Likewise.
2337         (DECL_SPECIFIC_COUNT): Likewise.
2338         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2339         * expr.c (build_expr_wfl): Removed.
2340         (expr_add_location): Likewise.
2342 2007-01-12  Tom Tromey  <tromey@redhat.com>
2344         * jcf-dump.c (main): Updated call to find_class.
2345         * lang.c (java_init): Removed dead code.
2346         * jcf-parse.c (read_class): Don't use java_source field.  Removed
2347         dead code.
2348         (parse_zip_file_entries): Don't use java_source field.
2349         (process_zip_dir): Likewise.
2350         (jcf_parse): Removed dead code.
2351         (java_parse_file): Likewise.
2352         (read_class): Updated call to find_class.
2353         * jcf-io.c (find_class): Don't use java_source field.  Removed
2354         'source_ok' argument, .java logic.
2355         * jcf.h (JCF) <java_source>: Removed field.
2356         (JCF_ZERO): Updated.    (find_class): Updated.
2357         * decl.c: Removed dead code.
2358         * class.c: Removed dead code.
2360 2007-01-11  Tom Tromey  <tromey@redhat.com>
2362         * typeck.c (convert): Don't use flag_emit_class_files.
2363         * lang.c (java_post_options): Don't use flag_emit_class_files.
2364         (java_handle_option): Don't use flag_extraneous_semicolon or
2365         flag_redundant.
2366         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2367         flag_emit_class_files.
2368         (load_class): Likewise.
2369         * java-tree.h (flag_emit_class_files): Don't declare.
2370         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2371         (flag_extraneous_semicolon): Don't declare.
2372         (flag_not_overriding): Likewise.
2373         (flag_static_local_jdk1_1): Likewise.
2374         (flag_redundant): Likewise.
2375         * expr.c (build_newarray): Don't use flag_emit_class_files.
2376         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2377         flag_emit_class_files.
2378         (build_class_ref): Likewise.
2379         * builtins.c (check_for_builtin): Don't use
2380         flag_emit_class_files.
2382 2007-01-10  Tom Tromey  <tromey@redhat.com>
2384         * lang.c (java_can_use_bit_fields_p): Removed.
2385         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2387 2007-01-09  Andrew Haley  <aph@redhat.com>
2389         * expr.c (build_java_arrayaccess): Rewrite to generate array
2390         access in canonical form.
2391         (expand_java_arraystore): Use build_fold_addr_expr() on address of
2392         array access.
2394 2007-01-03  Andrew Haley  <aph@redhat.com>
2396         PR java/28754
2397         * expr.c (expand_java_field_op): If we're initializing a field's
2398         declaring interface we should not also initialize the class
2399         context in which it was referenced.
2401 2007-01-02  Tom Tromey  <tromey@redhat.com>
2403         * java-tree.h (compiling_from_source, current_encoding,
2404         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2405         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2406         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2407         JTI_WFL_OPERATOR): Removed
2408         (finit_identifier_node, instinit_identifier_node,
2409         length_identifier_node, super_identifier_node,
2410         continue_identifier_node, access0_identifier_node, wfl_operator):
2411         Removed.
2412         (cyclic_inheritance_report,
2413         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2414         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2415         DECL_FIXED_CONSTRUCTOR_P): Removed.
2416         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2417         Removed.
2418         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2419         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2420         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2421         import_list, import_demand_list>: Removed.
2422         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2423         cxx_keyword_p): Removed.
2424         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2425         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2426         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2427         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2428         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2429         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2430         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2431         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2432         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2433         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2434         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2435         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2436         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2437         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2438         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2439         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2440         java_parse_abort_on_error, extract_field_decl): Removed.
2441         (finput): Declare.
2442         * lang.c: (compiling_from_source, current_encoding): Removed.
2443         (java_handle_option): Ignore -fencoding.
2444         * parse.h: Don't include lex.h.
2445         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2446         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2447         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2448         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2449         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2450         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2451         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2452         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2453         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2454         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2455         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2456         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2457         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2458         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2459         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2460         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2461         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2462         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2463         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2464         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2465         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2466         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2467         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2468         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2469         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2470         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2471         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2472         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2473         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2474         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2475         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2476         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2477         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2478         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2479         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2480         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2481         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2482         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2483         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2484         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2485         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2486         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2487         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2488         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2489         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2490         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2491         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2492         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2493         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2494         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2495         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2496         SET_CPC_STATIC_INITIALIZER_STMT,
2497         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2498         java_complete_class, java_check_circular_reference,
2499         java_fix_constructors, java_layout_classes, java_reorder_fields,
2500         java_method_add_stmt, java_get_line_col, reset_report,
2501         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2502         java_finish_classes, ctxp, ctxp_for_generation,
2503         ctxp_for_generation_last): Removed.
2504         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2505         * mangle.c (utf8_cmp): New function.
2506         (cxx_keywords): New global.
2507         (cxx_keyword_p): New function.
2508         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2509         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2510         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2511         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2512         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2513         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2514         * Make-lang.in (java.srcextra): Do nothing.
2515         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2516         (JAVA_OBJS): Don't mention deleted files.
2517         (java.mostlyclean): Likewise.
2518         (java.clean): Likewise.
2519         (JAVA_LEX_C): Removed.
2520         (buffer.o, check-init.o, parse.o): Remove unused targets.
2521         (typeck.o): Updated.
2522         * jcf-parse.c (read_class): Comment out unused code.
2523         (java_layout_seen_class_methods): New function.
2524         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2525         Removed.
2526         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
2527         (init_jcf_parse): Removed.
2528         * config-lang.in (gtfiles): Remove deleted files.
2529         * decl.c (java_init_decl_processing): Don't initialize
2530         finit_identifier_node, instinit_identifier_node,
2531         length_identifier_node, super_identifier_node,
2532         continue_identifier_node, access0_identifier_node.  Don't call
2533         init_jcf_parse.
2534         * class.c (cyclic_inheritance_report): New global.
2535         (add_method_1): Don't use
2536         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2537         (maybe_layout_super_class): Comment out code.
2538         (safe_layout_class): New function.
2539         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2540         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2541         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2542         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2543         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2544         (java_gimplify_case_expr): Removed.
2545         (java_gimplify_default_expr): Likewise.
2546         (java_gimplify_new_array_init): Likewise.
2547         * parse.y: Removed.
2548         * keyword.gperf, keyword.h: Removed.
2549         * chartables.h: Removed.
2550         * check-init.c: Removed.
2551         * buffer.c, buffer.h: Removed.
2552         * convert.h: Removed.
2553         * gen-table.pl: Removed.
2554         * lex.c, lex.h: Removed.
2556 2007-01-02  Andrew Haley  <aph@redhat.com>
2558         * expr.c (expand_java_arraystore): Make sure we perform a bounds
2559         check at runtime before we perform a type check.
2561 2006-12-19  Andrew Haley  <aph@redhat.com>
2563         * decl.c: Bump minor BC ABI version.
2565 2006-12-13  Gary Benson  <gbenson@redhat.com>
2567         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2569 2006-12-12  Tom Tromey  <tromey@redhat.com>
2571         * lang-specs.h: Pass -M options to jc1.
2572         * jcf-depend.c (jcf_dependency_add_file): Don't emit
2573         dependencies.
2575 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
2577         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2579 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
2581         * lang-specs.h: Pass '%U'-based options as separate arguments.
2583 2006-12-05  Tom Tromey  <tromey@redhat.com>
2585         PR java/29495:
2586         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2587         classes as well.
2588         * class.c (add_field): Handle ACC_SYNTHETIC.
2589         (add_method_1): Likewise.  Handle bridge and varargs.
2590         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2591         annotation.
2592         (set_class_decl_access_flags): Handle synthetic and annotation.
2593         * java-tree.h (METHOD_BRIDGE): New macro.
2594         (METHOD_VARARGS): Likewise.
2595         (TYPE_SYNTHETIC): Likewise.
2596         (TYPE_ANNOTATION): Likewise.
2597         (lang_type): New fields 'synthetic' and 'annotation'.
2598         (lang_decl_func): New fields 'varargs' and 'bridge'.
2600 2006-12-04  Andrew Haley  <aph@redhat.com>
2602         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2603         there's no map.
2605 2006-11-29  Gary Benson  <gbenson@redhat.com>
2607         * expr.c (rewrite_arglist_getcaller): Reorder.
2609 2006-11-29  Andrew Haley  <aph@redhat.com>
2611         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2612         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2614 2006-11-23  Andrew Haley  <aph@redhat.com>
2616         * expr.c (rewrite_arglist_getcaller): New.
2617         (rewrite_arglist_getclass): Fix indentation.
2618         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2619         gnu.classpath.VMStackWalker.getCallingClassLoader().
2620         * builtins.c (initialize_builtins): Remove duplicate def'n of
2621         __sync_synchronize.
2622         Add __builtin_return_address.
2624 2006-11-22  Andrew Haley  <aph@redhat.com>
2626         * jcf-reader.c (get_attribute): Mark attr_type unused.
2628         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2630 2007-01-08  Richard Guenther  <rguenther@suse.de>
2632         * lex.c (do_java_lex): Use build_int_cst_wide_type.
2633         * jcf-parse.c (get_constant): Likewise.
2635 2006-11-12  Jan Hubicka  <jh@suse.cz>
2637         * resource.c (compile_resource_data): Update for new varpool names.
2638         * java/class.c (build_utf8_ref): Likewise.
2640 2006-11-12  David Daney  <ddaney@avtrex.com>
2642         PR java/29805
2643         * typeck.c (build_java_array_type): Increase buffer sizes.
2645 2006-11-11  Richard Guenther  <rguenther@suse.de>
2647         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2648         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2650 2006-11-06  Andrew Haley  <aph@redhat.com>
2652         * java-tree.h (CONSTANT_LazyFlag): New.
2653         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2654         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2655         reflection_data.
2656         (handle_constant): Return 0 for dummy cpool entries.
2657         Handle constants of kind Class.
2658         Handle constants of kind NameAndType.
2659         (handle_enclosingmethod_attribute): New.
2660         (handle_signature_attribute): New.
2661         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2662         (HANDLE_SIGNATURE_ATTRIBUTE): New.
2663         (handle_constant): Use unmangle_classname()rather than calling
2664         identifier_subst() directly.
2666 2006-11-02  Andrew Haley  <aph@redhat.com>
2668         * java-tree.h (FIELD_ENUM): New.
2669         (lang_decl_var.field_enum): New.
2670         (lang_type.enum_class): New.
2671         (CLASS_ENUM): New.
2672         * class.c (set_class_decl_access_flags): Handle enum types.
2673         (add_field): Handle enum fields.
2674         (get_access_flags_from_decl): Likewise.
2676         * class.c (make_class_data): Put reflection_data into rodata.
2678 2006-11-01  Andrew Haley  <aph@redhat.com>
2680         * jcf-parse.c (field_offsets, bit_obstack): New variables.
2681         (jcf_parse): Write end marker to annotation_data.
2682         (java_parse_file): Create field_offsets bitmap.  Destroy it.
2683         (annotation_grow, annotation_rewrite_byte)
2684         (annotation_rewrite_short, annotation_rewrite_int)
2685         (annotation_read_short, annotation_write_byte)
2686         (annotation_write_short, annotation_write_int)
2687         (handle_long_constant, handle_constant, handle_element_value)
2688         (handle_annotation, handle_annotations)
2689         (handle_annotation_attribute, rewrite_reflection_indexes)
2690         (handle_member_annotations, handle_parameter_annotations)
2691         (handle_default_annotation): New functions.
2692         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2693         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2694         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2695         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2696         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2697         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2698         (TYPE_REFLECTION_DATA): New.
2699         (TYPE_REFLECTION_DATASIZE): New.
2700         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2701         an enum.
2702         * jcf-reader.c (get_attribute): Pass field/method index and
2703         attribute type to get_attribute().
2704         * constants.c (find_class_or_string_constant): Make nonstatic.
2705         (cpool_for_class): Likewise.
2706         (build_constants_constructor): Separate string and scalar types.
2707         * class.c (make_class_data): Generate field_indexes permutation.
2708         Pass it to rewrite_reflection_indexes().
2709         (make_class_data): Generate constructor for reflection_data field.
2711 2006-10-20  Tom Tromey  <tromey@redhat.com>
2713         * gcj.texi (Top): Don't mention jv-scan.
2714         (Invoking gcj): Likewise.
2715         (Invoking gcjh): Likewise.
2716         (Invoking gjnih): Likewise.
2717         (Invoking gij): Likewise.
2718         (Invoking gcj-dbtool): Likewise.
2719         (Invoking jv-scan): Removed.
2720         * parse-scan.y: Removed.
2721         * jv-scan.c: Removed.
2722         * config-lang.in (stagestuff): Don't mention jv-scan.
2723         * Make-lang.in (java): Removed jv-scan.
2724         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2725         (JVSCAN_OBJS): Removed.
2726         (jv-scan$(exeext)): Likewise.
2727         (JAVA_MANFILES): Removed jv-scan.1.
2728         (java.uninstall): Don't mention jv-scan.
2729         (java.mostlyclean): Likewise.
2730         (java.maintainer-clean): Likewise.
2731         (.INTERMEDIATE): Likewise.
2732         (java/jv-scan.o): Removed.
2733         (jv-scan.pod): Likewise.
2734         (java.srcextra): Don't mention parse-scan.c.
2735         (java.mostlyclean): Likewise.
2736         (java/parse-scan.c): Removed.
2737         (java/parse-scan.o-warn): Removed.
2738         (java/parse-scan.o): Removed.
2740 2006-10-20  Tom Tromey  <tromey@redhat.com>
2742         * lang.c (java_handle_option): Don't use
2743         jcf_write_base_directory.
2744         * jcf.h (jcf_write_base_directory): Removed.
2745         * parse.y (java_expand_classes): Don't call write_classfile.
2746         * config-lang.in (gtfiles): Removed jcf-write.c.
2747         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2748         (java/jcf-write.o): Removed.
2749         * jcf-parse.c (parse_class_file): Don't call write_classfile.
2750         * java-tree.h (write_classfile): Removed declaration.
2751         * jcf-write.c: Removed.
2753 2006-10-20  Tom Tromey  <tromey@redhat.com>
2755         * Make-lang.in (java): Removed gjnih, gcjh.
2756         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2757         (GCJH_OBJS): Removed.
2758         (GJNIH_OBJS): Likewise.
2759         (gjnih$(exeext)): Likewise.
2760         (gcjh$(exeext)): Likewise.
2761         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2762         (java.install-common): Don't special case gcjh.
2763         (java.uninstall): Don't mention gcjh, gjnih.
2764         (java.mostlyclean): Likewise.
2765         (java.maintainer-clean): Likewise.
2766         (.INTERMEDIATE): Likewise.
2767         (gcjh.pod): Removed.
2768         (gjnih.pod): Likewise.
2769         (GCJH_TARGET_INSTALL_NAME): Removed.
2770         (java/gjavah-jni.o): Removed.
2771         (java/gjavah.o): Likewise.
2772         * config-lang.in (stagestuff): Removed gjnih, gcjh.
2773         * gjavah.c: Removed.
2775 2006-10-17  Tom Tromey  <tromey@redhat.com>
2777         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2778         "string" case.
2780 2006-10-17  Tom Tromey  <tromey@redhat.com>
2782         * jvgenmain.c (main): Handle -findirect-dispatch.
2783         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2784         jvgenmain.
2786 2006-10-06  Andrew Haley  <aph@redhat.com>
2788         * builtins.c (compareAndSwapInt_builtin): Check that we really do
2789         have a compare_and_swap builtin.
2790         (compareAndSwapLong_builtin): Likewise.
2791         (compareAndSwapObject_builtin): Likewise.
2793 2006-10-04  Andrew Haley  <aph@redhat.com>
2795         * builtins.c (java_builtins): Add compareAndSwapInt,
2796         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2797         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2798         putObjectVolatile, getObjectVolatile, getIntVolatile,
2799         getLongVolatile, getLong.
2800         (UNMARSHAL3): New macro.
2801         (UNMARSHAL4): Likewise.
2802         (UNMARSHAL5): Likewise.
2803         (build_arglist_for_builtin): New function.
2804         (build_addr_sum, build_check_this): New functions.
2805         (putObject_builtin. compareAndSwapInt_builtin,
2806         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2807         putVolatile_builtin, getVolatile_builtin): New builtins.
2809 2006-06-08  Andrew Haley  <aph@redhat.com>
2811         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2812         get_symbol_table_index().
2813         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2814         private method.
2815         (build_known_method_ref): New arg: special.  Pass it to
2816         get_symbol_table_index.
2817         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2818         the method list.
2819         (build_invokevirtual): New arg: special.  Pass it to
2820         get_symbol_table_index.
2821         (expand_invoke): New variable: special.
2822         Pass it to maybe_rewrite_invocation().
2823         Pass it to build_known_method_ref().
2824         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2825         build the symbol table conbstructor.
2826         (emit_symbol_table): Extract SPECIAL from the method list and pass
2827         it to build_symbol_entry().
2828         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2829         special accordingly.
2831 2006-09-08  Andrew Haley  <aph@redhat.com>
2833         * class.c (layout_class_method): Use build_java_signature, not
2834         build_java_argument_signature.  Use lookup_java_method, not
2835         lookup_argument_method.
2837 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2838             Bryce McKinlay  <bryce@mckinlay.net.nz>
2840         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2842 2006-07-18  Tom Tromey  <tromey@redhat.com>
2844         * lang.opt: Added missing -W options.
2846 2006-07-12  Tom Tromey  <tromey@redhat.com>
2848         PR java/28329:
2849         * lang-specs.h: Pass '%U'-based options as separate arguments.
2850         Use -faux-classpath.
2851         * lang.c (java_handle_option): Handle OPT_faux_classpath.
2852         * lang.opt (faux-classpath): New option.
2854 2006-07-07  Tom Tromey  <tromey@redhat.com>
2856         * class.c (make_class_data): Set value for reflection_data field.
2857         * decl.c (java_init_decl_processing): Add reflection_data field.
2859 2006-07-07  Tom Tromey  <tromey@redhat.com>
2861         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2862         earlier.
2863         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2865 2006-07-07  Andrew Haley  <aph@redhat.com>
2867         * jcf-parse.c (set_source_filename): Don't check for
2868         CLASS_FROM_CURRENTLY_COMPILED_P.
2869         Remove // comments.
2871 2006-07-07  Andrew Haley  <aph@redhat.com>
2873         * java-tree.h (java_read_sourcefilenames): Declare.
2874         * lang.c (java_handle_option): Call java_read_sourcefilenames().
2875         * lang.opt (fsource-filename): New opt.
2876         * lang-specs.h: Add -fsource-filename.
2877         * jcf-parse.c (num_files, filenames): New variables.
2878         (reverse, cmpstringp, java_read_sourcefilenames,
2879         find_sourcefile): New.
2880         (set_source_filename): Call find_sourcefile to find the real name
2881         of a source file.
2883 2006-06-27  Tom Tromey  <tromey@redhat.com>
2885         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2886         Signature, LocalVariableTypeTable, annotation attributes.
2887         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2888         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2889         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2890         (HANDLE_METHOD): Likewise.
2891         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2892         (print_annotation): New function.
2893         (print_element_value): Likewise.
2894         (indent): Likewise.
2895         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2896         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2897         (print_parameter_annotations): New function.
2898         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2899         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2900         Likewise.
2901         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2902         (print_annotations): New function.
2904 2006-06-23  Tom Tromey  <tromey@redhat.com>
2906         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
2907         emitting class files, always use 1.5.
2908         * gcj.texi (Input Options): Document -fsource.
2909         (Code Generation): Document -ftarget.
2911 2006-06-21  Tom Tromey  <tromey@redhat.com>
2913         PR java/28089:
2914         * expr.c (expand_java_field_op): Initialize field's declaring
2915         class.
2917 2006-06-20  Tom Tromey  <tromey@redhat.com>
2919         * expr.c (push_value): Always flush quick stack.
2921 2006-06-19  Tom Tromey  <tromey@redhat.com>
2923         * expr.c (push_value): Also flush quick stack if value is a
2924         component_ref.
2926 2006-06-19  Tom Tromey  <tromey@redhat.com>
2928         * expr.c (push_value): Flush quick stack if value has side
2929         effects.
2931 2006-06-13  Tom Tromey  <tromey@redhat.com>
2933         * class.c (is_compiled_class): Explicitly check for current
2934         class.
2936 2006-06-09  Tom Tromey  <tromey@redhat.com>
2938         * gjavah.c (decompile_method): Don't decompile a static field
2939         accessor method.
2941 2006-06-06  Tom Tromey  <tromey@redhat.com>
2943         * lang-specs.h <jc1>: Add .jar file to command line if
2944         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
2946 2006-06-05  Tom Tromey  <tromey@redhat.com>
2948         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2949         synthetic, enum, annotation.
2950         * jcf.h (ACC_BRIDGE): New macro.
2951         (ACC_VARARGS): Likewise.
2952         (ACC_SYNTHETIC): Likewise.
2953         (ACC_ENUM): Likewise.
2954         (ACC_ANNOTATION): Likewise.
2956 2006-06-04  Tom Tromey  <tromey@redhat.com>
2958         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2959         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2960         and -ftarget.
2961         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
2962         when needed.  Handle classpath-setting.
2963         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2964         * lang-specs.h: Rewrote.
2966 2006-06-04  Tom Tromey  <tromey@redhat.com>
2968         * jcf-io.c (find_class): Set source_ok to 0.
2969         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2970         (parse_class_file): Don't call java_mark_class_local.
2971         (java_parse_file): Skip .java files.  Call java_mark_class_local
2972         before lowering any code.
2973         (parse_zip_file_entries): Don't call duplicate_class_warning
2974         here.
2975         (process_zip_dir): ... call it here.
2976         * class.c (add_field): Don't mark field external if it is being
2977         compiled into this object.
2978         (make_class_data): Handle situation where class_dtable_decl is
2979         created before Class is compiled.
2980         (is_compiled_class): Don't assume files in zip are compiled into
2981         this object.
2982         (layout_class_method): Don't mark method external if it is being
2983         compiled into this object.
2985 2006-06-04  Tom Tromey  <tromey@redhat.com>
2987         * jcf-path.c (jcf_path_compute): New function.
2988         * jcf.h (jcf_path_compute): Declare.
2990 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2992         * decl.c: Include langhooks.h.
2993         (builtin_function): Remove.
2994         (java_init_decl_processing): Replace calls to builtin_function
2995         with add_builtin_function.
2996         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2997         (java/decl.o): Depend on langhooks.h.
2998         * java-tree.h (builtin_function): Remove.
3000 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
3002         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
3004 2006-09-12  Tom Tromey  <tromey@redhat.com>
3006         * expr.c (push_value): Always flush quick stack.
3008 2006-09-12  Tom Tromey  <tromey@redhat.com>
3010         PR java/29013:
3011         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
3012         the push of the called method's return result.
3014 2006-09-12  Tom Tromey  <tromey@redhat.com>
3016         * jvspec.c (lang_specific_driver): Read spec file even if
3017         -fsyntax-only.
3019 2006-09-12  Tom Tromey  <tromey@redhat.com>
3021         PR java/28754:
3022         * expr.c (expand_java_field_op): Initialize field's declaring
3023         interface if necessary.
3025 2006-09-12  Tom Tromey  <tromey@redhat.com>
3027         PR java/28892:
3028         * expr.c (expand_java_field_op): No error for assignments not in
3029         class initializer or constructor.
3031 2006-08-22  Andrew Haley  <aph@redhat.com>
3033         * decl.c (java_add_stmt): Give the statement list a type.
3035 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
3036             Bryce McKinlay  <bryce@mckinlay.net.nz>
3038         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
3040 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
3042         PR java/8923
3043         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
3044         or '--' is used with a constant operand.
3045         (java_complete_lhs): When processing a '++' or '--' expression,
3046         don't call java_complete_tree but java_complete_lhs, so that a
3047         static final variable operand is never replaced by its value. This
3048         avoids an ICE later on.
3049         (patch_unaryop): Fixed typo in comment.
3051 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3053         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
3055 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
3057         * builtins.c (check_for_builtin): If a builtin could result in a
3058         direct call being generated, don't use it if flag_indirect_dispatch
3059         is set.
3061 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
3063         * gcj.texi (Invocation): Corrections for Invocation API example.
3065 2006-07-04  Andrew Haley  <aph@redhat.com>
3067         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
3068         entry.
3070 2006-06-21  Andrew Haley  <aph@redhat.com>
3072         * java-tree.h (update_aliases): Remove
3073         * expr.c (expand_iinc): Remove call to update_aliases().
3074         (STORE_INTERNAL): Likewise.
3075         * decl.c (update_aliases, initialize_local_variable)
3076         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
3078 2006-06-19  Andrew Haley  <aph@redhat.com>
3080         PR java/1305
3081         PR java/27908
3082         * expr.c (java_modify_addr_for_volatile): New function.
3083         (expand_java_field_op): Handle volatile fields.
3084         * java-gimplify.c (java_gimplify_component_ref): Call
3085         java_modify_addr_for_volatile to give the field_ref the correct
3086         volatile type.
3087         (java_gimplify_modify_expr): Likewise.
3088         * java-tree.h (java_modify_addr_for_volatile): New decl.
3090 2006-06-17  Karl Berry  <karl@gnu.org>
3092         * gcj.texi (@dircategory): Use "Software development" instead
3093         of "Programming", following the Free Software Directory.
3095 2006-06-16  Andrew Haley  <aph@redhat.com>
3097         * class.c (make_class_data): When using flag_indirect_classes,
3098         don't initialize the vtable of Class instances.
3100 2006-06-09  Andrew Haley  <aph@redhat.com>
3102         PR java/1305
3103         PR java/27908
3104         * builtins.c (initialize_builtins): Add __sync_synchronize().
3105         * class.c (add_field): Mark volatile fields.
3106         * java-gimplify.c (java_gimplify_expr): Call new functions to
3107         handle self-modifying exprs and COMPONENT_REFs.
3108         (java_gimplify_component_ref): New.
3109         (java_gimplify_modify_expr): Add handling for volatiles.
3111 2006-06-08  Tom Tromey  <tromey@redhat.com>
3113         * gcj.texi (libgcj Runtime Properties): Document
3114         gnu.gcj.user.realname.
3116 2006-06-08  Andrew Haley  <aph@redhat.com>
3118         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
3119         get_symbol_table_index().
3120         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
3121         private method.
3122         (build_known_method_ref): New arg: special.  Pass it to
3123         get_symbol_table_index.
3124         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
3125         the method list.
3126         (build_invokevirtual): New arg: special.  Pass it to
3127         get_symbol_table_index.
3128         (expand_invoke): New variable: special.
3129         Pass it to maybe_rewrite_invocation().
3130         Pass it to build_known_method_ref().
3131         * class.c (build_symbol_entry): Add new arg: special.  Use it to
3132         build the symbol table conbstructor.
3133         (emit_symbol_table): Extract SPECIAL from the method list and pass
3134         it to build_symbol_entry().
3135         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
3136         special accordingly.
3138 2006-06-06  David Daney  <ddaney@avtrex.com>
3140         * gcj.texi (libgcj Runtime Properties): Document
3141         gnu.gcj.runtime.NameFinder.show_raw and
3142         gnu.gcj.runtime.NameFinder.remove_unknown.
3144 2006-06-06  Tom Tromey  <tromey@redhat.com>
3146         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3147         synthetic, enum, annotation.
3148         * jcf.h (ACC_BRIDGE): New macro.
3149         (ACC_VARARGS): Likewise.
3150         (ACC_SYNTHETIC): Likewise.
3151         (ACC_ENUM): Likewise.
3152         (ACC_ANNOTATION): Likewise.
3154 2006-06-06  Mike Stump  <mrs@apple.com>
3156         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
3157         installing during build.
3159 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
3161         * gcj.texi (Extensions): Document the new gcj-dbtool-based
3162         classname-to-library resolution mechanism.
3163         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
3164         mechanism deprecated.
3165         (libgcj Runtime Properties): Document
3166         gnu.gcj.runtime.VMClassLoader.library_control's new default.
3168 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
3170         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
3171         bit wide type.
3172         (jword): Define to uint64 on 64-bit arches.
3173         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
3175 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
3177         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
3178         typos.
3180 2006-05-26  Tom Tromey  <tromey@redhat.com>
3182         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
3183         * verify-glue.c (vfy_class_type): New function.
3184         * verify-impl.c (check_constant): Allow 'ldc class'.
3185         * verify.h (vfy_class_type): Declare.
3187 2006-05-25  Andrew Haley  <aph@redhat.com>
3189         PR java/27756
3190         * decl.c (maybe_pushlevels): When variable ranges are non-nested
3191         update all lifetimes, not just the first one.
3193 2006-05-24  Tom Tromey  <tromey@redhat.com>
3195         * java-tree.h: Fixed flag documentation.
3197 2006-05-24  Tom Tromey  <tromey@redhat.com>
3199         PR libgcj/27729:
3200         * jcf.h (ACC_INVISIBLE): Changed value.
3202 2006-05-24  Andrew Haley  <aph@redhat.com>
3204         PR java/27754
3205         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3206         COMPOUND_EXPR.
3208 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
3210         * lang.opt (femit-class-file): Remove VarExists.
3212 2006-05-16  Tom Tromey  <tromey@redhat.com>
3214         * verify-impl.c (verify_instructions_0) <op_return>: Special case
3215         for Object.<init>.
3217 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
3219         PR driver/26885
3220         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3221         $(GCC_OBJS).
3223 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
3225         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3226         (java/expr.o): Replace target.h with $(TARGET_H).
3227         (java/parse.o): Likewise.
3229 2006-05-10  Andrew Haley  <aph@redhat.com>
3231         * class.c (emit_indirect_register_classes): Fix comment.
3233 2006-05-04  Tom Tromey  <tromey@redhat.com>
3235         * java-tree.h (uses_jv_markobj_p): Declare.
3236         * class.c (uses_jv_markobj_p): Removed.
3237         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3238         (get_boehm_type_descriptor): Use it.
3239         (uses_jv_markobj_p): Moved from class.c.  Return bool.
3241 2006-05-04  Tom Tromey  <tromey@redhat.com>
3243         * java-tree.def (THIS_EXPR): Now a tcc_expression.
3245 2006-05-04  Andrew Haley  <aph@redhat.com>
3247         * class.c (make_field_value): Always build_address_of fdecl if
3248         there is an initializer.
3250 2006-05-03  Andrew Haley  <aph@redhat.com>
3252         PR libgcj/27352
3253         * expr.c (maybe_rewrite_invocation): New function.
3254         (rewrite_arglist_getclass): Likewise.
3255         (rules): New.
3256         (expand_invoke): Call maybe_rewrite_invocation.
3257         * parse.y (patch_invoke): Likewise.
3258         * java-tree.h: (maybe_rewrite_invocation): New function.
3260 2006-04-21  Andrew Haley  <aph@redhat.com>
3262         * lang.c (java_init): Handle flag_indirect_classes.
3263         * jvgenmain.c: Use "class$$" instead of "class$".
3264         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3265         DECLs.
3266         (mangle_class_field): Special case "class$$" as well as "class$".
3267         * constants.c (build_ref_from_constant_pool): If
3268         flag_indirect_classes, generate a ref into the heap.
3269         * decl.c (constants_field_decl_node,
3270         constants_data_field_decl_node): New.
3271         * class.c (build_static_class_ref): New.
3272         (build_classdollar_field): Factor out from build_class_ref().
3273         (make_field_value): Handle static fields in heap.
3274         (make_class_data): Make sure we get a static ref to class.
3275         Make class initializer const if flag_indirect_classes.
3276         (register_class): Build a class_ref for initialization if
3277         flag_indirect_classes.
3278         (emit_indirect_register_classes): New.
3280 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
3282         * expr.c, gjavah.c: Fix comment typos.
3284 2006-04-03  Andrew Haley  <aph@redhat.com>
3286         PR java/26858
3287         * expr.c (build_field_ref): Don't check the field offset if
3288         flag_syntax_only.
3290 2006-03-30  Andrew Haley  <aph@redhat.com>
3292         PR java/26858
3293         * lang.c (java_attribute_table): New.
3294         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3295         * expr.c (build_field_ref): Add a null pointer check for all
3296         fields of offset > 4k.  Don't do so for accesses via the this
3297         pointer, which we know can never be null.
3298         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3299         methods nonnull.
3301 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
3303         * Make-lang.in: Rename docdir to gcc_docdir.
3305 2006-03-30  Tom Tromey  <tromey@redhat.com>
3307         PR java/26042:
3308         * parse.y (java_reorder_fields): Reset superclass field's size as
3309         well.
3311 2006-03-28  Tom Tromey  <tromey@redhat.com>
3313         PR java/26390:
3314         * parse.y (find_most_specific_methods_list): Added 'class'
3315         argument.
3316         (lookup_method_invoke): Updated.
3318 2006-03-15  Tom Tromey  <tromey@redhat.com>
3320         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3321         non-static method calls.
3323 2006-03-15  David Daney  <ddaney@avtrex.com>
3325         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3326         declaration.
3328 2006-03-15  David Daney  <ddaney@avtrex.com>
3330         * lang.opt (-freduced-reflection): New option.
3331         * lang.c (java_post_options): Generate an error if
3332         -freduced-reflection used with -fjni or -findirect-dispatch.
3333         * java-tree.h (flag_reduced_reflection): Declare new variable.
3334         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3335         if bitmap overflows and flag_reduced_reflection set.
3336         * class.c (uses_jv_markobj_p): New function.
3337         (make_class_data): Moved generation of vtable to before
3338         reflection data, generate less reflection data if
3339         flag_reduced_reflection set.
3340         * gcj.texi: Document -freduced-reflection.
3342 2006-03-15  Tom Tromey  <tromey@redhat.com>
3344         PR java/26638:
3345         * class.c (get_interface_method_index): Don't put <clinit> into
3346         interface table.
3348 2006-03-15  Tom Tromey  <tromey@redhat.com>
3350         * parse.y (analyze_clinit_body): Ignore empty statements.
3352 2006-03-08  David Daney  <ddaney@avtrex.com>
3354         * gcj.texi: Document -static-libgcj option.
3356 2006-02-20  Andrew Haley  <aph@redhat.com>
3358         * jcf-parse.c (parse_class_file): Set input_location from
3359         current_class.
3361 2006-02-15  Andrew Haley  <aph@redhat.com>
3363         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3364         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3365         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3367 2006-02-09  Andrew Haley  <aph@redhat.com>
3369         PR java/26192
3370         * expr.c (expand_invoke): Allow methods in arrays to be resolved
3371         in their superclass.
3373         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3374         array types.
3376 2006-02-08  Tom Tromey  <tromey@redhat.com>
3378         PR java/22578:
3379         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3380         * builtins.c (convert_real): New function.
3381         (java_builtins): Handle Float.intBitsToFloat,
3382         Float.floatToRawIntBits, Double.longBitsToDouble,
3383         Double.doubleToRawLongBits.
3385 2006-02-07  Andrew Haley  <aph@redhat.com>
3387         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
3388         class other than the one in which we expected to find it, ignore
3389         the result.
3391         PR java/25535
3392         * constants.c (build_constants_constructor): move initializer into
3393         first halfword on a 64-bit big-endian machine.
3395 2006-02-04  Tom Tromey  <tromey@redhat.com>
3397         PR java/25676:
3398         * builtins.c (max_builtin): Skip floating point 'max'.
3399         (min_builtin): Skip floating point 'min'.
3400         (check_for_builtin): Never return NULL_TREE.
3402 2006-02-04  Tom Tromey  <tromey@redhat.com>
3404         PR java/26097:
3405         * expr.c (push_type): Avoid side effect in gcc_assert.
3407 2006-02-04  Roger Sayle  <roger@eyesopen.com>
3409         * decl.c (java_init_decl_processing): Create char_type_node as a
3410         regular INTEGER_TYPE node.
3411         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3412         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3413         test for char_type_node and promoted_char_type_node as special
3414         instances of INTEGER_TYPE tree codes.
3415         (promote_type,build_java_signature): Likewise.
3416         * jcf-write.c (adjust_typed_op): Likewise.
3417         * mangle.c (mangle_type): Likewise.
3418         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3419         * parse.h (JINTEGRAL_TYPE_P): Likewise.
3421 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
3423         * expr.c (java_stack_swap): Revert gcc_assert patch.
3425 2006-02-03  Ben Elliston  <bje@au.ibm.com>
3427         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3428         * typeck.c: Likewise.
3429         * verify-impl.c: Likewise.
3430         * class.c: Likewise.
3431         * decl.c: Likewise.
3432         * jcf-parse.c: Likewise.
3433         * constants.c: Likewise.
3434         * check-init.c: Likewise.
3435         * jcf-write.c: Likewise.
3436         * verify-glue.c: Likewise.
3437         * mangle.c: Likewise.
3438         * expr.c: Likewise.
3439         * lang.c: Likewise.
3440         * boehm.c: Likewise.
3442 2006-02-01  Jan Hubicka  <jh@suse.cz>
3444         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3445         * lang.c (java_init_options): Set no_unit_at_a_time_default.
3447 2006-01-30  Andrew Haley  <aph@redhat.com>
3449         PR java/21428
3450         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3452 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
3454         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3455         Update copyright notice dates.
3457 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3459         * jvspec.c (lang_specific_spec_functions): Remove.
3461 2006-01-06  Tom Tromey  <tromey@redhat.com>
3463         * gcj.texi (Arrays): Added more documentation for
3464         JvNewObjectArray.
3465         (Primitive types): Correct information about primitive classes.
3466         (Reference types): New node.
3467         (Index): New node.
3469 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
3471         * jcf-parse.c (set_source_filename): Set the decl source location
3472         even when returning early.
3474 2005-12-15  Tom Tromey  <tromey@redhat.com>
3475             Andrew Haley  <aph@redhat.com>
3477         PR java/25429
3478         * parse.y (resolve_expression_name): Don't generate accessor
3479         methods for constant fields.
3481 2005-12-13  Andrew Haley  <aph@redhat.com>
3483         PR java/25366
3484         PR java/25368
3485         * class.c (maybe_layout_super_class): Update current_class before
3486         calling do_resolve_class.
3488 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
3490         PR java/25330
3491         * jcf-write.c (write_classfile): Use PID in temporary class
3492         file. Save/restore errno when reporting error.
3494 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
3496         PR java/9861
3497         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3498         to bare_function_type and including the return type
3499         * builtins.c (initialize_builtins) : Change builtin mangled name
3500         constants to conform to new mangling scheme
3502 2005-12-08  Andrew Haley  <aph@redhat.com>
3504         PR libgcj/25265
3505         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3506         (soft_abstractmethod_node): New.
3507         * expr.c (build_field_ref): Add in-line check for missing field.
3508         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3510 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3512         * Make-lang.in (java.all.build, java.install-normal): Remove.
3514 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3516         * Make-lang.in: Remove all dependencies on s-gtype, except for
3517         gt-java-parse.h.
3519 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
3521         * class.c (build_utf8_ref, emit_register_classes): Use
3522         switch_to_section and get_section.
3524 2005-12-06  Tom Tromey  <tromey@redhat.com>
3526         PR java/25283:
3527         * parse.y (patch_new_array_init): Revert previous patch.
3528         (lookup_method_invoke): Use size-less array type when creating an
3529         anonymous constructor.
3531 2005-12-05  Tom Tromey  <tromey@redhat.com>
3533         * parse.y (patch_new_array_init): Don't set length on array.
3535 2005-12-02  Richard Guenther  <rguenther@suse.de>
3537         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3538         buildN instead of build.
3539         * class.c (finish_class): Likewise.
3540         * expr.c (java_create_object): Likewise.
3542 2005-11-28  Tom Tromey  <tromey@redhat.com>
3544         PR java/18278:
3545         * expr.c (build_jni_stub): Unwrap the return value.
3546         * java-tree.h (soft_unwrapjni_node): New define.
3547         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3548         * decl.c (java_init_decl_processing): Initialize
3549         soft_unwrapjni_node.
3551 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
3553         * gcj.texi (gij options): Add -Xss documentation.
3555 2005-11-08  Wil Mahan  <wmahan@gmail.com>
3557         PR java/23617
3558         * zextract.c (read_zip_archive): Fix out of memory error when
3559         reading jar files with zip-style comments.
3561 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
3563         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3564         formats.
3565         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3567 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3568             Wil Mahan <wmahan@gmail.com>
3570         PR java/23620
3571         * class.c (make_class): Create empty binfo here.
3572         (set_super_info): Only create binfo if we have superclasses.
3574 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
3576         PR java/24127
3577         * parse.y (method_header): Make the result of the rule a NULL_TREE
3578         when a parsing error occurs.
3580 2005-09-29  Tom Tromey  <tromey@redhat.com>
3582         PR java/24120:
3583         * jcf-io.c (memoized_dirlist_hash): New function.
3584         (caching_stat): Use it.
3586 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
3588         PR java/21418
3589         * class.c (inherits_from_p): Try to lay out super class
3590         if it is not already laid out.
3591         (maybe_layout_super_class): Handle the case where SUPER_CLASS
3592         is a NULL_TREE.
3594 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
3596         * builtins.c (max_builtin, min_builtin, abs_builtin,
3597         java_build_function_call_expr): Use fold_buildN.
3598         * class.c (layout_class_method): Likewise.
3599         * expr.c (java_truthvalue_conversion, build_java_jsr,
3600         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3601         build_java_binop, build_field_ref, expand_compare,
3602         build_known_method_ref, build_invokevirtual,
3603         process_jvm_instruction): Likewise.
3604         * parse.y (patch_binop, patch_exit_expr): Likewise.
3605         * typeck.c (convert_ieee_real_to_integer): Likewise.
3606         (convert): Don't call fold after convert_ieee_real_to_integer.
3608 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
3610         PR java/23891
3611         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3612         the newly created type. Set import lists here, not in create_class.
3613         (jdep_resolve_class): Set current_class.
3614         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3615         the current package context, not ctxp->package.
3616         (cicp_cache): Removed.
3617         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3618         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3619         * java-tree.h (TYPE_PACKAGE): New macro.
3620         (struct lang_type): New member 'package'.
3622 2005-09-09  Andrew Haley  <aph@redhat.com>
3624         PR libgcj/23182
3625         * expr.c (pop_type_0): If the expected type is object or ptr
3626         (i.e. void*), return the type of the object we just popped from
3627         the stack.
3629 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
3631         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3632         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3634 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3636         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3637         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3638         typos.  Follow spelling conventions.
3640 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
3642         PR java/23431
3643         * typeck.c (lookup_do): Look up interfaces for the original class,
3644         not the base class.
3645         * parse.y (java_check_regular_methods): Fix diagnostic message for
3646         more restrictive overriding of a method from an interface.
3648 2005-08-16  Tom Tromey  <tromey@redhat.com>
3650         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3651         class' initial state.
3653 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3655         PR java/22113
3656         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3657         `literal_token' for large numeric input tokens.
3659 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3661         PR java/19870
3662         * parse.y (nested_field_access_p): Rename to nested_member_access_p
3663         and expand to handle method accesses across nested classes.
3664         (build_outer_method_access_method): Rename to
3665         build_nested_method_access_method.  Minor adjustments to comments.
3666         (resolve_expression_name): Use the newly-renamed
3667         nested_member_access_p method.
3668         (resolve_qualified_expression_name): Likewise.
3669         (patch_method_invocation): Also consider static methods for access
3670         method generation.  Minor adjustments to comments.
3671         (maybe_use_access_method): Use the more general
3672         nested_memeber_access_p to determine access across nested class
3673         boundaries.  Allow THIS_ARG to be NULL (for static methods).
3675 2005-08-15  Tom Tromey  <tromey@redhat.com>
3677         PR java/23300.
3678         * expr.c (build_field_ref): Don't generate otable reference when
3679         DECL_FIELD_OFFSET is 0.
3680         * class.c (maybe_layout_super_class): Pass outer class to
3681         do_resolve_class.
3683 2005-08-15  Tom Tromey  <tromey@redhat.com>
3685         * java-tree.h (LABEL_IN_SUBR): Removed.
3686         (LABEL_IN_SUBR): Likewise.
3687         (LABEL_IS_SUBR_START): Likewise.
3688         (LABEL_SUBR_START): Likewise.
3689         (LABEL_SUBR_CONTEXT): Likewise.
3690         (LABEL_CHANGED): Likewise.
3691         (LABEL_RETURN_LABEL): Likewise.
3692         (LABEL_RETURN_TYPE_STATE): Likewise.
3693         (LABEL_RETURN_LABELS): Likewise.
3694         (RETURN_MAP_ADJUSTED): Likewise.
3695         (LABEL_PENDING_CHAIN): Likewise.
3697 2005-08-15  Tom Tromey  <tromey@redhat.com>
3699         * Make-lang.in (JAVA_OBJS): Removed verify.o
3700         (java/verify.o): Removed.
3701         * verify.c: Removed.
3702         * lang.c (flag_new_verifier): Removed.
3703         (java_post_options): Updated.
3704         * java-tree.h (flag_new_verifier): Removed.
3705         (verify_jvm_instructions): Removed.
3706         * expr.c (pop_type_0): Assume flag_new_verifier is true.
3707         (build_java_check_indexed_type): Likewise.
3708         (expand_java_arraystore): Likewise.
3709         (expand_java_arrayload): Likewise.
3710         (pop_arguments): Likewise.
3711         (expand_byte_code): Likewise.
3712         (process_jvm_instruction): Likewise.
3714 2005-08-10  Andrew Haley  <aph@redhat.com>
3716         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3717         type mismatches to make legal GIMPLE.
3719 2005-08-10  Robin Green <greenrd@greenrd.org>
3721         PR java/23230:
3722         * parse.y (maybe_use_access_method): Generalize check from
3723         java.lang.Object to any superclass of current_class
3725 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3727         * class.c (build_class_ref): Wrap the primary class type in a
3728         NOP_EXPR.
3729         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3730         primary class type from the NOP_EXPR in which it was placed.
3732 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
3734         * expr.c (expand_load_internal): Fix missing parens in
3735         predicate.
3737 2005-07-28  Andrew Haley  <aph@redhat.com>
3739         * expr.c (expand_load_internal): Convert to destination type.
3741 2005-07-22  Manfred Hollstein  <mh@suse.com>
3743         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3744         (check_constant): Likewise.
3745         (check_wide_constant): Likewise.
3747 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
3749         Make CONSTRUCTOR use VEC to store initializers.
3750         * check-init.c (check_init): Update to cope with VEC in
3751         CONSTRUCTOR_ELTS.
3752         * class.c (make_field_value, make_method_value, get_dispatch_table,
3753         make_class_data, emit_symbol_table, emit_catch_table,
3754         emit_assertion_table): Use build_constructor_from_list instead of
3755         build_constructor.
3756         * constants.c (build_constants_constructor): Likewise.
3757         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3758         VEC in CONSTRUCTOR_ELTS.
3759         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3760         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3761         of a TREE_LIST.
3762         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3763         CONSTRUCTOR_ELTS.
3764         * parse.y (build_new_array_init): Use build_constructor_from_list
3765         instead of build_constructor.
3766         (patch_new_array_init): Update to cope with VEC in
3767         CONSTRUCTOR_ELTS.
3768         (array_constructor_check_entry): Likewise.
3770 2005-07-12  Tom Tromey  <tromey@redhat.com>
3772         * jvspec.c (lang_specific_driver): Put filelist_filename first on
3773         command line.
3775 2005-07-12  Tom Tromey  <tromey@redhat.com>
3777         PR java/19674:
3778         * parse-scan.y (interface_member_declaration): Added
3779         empty_statement.
3781 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
3783         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3784         (LABEL_PENDING_CHAIN): Ditto.
3785         (LABEL_PC): Ditto.
3786         (DECL_BIT_INDEX): Ditto.
3788 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3790         PR java/18119
3791         * parse.y (inner_class_accessible): New function. Logic moved from
3792         check_inner_class_access.
3793         (check_inner_class_access): Use inner_class_accessible.
3794         (resolve_inner_class): Simplify arguments. Create circularity hash
3795         here. Keep looking for classes if we found one that was inaccessible.
3796         Return the inaccessible class only if there is no other match.
3797         (do_resolve_class): Update for new resolve_inner_class arguments.
3798         Don't create circularity_hash here.
3800 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3802         PR java/21045
3803         * parse.y (add_exception_to_throws): New function.
3804         (purge_unchecked_exceptions): Removed.
3805         (get_constructor_super): Renamed from verify_constructor_super. Now
3806         returns the super constructor after verification.
3807         (java_complete_expand_method): Don't use purge_unchecked_exceptions
3808         or save/restore the exception list.
3809         (check_thrown_exceptions): Add uncaught exceptions in anonymous
3810         class initializers and constructors to the throws clause of the method.
3812 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
3814         PR java/19674
3815         * parse.y (interface_member_declaration): Allow empty statements in
3816         interface declarations.
3818 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
3820         * Makefile.in (parse.o): Adjust dependencies.
3821         * parse.y: Include tree-dump.h.
3823 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
3825         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
3826         flag for quoting.
3828 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
3830         * parse.y (issue_warning_error_from_context): Call
3831         pp_output_formatted_text to be able to get the buffer.
3833 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
3835         * parse.y (issue_warning_error_from_context): Update for the
3836         renaming of pp_format_text to pp_format.
3838 2005-06-28  Paul Brook  <paul@codesourcery.com>
3840         * decl.c (java_init_decl_processing): Call
3841         default_init_unwind_resume_libfunc.
3843 2005-06-27  Tom Tromey  <tromey@redhat.com>
3845         PR java/21540, PR java/13788:
3846         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3847         fold_constant_for_init.
3848         (patch_binop): Added 'folding' argument.  Updated all callers.
3849         (patch_unaryop) <NOP_EXPR>: New case.
3850         (fold_constant_for_init) <NOP_EXPR>: Likewise.
3851         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3853 2005-06-25  Jan Hubicka  <jh@suse.cz>
3855         * builtins.c (define_builtin): Accept new flags parameter.
3856         (initialize_builtins): Mark the builtins const and nothrow accordingly.
3858 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
3860         * all files: Update FSF address in copyright headers.
3862 2005-06-24  Tom Tromey  <tromey@redhat.com>
3864         * verify-impl.c (verify_instructions_0): Correctly handle
3865         situation where PC falls off end.
3867 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3869         PR java/20697
3870         * parse.y (find_most_specific_methods_list): Remove special case for
3871         inner classes.
3873 2005-06-15  Tom Tromey  <tromey@redhat.com>
3875         PR libgcj/21906:
3876         * class.c (make_method_value): Use soft_abstractmethod_node for
3877         abstract method.
3878         * java-tree.h (soft_abstractmethod_node): New define.
3879         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3880         * decl.c (java_init_decl_processing): Initialize
3881         soft_abstractmethod_node.
3883 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3885         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3887 2005-06-13  Per Bothner  <per@bothner.com>
3889         * expr.c (int highest_label_pc_this_method,
3890         start_label_pc_this_method): New globals.
3891         (lookup_label): Add start_label_pc_this_method to pc for label, and
3892         update highest_label_pc_this_method.  This prevents conflicts between
3893         labels from different methods.
3894         * java-tree.h: Declare new globals.
3895         * jcf-parse.c (parse_class_file): If needed bump
3896         start_label_pc_this_method and reset highest_label_pc_this_method.
3898 2005-06-13  Tom Tromey  <tromey@redhat.com>
3900         PR java/21844:
3901         * parse.y (nested_field_access_p): Handle case where outer field
3902         is inherited by enclosing class.
3904 2005-06-12  Per Bothner  <per@bothner.com>
3906         * class.c (inherits_from_p): Do load_class if needed.
3908 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3910         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3911         * java-tree.h (parse_error_context): Move...
3912         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3913         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3914         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3916 2005-06-08  Roger Sayle  <roger@eyesopen.com>
3918         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3920 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
3922         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3923         msgid for argument name.
3924         * gjavah.c (error): Likewise.
3925         * java-tree.h (parse_error_context): Likewise.
3926         * parse.y (parse_error_context, parse_warning_context,
3927         issue_warning_error_from_context): Likewise.
3929 2005-06-01  Tom Tromey  <tromey@redhat.com>
3931         PR java/21722:
3932         * class.c (build_static_field_ref): Don't fold constant fields if
3933         current class is from a .class file and we're using indirect
3934         dispatch.
3936 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3938         * java/verify-glue.c: Don't include errors.h and include toplev.h.
3939         * java/Make-lang.in: Updates dependencies.
3941 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
3943         PR java/19870.
3944         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3945         NESTED_FIELD_ACCESS_IDENTIFIER_P.
3946         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3947         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3948         * jcf-write.c (generate_classfile): Use
3949         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3950         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3951         * parse.y (build_outer_field_access): Rename to
3952         build_nested_field_access. Support static fields and outer-to-inner
3953         class accesses.
3954         (outer_field_access_p): Rename to nested_field_access_p. Support
3955         static fields and generalise to outer-to-inner class and sibling
3956         inner class accesses.
3957         (outer_field_expanded_access_p): Rename to
3958         nested_field_expanded_access_p and support static fields.
3959         (outer_field_access_fix): Rename to nested_field_access_fix and
3960         support static fields.
3961         (build_outer_field_access_expr): Rename to
3962         build_nested_field_access_expr and support static fields.
3963         (build_outer_field_access_methods): Rename to
3964         build_nested_field_access_methods and support static fields. For
3965         static fields, generate accessors without class instance parameters.
3966         (build_outer_field_access_method): Rename to
3967         build_nested_field_access_method and support static fields.
3968         (build_outer_method_access_method): Use
3969         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3970         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3971         (resolve_expression_name): Consider static field accesses across
3972         nested classes.
3973         (resolve_qualified_expression_name): Likewise.
3974         (java_complete_lhs): Use nested_field_access_fix instead of
3975         outer_field_access_fix.
3976         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3977         Use nested_field_expanded_access_p instead of
3978         outer_field_expanded_access_p. Use nested_field_access_fix instead
3979         of outer_field_access_fix.
3980         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3981         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3983 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3985         * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3986         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3987         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3988         MINOR_BINARYCOMPAT_ABI_VERSION): New.
3989         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3990         (parse_version): Calculate version ID using new method. Use bit-flags
3991         for flag_indirect_dispatch and flag_bootstrap_classes.
3993 2005-05-25  Richard Henderson  <rth@redhat.com>
3995         PR libgcj/21692
3996         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3997         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3998         DECL_CONTEXT; avoid pushdecl_top_level.
3999         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
4000         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
4001         (layout_class_method): Likewise.
4002         * decl.c (java_mark_cni_decl_local): New.
4003         (java_mark_class_local): Use it.
4004         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
4005         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
4006         (struct lang_decl_func): Add local_cni;
4007         (struct lang_decl_var): Add class_field, vtable.
4008         (java_mangle_decl): Declare.
4009         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
4010         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
4011         (mangle_obstack_1): New.
4012         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
4013         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
4014         lhd_set_decl_assembler_name for things that don't need mangling.
4015         (mangle_class_field): Rename from java_mangle_class_field, make
4016         static, don't call init_mangling or finish_mangling.
4017         (mangle_vtable): Similarly.
4018         (mangle_local_cni_method_decl): New.
4019         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
4020         gcc_assert, and MANGLE_RAW_STRING.
4021         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
4023 2005-05-25  DJ Delorie  <dj@redhat.com>
4025         * class.c (set_constant_value): Move warning control from if() to
4026         warning(OPT_*).
4028 2005-05-24  Richard Henderson  <rth@redhat.com>
4030         * builtins.c (define_builtin): Don't call make_decl_rtl.
4031         * constants.c (build_constant_data_ref): Likewise.
4032         * class.c (build_utf8_ref): Likewise.
4033         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
4034         (get_dispatch_table, layout_class_method): Likewise.
4035         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
4036         by hand.
4037         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
4038         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
4039         to determine if we need a non-zero address.
4040         * decl.c (builtin_function): Don't call make_decl_rtl.
4041         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
4042         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
4043         * resource.c (compile_resource_data): Likewise.
4044         * parse.y (resolve_field_access): Re-word comment to avoid
4045         building DECL_RTL.
4047 2005-05-24  Richard Henderson  <rth@redhat.com>
4049         * class.c (registered_class): Take it out of class_roots; turn into
4050         a vec of trees.
4051         (register_class): Make static.  Don't duplicate decl node.  Use
4052         VEC_safe_push.
4053         (emit_register_classes): Use VEC_iterate.  Use output_constant
4054         instead of assemble_integer.  Don't call mark_decl_referenced
4055         directly.
4056         * java-tree.h (register_class): Remove decl.
4058 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
4060         PR java/17845
4062         * parse.y (register_package, package_list): Remove.
4063         (package_declaration): Do not call register_package.
4064         (do_resolve_class): Do not use package_list.
4066 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
4068         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
4069         unused variable.
4071 2005-05-15  Tom Tromey  <tromey@redhat.com>
4073         PR java/21519:
4074         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
4075         NOTE_PUSH.
4077 2005-05-12  Aaron Luchko <aluchko@redhat.com>
4079         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
4081 2005-05-11  Tom Tromey  <tromey@redhat.com>
4083         * gcj.texi (Code Generation): Document -fbootstrap-classes.
4084         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
4085         (parse_version): Use it.
4086         * lang.opt (-fbootstrap-classes): New option.
4088 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
4090         PR java/21436
4091         * class.c (maybe_layout_super_class): Look for imports in this_class.
4092         * parse.h (ctxp_for_generation_last): New.
4093         (do_resolve_class): Add a parameter.
4094         * parse.y (ctxp_for_generation_last): New.
4095         (java_pop_parser_context): Add at end of list.
4096         (find_in_imports, find_in_imports_on_demand): Look in ctxp
4097         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
4098         the given type are NULL.
4099         (do_resolve_class): Look into the imports of the new second parameter.
4100         Adjust recursive calls.
4101         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
4102         calls to do_resolve_class.
4103         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
4104         (java_complete_class): Do not do that here.
4106 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
4108         PR java/20309
4109         * Make-lang.in (java): Add gjnih.
4110         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
4111         (GJNIH_OBJS): New variable.
4112         (gjnih$(exeext)): New target.
4113         (JAVA_MANFILES): Add gjnih.1.
4114         (java.uninstall): Add gjnih.1.
4115         (java.mostlyclean): Add gjnih.
4116         (java.maintainer-clean): Add gjnih.1.
4117         (java/gjavah-jni.o): New target.
4118         (.INTERMEDIATE): Add gjnih.pod.
4119         (gjnih.pod): New target.
4120         * config-lang.in (stagestuff): Add gjnih.
4121         * gcj.texi (Top): Add gjnih node.
4122         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
4123         -bootclasspath options.
4124         (Invoking gjnih): New node.
4125         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
4126         (TOOLNAME): New macro.
4127         (error): Replace hard-coded gcjh with TOOLNAME.
4128         (process_file): Likewise.
4129         (usage): Likewise.
4130         (version): Likewise.
4131         (help): Likewise.  Add help output for -force, -old, -trace and -J
4132         options.
4133         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
4134         (options): Add force, old, trace and J fields.
4135         (main): Handle -force, -old, -trace and -J options.
4137 2005-05-03  Tom Tromey  <tromey@redhat.com>
4139         PR java/21245:
4140         * gjavah.c (main): Unlink output file on error.
4142 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
4144         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
4145         copyright.
4147 2005-04-29  Tom Tromey  <tromey@redhat.com>
4149         * expr.c (build_jni_stub): Updated for change to build_block.
4151 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
4153         * expr.c (force_evaluation_order): Declare 'saved' earlier.
4155 2005-04-28  Andrew Haley  <aph@redhat.com>
4157         PR java/19285
4158         * java-tree.h (soft_resolvepoolentry_node): New.
4159         (alloc_constant_fieldref): Declare.
4160         * expr.c (expand_java_field_op): Don't call class_init for
4161         accesses to static fields with indirect dispatch.
4162         * builtins.c (initialize_builtins): Add "__builtin_expect".
4163         * decl.c (soft_resolvepoolentry_node): New variable.
4164         (java_init_decl_processing): Create a decl for
4165         "_Jv_ResolvePoolEntry".
4166         * class.c (build_fieldref_cache_entry): New function.
4167         (build_static_field_ref): Rewrite for indirect dispatch.
4168         * constants.c (find_name_and_type_constant_tree): New function.
4169         (alloc_constant_fieldref): Likewise.
4170         (build_constants_constructor): Handle CONSTANT_Fieldref and
4171         CONSTANT_NameAndType.
4173         PR java/21115
4174         * expr.c (force_evaluation_order): Convert outgoing args smaller
4175         than integer.
4177 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
4179         * gcj.texi (libgcj Runtime Properties): Remove obsolete
4180         gnu.gcj.runtime.NameFinder.* system properties. Update documentation
4181         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
4183 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4185         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4186         to `unlock_stream' with `unlock_std_streams'.
4188 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
4190         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
4191         instead of just expr.h.
4193 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4195         * gjavah.c (main): Unlock the stdio streams.
4196         * jcf-dump.c (main): Likewise.
4197         * jv-scan.c (main): Likewise.
4198         * jvgenmain.c (main): Likewise.
4200 2005-04-23  DJ Delorie  <dj@redhat.com>
4202         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4203         parse.y: Adjust warning() callers.
4205 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
4207         * gcj.texi (Object fields): Change "Integer" to "Int" in example
4208         contructor.
4210 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4212         * gcj.texi: Fix typos and bogus example.
4214 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
4216         * except.c: Fix a comment typo.
4218 2005-04-19  Julian Brown  <julian@codesourcery.com>
4220         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4221         indirect dispatch with PIC.
4223 2005-04-18  Andrew Haley  <aph@redhat.com>
4225         * java-except.h (struct eh_range.handler): Remove unused field.
4226         (handle_nested_ranges): Remove function declaration.
4227         (sanity_check_exception_range): Add function declaration.
4228         * verify.c (verify_jvm_instructions): Remove call to
4229         handle_nested_ranges.
4230         * verify-glue.c (verify_jvm_instructions_new): Call
4231         sanity_check_exception_range.
4232         * except.c (link_handler, eh_range_freelist, link_handler,
4233         handle_nested_ranges): Remove.
4234         (add_handler): Rewrite.
4235         (sanity_check_exception_range): New function.
4236         (print_ranges): New function.
4238 2005-04-13  Julian Brown  <julian@codesourcery.com>
4240         * decl.c (finish_method): Give methods once-only linkage.
4242 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
4244         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4246 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4248         * java-tree.h: Don't use PARAMS().
4250 2005-04-07  Per Bothner  <per@bothner.com>
4252         * class.c (push_class): By default, suppress debug output.
4253         (finish_class): Enable debug output for classes we're emitting.
4255 2005-04-07  Andrew Haley  <aph@redhat.com>
4257         * gcj.texi: Correct gcj-dbtool instructions.
4259 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
4261         * gcj.texi: Fix a typo.
4262         * lang.c: Fix a comment typo.
4264 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
4266         * gcj.texi (Invoking gij): Add descriptions of new -X options.
4267         Mention recognized-and-ignored compatibility options.
4268         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4269         JvFree.
4270         (About CNI): Add Memory allocation section.
4272 2005-04-01  Tom Tromey  <tromey@redhat.com>
4274         * decl.c (java_init_decl_processing): Fix types of
4275         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4276         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4277         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4279 2005-03-31  Jan Hubicka  <jh@suse.cz>
4281         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4282         * class.c: Include cgraph.h
4283         (make_local_functoin_alias): Mark aslias as needed.
4284         * resource.c: Include cgraph.h
4285         (compile_resource_data): Go via cgraph interface.
4287 2005-03-30  Ian Lance Taylor  <ian@airs.com>
4289         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4291 2005-03-30  Tom Tromey  <tromey@redhat.com>
4293         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4294         inner_class_info_index==0 or outer_class_info_index==0.
4296 2005-03-29  Tom Tromey  <tromey@redhat.com>
4298         * gcj.texi (libgcj Runtime Properties): Document
4299         gnu.gcj.runtime.endorsed.dirs.
4301 2005-03-24  Anthony Green  <green@redhat.com>
4303         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4304         'gcj-dbtool -p'.
4306 2005-03-23  Tom Tromey  <tromey@redhat.com>
4308         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4309         (parse_version): Use it.
4311 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
4313         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4315 2005-03-18  Andrew Haley  <aph@redhat.com>
4317         PR java/20522
4318         * decl.c (update_aliases): Don't update variables that are about
4319         to die.
4320         (maybe_poplevels): Add comment.
4322 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
4324         PR java/20502
4325         * jcf-parse.c (duplicate_class_warning): New function.
4326         (java_parse_file): Call duplicate_class_warning if
4327         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4328         (parse_zip_file_entries): Likewise. Also set
4329         CLASS_FROM_CURRENTLY_COMPILED_P.
4331 2005-03-16  Andrew Haley  <aph@redhat.com>
4333         * expr.c (expand_java_arrayload): Don't generate a
4334         NullPointerException based on the type of the node.
4335         (build_java_array_length_access): Likewise.
4337 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
4339         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4341 2005-03-11  Tom Tromey  <tromey@redhat.com>
4343         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4344         (libgcj Runtime Properties): Document the default .db.
4346 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
4348         PR java/20312
4349         * parse.y (checks_throws_clauses): Check exceptions list even when
4350         the base class does not come from a source file being compiled.
4351         (java_complete_lhs): Remove unused variable 'wfl'.
4353 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
4355         PR java/20338
4356         * decl.c (finish_method): Emit _Jv_InitClass for private static
4357         methods inside inner classes as well.
4359 2005-03-08  Julian Brown  <julian@codesourcery.com>
4360         * Revert patch from 2005-03-08 for causing bootstrap failure on
4361         ppc-darwin.
4363 2005-03-08  Julian Brown  <julian@codesourcery.com>
4365         * decl.c (finish_method): Give methods once-only linkage.
4367 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
4369         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4371 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
4373         * verify-glue.c (vfy_is_assignable_from): Perform static check using
4374         can_widen_reference_to if the C++ ABI is in use.
4375         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4376         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4377         type_isresolved, init_state, set_pc, state_get_pc,
4378         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4379         (verify_fail): Report the current PC from the verifier context.
4380         (free_state): Remove #if 0 block to enable this function.
4381         (free_verifier_context): Call free_state on state_list iterator
4382         values before freeing them.
4383         * expr.c (pop_type_0): Pop correct type for error message when stack
4384         contains a multi-word type.
4386 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
4388         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4389         for known NULL array length access.
4391 2005-03-07  Tom Tromey  <tromey@redhat.com>
4393         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4395 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
4397         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4398         typeck.c: Update copyright.
4400 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
4402         Remove xref code.
4403         * xref.c, xref.h: Remove file.
4404         * Make-lang.in (java/xref.o): Remove.
4405         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4406         * lang.c (flag_emit_xref): Remove definition.
4407         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4408         * typeck.c (convert): Remove use of do_not_fold.
4409         * parse.y (do_not_fold): Remove definition.
4410         (parser grammar): Remove xref code.
4411         (maybe_create_class_interface_decl, create_class): Likewise.
4412         (register_fields, method_header, finish_method_declaration): Likewise.
4413         (declare_local_variables, source_end_java_method): Likewise.
4414         (java_complete_expand_classes): Do not set do_not_fold.
4415         (java_complete_expand_method): Remove xref code.
4416         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4417         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4418         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4419         (patch_synchronized_statement, patch_throw_statement): Likewise.
4420         (maybe_build_class_init_for_field): Likewise.
4422 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
4424         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4425         instead of IS_NON_TYPE_CODE_CLASS.
4427 2005-03-04  Andrew Haley  <aph@redhat.com>
4429         PR java/18362
4430         * class.c (set_method_index): Don't set method_index if it is
4431         NULL_TREE.
4432         (layout_class_method): Don't complain about "non-static method foo
4433         overrides static method" in the case of indirect dispatch.
4435 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4437         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4438         warning.
4439         * Make-lang.in: Don't elide warnings in jcf-io.c.
4441 2005-03-01  Per Bothner  <per@bothner.com>
4443         PR java/8608
4444         * check-init.c (wfl): Remove static.
4445         (final_assign_error, check_init): Replace calls to parse_error_context
4446         by plain error.
4447         (check_init): Save, set, and restore input_location for each exp.
4449 2005-03-01  Per Bothner  <per@bothner.com>
4451         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4452         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4453         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4455 2005-03-01  Per Bothner  <per@bothner.com>
4457         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4459 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4461         PR libgcj/16923
4462         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4463         JvVMOption.
4465 2005-02-22  Tom Tromey  <tromey@redhat.com>
4467         PR java/20056:
4468         * verify-impl.c (EITHER): New define.
4469         (types_compatible): Handle it.
4470         (check_field_constant): Use it.
4472 2005-02-18  Tom Tromey  <tromey@redhat.com>
4474         PR java/20056:
4475         * verify-impl.c (types_equal): Fixed test.
4477         PR java/20056:
4478         * verify-glue.c (vfy_class_has_field): New function.
4479         * verify.h (vfy_class_has_field): Declare.
4480         * verify-impl.c (check_field_constant): Added 'putfield'
4481         argument.
4482         (verify_instructions_0): Updated.
4483         (types_equal): New function.
4485 2005-02-14  Tom Tromey  <tromey@redhat.com>
4487         PR java/19921:
4488         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4489         stack effect of multianewarray.
4491 2005-02-14  Andrew Haley  <aph@redhat.com>
4493         PR java/19907
4494         * expr.c (expand_byte_code): Call promote_arguments().
4495         (promote_arguments): New function.
4496         * decl.c (check_local_unnamed_variable): Remove special case for
4497         new verifier.
4498         (find_local_variable): Promote all boolean types to int
4499         when searching for local variable decls.
4501 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
4503         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4504         parse-scan.y: Update copyright.
4506 2005-02-11  Per Bothner  <per@bothner.com>
4508         PR java/15543
4509         * parse-scan.y (input_location): Remove variable.
4510         (main_input_filename): New - replaces input_filename, which isn't
4511         settable if USE_MAPPED_LOCATION.
4512         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4513         so we don't reference input_location or wfl_operator in that case.
4514         * jv-scan.c (expand_location): Remove - no longer used.
4515         (main): Set main_input_filename rather than input_filename.
4517 2005-02-09  Richard Henderson  <rth@redhat.com>
4519         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4520         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4522 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
4524         * expr.c (add_type_assertion): Use the proper enumeration type,
4525         since this is what htab_find_slot() is expecting.
4527 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
4529         * gcj.texi: Update copyright dates.
4531 2005-02-02  Tom Tromey  <tromey@redhat.com>
4533         * gcj.texi (libgcj Runtime Properties): Default library_control
4534         to 'cache'.
4536 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
4538         PR java/15543
4539         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4540         (modifiers) when square brackets are present in a declaration for
4541         a final paramter.
4542         * jv-scan.c (main): Set input_filename and input_line.
4544 2005-02-01  Tom Tromey  <tromey@redhat.com>
4546         PR java/19742:
4547         * gjavah.c (get_field_name): Don't override name for JNI header.
4549 2005-02-01  Roger Sayle  <roger@eyesopen.com>
4551         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4552         of unsigned types using iushr and lushr JVM bytecodes.
4554 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4556         PR java/19738
4557         * gjavah.c (jni_print_float): Do not emit floating-point
4558         initialiser for a static final field.
4559         (jni_print_double): Likewise.
4561 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
4563         Revert:
4564         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4565         * gjavah.c (print_field_info): Mark static data members of
4566         floating-point type with "__extension__".
4568 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4570         * gjavah.c (print_field_info): Mark static data members of
4571         floating-point type with "__extension__".
4573 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4575         PR java/9157
4576         * parse.y (build_string_concatenation): Remove redundant if.
4577         (patch_conditional_expr): Attempt to patch_string() the condition
4578         of a ?: as well, in addition to its other operands.
4580 2005-01-25  Tom Tromey  <tromey@redhat.com>
4582         * Make-lang.in (java/java-tree-inline.o): Removed.
4584 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
4586         PR java/19070
4587         * parse.y (patch_binop): Allow comparisons against NULL only
4588         if the other operand is of a reference type.
4590 2005-01-24  Tom Tromey  <tromey@redhat.com>
4592         * java-tree.h (gcj_abi_version): Declare.
4593         * class.c (make_class_data): Push gcj_abi_version into "next"
4594         field.  Renamed field.
4595         * decl.c (gcj_abi_version): New global.
4596         (parse_version): New function.
4597         (java_init_decl_processing): Call it.  Renamed 'next' field.
4598         Include version.h.
4599         (GCJ_BINARYCOMPAT_ADDITION): New define.
4601 2005-01-24  Roger Sayle  <roger@eyesopen.com>
4603         PR java/19295
4604         * jcf-write.c (generate_bytecode_insns): Conversions between
4605         integer types of the same precision shouldn't generate widening
4606         or narrowing conversion bytecodes.
4608 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
4610         * java-except.h, java-tree.h: Remove unused prototypes.
4612 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
4614         PR java/18091:
4615         * jcf-write.c (perform_relocations): Don't call memcpy if source
4616         and destination are the same.
4618 2005-01-17  Tom Tromey  <tromey@redhat.com>
4620         * verify-impl.c (get_short): Sign extend.
4621         (get_int): Likewise.
4623 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
4625         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4626         with TYPE_SIZE.
4628 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4630         * verify.c: Revert to the version before the BC-ABI merge.
4632 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4634         PR java/19277
4635         * check-init.c (check_init): Take care of references that do not
4636         have an explicit final variable declaration (e.g. array length
4637         access) for pre/post in/de-crement operators.
4639 2005-01-08  Mark Wielaard  <mark@klomp.org>
4641         * parse.y (process_imports): Allocate (and free) original_name only
4642         when not already defined.
4643         * jcf-parse.c (read_class): Free results of find_class() and
4644         lrealpath().
4645         (java_parse_file): Keep pointer to head of file_list and free when
4646         done. Free result of lrealpath().
4648 2005-01-05  Tom Tromey  <tromey@redhat.com>
4650         * gcj.texi (Standard Properties): java.ext.dirs is now used.
4652 2004-12-20  Andrew Haley  <aph@redhat.com>
4654         * typeck.c: Use fold_convert for ints and booleans.
4656 2004-12-17  Andrew Haley  <aph@redhat.com>
4658         PR java/18931
4659         * typeck.c (convert): Use a CONVERT_EXPR when converting to
4660         BOOLEAN_TYPE or CHAR_TYPE.
4661         (convert_to_boolean, convert_to_char) : Remove.
4662         * convert.h (convert_to_boolean, convert_to_char) : Remove.
4663         * expr.c (expand_load_internal): Do type conversion if type is not
4664         as required.
4666 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
4668         PR target/18459
4669         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4670         Update comment.
4672 2004-12-07  Andrew Haley  <aph@redhat.com>
4674         PR java/18811:
4675         * jcf-parse.c (load_class): Remove sanity test for missing inner
4676         class file.
4678 2004-12-06  Tom Tromey  <tromey@redhat.com>
4680         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4681         (java.uninstall): Likewise.
4682         (java.maintainer-clean): Likewise.
4683         (.INTERMEDIATE): Likewise.
4684         (java.install-man): Likewise.
4685         (gcj-dbtool.pod): New target.
4686         * gcj.texi (Code Generation): Document -findirect-dispatch.
4687         (libgcj Runtime Properties): Document
4688         gnu.gcj.precompiled.db.path.
4689         (Top): Link to "Invoking gcj-dbtool".
4691 2004-12-06  Tom Tromey  <tromey@redhat.com>
4693         PR java/14853:
4694         * java-tree.h (extract_field_decl): Declare.
4695         * parse.y (extract_field_decl): Renamed from
4696         strip_out_static_field_access_decl.  No longer static.
4697         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4699 2004-12-03  Tom Tromey  <tromey@redhat.com>
4701         * lang.c (flag_new_verifier): Define.
4702         (java_post_options): Set flag_new_verifier if indirect dispatch
4703         is being used.
4704         * lang.opt (fnew-verifier): Removed.
4706 2004-12-03  Tom Tromey  <tromey@redhat.com>
4708         PR bootstrap/14614:
4709         * Make-lang.in (java.install-common): Only install transformed
4710         gcjh if gcj-cross exists.
4712 2004-12-03  Andrew Haley  <aph@redhat.com>
4714         PR java/18812
4715         * except.c (link_handler): Patch 'outer' field of siblings of the
4716         range we're demoting.
4718 2004-12-03  Andrew Haley  <aph@redhat.com>
4720         PR java/18697
4721         * class.c (layout_class_method): Don't fail to override a method
4722         simply because it has DECL_ARTIFICIAL set.
4724 2004-12-02  Tom Tromey  <tromey@redhat.com>
4726         PR java/16675:
4727         * parse.y (craft_constructor): Special case null_pointer_node.
4729 2004-12-02  Tom Tromey  <tromey@redhat.com>
4731         PR java/18741:
4732         * java-gimplify.c (java_gimplify_expr): Don't call
4733         SET_EXPR_LOCATION unless wrapped tree is an expression.
4735 2004-11-27  Per Bothner  <per@bothner.com>
4737         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
4738         Fix fencepost error in 'i', which got executed one too many times.
4739         Also, fold memcpy into explicit loop, as originally intended.
4740         Also, free temporary 'buf' which otherwise leaks.
4742 2004-11-27  Per Bothner  <per@bothner.com>
4744         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4745         local static variables if not USE_MAPPED_LOCATION.
4747 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
4749         * class.c, decl.c, expr.c: Fix comment typos.
4751 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
4753         PR java/18305
4754         * decl.c (end_java_method): Call
4755         attach_init_test_initialization_flags on all the init_decls.
4756         * parse.y (attach_init_test_initialization_flags): Move to ...
4757         * expr.c (attach_init_test_initialization_flags): here and
4758         support BIND_EXPR also.
4759         * java-tree.h (attach_init_test_initialization_flags): Prototype.
4760         * jcf-parse.c (parse_class_file): Don't disable class init
4761         optimization.
4763 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
4765         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4766         in diagnostics.
4768 2004-11-24  Richard Henderson  <rth@redhat.com>
4770         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4771         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4773 2004-11-24  Tom Tromey  <tromey@redhat.com>
4775         * verify.c (defer_merging): Don't use C++-style comment.
4776         * verify.h (java_opcode): Added java_opcode_end.
4777         * class.c (build_class_ref): Remove C++ comment and old FIXME.
4779         * verify-impl.c (vfy_push_type): Removed bogus "return".
4780         (initialize_stack): Use vfy_alloc and vfy_free.
4781         (verify_instructions_0): Likewise.
4783         * Merged gcj-abi-2-dev-branch to trunk.
4785 2004-11-24  Andrew Haley  <aph@redhat.com>
4787         * jcf-parse.c (parse_class_file): Set file_start_location.
4789 2004-11-10  Tom Tromey  <tromey@redhat.com>
4791         * class.c (make_field_value): Don't call build_static_field_ref.
4792         (build_static_field_ref): Don't emit direct references when using
4793         indirect dispatch.
4795         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
4796         -verbose:class into man page synopsis.
4798 2004-11-09  Tom Tromey  <tromey@redhat.com>
4800         * expr.c (build_java_arraystore_check): Still generate check if
4801         element type is itself an array.
4803 2004-11-08  Tom Tromey  <tromey@redhat.com>
4805         * java-tree.h (soft_check_assignment_node): Removed.
4806         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4807         * decl.c (java_init_decl_processing): Don't initialize
4808         soft_check_assignment_node.
4810 2004-11-05  Tom Tromey  <tromey@redhat.com>
4812         * class.c (layout_class_methods): Don't add Miranda methods when
4813         using indirect dispatch.
4815 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
4817         * class.c (make_class_data): Call emit_assertion_table to set the
4818         'assertion_table' field.
4819         (build_signature_for_libgcj): Move here from expr.c.
4820         (add_assertion_table_entry): New function. Callback for assertion
4821         hashtable traversal.
4822         (emit_assertion_table): New. Take class argument, and generate
4823         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4824         * decl.c (init_decl_processing): Define assertion_entry_type record.
4825         Push 'assertion_table' class field instead of 'verify'.
4826         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4827         (type_assertion_hash): Include 'assertion_code' in hash.
4828         (add_type_assertion): Rewritten. Take class and assertion_code
4829         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4830         (can_widen_reference_to): Use new add_type_assertion() arguments.
4831         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4832         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4833         (verify_identifier_node): Removed.
4834         (assertion_entry_type, assertion_table_type): New.
4835         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4836         assertion code definitions.
4837         (struct type_assertion): Add assertion_code. Rename 'source_type' and
4838         'target_type' to 'op1' and 'op2'.
4839         (add_type_assertion): Declare.
4840         (lang_printable_name_wls): Remove unused definition.
4841         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4842         to emit runtime assertion.
4843         (vfy_note_stack_type): Clean up non-C90 declarations.
4844         (vfy_note_local_type): Likewise.
4845         * verify.h (vfy_is_assignable_from): Declare.
4846         * verify-impl.c (is_assignable_from_slow): Remove unused function.
4847         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4848         instead of is_assignable_from_slow().
4849         (types_compatible): Reinstate ref_compatible() call.
4851 2004-11-04  Tom Tromey  <tromey@redhat.com>
4853         * class.c (build_static_field_ref): Reverted previous patch.
4855         * class.c (build_static_field_ref): Don't emit direct references
4856         when using indirect dispatch.
4858 2004-11-03  Tom Tromey  <tromey@redhat.com>
4860         * expr.c (expand_java_arrayload): Set lhs_type_node.
4861         (expand_java_arraystore): Set rhs_type_node.
4863 2004-11-02  Tom Tromey  <tromey@redhat.com>
4865         * jcf-parse.c (compute_class_name): Use filename length from zip
4866         directory, not strlen.
4868         * expr.c (expand_invoke): Mark new interface methods as abstract.
4870 2004-11-01  Tom Tromey  <tromey@redhat.com>
4872         * verify-impl.c (push_jump): Removed check for uninitialized
4873         objects.
4874         (push_exception_jump): Likewise.
4875         (handle_ret_insn): Likewise.
4876         (handle_jsr_insn): Likewise.
4877         (state_check_no_uninitialized_objects): Removed.
4879         * decl.c (check_local_unnamed_variable): Recognize
4880         promoted-to-int parameters when using the new verifier.
4881         * expr.c (expand_java_arraystore): Explicitly request array type
4882         when using new verifier.
4883         (expand_java_arrayload): Likewise.
4884         (invoke_build_dtable): Don't pass object_type_node as
4885         expression argument to build_java_indirect_ref.
4886         (build_java_check_indexed_type): Do nothing.
4887         (build_java_arraystore_check): Handle case where array doesn't
4888         have array type.
4889         (build_java_array_length_access): Likewise.
4890         (expand_invoke): Handle case where interface overrides a method
4891         from Object.
4892         (pop_type_0): Always succeed for reference types.
4893         (process_jvm_instruction): Don't pop a value in a dead
4894         exception handler.
4895         (pop_arguments): Convert arguments to correct types.
4897 2004-10-29  Andrew Haley  <aph@redhat.com>
4899         * jcf-parse.c (give_name_to_class): Remove line that was
4900         incorrectly merged.
4902 2004-10-29  Andrew Haley  <aph@redhat.com>
4904         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4906 2004-10-20  Andrew Haley  <aph@redhat.com>
4908         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4910 2004-10-26  Tom Tromey  <tromey@redhat.com>
4912         * verify.h (vfy_notify_verified): Removed.
4913         * verify-glue.c (vfy_notify_verified): Removed.
4915 2004-10-26  Tom Tromey  <tromey@redhat.com>
4917         * verify-impl.c (debug_print_state): Declare `i' before code.
4918         (merge_types): Modify `t' when it is null_type.
4920 2004-10-26  Tom Tromey  <tromey@redhat.com>
4922         * verify-impl.c (type_print): Renamed from print.  Now static and
4923         takes an argument.
4924         (debug_print_state): Use type_print.
4926 2004-10-25  Tom Tromey  <tromey@redhat.com>
4928         * expr.c (build_invokeinterface): Compute correct offset for
4929         index into interface methods.
4931 2004-10-20  Tom Tromey  <tromey@redhat.com>
4933         * java-tree.h (verify_jvm_instructions_new): Declare.
4935         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4936         command line.
4938         * verify-impl.c (verify_instructions): Correctly handle wide
4939         types on the stack.
4940         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4941         (vfy_get_component_type): Strip pointer types.
4942         (vfy_find_class): Use get_type_from_signature.  Strip pointer
4943         types.
4944         Include java-except.h.
4946 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
4948         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4949         vfy_push_type_t, set_variable, add_new_state, merge_into,
4950         handle_jsr_insn, branch_prepass, check_class_constant,
4951         check_wide_constant, get_one_type, compute_static_types,
4952         verify_instructions_0): Clean up C99 declarations after statements.
4954 2004-10-20  Tom Tromey  <tromey@redhat.com>
4956         * verify-impl.c (merge_refs): Compare reference against iterator,
4957         not ref2.
4959         * verify-glue.c (vfy_tag): Mask off resolved flag.
4961 2004-10-19  Tom Tromey  <tromey@redhat.com>
4963         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4964         (init_state_with_stack): Initialize `this_type' in state.
4965         (verify_method): Use debug_print.
4966         * verify-glue.c (vfy_is_primitive): Removed debugging print.
4967         (vfy_note_stack_depth): Reverted last patch.
4968         (vfy_note_stack_type): Note pointer to Object, not Object.
4969         (vfy_note_local_type): Likewise.
4971         * verify.h (vfy_note_instruction_seen): Declare.
4972         * verify-glue.c (verify_jvm_instructions_new): Set
4973         BCODE_EXCEPTION_TARGET on target instruction.
4974         (vfy_note_instruction_seen): New function.
4975         * verify-impl.c (FLAG_INSN_SEEN): New define.
4976         (verify_instructions_0): Set flag on instruction.  Save state for
4977         PC=0 later.
4978         (verify_instructions): Call vfy_note_instruction_seen.
4980         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4981         (verify_jvm_instructions_new): Call method_init_exceptions,
4982         add_handler, and handle_nested_ranges.
4983         * verify-impl.c (verify_method): Return 1 on success.
4984         (verify_instructions_0): Save the state at PC=0.
4986         * verify-impl.c (init_type_from_class): Set is_resolved and
4987         ref_next on new ref_intersection.
4988         (init_type_from_string): Likewise.
4990 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
4992         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4993         if flag_new_verifier is set.
4994         * java-tree.h (flag_new_verifier): Declare.
4995         * lang.opt (fnew-verifier): New option.
4996         * verify-impl.c: Work around namespace pollution by undef'ing
4997         'current_class'.
4998         (struct verifier_context): Make 'bytecode' const.
4999         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
5000         (types_compatible): For the BC-ABI, always consider reference types
5001         compatible.
5002         (check_class_constant): Use vfr->current_class.
5003         (check_constant): Likewise.
5004         (check_wide_constant): Likewise.
5005         (check_field_constant): Check for 'L' at start of type name.
5006         (get_one_type): Return pointer instead of type. Set type result in
5007         caller via passed type pointer.
5008         (compute_argument_types): Update to use new get_one_type arguments.
5009         (compute_return_type): Likewise.
5010         (make_verifier_context): New. Allocate and initialize 'vfr'.
5011         (free_verifier_context): New. Free 'vfr' and its contents.
5012         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
5013         and free_verifier_context.
5015 2004-10-15  Tom Tromey  <tromey@redhat.com>
5017         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
5018         * verify.h (vfy_fail): Fixed formatting.
5020         * verify-impl.c (vfr): Fixed comment formatting.
5021         (collapse_type): New function.
5022         (verify_instructions): Notify compiler about type map.
5023         * verify.h (vfy_note_stack_depth): Updated.
5024         (vfy_note_stack_type): Likewise.
5025         (vfy_note_local_type): Likewise.
5026         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
5027         Declare.
5028         * verify-glue.c (vfy_note_stack_depth): Correctly size type
5029         state.  Added `method' argument.
5030         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
5031         argument.
5032         (vfy_note_local_type): New function.
5033         (vfy_unsuitable_type): Likewise.
5034         (vfy_return_address_type): Likewise.
5035         (vfy_null_type): Likewise.
5037         * verify.h (VFY_IN_GCC): Removed.
5038         (VFY_WANT_TYPEMAP): Removed.
5039         * verify-impl.c (verify_instructions_0): Removed useless "\".
5040         (struct state) <next>: Uncomment.
5042 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
5044         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
5045         C-style.
5047 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
5049         * Make-lang.in (verify.o): Re-enabled this target.
5050         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
5051         (vfy_get_interface): Likewise.
5052         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
5053         * verify.h (verify_jvm_instructions_new): Declare.
5054         * verify-impl.c (free_state): Temporarily comment out unused
5055         function.
5057 2004-10-06  Tom Tromey  <tromey@redhat.com>
5059         * java-tree.h (JV_STATE_READ): New enum value.
5061 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
5063         * verify.h: New file.
5065 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
5067         * verify-impl.c, verify-glue.c, verify.h: New files.
5068         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
5070 2004-09-24  Andrew Haley  <aph@redhat.com>
5072         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
5073         for a slot if it's of pointer type.
5075 2004-09-14  Tom Tromey  <tromey@redhat.com>
5077         * class.c (make_class_data): Correctly initialize "state" field.
5078         Initialize "engine" field.
5079         * decl.c (java_init_decl_processing): Add "engine" field.
5081 2004-09-10  Andrew Haley  <aph@redhat.com>
5083         PR java/12760
5084         * expr.c (build_invokeinterface): Use fast method for interface
5085         dispatch.
5086         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
5087         JTI_ITABLE_PTR_TYPE.
5088         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
5089         (emit_symbol_table): Add new arg, element_size.
5090         * decl.c (java_init_decl_processing): Initialize Class.itable.
5091         * class.c (GEN_TABLE): New macro.
5092         (gen_indirect_dispatch_tables): Use it.  Add itable.
5093         (make_class_data): Add new arg for emit_symbol_table().
5094         Emit itable.
5095         (add_miranda_methods): Make sure search_class has been parsed.
5096         (emit_symbol_table): Add new arg, element_size.
5098 2004-09-06  Andrew Haley  <aph@redhat.com>
5100         * verify.c (merge_types): Return Object for all merges of
5101         interfaces.
5102         * expr.c (add_type_assertion): Don't generate assertions when
5103         source type is array of Object.
5105 2004-09-03  Andrew Haley  <aph@redhat.com>
5107         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
5109         * lang.c (java_post_options): Force flag_verify_invocations if
5110         we're not using indirect dispatch.
5112         * expr.c (pop_type_0): Move test for interfaces before call to
5113         can_widen_reference_to().
5114         (build_signature_for_libgcj): Remove generation of canonical array
5115         type.
5116         (add_type_assertion): Canonicalize both arrays.
5117         Don't assert that type X can be assigned to Object.
5118         Don't assert that type X an be assigned to type X.
5119         Don't assert that Object can be assigned to type X.
5120         (can_widen_reference_to): Warn whenever we generate an assertion.
5121         (process_jvm_instruction): Use throwable_type_node for the type of
5122         an exception class.
5124 2004-09-01  Andrew Haley  <aph@redhat.com>
5126         * decl.c (java_init_decl_processing): Change
5127         verify_identifier_node to "__verify".
5128         * expr.c (add_type_assertion): Use verify_identifier_node for name.
5129         * java-tree.h (verify_identifier_node): Change to "__verify".
5131         * expr.c (build_signature_for_libgcj): New function.
5132         (add_type_assertion): Use it to construct signatures for
5133         source_type and target_type.
5135 2004-08-27  Andrew Haley  <aph@redhat.com>
5137         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
5138         (verify_identifier_node): New.
5139         (TYPE_VERIFY_METHOD): New.
5140         (struct type_assertion): New type.
5141         * expr.c (type_assertion_eq): New function.
5142         (type_assertion_hash): New function.
5143         (add_type_assertion): New function.
5144         (can_widen_reference_to): Call add_type_assertion().
5145         * decl.c (java_init_decl_processing): Add verify_identifier_node.
5146         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
5147         (finish_class): Output TYPE_VERIFY_METHOD (type).
5149         * decl.c (end_java_method): Nullify unused fields.
5151 2004-08-17  Andrew Haley  <aph@redhat.com>
5153         * verify.c (defer_merging): Quieten.
5154         * jcf-parse.c (load_class): Only try to open a class file if it's
5155         java.lang.Object or if it's part of the current compilation.
5156         Check that the class we just tried to load is the class we just
5157         loaded.  Quieten.
5158         (java_parse_file): Set flag_verify_invocations off if we're
5159         compiling from .class.
5160         (parse_zip_file_entries): Abort if we try to read a dummy class.
5161         * expr.c (can_widen_reference_to): Quieten.
5162         (build_invokevirtual): Abort if we try to invokevirtual an
5163         interface.
5164         (expand_invoke): Don't build a non-interface call to an interface.
5165         (build_instanceof): Don't do premature optimization if
5166         flag_verify_invocations is not set.
5167         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
5168         from superclass.
5169         (build_static_field_ref): Add correct type conversion for
5170         field_address.
5171         (add_miranda_methods): Disable generation of Miranda methods for
5172         dummy classes.
5173         (layout_class_method): Don't complain about non-static method
5174         overrides static method with dummy classes.
5176 2004-08-13  Tom Tromey  <tromey@redhat.com>
5178         * class.c (build_static_field_ref): Re-enable atable lookups for
5179         static fields.
5181         * parse.y (strip_out_static_field_access_decl): Indentation fix.
5183 2004-08-11  Tom Tromey  <tromey@redhat.com>
5185         * gcj.texi (libgcj Runtime Properties): Document new properties.
5187 2004-08-06  Andrew Haley  <aph@redhat.com>
5189         * jcf-parse.c (load_class): Check that we really have loaded the
5190         class we're looking for.
5192 2004-07-19  Andrew Haley  <aph@redhat.com>
5194         * verify.c (verify_jvm_instructions): Comment change only.
5196         * typeck.c (build_java_array_type): Add size field to array name.
5198         * java-tree.h (LOCAL_SLOT_P): New.
5199         (update_aliases): Add PC argument.
5200         (pushdecl_function_level): New function.
5202         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5203         MODIFY_EXPR, and SAVE_EXPR.
5204         (java_gimplify_modify_expr): New function.
5206         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5207         (expand_iinc): Pass PC to update_aliases().
5208         (STORE_INTERNAL): Likewise.
5209         (process_jvm_instruction): Likewise.
5211         * decl.c (base_decl_map): New variable.
5212         (uniq): New variable.
5213         (update_aliases): Rewrite with more thorough checking.
5214         (debug_variable_p): New function.
5215         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
5216         (check_local_named_variable): Delete whole function.
5217         (initialize_local_variable): New function.
5218         (check_local_unnamed_variable): Add checks and comments.
5219         (find_local_variable): Rewrite.
5220         (java_replace_reference): New function.
5221         (function_binding_level): New variable.
5222         (pushdecl_function_level): New function.
5223         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5224         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5225         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5226         function_binding_level.
5227         (end_java_method): Null unused fields to save memory.
5229 2004-06-29  Andrew Haley  <aph@redhat.com>
5231         * except.c (expand_start_java_handler): Push a new binding level.
5232         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5233         register_exception_range() to register where we'll do it.
5234         (expand_end_java_handler): Remove old bogus code.  Replace with
5235         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5236         the top of the expression we're curently building.
5237         (maybe_end_try): Delete.
5238         * decl.c (binding_level.exception_range): New field.
5239         (clear_binding_level): Add field exception_range.  Reformat.
5240         (poplevel): Call expand_end_java_handler().
5241         (poplevel): Call java_add_stmt only if functionbody is false.
5242         (maybe_poplevels): Don't call maybe_end_try() from here.
5243         (end_java_method): Clear no longer used trees in function decl.
5244         (register_exception_range): New function.
5245         * java-tree.h (register_exception_range, struct eh_range): Declare.
5247 2004-06-22  Andrew Haley  <aph@redhat.com>
5249         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5250         the otable.
5251         * check-init.c (get_variable_decl): Teach check-init about
5252         FIELD_DECLs addressed via the otable.
5253         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5254         CLASS_PARSED_P.
5256 2004-05-28  Andrew Haley  <aph@redhat.com>
5258         * jcf-parse.c (load_class): Don't try to read a class that we've
5259         already read.
5261         * expr.c (build_invokeinterface): Use the old-fashioned way of
5262         doing indirect dispatch: look up interfaces by name.
5263         * java-tree.h (enum java_tree_index): Add
5264         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5265         * decl.c (java_init_decl_processing): Add
5266         soft_lookupinterfacemethodbyname_node.
5268         * gjavah.c (print_method_info): Final methods have vtable entries,
5269         so gjavah needs to output them.
5270         * class.c (layout_class_method): Generate vtable entries for final
5271         methods.
5272         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5273         dispatch, even if a method is final.
5275 2004-05-25  Andrew Haley  <aph@redhat.com>
5277         * class.c (build_symbol_entry): Convert the names of constructors
5278         to init_identifier_node when generating an entry for the indirect
5279         dispatch table.
5281         * expr.c (build_known_method_ref): Generate indirect calls for
5282         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5284 2004-05-24  Andrew Haley  <aph@redhat.com>
5286         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5287         atable element is of the right type.
5289         * class.c (build_static_field_ref): Cast pointer to correct type
5290         for field.
5292 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
5294         * Merged with HEAD as of 20040514. Diff against
5295         gcj-abi-2-merge-20040514.
5297 2004-04-16  Andrew Haley  <aph@redhat.com>
5299         * verify.c (check_pending_block): Disable subroutine checks.
5300         (defer_merging): New function.
5301         (merge_types): If types are dummy, use defer_merging to combine them.
5302         (verify_jvm_instructions): If invocation is invokeinterface and
5303         target is dummy, assume target really is an interface.
5305         * parse.y (patch_invoke): Break out call to java_create_object.
5307         * lang.c (flag_verify_invocations): New.
5309         * jcf-parse.c (load_class): If we've already failed to load a
5310         class, don't try again.
5311         (load_class): If we can't find a .class file, don't fail, but emit
5312         a warning.
5313         (parse_class_file): Don't act on dummy methods.
5315         * java-tree.h (flag_verify_invocations): New.
5316         (TYPE_DUMMY): New.
5317         (lang_type.dummy_class): New field.
5318         (java_create_object): New function.
5319         (METHOD_DUMMY): New.
5321         * expr.c (build_field_ref): Widen field offset.
5322         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5323         that each of its elements is compatible with the one we're
5324         popping.
5325         (pop_type_0): Issue a warning to say that we need to generate a
5326         runtime check.
5327         (java_create_object): New function.
5328         (build_field_ref): Only generate hard refs if we're not using
5329         indirect dispatch.
5330         (expand_java_field_op): If we're using !verify_invocations and we
5331         see a missing field, generate a decl for it.
5333         (expand_invoke): If a class doesn't have the method we seek and
5334         we're using !flag_verify_invocations, generate a decl for the
5335         method now.
5337         (build_known_method_ref): Always use indirect dispatch via the
5338         atable for static methods.
5340         (expand_java_NEW): Break out object creation into new function,
5341         java_create_object.
5343         (can_widen_reference_to): Issue a warning to say that we need to
5344         generate a runtime check.
5346         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5347         (make_method_value): Also use index for interfaces.
5348         (make_class_data): Skip dummy field for inherited data.
5349         Don't build method array for dummy methods.
5350         Set size_in_byte to -1 when using inirect dispatch
5351         Don't build a hard class ref if we don't have a hard ref to our
5352         superclass, or if we're using inirect dispatch.
5353         Null out dispatch tables.
5355         (layout_class_method): Don't complain about non-static method
5356         overrides static method is method is artificial.
5358         (build_static_field_ref): Disable atable references to static
5359         fields for the time being.
5361         (layout_class_methods): Check for CLASS_INTERFACE as
5362         well as CLASS_ABSTRACT.
5364 2004-11-24  Steven Bosscher  <stevenb@suse.de>
5366         * class.c (make_class_data): Don't check flag_inline_functions.
5367         * lang.c (flag_really_inline): Remove unused flag.
5368         (java_handle_option): Don't set it here.  Remove special handling
5369         of flag_inline_functions for Java.
5370         (java_init): Don't set flag_inline_trees here.  Already done...
5371         (java_post_options): ...here.  Don't clear flag_inline_functions.
5373 2004-11-24  Steven Bosscher  <stevenb@suse.de>
5375         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5376         (java_gimplify_exit_block_expr): New function.
5377         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5378         LABELED_BLOCK_EXPR.
5379         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5380         (EXIT_BLOCK_EXPR): Likewise.
5381         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5382         (LABELED_BLOCK_BODY): Likewise.
5383         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5384         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5385         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
5386         TREE_OPERAND.
5387         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5388         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5389         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
5390         second operand of EXIT_BLOCK_EXPR.
5391         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5392         TREE_OPERAND.
5393         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5395 2004-11-23  Ben Elliston  <bje@au.ibm.com>
5397         * xref.h (xref_flag_value): Remove.
5398         (xref_set_data, xref_get_data): Likewise.
5399         (xref_set_current_fp): Likewise.
5400         (XREF_NONE): Likewise.
5401         (XREF_GET_DATA): Likewise.
5402         * xref.c (xref_flag_value): Remove.
5403         (xref_set_data, xref_get_data): Likewise.
5404         (xref_set_current_fp): Likewise.
5406 2004-11-23  Ben Elliston  <bje@au.ibm.com>
5408         * gjavah.c (output_directory): Make static.
5409         (temp_directory): Likewise.
5411 2004-11-15  Tom Tromey  <tromey@redhat.com>
5413         * decl.c (instn_ptr_type_node): Removed.
5414         (lineNumbers_ptr_type_node): Removed.
5415         (jint_type): Removed.
5416         (jint_ptr_type): Removed.
5418 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
5420         PR java/15576
5421         * check-init.c (check_init): Ignore DECL_EXPR.
5422         * expr.c (always_initialize_class_p): Reenable.
5423         (build_class_init): Use a variable to store the decl.  Also use
5424         boolean_false_node instead of integer_zero_node.
5425         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5426         to the block.
5428 2004-11-08  Tom Tromey  <tromey@redhat.com>
5430         PR java/16843:
5431         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5432         generating a JNI header.
5433         (print_field_info): Handle JNI headers.
5434         (jni_print_float): Likewise.
5435         (jni_print_double): Likewise.
5437 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
5439         * decl.c (end_java_method): Remove duplicated code.
5441 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
5442             Gerald Pfeifer  <gerald@pfeifer.com>
5444         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5445         as well.
5447 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
5449         PR java/17265
5450         * class.c: Reinstate 2004-08-18 patch.
5451         (make_local_function_alias): Don't create an alias for extern (native)
5452         functions.
5454 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
5456         PR java/17265
5457         * class.c (make_local_function_alias): Revert 2004-08-18 change.
5458         (make_method_value): Likewise.
5460 2004-10-21  Andrew Haley  <aph@redhat.com>
5462         PR java/18091:
5463         * jcf-parse.c (set_source_filename): Add code to build new sfname.
5465 2004-10-20  Andrew Haley  <aph@redhat.com>
5467         * decl.c (end_java_method): Don't expand if flag_syntax_only.
5468         Remove duplicated code block.
5470 2004-10-18  Steven Bosscher  <stevenb@suse.de>
5472         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5473         New rules to work around old Bison warnings.
5475 2004-10-17  Steven Bosscher  <stevenb@suse.de>
5477         * class.c (ident_subst): Always alloca buffer.
5478         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5479         opcode after including javaop.def.
5480         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5481         conditional expression that exits, to avoid warnings.
5482         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5483         a user of an extension.
5484         * win32-host.c: Move check down to have non-empty file when
5485         WIN32 is not defined.
5487         * Make-lang.in (java-warn): Add STRICT_WARN.
5488         (java/jcf-io.o-warn): Don't have Werror for this file.
5489         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5491 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
5493         * expr.c (expr_add_location): Move declaration to before all
5494         statements.
5495         * parse.y (java_expand_classes): Ditto.
5496         * lex.c (java_peek_unicode): Ditto.
5498 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
5500         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5501         if possible, else convert `foo' to 'foo'.
5502         * class.c: Likewise.
5503         * decl.c: Likewise.
5504         * expr.c: Likewise.
5505         * jcf-io.c: Likewise.
5506         * jcf-parse.c: Likewise.
5507         * lang.c: Likewise.
5508         * lex.c: Likewise.
5509         * parse.h: Likewise.
5511 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
5513         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5514         rename parameter 'msg' to 'msgid' in function declaration.
5515         (issue_warning_error_from_context): Likewise.
5516         (yyerror): Rename parameter 'msg' to 'msgid'.
5517         (all over): Use new quoting style for diagnostics.
5519 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
5521         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5522         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5523         Update copyright.
5525 2004-10-14  Matt Austern  <austern@apple.com>
5527         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5528         pointer_set_t* now.
5530 2004-10-13  Tom Tromey  <tromey@redhat.com>
5532         PR java/15578:
5533         * lang.opt (--extdirs): Document.
5534         * jvspec.c (lang_specific_driver): Recognize -encoding and
5535         -extdirs.
5537 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
5539         * parse.y (issue_warning_error_from_context): Use va_list *
5540         instead of va_list parameter.
5541         (parse_error_context): Update call.
5542         (parse_warning_context): Likewise.
5544 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
5546         * parse.y, parse-scan.y: Add list of diagnostic messages to
5547         insulate translation template from version of yacc/bison used
5548         to compile the grammar.
5550 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
5552         Prepare for %q, %< and %> in diagnostic message strings.
5553         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5554         Name second parameter 'msgid'.
5555         * parse.y: Additionally include pretty-print.h and diagnostic.h.
5556         (issue_warning_error_from_context): Use pretty-printer functions
5557         instead of vsprintf for constructing formatted messages. Rename
5558         parameter 'msg' to 'msgid'.
5559         (parse_error_context): Rename parameter 'msg' to 'msgid'.
5560         (parse_warning_context): Likewise.
5562 2004-10-05  Andrew Haley  <aph@redhat.com>
5564         PR java/17779
5565         * jcf-parse.c (parse_zip_file_entries): If a class has a
5566         superclass and a TYPE_SIZE of zero, lay it out.
5568 2004-09-30  Andrew Haley  <aph@redhat.com>
5570         PR java/17733
5571         * jcf-parse.c (compute_class_name): Rewrite.
5573 2004-10-01  Jan Hubicka  <jh@suse.cz>
5575         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5577 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5579         * lex.c: Fix a comment typo.
5581 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5583         * java-tree.h: Fix a comment typo.
5585 2004-09-30  Per Bothner  <per@bothner.com>
5587         Simplify lexer.  Implement --enable-mapped-location support.
5588         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
5589         (parse_source_file_1): Pass filename as extra parameter, so we can call
5590         linemap_add and set input_location here, rather than in both callers.
5591         (read_class): Pass copied filename to parse_source_file_1.
5592         Don't initialize wfl_operator - only needed for source compilation.
5593         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
5594         * lex.h:  Remove a bunch of debugging macros.
5595         * lex.h (struct_java_line, struct java_error):  Remove types.
5596         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
5597         (struct java_lc_s):  Remove prev_col field.
5598         (struct java_lexer):  New fields next_unicode, next_columns, and
5599         avail_unicode.  New position field, and maybe token_start field.
5600         Don't need hit_eof field - use next_unicode == -1 instead.
5601         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
5602         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
5603         * parse.h:  Various changes for USE_MAPPED_LOCATION.
5604         (EXPR_WFL_EMIT_LINE_NOTE): XXX
5605         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5606         (struct parser_ctxt):  New file_start_location field.
5607         Remove p_line, c_line fields since we no longer save lines.
5608         Remove elc, lineno, and current_jcf fields - no longer used.
5609         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
5610         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5611         source_location and is probably not needed anymore anyway.
5612         Use new expr_add_Location function.
5613         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
5614         (java_pop_parser_context):  Minor cleanup.
5615         (java_parser_context_save_global, java_parser_context_restore_global,
5616         java_pop_parser_context):  Save/restore input_location as a unit.
5617         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
5618         a source_location instead of a wfl context node.
5619         (check_class_interface_creation):  input_filename is not addressable.
5620         (create_artificial_method):  Calling java_parser_context_save_global
5621         and java_parser_context_restore_global is overkill.  Instead,
5622         temporarily set input_location from class decl.
5623         (java_layout_seen_class_methods): Set input_location from method decl.
5624         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5625         (finish_loop_body):  Likewise.
5626         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
5627         (java_sprint_unicode):  Take a character, not index in line.
5628         (java_sneak_uncode):  Replaced by java_peek_unicode.
5629         (java_unget_unicode):  No longer used.
5630         (java_allocate_new_line. java_store_unicode):  Removed, since we
5631         no longer remember "lines".
5632         (java_new_lexer):  Update for new data structures.
5633         (java_read_char):  Move unget_value checking to java_read_unicode.
5634         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5635         efficient functions that are used directly when lexing.
5636         (java_read_unicode_collapsing_terminators):  No longer needed.
5637         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5638         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5639         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
5640         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
5641         combine switch branches, and test for common token kinds earlier.
5642         (java_lex_error):  Rewrite.
5643         * jv-scan.c (expand_location): New function, copied from tree.c.
5644         (main): Set ctxp->filename instead of setting input_filename directly.
5646 2004-09-30  Per Bothner  <per@bothner.com>
5648         More cleanup for --enable-mapped-location.
5649         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
5650         input_location here.  Instead do it in give_name_to_class.
5651         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5652         * expr.c (expand_byte_code): Call linemap_line_start.
5653         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
5654         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
5655         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
5656         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
5657         to USE_MAPPED_LOCATION case.
5659         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
5660         * jcf-parse.c (java_parse_file): Don't set input_filename.
5661         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5662         Create a list of TRANSLATION_UNIT_DECL.
5663         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
5664         reason is so we can set a DECL_SOURCE_LOCATION for each file.
5665         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5666         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5667         (file_start_location):  New static.
5668         (set_source_filename):  Avoid extra access to input_filename macro.
5669         Concatenate new name with class's package prefix.
5670         (set_source_filename, give_name_to_class): Update.
5671         (give_name_to_class):  Set class's "line 0" input_location here.
5672         (parse_class_file):  Set input_location as a unit.
5674         * jcf-parse.c (load_class): Sanity test if missing inner class file.
5676 2004-09-29  Per Bothner  <per@bothner.com>
5678         * java-tree.h:  Redefine some macros and add some declaration
5679         to handle the USE_MAPPED_LOCATION case.
5680         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
5681         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
5682         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5683         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5685         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5686         * decl.c (finish_method, java_add_stmt): Likewise.
5687         * java-gimplify.c (java-gimplify.c):  Likewise.
5688         * jcf-write.c (generate_bytecode_insns):  Likewise.
5689         * lang.c (java_post_options): Likewise - call linemap_add.
5691 2004-09-29  Andrew Haley  <aph@redhat.com>
5693         PR java/17007
5694         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5695         result of TRUNC_MOD_EXPR.
5696         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5697         * decl.c (java_init_decl_processing): Mark
5698         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5700 2004-09-28  Tom Tromey  <tromey@redhat.com>
5702         PR java/15710:
5703         * class.c (add_miranda_methods): Load superinterface if not
5704         already loaded.
5706 2004-09-28  Andrew Haley  <aph@redhat.com>
5708         PR java/17586
5709         * jcf-parse.c (load_class): Don't try to read a class that we've
5710         already read.
5712 2004-09-28  Andrew Haley  <aph@redhat.com>
5714         * jcf-parse.c (load_class): Back out previous broken patch.
5716 2004-09-28  Andrew Haley  <aph@redhat.com>
5718         PR java/17586
5719         * jcf-parse.c (load_class): Don't try to read a class that we've
5720         already read.
5721         Check that we really did read the right class.
5723 2004-09-25  Tom Tromey  <tromey@redhat.com>
5725         PR java/17500:
5726         * parse.y (create_artificial_method): Use add_method_1.
5728 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
5730         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5731         comment typos.
5732         * gcj.texi: Fix typos.
5734 2004-09-24  Tom Tromey  <tromey@redhat.com>
5736         PR java/15656:
5737         * parse.y (class_instance_creation_expression): Set `$$' to NULL
5738         in error parts of rule.
5739         (unary_expression): Don't call error_if_numeric_overflow when $1
5740         is NULL.
5742 2004-09-24  Tom Tromey  <tromey@redhat.com>
5744         PR java/16789:
5745         * parse.y (resolve_qualified_expression_name): Set
5746         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5747         * expr.c (force_evaluation_order): Check for empty argument list
5748         after stripping COMPOUND_EXPR.
5750 2004-09-23  Andrew Haley  <aph@redhat.com>
5752         PR java/16927:
5753         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5754         COND_EXPRs.
5756 2004-09-23  Tom Tromey  <tromey@redhat.com>
5758         PR java/17329:
5759         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5760         where operand is null.
5762 2004-09-23  Tom Tromey  <tromey@redhat.com>
5764         PR java/17380:
5765         * parse.y (not_accessible_p): Allow access to protected members
5766         even when class is not static.
5768 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
5770         * Make-lang.in: Revert the gcc-none.o change.
5772 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
5774         * parse.y (patch_anonymous_class): VEC_space returns true if there
5775         is space.
5777 2004-09-21  Matt Austern  <austern@apple.com>
5779         Fix bootstrap.
5780         * gjavah.c (free_method_name_list): Fix function definition so
5781         it's a proper C prototype.
5783 2004-09-21  Tom Tromey  <tromey@redhat.com>
5785         PR java/17575:
5786         * gjavah.c (free_method_name_list): New method.
5787         (main): Call it.
5789 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
5790             Zack Weinberg  <zack@codesourcery.com>
5792         * java-tree.def: Use tree_code_class enumeration constants
5793         instead of code letters.
5794         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5795         new tree-class enumeration constants.
5797 2004-09-13  Tom Tromey  <tromey@redhat.com>
5799         PR java/17216:
5800         * class.c (layout_class_method): Put synthetic methods into the
5801         vtable.
5803 2004-09-11  Andrew Pinski  <apinski@apple.com>
5805         * Make-lang.in (java/ggc-none.c): Change dependency
5806         for ggc.h into $(GGC_H).
5808 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5810         * Make-lang.in (java/win32-host.o): Add dependency on
5811         coretypes.h.
5812         * win32-host.c: Add includes for coretypes.h, jcf.h
5814 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5816         * Make-lang.in (GCJH_OBJS): Change dependency from
5817         ggc-none.o to java/ggc-none.o
5818         (JCFDUMP_OBJS): Likewise.
5819         (java/ggc-none.o): New target.
5821 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
5823         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
5824         * class.c (build_utf8_ref, build_static_field_ref,
5825         make_field_value, make_method_value, get_dispatch_table,
5826         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5827         * constants.c (get_tag_node, build_ref_from_constant_pool,
5828         build_constants_constructor): Likewise.
5829         * decl.c (java_init_decl_processing): Likewise.
5830         * expr.c (build_java_array_length_access, build_newarray,
5831         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5832         build_java_binop, build_field_ref, expand_java_add_case,
5833         expand_java_call, build_known_method_ref, build_invokevirtual,
5834         build_invokeinterface, build_jni_stub): Likewise.
5835         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5836         * jcf-parse.c (get_constant): Likewise.
5837         * lex.c (do_java_lex): Likewise.
5838         * parse.y (patch_binop, patch_unaryop, patch_cast,
5839         build_newarray_node, patch_newarray): Likewise.
5840         * resource.c (compile_resource_data): Likewise.
5841         * typeck.c (build_prim_array_type): Likewise.
5843 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
5845         * decl.c (java_init_decl_processing): Adjust
5846         initialize_sizetypes call.
5848 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
5850         * jv-scan.c (fancy_abort): Add.
5852 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
5854         * expr.c (build_java_arrayaccess): Use convert to change
5855         len's type.
5857 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
5859         * class.c (make_local_function_alias): Allocate extra space for 'L'
5860         in name buffer. Reported by Thomas Neumann.
5862 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
5864         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5865         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
5866         * lex.c (do_java_lex): Adjust.
5867         (error_if_numeric_overflow): Likewise.
5869 2004-08-18  Andrew Pinski  <apinski@apple.com>
5871         * class.c (make_local_function_alias): Only make a new decl if we
5872         support alias attribute on all decls.
5874 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
5876         * class.c (make_local_function_alias): New function. Create local
5877         alias for public method DECL.
5878         (make_method_value): Use make_local_function_alias.
5879         * parse.y (craft_constructor): Don't special-case anonymous classes.
5880         Always set ctor_name to init_identifier_node.
5881         (lookup_method_invoke): Call layout_class_method when creating
5882         anonymous class constructor.
5884 2004-08-18  Richard Henderson  <rth@redhat.com>
5886         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5887         default case.  Treat '<' similarly.  Update for
5888         is_gimple_formal_tmp_var name change.
5890 2004-08-17  Andrew Haley  <aph@redhat.com>
5892         * lang.c (lang_printable_name): Obey verbose flag.
5893         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5894         lang_printable_name().
5895         (verify_constructor_circularity, get_printable_method_name,
5896         check_abstract_method_definitions, java_check_regular_methods,
5897         java_check_abstract_methods, check_inner_class_access,
5898         fix_constructors, patch_method_invocation, patch_return):
5899         Likewise.
5900         * expr.c (pop_type_0): Likewise.
5902         * java-tree.h (lang_printable_name_wls): Delete.
5904 2004-08-16  Tom Tromey  <tromey@redhat.com>
5906         PR java/8473:
5907         * parse.y (primary): Changed for initialized and uninitialized
5908         array creations.
5909         (array_access): Handle array_creation_initialized.
5910         (array_creation_expression): Split into
5911         array_creation_initialized and array_creation_uninitialized.
5913 2004-08-16  Andrew Haley  <aph@redhat.com>
5915         * jcf-write.c (find_constant_index): Canonicalize NaNs when
5916         generating bytecode.
5918 2004-08-16  Elliot Lee <sopwith@redhat.com>
5920         PR java/9677
5921         * jcf-parse.c (java_parse_file): Handle filenames with embedded
5922         spaces, and quoted filelists.
5924 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5926         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5927         * class.c (build_utf8_ref, build_static_field_ref,
5928         make_field_value, make_method_value, get_dispatch_table,
5929         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5930         * constants.c (get_tag_node,  build_ref_from_constant_pool,
5931         build_constants_constructor): Likewise.
5932         * decl.c (java_init_decl_processing): Likewise.
5933         * expr.c (build_java_array_length_access, build_newarray,
5934         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5935         build_java_binop, build_field_ref, expand_java_add_case,
5936         expand_java_call, build_known_method_ref, build_invokevirtual,
5937         build_invokeinterface, build_jni_stub): Likewise.
5938         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5939         * jcf-parse.c (get_constant): Likewise.
5940         * lex.c (do_java_lex): Likewise.
5941         * parse.y (patch_binop, patch_unaryop, patch_cast,
5942         build_null_of_type, patch_newarray): Likewise.
5943         * resource.c (compile_resource_data): Likewise.
5944         * typeck.c (build_prim_array_type): Likewise.
5946 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
5948         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5949         Don't create BLOCK here or call java_gimplify_block.
5951 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5953         * java-tree.h (flag_deprecated): Removed.
5954         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5955         * parse.y (check_deprecation): Check warn_deprecated instead of
5956         flag_deprecated.
5958 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
5960         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5961         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5962         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5963         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5964         flag_force_classes_archive_check, flag_optimize_sci,
5965         flag_indirect_dispatch): Remove explicit declarations.
5966         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
5967         final comment.
5969 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
5971         PR bootstrap/14893
5972         * Make-lang.in (java.install-man): Install from either build
5973         tree or source tree, whichever has the file first.
5975 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
5977         * jcf-parse.c (get_constant): Adjust force_fit_type call.
5978         * lex.h (SET_LVAL_NODE_TYPE): Remove.
5979         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5980         (do_java_lex): Likewise. Adjust force_fit_type call.
5982 2004-08-04  Roger Sayle  <roger@eyesopen.com>
5983             Andrew Haley  <aph@redhat.com>
5985         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5986         checking trees as they're being built.
5987         (convert): Call convert_ieee_real_to_integer if we're
5988         converting a constant, even if we're writing a class file.
5990 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
5992         PR java/16701
5993         * parse.y (fold_constant_for_init): Call resolve_field_access with
5994         correct current_class context.
5996 2004-08-01  Roger Sayle  <roger@eyesopen.com>
5998         * decl.c (update_aliases, initialize_local_variable): Replace calls
5999         to build with calls to buildN.
6000         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
6001         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
6002         * parse.h (BUILD_THROW): Likewise.
6003         * parse.y (switch_expression, synchronized_statement,
6004         catch_clause_parameter, array_creation_expression,
6005         conditional_expression, make_qualified_name,
6006         resolve_qualified_expression_name, patch_method_invocation,
6007         patch_invoke, build_method_invocation, build_new_invocation,
6008         build_assignment, patch_assignment, build_binop, patch_binop,
6009         build_string_concatenation, build_incdec, patch_unaryop,
6010         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
6011         patch_return, build_if_else_statement, build_labeled_block,
6012         build_new_loop, build_loop_body, build_bc_statement,
6013         build_assertion, encapsulate_with_try_catch, build_try_statement,
6014         build_try_finally_statement, patch_synchronized_statement,
6015         emit_test_initialization): Likewise, replace build with buildN.
6017 2004-07-28  Eric Christopher  <echristo@redhat.com>
6019         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
6020         (java_unsafe_for_reeval): Ditto.
6022 2004-07-26    <hp@bitrange.com>
6024         * parse.y (build_super_invocation): Adjust declaration order to
6025         avoid declaration after statement.
6027 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
6029         * decl.c: Rename all identifiers named `class' to `cl'.
6031 2004-07-25  Richard Henderson  <rth@redhat.com>
6033         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
6035 2004-07-23  Mike Stump  <mrs@apple.com>
6037         * boehm.c (set_bit): Improve type safety wrt unsignedness.
6038         * gjavah.c (throwable_p, decode_signature_piece,
6039         print_full_cxx_name, print_include, add_namelet, add_class_decl,
6040         process_file): Likewise.
6041         * jcf-dump.c (main): Likewise.
6042         * jcf-io.c (read_zip_member): Likewise.
6043         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
6044         give_name_to_class, get_class_constant): Likewise.
6045         * jcf-write.c (find_constant_wide, push_long_const,
6046         generate_classfile): Likewise.
6047         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
6048         * parse.y (read_import_dir): Likewise.
6049         * typeck.c (parse_signature_type): Likewise.
6050         * verify.c (verify_jvm_instructions): Likewise.
6051         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
6053 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
6055         * Make-lang.in: Replace rmic and rmiregistry references with
6056         grmic and grmiregistry.
6057         * gcj.texi: Likewise.
6059 2004-07-20  Andrew Haley  <aph@redhat.com>
6061         PR java/16431.
6062         * verify.c (verify_jvm_instructions): Comment change only.
6064         * typeck.c (build_java_array_type): Add size field to array name.
6066         * java-tree.h (LOCAL_SLOT_P): New.
6067         (update_aliases): Add PC argument.
6068         (pushdecl_function_level): New function.
6070         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
6071         MODIFY_EXPR, and SAVE_EXPR.
6072         (java_gimplify_modify_expr): New function.
6074         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
6075         (expand_iinc): Pass PC to update_aliases().
6076         (STORE_INTERNAL): Likewise.
6077         (process_jvm_instruction): Likewise.
6079         * decl.c (base_decl_map): New variable.
6080         (uniq): New variable.
6081         (update_aliases): Rewrite with more thorough checking.
6082         (debug_variable_p): New function.
6083         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
6084         (check_local_named_variable): Delete whole function.
6085         (initialize_local_variable): New function.
6086         (check_local_unnamed_variable): Add checks and comments.
6087         (find_local_variable): Rewrite.
6088         (java_replace_reference): New function.
6089         (function_binding_level): New variable.
6090         (pushdecl_function_level): New function.
6091         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
6092         (maybe_pushlevels): Call pushdecl() on each of the new decls.
6093         (start_java_method): Reset uniq.  Create base_decl_map.  Set
6094         function_binding_level.
6095         (end_java_method): Null unused fields to save memory.
6097 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6099         * class.c (add_interface_do): Remove.
6100         (set_super_info, interface_of_p, maybe_add_interface,
6101         add_interface, make_class_data, layout_class,
6102         add_miranda_methods): Adjust BINFO accessors and addition.
6103         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
6104         accessors.
6105         * jcf-write.c (generate_classfile): Likewise.
6106         * parse.y (patch_anonymous_class, check_inner_circular_reference,
6107         check_circular_reference, java_complete_class,
6108         check_abstract_method_definitions,
6109         java_check_abstract_method_definitions,
6110         check_interface_throws_clauses, java_check_abstract_methods,
6111         lookup_java_interface_method2,
6112         find_applicable_accessible_methods_list): Adjust BINFO accessors
6113         and addition.
6114         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
6116 2004-07-18  Roger Sayle  <roger@eyesopen.com>
6118         * builtins.c (max_builtin, min_builtin,
6119         java_build_function_call_expr): Replace calls to build with buildN.
6120         * class.c (build_class_ref, build_static_field_ref,
6121         get_dispatch_table, make_class_data, layout_class_method): Likewise.
6122         * constants.c (build_ref_from_constant_pool): Likewise.
6123         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
6124         add_stmt_to_compound): Likewise.
6125         * except.c (build_exception_object_ref, expand_end_java_handler):
6126         Likewise.
6127         * java-gimplify.c (java_gimplify_case_expr,
6128         java_gimplify_default_expr, java_gimplify_block,
6129         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
6130         * jcf-write.c (generate_bytecode_insns): Likewise.
6131         * typeck.c (convert_ieee_real_to_integer): Likewise.
6133 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
6135         * java-tree.h (builtin_function): Declare.
6137 2004-07-16  Steven Bosscher  <stevenb@suse.de>
6139         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
6140         abuse restore_line_number_status.
6142 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
6144         g++/15861
6145         * jcf-parse.c (java_emit_static_constructor): Specify default
6146         priority.
6148 2004-07-13  Per Bothner  <per@bothner.com>
6150         * java-tree.h (all_class_filename):  Remove useless macro.
6151         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
6152         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
6153         * parse.y (java_parser_context_restore_global):  Replace
6154         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
6155         * jcf-parse.c (read_class, java_parse_file):  Likewise.
6157 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
6159         PR java/16474
6160         gjavah.c (print_field_info): Emit constant only if field is static.
6162 2004-07-11  Roger Sayle  <roger@eyesopen.com>
6164         * expr.c (java_truthvalue_conversion, flush_quick_stack,
6165         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
6166         build_java_ret, build_java_throw_out_of_bounds_exception,
6167         build_java_array_length_access, java_check_reference,
6168         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
6169         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
6170         expand_java_arrayload, build_java_monitor, expand_java_return,
6171         expand_load_internal, expand_java_NEW, build_get_class,
6172         build_instanceof, expand_java_CHECKCAST, expand_iinc,
6173         build_java_soft_divmod, build_java_binop, build_field_ref,
6174         expand_compare, expand_java_goto, expand_java_switch,
6175         expand_java_add_case, build_class_init, build_known_method_ref,
6176         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
6177         expand_invoke, build_jni_stub, expand_java_field_op,
6178         java_expand_expr, expand_byte_code, STORE_INTERNAL,
6179         force_evaluation_order, emit_init_test_initialization): Convert
6180         calls to "build" into calls to the prefered "buildN" functions.
6182 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
6184         * java-tree.h (set_block): Remove.
6185         * lang.c (java_clear_binding_stack): New.
6186         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6187         * decl.c (struct binding_level): Remove this_block.
6188         (clear_binding_level): Likewise.
6189         (poplevel): Don't handle this_block.
6190         (set_block): Remove.
6192 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
6194         * class.c (common_enclosing_context_p): Remove statement with no
6195         side-effects.
6197 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
6199         PR java/8618
6200         * parse.y (create_anonymous_class): Remove 'location' argument. Use
6201         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6202         (craft_constructor): Inherit access flags for implicit constructor
6203         from the enclosing class.
6204         (create_class): Fix comment typo.
6205         (resolve_qualified_expression_name): Pass type of qualifier to
6206         not_accessible_p, not the type in which target field was found.
6207         (not_accessible_p): Handle inner classes. Expand protected
6208         qualifier-subtype check to enclosing instances, but don't apply this
6209         check to static members. Allow protected access to inner classes
6210         of a subtype. Allow private access within common enclosing context.
6211         (build_super_invocation): Get WFL line number info from current
6212         class decl.
6213         (build_incomplete_class_ref): Update for new create_anonymous_class
6214         signature.
6215         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6216         common_enclosing_instance_p.
6217         * class.c (common_enclosing_context_p): New. Determine if types
6218         share a common enclosing context, even across static contexts.
6219         (common_enclosing_instance_p): Renamed from
6220         common_enclosing_context_p. Determines if types share a common
6221         non-static enclosing instance.
6222         * java-tree.h (common_enclosing_instance_p): Declare.
6223         * jcf-write.c (get_method_access_flags): New. Surpress private flag
6224         for inner class constructors.
6225         (generate_classfile): Use get_method_access_flags.
6227 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
6229         * class.c (interface_of_p): Check for null TYPE_BINFO.
6231 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
6233         * class.c (make_class): Do not create binfo here.
6234         (set_super_info): Create it here.
6235         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6237 2004-07-08  Richard Henderson  <rth@redhat.com>
6239         * expr.c (case_identity, get_primitive_array_vtable,
6240         java_expand_expr, emit_init_test_initialization): Remove.
6241         * java-tree.h (java_expand_expr): Remove.
6242         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6244 2004-07-07  Per Bothner  <per@bothner.com>
6246         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
6247         get internal error due to mismatched types.
6249         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
6251         * gcj.texi (Linking):   New node.  Document -lgij usage.
6253 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
6255         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6256         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6257         * java/class.c (set_super_info, class_depth, interface_of_p,
6258         maybe_add_interface, add_interface, make_class_data,
6259         layout_class, add_miranda_methods): Adjust BINFO macros.
6260         * expr.c (can_widen_reference_to, lookup_field): Likewise.
6261         * jcf-write.c (generate_classfile): Likewise.
6262         * parse.y (patch_anonymous_class,
6263         check_inner_circular_reference, check_circular_reference,
6264         java_complete_class, check_abstract_method_definitions,
6265         java_check_abstract_method_definitions,
6266         check_interface_throws_clauses, java_check_abstract_methods,
6267         lookup_java_interface_method2,
6268         find_applicable_accessible_methods_list): Likewise.
6269         * typeck.c (find_method_in_interface): Likewise.
6270         * verify.c (merge_types): Likewise.
6272 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
6274         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6275         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6277 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
6279         * class.c (make_class): Use make_tree_binfo.
6280         (set_super_info, add_interface_do): Likewise.
6281         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6283 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
6285         * verify.c: Correct array element access formatting thinko.
6287 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
6289         * verify.c: Insert a short blurb at the start referring to the JVMS.
6290         (merge_type_state): Remove redundant nested if statement.
6291         (verify_jvm_instructions): Ensure current_subr is initialised to
6292         NULL_TREE.
6293         Minor formatting fixes all over the place.
6295 2004-07-02  Richard Henderson  <rth@redhat.com>
6297         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6299 2004-07-01  Richard Henderson  <rth@redhat.com>
6301         * class.c (registerClass_libfunc): Remove.
6302         (init_class_processing): Don't set it.
6303         (emit_register_classes): Take list_p parameter.  Fill it in
6304         with _Jv_RegisterClass calls.
6305         * decl.c (java_init_decl_processing): Don't call
6306         init_resource_processing.
6307         * jcf-parse.c (java_emit_static_constructor): New.
6308         (java_parse_file): Call it.
6309         * resource.c (registerResource_libfunc): Remove.
6310         (init_resource_processing): Remove.
6311         (write_resource_constructor): Take list_p parameter.  Fill it in
6312         with _Jv_RegisterResource calls.
6313         * java-tree.h: Update prototypes.
6315 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
6317         PR java/1262
6318         * class.c (layout_class_method): Do not override package-private
6319         method if its in a different package.
6320         (split_qualified_name): Move here from parse.y. Rename from
6321         breakdown_qualified. Add comment.
6322         (in_same_package): Move here from parse.y. Add comment.
6323         * java-tree.h (break_down_qualified, in_same_package): Declare.
6324         (in_same_package): Likewise.
6325         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6326         Callers updated.
6328 2004-06-29  Andrew Haley  <aph@redhat.com>
6330         * except.c (expand_start_java_handler): Push a new binding level.
6331         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
6332         register_exception_range() to register where we'll do it.
6333         (expand_end_java_handler): Remove old bogus code.  Replace with
6334         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6335         the top of the expression we're curently building.
6336         (maybe_end_try): Delete.
6337         * decl.c (binding_level.exception_range): New field.
6338         (clear_binding_level): Add field exception_range.  Reformat.
6339         (poplevel): Call expand_end_java_handler().
6340         (poplevel): Call java_add_stmt only if functionbody is false.
6341         (maybe_poplevels): Don't call maybe_end_try() from here.
6342         (end_java_method): Clear no longer used trees in function decl.
6343         (register_exception_range): New function.
6344         * java-tree.h (register_exception_range, struct eh_range): Declare.
6346 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
6348         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6350 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
6352         Formatting fixes.
6353         * expr.c (class_has_finalize_method): Fix method name indentation.
6354         (expand_java_call): Remove K&R style parameter declaration.
6355         (expand_invoke): Fix statement indentation.
6356         (expand_java_field_op): Likewise.
6357         * parse-scan.y: Fix typo.
6358         (reset_report): Fix method name indentation.
6359         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6360         line. Fix typos.
6361         * verify.c (verify_jvm_instructions): Document parameters, insert
6362         page break.
6363         * lang.c (lang_init_source): Fix method name indentation.
6364         * class.c (common_enclosing_context_p): Likewise.
6365         (emit_symbol_table): Fix parameter list indentation.
6366         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6367         parameter declaration.
6368         * constants.c: Fix copyright notice indentation.
6369         * typeck.c (find_method_in_superclasses): Fix parameter list
6370         indentation.
6371         (find_method_in_interfaces): Likewise.
6372         * zextract.c (makelong): Fix method name indentation.
6374 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6376         PR java/15715.
6377         * parse.y (create_interface): Set correct access modifiers for
6378         interfaces.
6379         * jcf-write.c (get_classfile_modifiers): New function.
6380         (generate_classfile): Use get_classfile_modifiers, not
6381         get_access_flags.
6383 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6385         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6386         dependency to current parser context, not NULL_TREE, for top-level
6387         classes.
6388         (jdep_resolve_class): Enable member access check for all inner
6389         class dependencies.
6391 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6393         * parse.y (qualify_and_find): Pass type decl, not identifier, to
6394         load_class.
6396 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6398         PR java/15734
6399         * expr.c (expand_java_field_op): Ensure that target class for static
6400         field access has been loaded.
6402 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6403             Ranjit Mathew  <rmathew@hotmail.com>
6405         PR java/1207, java/16178
6406         * jcf-parse.c (load_class): Return immediately if passed a type decl
6407         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6408         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6409         before calling load_class.
6410         (qualify_and_find): Likewise.
6411         (find_in_imports_on_demand): Likewise.
6412         (find_applicable_accessible_methods_list): Likewise.
6414 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
6416         * parse.y (java_layout_seen_class_methods): Don't call load_class
6417         on class defined by source parser.
6419 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
6421         * parse.y (set_nested_class_simple_name_value): Removed.
6422         (java_complete_expand_class): Remove calls to
6423         set_nested_class_simple_name_value.
6425 2004-06-22  Andrew Haley  <aph@redhat.com>
6426             Ranjit Mathew  <rmathew@hotmail.com>
6428         Fixes PR java/16113.
6429         * decl.c (force_poplevels): Remove call to expand_end_bindings.
6431 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
6433         * parse.y (create_class): Correct diagnostic message about
6434         java.lang.Object extending anything else.
6436 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6438         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6439         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6440         * constants.c (build_ref_from_constant_pool): Likewise.
6441         * expr.c (build_java_array_length_access): Likewise.
6442         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6443         (invoke_build_dtable, build_invokevirtual): Likewise.
6444         (build_invokeinterface, java_expand_expr): Likewise.
6445         (emit_init_test_initialization): Likewise.
6446         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6447         * parse.y (make_qualifed_name, build_array_ref): Likewise.
6449 2004-06-21  Andrew Haley  <aph@redhat.com>
6451         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6452         block.
6454 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
6456         * jcf.h (struct JCF): Change java_source, right_zip and finished
6457         to unsigned int.
6458         * lex.h (struct java_lexer): Change hit_eof, read_anything,
6459         byte_swap and use_fallback to unsigned int.
6460         * parse.h (struct _jdep): Change flag0 to unsigned int.
6462 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
6464         Fixes PR java/13948
6465         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6466         before trying to lay out its methods.
6467         * jcf-parse.c (read_class): Track parsed files using canonical paths
6468         obtained via lrealpath from libiberty.
6469         (java_parse_file): Likewise.
6470         (parse_source_file_1): Rename formal parameter to reflect its
6471         modified purpose. Minor formatting fix.
6473 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6475         * class.c (emit_register_classes): Make the function uninlinable,
6476         do not set current_function_cannot_inline.
6477         * resource.c (write_resource_constructor): Do not reset
6478         flag_inline_functions around rest_of_compilation.
6480 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
6482         PR java/15769
6483         * expr.c (java_truthvalue_conversion): Handle
6484         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6485         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6486         i.e. return the expression.
6488 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
6490         * gjavah.c: Include version.h
6492 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
6494         * jcf-write.c (generate_bytecode_conditional): Correct handling
6495         of unordered conditionals. Add comment.
6497 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
6498             Per Bothner  <per@bothner.com>
6500         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6501         local variable was initialised upon declaration.
6502         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6503         variable was final and initialised upon declaration.
6504         * check-init.c (check_final_reassigned): Give error only if a blank
6505         final is not definitely unassigned or if an initialised final is
6506         reassigned.
6507         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6508         assignment expressions. Remove case MODIFY_EXPR, label do_default.
6509         (check_init): Perform initialised-variable-removing-optimisation
6510         only on non-final local variables.
6512 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6514         * jcf-write.c (generate_bytecode_conditional): Handle binops
6515         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6516         and LTGT_EXPR.
6517         (generate_bytecode_insns): Likewise.
6519 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6521         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6522         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6524 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6526         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6527         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6529 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6531         * decl.c (struct binding_level): Add GTY marker. Compile
6532         binding_depth unconditionally.
6533         (current_binding_level, free_binding_level, global_binding_level):
6534         Likewise.
6535         (clear_binding_level): Unconditionally set binding_depth.
6536         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6538 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6540         * lex.c (java_new_lexer): Set 'encoding'.
6541         (java_read_char): Improve error message for unrecognized characters.
6542         * lex.h (struct java_lexer): New field 'encoding'.
6544 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6546         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6548 2004-05-21  Mark Wielaard  <mark@klomp.org>
6550         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6551         extern.
6553 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
6555         * typeck.c: Remove non-printable character 160.
6557 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
6559         * check-init.c: Correct minor typos.
6561 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6563         * Make-lang.in, expr.c, java-gimplify.c: Rename
6564         tree-simple.[ch] to tree-gimple.[ch].
6566 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
6568         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6570 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6572         Merge from tree-ssa-20020619-branch.  See
6573         ChangeLog.tree-ssa for details.
6575         * Make-lang.in, builtins.c, check-init.c, class.c,
6576         constants.c, decl.c, except.c, expr.c, java-except.h,
6577         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6578         lang.c, lang.opt, parse.y, resource.c: Merged.
6579         * java-gimplify.c: New file.
6581 2004-05-10  Andrew Haley  <aph@redhat.com>
6583         * parse.y (create_class): Set TYPE_VFIELD.
6584         * decl.c (java_init_decl_processing): Likewise.
6586         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6587         * class.c (make_method_value): Replace DECL_VINDEX with call to
6588         get_method_index().
6589         (get_dispatch_vector): Likewise.
6590         (layout_class_method): Likewise.
6591         Replace set of DECL_VINDEX with call to set_method_index().
6592         (set_method_index): New function.
6593         (get_method_index): New function.
6594         * java-tree.h (set_method_index): New function decl.
6595         (get_method_index): New function decl.
6597 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
6599         * parse.y (check_pkg_class_access): Add new argument
6600         and use it when cl is NULL to call lookup_cl on it.
6601         (parser_check_super_interface): Do not call lookup_cl.
6602         Pass this_decl to check_pkg_class_access and NULL
6603         instead of lookup_cl.
6604         (parser_check_super): Update for change in
6605         check_pkg_class_access.
6606         (do_resolve_class): Likewise.
6607         (process_imports): Likewise.
6608         (find_in_imports_on_demand): Likewise.
6609         (resolve_qualified_expression_name): Likewise.
6611 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
6613         Fixes PR java/9685, PR java/15073
6614         * parse.y (accessibility_string): New method.
6615         (not_accessible_field_error): Use accessibility_string()
6616         instead of java_accstring_lookup().
6617         (resolve_qualified_expression_name): Check with
6618         check_pkg_class_access() before allowing access using
6619         qualified names.
6620         Fix comment typo.
6621         Use check_pkg_class_access() instead of not_accessible_p()
6622         for unqualified types.
6623         (not_accessible_p): Use DECL_CONTEXT (member) instead of
6624         REFERENCE for package-private access checking.
6625         (patch_method_invocation): Use accessibility_string() instead
6626         of java_accstring_lookup().
6628 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
6630         Fixes PR java/15133
6631         * gjavah.c (struct method_name): Add member is_native.
6632         (overloaded_jni_method_exists_p): Match candidate method only if
6633         it is native.
6634         (print_method_info): Initialise is_native flag from the method's
6635         access flags.
6637 2004-04-30  Roger Sayle  <roger@eyesopen.com>
6639         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6640         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6642 2004-04-22  Roger Sayle  <roger@eyesopen.com>
6644         * resource.c (write_resource_constructor): Guard call to possibly
6645         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6647 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
6649         * class.c (make_class_data): Add new field aux_info.
6650         * decl.c (java_init_decl_processing): Push type and decl for
6651         `aux_info'.
6653 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6655         * expr.c (expand_java_NEW): Don't use size argument for
6656         _Jv_AllocObject calls.
6657         * parse.y (patch_invoke): Likewise.
6659 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6661         * expr.c (build_invokeinterface): Remove unused variables to
6662         fix warnings.
6664 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6666         * class.c (get_interface_method_index): New function. Return dispatch
6667         index for interface method.
6668         (make_method_value): For interface methods, set index field to
6669         iface dispatch index, not DECL_VINDEX.
6670         * expr.c (build_invokeinterface): Use get_interface_method_index.
6672 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6674         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6676 2004-03-31  Andrew Haley  <aph@redhat.com>
6678         PR java/14104
6679         * jcf-io.c (opendir_in_zip): Tidy up error handling.
6681 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6683         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6684         form of GTY markers.
6686 2004-03-25  Marcus Meissner  <meissner@suse.de>
6688         PR java/14689:
6689         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6691 2004-03-23  Tom Tromey  <tromey@redhat.com>
6693         PR java/14315:
6694         * jcf-write.c (make_class_file_name): Don't report if mkdir
6695         failed with EEXIST.
6697 2004-03-23  Tom Tromey  <tromey@redhat.com>
6699         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6701 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
6703         * class.c, gjavah.c, lang.c: Fix comment typos.
6704         * gcj.texi: Fix typos.
6706 2004-03-19  Per Bothner  <per@bothner.com>
6708         * gcj.texi (Code Generation):  Document new flags and assert defaults.
6710         * class.c (assume_compiled_node_struct):  Rename type to
6711         class_flag_node_struct, as it is now also used for enable_assertions.
6712         Rename assume_compiled_node typedef.  Rename excludep field to value.
6713         (find_assume_compiled_node):  Rename function to find_class_flag_node.
6714         Minor optimization - avoid needless strlen.
6715         (add_assume_compiled):  Some tweaking and optimization.
6716         Rename and generalize to add_class_flag takem an extra parameter.
6717         (add_assume_compled):  New just calls add_class_flag.
6718         (add_enable_assert, enable_assertions):  New functions.
6719         (enable_assert_tree):  New static.
6720         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6721         * lang.opt (fenable-assertions, fenable-assertions=,
6722         fdisable-assertions, fdisable-assertions=):  New options.
6723         * lang.c (java_handle_option):  Handle new options.
6724         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
6725         class in an interface - create helper class nested in outer interface.
6726         (build_assertion):  Short-circuit if enable_assertions is false.
6728 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6730         * java-tree.h: Changes throughout to add checking to macros
6731         and numerous whitespace changes.
6732         (VAR_OR_FIELD_CHECK): New macro.
6733         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6734         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6736 2004-03-16  Per Bothner  <per@bothner.com>
6738         * jcf-jump.c (options):  New --print-constants option.
6739         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
6741         * jcf-dump.c (flag_print_constant_pool):  Default to off.
6742         (print_constant_terse_with_index):  New helper function.
6743         (various places):  Check flag_print_constant_pool where missing.
6744         (main):  If verbose set flag_print_constant_pool.
6745         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
6747 2004-03-15  Andrew Haley  <aph@redhat.com>
6749         PR java/14581
6750         * parse.y (java_complete_lhs): Check that final variable has an
6751         initializer.
6753 2004-03-12  Andrew Haley  <aph@redhat.com>
6755         PR java/14551
6756         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6757         conversion.
6759 2004-02-29  Roger Sayle  <roger@eyesopen.com>
6761         * jcf-parse.c (java_parse_file): Handle the case that input_filename
6762         is NULL.
6764 2004-02-27  Per Bothner  <per@bothner.com>
6766         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
6767         suggestion:  Use build_incomplete_class_ref.
6768         This fixes PR java/13508, java/11714.
6770 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
6772         * java/parse.h: Update copyright.
6774 2004-02-26  Andrew Haley  <aph@redhat.com>
6776         PR java/14231:
6777         * parse.y (check_interface_throws_clauses): Check for
6778         !METHOD_INVISIBLE (iface_method).
6779         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6780         well as CLASS_ABSTRACT.
6782 2004-02-25  Per Bothner  <per@bothner.com>
6784         * parse.y (build_assertion):  If we're in an inner class, create the
6785         class$ helper routine in the outer class.
6787 2004-02-19  Richard Henderson  <rth@redhat.com>
6789         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6791 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
6793         * Make-lang.in (java.install-man): Add extra dependencies.
6795 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
6797         * Make-lang.in: Install man pages under the same names
6798         (possibly transformed) as the program they document.
6800 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
6802         * gjavah.c: Include "intl.h".
6803         (error): New function.
6804         (main): Call gcc_init_libintl.
6805         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6806         print_stub_or_jni, process_file, main): Use error rather than
6807         fprintf.
6808         (print_method_info, usage, help, version, main): Mark strings for
6809         translation with _.  Avoid splitting up sentences.  Send
6810         information messages to stdout.
6811         * jcf-dump.c: Include "intl.h".
6812         (main): Call gcc_init_libintl.
6813         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6814         Mark error, usage and version messages for translation with _.
6815         Avoid splitting up sentences.
6816         * jv-scan.c: Include "intl.h".
6817         (fatal_error, warning): Change parameter s to msgid.  Translate
6818         messages.
6819         (main): Call gcc_init_libintl.
6820         (usage, help, version): Mark error, usage and version messages for
6821         translation with _.  Avoid splitting up sentences.
6822         * jvgenmain.c: Include "intl.h".
6823         (main): Call gcc_init_libintl.
6824         (usage, main): Mark error messages for translation with _.
6825         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6826         JVGENMAIN_OBJS): Add intl.o.
6827         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6828         java/jvgenmain.o): Update dependencies.
6830 2004-02-08  Per Bothner  <per@bothner.com>
6832         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
6833         class don't use not_accessible_field_error, which can get confused.
6835 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6837         Make-lang.in (po-generated):  Delete.
6839 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6841         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6842         Depend on target.h.
6843         * decl.c: Include target.h.
6844         (start_java_method): Replace PROMOTE_PROTOTYPES with
6845         targetm.calls.promote_prototypes.
6846         * expr.c: Include target.h.
6847         (pop_arguments): Replace PROMOTE_PROTOTYPES with
6848         targetm.calls.promote_prototypes.
6849         * parse.y: Include target.h.
6850         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6851         with targetm.calls.promote_prototypes.
6853 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6855         * typeck.c: Update copyright.
6857 2004-02-02  Tom Tromey  <tromey@redhat.com>
6859         * decl.c (java_init_decl_processing): Remove duplicate
6860         gnu/gcj/RawData.
6862 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
6864         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6866 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
6868         * expr.c (build_field_ref): Move variable
6869         definition up.
6871 2004-01-28  Andrew Haley  <aph@redhat.com>
6873         * expr.c (build_field_ref): Widen field offset.
6875 2004-01-27  Andrew Haley  <aph@redhat.com>
6877         java/13273
6878         * parse.y (check_interface_throws_clauses): Make sure class_decl
6879         has been loaded.
6881 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
6883         PR java/13733
6884         * parse.y (patch_assignment): Don't modify lhs_type for
6885         reference assignments.
6887 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6889         * Make-lang.in: Replace $(docdir) with doc.
6890         (java.info, java.srcinfo, java.man, java.srcman): New rules.
6891         (java.install-man): Revamp rule.
6893 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6895         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6896         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6897         instead of deferred backquote.
6899 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
6901         * typeck.c (find_method_in_interfaces): Move variable
6902         definition up.
6904 2004-01-16  Andrew Haley  <aph@redhat.com>
6906         PR java/13273:
6907         * typeck.c (shallow_find_method): New.
6908         (find_method_in_superclasses): New.
6909         (find_method_in_interfaces): New.
6910         (lookup_do): Rewrite.
6911         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6913         * jcf-parse.c (read_class): Save and restore output_class.
6914         * decl.c (java_expand_body): Set output_class from fndecl.
6916 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
6918         * class.c (gen_indirect_dispatch_tables): Fix string length
6919         calculations.
6921 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
6923         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6924         (java.srcextra): Copy above back to source directory if requested.
6925         (po-generated): Delete reference to $(parsedir).
6926         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6927         Use implicit rule.
6929 2004-01-14  Jan Hubicka  <jh@suse.cz>
6931         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6932         estimation.
6934 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
6936         * java-tree.h (java_expand_expr): Change prototype.
6937         * expr.c (java_expand_expr): Add alt_rtl parameter.
6939 2004-01-09  Andrew Haley  <aph@redhat.com>
6941         PR java/12755:
6942         * parse.y (java_fix_constructors):  Set output_class.
6943         (java_reorder_fields): Likewise.
6944         (java_layout_classes): Likewise.
6945         (java_expand_classes): Generate indirect dispatch tables.
6946         (java_expand_classes): Set output_class.
6947         (java_finish_classes): Likewise.
6948         * lang.c (java_init): Turn on always_initialize_class_p if we're
6949         using indirect dis[atch.
6950         (java_decl_ok_for_sibcall): Use output_class, not current_class.
6951         (java_get_callee_fndecl): Use class local atable.
6952         * jcf-parse.c
6953         (always_initialize_class_p): Decl moved to java-tree.h.
6954         (HANDLE_CLASS_INFO): Set output_class.
6955         (read_class): Likewise.
6956         (parse_class_file): Call gen_indirect_dispatch_tables.
6957         (parse_zip_file_entries): Set output_class.
6958         (java_parse_file): Set output_class.  Don't emit symbol tables.
6959         * java-tree.h (output_class): New.
6960         Remove global declarations for otable, atable, and ctable.
6961         (always_initialize_class_p): moved here from decl.c.
6962         (DECL_OWNER): New.
6963         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6964         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6965         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6966         (struct lang_type): Add otable_methods, otable_decl,
6967         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6968         ctable_decl, catch_classes, type_to_runtime_map.
6969         * expr.c (build_field_ref): Make otable, atable, and ctable class
6970         local rather than global.
6971         (build_known_method_ref): Likewise.
6972         (build_invokeinterface): Likewise.
6973         (java_expand_expr): Pass runtime type (rather than actual type) to
6974         expand_start_catch.
6975         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6976         this class.  Look up each class in that map to delete duplicates.
6977         (expand_end_java_handler): Pass runtime type (rather than actual
6978         type) to expand_start_catch.
6979         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6980         (do_nothing): New.
6981         (java_init_decl_processing): Rearrange things.  Remove global
6982         declarations of otable, atable, and ctable.
6983         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6984         (java_expand_body): Set output_class.
6985         * constants.c (build_constant_data_ref): Use output_class, not
6986         current_class.
6987         (alloc_name_constant): Likewise.
6988         * class.c (gen_indirect_dispatch_tables): New.
6989         (build_class_ref): Generate hard reference to superclass, even if
6990         using indirect dispatch.
6991         (build_static_field_ref): Use class local atable.
6992         (make_class_data): Generate hard reference to superclass, even if
6993         using indirect dispatch.
6994         Generate symbolic references to interfaces when using indirect
6995         dispatch.
6996         (make_class_data): Emit otable, atable, and ctable.
6997         Make otable, atable, and ctable class local rather than global.
6998         (emit_catch_table): Make otable, atable, and ctable class local
6999         rather than global.
7001 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
7003         * parse.y (catch_clause_parameter): Fix typo.
7005         PR java/13404
7006         * parse.y: (catch_clause_parameter): Return early if $3, aka
7007         formal_parameter, is null.
7009 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
7011         * class.c: Remove uses of "register" specifier in
7012         declarations of arguments and local variables.
7013         * decl.c: Likewise.
7014         * expr.c: Likewise.
7015         * gjavah.c: Likewise.
7016         * jcf-dump.c: Likewise.
7017         * jcf-io.c: Likewise.
7018         * jcf-parse.c: Likewise.
7019         * jcf-write.c: Likewise.
7020         * keyword.h: Likewise.
7021         * parse.y: Likewise.
7022         * typeck.c: Likewise.
7023         * verify.c: Likewise.
7025 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
7027         * Make-lang.in (GCJ_CROSS_NAME): Delete.
7028         (java.install_common, java.install-man): Adjust for above.
7029         (java.uninstall): Likewise.
7031 2003-12-03  Michael Koch  <konqueror@gmx.de>
7033         * class.c (make_class_data):
7034         Push field value to 'hack_signers' instead of 'signers'.
7035         * decl.c (java_init_decl_processing):
7036         Push field 'hack_signers' instead of 'signers'.
7038 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
7040         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
7041         including iconv.h.
7043 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
7045         PR java/12374:
7046         * parse.y (qualify_ambiguous_name): Remove lots of broken
7047         field access processing - there's no need to do that here,
7048         because we have resolve_field_access.  Remove
7049         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
7050         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
7051         used.
7053 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
7055         Fix PR java/13237
7056         * parse.y (java_complete_lhs): Save location prior to patching
7057         CALL_EXPR.
7059 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
7061         PR java/12548
7062         * resource.c (write_resource_constructor): Append
7063         "_resource" to constructor identifier name.
7065 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
7067         Fix PR java/13183.
7068         * constants.c (cpool_for_class): New function.
7069         (outgoing_cpool): Remove global variable.
7070         (alloc_name_constant): Use cpool_for_class.
7071         (build_constants_constructor): Likewise.
7072         * decl.c (java_expand_body): Set current_class.
7073         * java-tree.h (outgoing_cpool) Remove declaration.
7074         (init_outgoing_cpool): Likewise.
7075         * jcf-parse.c (init_outgoing_cpool): Remove function.
7076         (parse_class_file): Don't call init_outgoing_cpool.
7077         * parse.y (java_complete_expand_methods): Don't call
7078         init_outgoing_cpool.  Don't save outgoing_cpool.
7079         (java_expand_classes): Don't restore outgoing_cpool.
7080         (java_finish_classes): Likewise.
7082 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
7084         * Make-lang.in: (java.install-common) Add
7085         symlink for $(target_noncanonical)-gcjh for
7086         native builds.
7088 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
7090         * Make-lang.in (java.extraclean): Delete.
7092 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
7094         * Make-lang.in (check-java): Add.
7096 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
7098         Fix PR java/13024.
7099         * except.c (prepare_eh_table_type): Allocate variable-sized
7100         buffer `buf' with alloca.
7102 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
7104         Fix PR java/12857.
7106         decl.c (java_init_decl_processing): Don't initialize
7107         class_not_found_type_node, no_class_def_found_type_node.
7109         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
7110         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
7111         (class_not_found_type_node, no_class_def_found_type_node):
7112         Don't define.
7114         parse.y (build_dot_class_method_invocation): Add this_class
7115         argument.  Qualify method invocations to a different class.
7116         (create_new_parser_context): Initialize saved_data_ctx to 0.
7117         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
7118         (build_dot_class_method): Don't load classes.  Register
7119         incomplete types.
7120         (build_incomplete_class_ref): Special cases for interfaces
7121         and inner classes.  Move build_dot_class_method call to here...
7122         (patch_incomplete_class_ref): ...from here.  Pass current_class
7123         to build_dot_class_method_invocation.
7124         (build_assertion): Pass class_type to
7125         build_dot_class_method_invocation.
7126         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
7128 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
7130         Fix PR java/12739.
7131         * java-tree.h (BLOCK_EMPTY_P): Define.
7132         * parse.y (java_complete_lhs): Check for empty blocks
7133         in TRY_FINALLY_EXPR case.
7135 2003-11-17  Andrew Haley  <aph@redhat.com>
7137         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
7138         (struct lang_decl_var:freed): New variable.
7139         * decl.c (poplevel): Mark local vars that have gone out of scope.
7140         (push_jvm_slot): Don't use the RTL of a var that has gone out of
7141         scope.
7143 2003-11-16  Jason Merrill  <jason@redhat.com>
7145         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
7146         and TAGS files that include them for each front end.
7148 2003-11-15  Tom Tromey  <tromey@redhat.com>
7150         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
7152 2003-11-12  Jason Merrill  <jason@redhat.com>
7154         PR optimization/12547
7155         * lang.c (java_tree_inlining_walk_subtrees): Just walk
7156         BLOCK_EXPR_BODY directly.
7158 2003-11-12  Andrew Haley  <aph@redhat.com>
7160         PR java/11045
7161         * parse.y (fold_constant_for_init): Check that we really do have a
7162         constant.
7164         PR java/11533
7165         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
7166         init_test_decls being inlined.
7168         PR java/12890:
7169         * parse.y (do_resolve_class): Check return value from
7170         breakdown_qualified().
7172 2003-11-11  Tom Tromey  <tromey@redhat.com>
7174         PR java/12915:
7175         * parse.y (merge_string_cste): Handle case where we have a
7176         pointer that happens to be zero, not null_pointer_node.
7178 2003-11-10  Tom Tromey  <tromey@redhat.com>
7180         * jcf-parse.c (classify_zip_file): Correctly compare
7181         filename_length against length of manifest file's name.
7183 2003-11-08  Tom Tromey  <tromey@redhat.com>
7185         PR java/12894:
7186         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
7188 2003-11-06  Andrew Haley  <aph@redhat.com>
7190         * expr.c (java_stack_swap): Make sure destination stack slots are
7191         of the correct type.
7193 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
7195         * Make-lang.in (dvi): Move targets to $(docobjdir).
7196         (gcj.dvi): Simplify rule and adjust target.
7197         (gcj.info): Simplify rule.
7198         (gcj.pod): New intermediate rule.
7199         (gcjh.pod): Likewise.
7200         (jv-scan.pod): Likewise.
7201         (jcf-dump.pod): Likewise.
7202         (gij.pod): Likewise.
7203         (jv-convert.pod): Likewise.
7204         (rmic.pod): Likewise.
7205         (rmiregistry.pod): Likewise.
7206         (gcj.1): Delete.
7207         (gcjh.1): Delete.
7208         (jv-scan.1): Delete.
7209         (jcf-dump.1): Delete.
7210         (gij.1): Delete.
7211         (jv-convert.1): Delete.
7212         (rmic.1): Delete.
7213         (rmiregistry.1): Delete.
7215 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
7217         Fixes PR java/12866.
7218         * parse.y (resolve_qualified_expression_name): Move test
7219         for outer field access methods from here...
7220         (check_thrown_exceptions) ...to here.
7222 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
7224         * .cvsignore: Delete.
7226 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
7228         * verify.c (verify_jvm_instructions): Don't warn about legal
7229         eh binding regions generated for example by jdk 1.4.1.
7231 2003-10-24  David S. Miller  <davem@redhat.com>
7233         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7235 2003-10-22  Andrew Haley  <aph@redhat.com>
7237         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7238         (java_get_callee_fndecl): New.
7240         * jcf-parse.c (java_parse_file): Call emit_catch_table().
7242         * java-tree.h (ctable_decl): New.
7243         (catch_classes):  New.
7244         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7246         * decl.c (java_init_decl_processing): Add catch_class_type.
7247         Add ctable_decl.
7248         Add catch_classes field.
7250         * class.c (build_indirect_class_ref): Break out from
7251         build_class_ref.
7252         (make_field_value): Check flag_indirect_dispatch.
7253         (make_class_data): Ditto.
7254         Tidy uses of PUSH_FIELD_VALUE.
7255         Add field catch_classes.
7256         (make_catch_class_record): New.
7258         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7260 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
7262         * jcf-write.c: Follow spelling conventions.
7263         * parse.y: Likewise.
7265 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
7267         * ChangeLog: Fix typos.
7268         * expr.c: Fix comment typos.
7269         * jcf-write.c: Likewise.
7270         * lang.c: Likewise.
7271         * lex.c: Likewise.
7272         * mangle.c: Likewise.
7273         * parse-scan.y: Likewise.
7274         * parse.y: Likewise.
7276 2003-10-22  Tom Tromey  <tromey@redhat.com>
7278         * expr.c (expand_byte_code): Only warn about dead bytecode when
7279         extra_warnings is set.
7281 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
7283         Fix for PR java/12586.
7284         * mangle.c (find_compression_record_match): Don't iterate through
7285         package namespace elements unless they all match compression_table
7286         entries.
7288 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
7290         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7291         (generate-manpages): Likewise.
7292         (java.maintainer-clean): Likewise.
7293         (gcj.info): Likewise.
7294         (gcj.1): Likewise.
7295         (gcjh.1): Likewise.
7296         (jv-scan.1): Likewise.
7297         (jcf-dump.1): Likewise.
7298         (gij.1): Likewise.
7299         (jv-convert.1): Likewise.
7300         (rmic.1): Likewise.
7301         (rmiregistry.1): Likewise.
7302         (java.install-man): Likewise.
7303         (parse-scan.o): Move and define complete compile line.
7304         (parse.o): Likewise.
7305         (jcf-tree-inline.o): Move.
7307 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
7309         * Make-lang.in (info): Update dependencies.
7310         (java.install-info): Remove.
7311         ($(srcdir)/java/gcj.info): Replace with ...
7312         ($(docobjdir)/gcj.info): ... this.
7314 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
7316         * Make-lang.in: Replace uses of $(target_alias) with
7317         $(target_noncanonical).
7319 2003-10-09  Tom Tromey  <tromey@redhat.com>
7321         * decl.c (java_init_decl_processing): Declare signers field.
7322         * class.c (make_class_data): Set signers field.
7324 2003-10-09  Jason Merrill  <jason@redhat.com>
7326         * parse.y (patch_assignment): Use make_node to create a BLOCK.
7327         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7328         POINTER_TYPE.
7330 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
7332         * Make-lang.in (java.info): Replace with ...
7333         (info): ... this.
7334         (java.dvi): Replace with ...
7335         (dvi): ... this.
7336         (java.generated-manpages): Replace with ...
7338 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
7340         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7342 2003-10-01  Andrew Haley  <aph@redhat.com>
7344         * jcf-parse.c (java_parse_file): Write otable and atable.
7345         * java-tree.h (atable_methods): New.
7346         (atable_decl): New.
7347         (atable_syms_decl): New.
7348         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7349         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7350         (symbol_*type): Rename method_symbol* to symbol*type.
7351         (emit_offset_symbol_table): Delete.
7352         (emit_symbol_table): New.
7353         (get_symbol_table_index): New.
7354         (atable_type): New.
7355         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7356         (build_known_method_ref): Likewise.
7357         (get_symbol_table_index): Rename from get_offset_table_index.
7358         Parameterize to allow re-use by differing types of symbol table.
7359         (build_invokevirtual): Pass table to get_offset_table_index.
7360         * decl.c (java_init_decl_processing): Push types and decls for
7361         atable and atable_syyms.
7362         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7363         (make_class_data): Add new fields atable and atable_syms.
7364         (emit_symbol_table): Rename from emit_offset_symbol_table.
7365         Parameterize to allow re-use by different types of symbol table.
7366         (build_symbol_entry): Renamed from build_method_symbols_entry.
7368 2003-09-30  Roger Sayle  <roger@eyesopen.com>
7370         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7371         semantics for SAVE_EXPR, by caching the result in a temporary.
7373 2003-09-28  Richard Henderson  <rth@redhat.com>
7375         * check-init.c (check_init): Save and restore input_location
7376         instead of file and line separately.
7377         * decl.c (java_expand_body): Likewise.
7378         * jcf-write.c (generate_bytecode_insns): Likewise.
7379         * parse.y (safe_layout_class): Likewise.
7380         * jcf-parse.c (read_class, parse_class_file): Likewise.
7381         (java_parse_file): Use %H for warning locator.
7383 2003-09-28  Roger Sayle  <roger@eyesopen.com>
7385         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7386         with void-type branches instead of using a COMPOUND_EXPR.
7388 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
7390         * decl.c (java_optimize_inline, dump_function): Remove.
7391         * java-tree.h (java_optimize_inline): Remove declaration.
7392         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7393         * parse.y (source_end_java_method, java_expand_classes):
7394         Likewise.  Remove dead code.
7396 2003-09-27  Roger Sayle  <roger@eyesopen.com>
7398         * lang.c (java_init_options): Set flag_evaluation_order.
7399         * expr.c (force_evaluation_order): Don't attempt to force
7400         evaluation order of binary operations using save_expr.
7401         * parse.y (java_complete_lhs): No longer need to call
7402         force_evaluation_order when constructing binary operators.
7404 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7405             Bryce McKinlay  <bryce@mckinlay.net.nz>
7407         PR java/1333:
7408         * parse.y (not_accessible_field_error): New function.
7409         (resolve_expression_name): Check field access permissions.
7410         (resolve_qualified_expression_name): Use
7411         not_accessible_field_error.
7412         (resolve_qualified_expression_name): Likewise.
7414 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7416         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7418 2003-09-23  Roger Sayle  <roger@eyesopen.com>
7420         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7421         with equal operands without side-effects.
7423 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
7425         * decl.c (java_init_decl_processing): Don't emit otable decls
7426         if flag_indirect_dispatch is not set.
7428 2003-09-21  Richard Henderson  <rth@redhat.com>
7430         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7431         resource.c: Revert.
7433 2003-09-21  Richard Henderson  <rth@redhat.com>
7435         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7436         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7438 2003-09-20  Richard Henderson  <rth@redhat.com>
7440         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7442 2003-09-18  Roger Sayle  <roger@eyesopen.com>
7444         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7445         * check-init.c (check_init): Likewise.
7447 2003-09-18  Roger Sayle  <roger@eyesopen.com>
7449         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7451 2003-09-16  Andrew Haley  <aph@redhat.com>
7453         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7455 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
7457         Fixes PR java/9577
7458         * mangle.c (find_compression_record_match): Skip
7459         over a "6JArray" (the array template mangled string)
7460         IDENTIFIER_NODE.
7461         (mangle_array_type): Correct minor typo.
7462         (atms): Move definition to the beginning.
7464 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
7466         * class.c (add_miranda_methods): Ensure super-interfaces are laid
7467         out. Fix for PR java/12254.
7469 2003-09-11  Richard Henderson  <rth@redhat.com>
7471         * parse.y (source_end_java_method): Update for new
7472         cgraph_finalize_function argument.
7474 2003-09-09  Richard Henderson  <rth@redhat.com>
7476         * parse.y (source_end_java_method): Update call to
7477         cgraph_finalize_function.
7479 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
7481         * decl.c (java_expand_body): New function.
7482         * expr.c (build_class_init): Set DECL_IGNORED_P.
7483         * java-tree.h (start_complete_expand_method,
7484         java_expand_body): Declare.
7485         * jcf-parse.c (cgraph.h): Include.
7486         (java_parse_file): Handle flag_unit_at_a_time.
7487         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7488         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7489         (java_estimate_num_insns): Use walk_tree_without_duplicates.
7490         (java_start_inlining): New function.
7491         * parse.h (java_finish_classes): Declare.
7492         * parse.y: Include cgraph.h.
7493         (block): Don't special-case empty block production.
7494         (craft_constructor): Set DECL_INLINE.
7495         (source_end_java_method): Handle flag_unit_at_a_time.
7496         Replace inline code with call to java_expand_body.
7497         (start_complete_expand_method): Remove static modifier.
7498         (java_expand_method_bodies): Patch function tree for
7499         class initialization and/or synchronization as needed.
7500         Don't begin RTL expansion yet.
7501         (java_expand_classes): Check flag_unit_at_a_time before
7502         calling finish_class.
7503         (java_finish_classes): New function.
7504         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7505         (patch_assignment): Set DECL_CONTEXT on temporary variable.
7506         (emit_test_initialization): Set DECL_IGNORED_P.
7508 2003-09-03  Roger Sayle  <roger@eyesopen.com>
7510         * builtins.c (enum builtin_type): Delete unused enumeration.
7511         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7513 2003-08-28  Tom Tromey  <tromey@redhat.com>
7515         * gcj.texi (Extensions): Document gcjlib URLs.
7517 2003-08-20  Tom Tromey  <tromey@redhat.com>
7519         * gcj.texi (Extensions): Added xref.
7520         (libgcj Runtime Properties): Document
7521         gnu.gcj.runtime.VMClassLoader.library_control.
7523 2003-08-20  Andrew Haley  <aph@redhat.com>
7525         * except.c (prepare_eh_table_type): Use new encoding for exception
7526         handlers when using -fno-assume-compiled.
7528 2003-08-13  Tom Tromey  <tromey@redhat.com>
7530         * gcj.texi (Invoking gij): Document -X and -?.
7532 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
7534         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7535         GCJH_OBJS, JCFDUMP_OBJS
7536         * win32-host.c: Removed the unnecessary and broken dependency
7537         on jcf.h
7539 2003-08-11  Tom Tromey  <tromey@redhat.com>
7541         * parse.y (java_check_regular_methods): Typo fixes.  Call
7542         check_interface_throws_clauses.  Use
7543         check_concrete_throws_clauses.
7544         (check_interface_throws_clauses): New function.
7545         (check_concrete_throws_clauses): New function.
7546         (hack_is_accessible_p): New function.
7547         (find_most_specific_methods_list): Added FIXME.
7548         * typeck.c (lookup_do): Use `flags' argument to decide what to
7549         do.  Reimplemented.
7550         (lookup_argument_method_generic): New function.
7551         (lookup_argument_method2): Removed.
7552         * jcf.h (ACC_INVISIBLE): New define.
7553         * jcf-write.c (generate_classfile): Skip invisible methods.
7554         * class.c (add_miranda_methods): New function.
7555         (layout_class_methods): Use it.
7556         (get_access_flags_from_decl): Use ACC_INVISIBLE.
7557         * java-tree.h (METHOD_INVISIBLE): New define.
7558         (lang_decl_func) [invisible]: New field.
7559         (lookup_argument_method_generic): Declare.
7560         (SEARCH_INTERFACE): New define.
7561         (SEARCH_SUPER): Likewise.
7562         (SEARCH_ONLY_INTERFACE): Likewise.
7563         (SEARCH_VISIBLE): Likewise.
7564         (lookup_argument_method2): Removed declaration.
7566 2003-08-05  Tom Tromey  <tromey@redhat.com>
7568         Fix for PR java/11600:
7569         * parse.y (java_complete_lhs): See whether we're calling a method
7570         on an array.
7571         (check_thrown_exceptions): Added `is_array_call' argument;
7572         fixed `clone' checking; updated all callers.
7574 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
7576         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7578 2003-08-03  Tom Tromey  <tromey@redhat.com>
7580         * java-tree.h (METHOD_TRANSIENT): Removed.
7581         * decl.c (pushdecl): Removed some dead code.
7582         * class.c (get_access_flags_from_decl): Can't have transient
7583         method.
7584         (add_method_1): Can't have a transient method.
7586 2003-07-28  Andreas Jaeger  <aj@suse.de>
7588         * jvspec.c: Convert to ISO C90 prototypes.
7590 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7592         * decl.c (force_poplevels): Fix warning call.
7594 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7596         * expr.c (expand_java_field_op): Don't use xxx_with_decl
7597         (expand_java_field_op): Likewise.
7598         * class.c (layout_class_method): Likewise
7599         (emit_register_classes): Likewise.
7600         * decl.c (pushdecl): Likewise.
7601         (poplevel): Likewise.
7602         (force_poplevels): Likewise.
7603         (give_name_to_locals): Likewise.
7604         * check-init.c (check_for_initialization): Likewise.
7606 2003-07-24  Jason Merrill  <jason@redhat.com>
7608         * java-tree.h: Move boolean_type_node et al to the back end.
7610 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7612         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7613         casts.
7615 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
7617         * lang.opt: Don't show -MD_ and -MDD_.
7619 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
7621         * lang-options.h: Remove.
7622         * lang.opt: Add help text.
7624 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
7626         * expr.c: Remove the last argument to expand_assignment().
7628 2003-07-09  Jan Hubicka  <jh@suse.cz>
7630         * java-tree.h (DECL_NUM_STMTS): Rename to...
7631         (DECL_ESTIMATED_INSNS): ... this.
7632         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7633         New static functions.
7634         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7635         * parser.y (add_stmt_to_compound): Do not account statements.
7637 2003-07-08  Mark Wielaard  <mark@klomp.org>
7639         * gcj.texi: CNI now expands to Compiled Native Interface.
7641 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7643         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7645 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
7647         * expr.c (expand_byte_code): Adjist emit_line_note call.
7649 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
7651         * lang.c (java_handle_option): Don't handle filenames.
7653 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
7655         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7656         DIR_SEPARATOR.
7657         Use FILENAME_CMP.
7658         * jcf-write.c: Don't default-define DIR_SEPARATOR.
7659         * jcf.h: Delete COMPARE_FILENAMES definition.
7661 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
7663         * lang.c (java_init_options): Update prototype.
7665 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
7667         * decl.c (poplevel): Adjust define_label call.
7669 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
7671         * gjavah.c (flag_jni): Make non-static.
7672         * parse-scan.y (ctxp): Make non-static.
7674         * class.c (build_method_symbols_entry)
7675         * expr.c (get_offset_table_index)
7676         * jcf-parse.c (jcf_parse):
7677         Mark the definition static, matching the forward declaration.
7679 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
7681         * lang.c (java_handle_option): Don't check for missing arguments.
7683 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7685         * class.c (push_class): Use a location_t to save place.
7686         (emit_register_classes): Set input_location. Adjust
7687         expand_function_end call.
7688         * resource.c (write_resource_constructor): Likewise.
7689         * decl.c (end_java_method): Adjust expand_function_end call.
7690         * parse.y (source_end_java_method): Likewise.
7692 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
7694         * lang.c (java_handle_option): Likewise.
7696 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
7698         * lang.c (java_handle_option): Special-casing of optional
7699         joined arguments no longer needed.
7700         * lang.opt: Update switches that take optional argument.
7702 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7704         * lang.opt: Declare Java.
7705         * lang.c (java_init_options): Update.
7707 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7709         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7711 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7713         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7714         * lang.c (java_handle_option): -MD and -MMD have an underscore.
7715         * lang.opt: -MD and -MMD have an underscore.
7717 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7719         * class.c (emit_register_classes): Adjust init_function_start
7720         call.
7721         * decl.c (complete_start_java_method): Likewise.
7722         * resource.c (write_resource_constructor): Likewise.
7724 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7726         * Make-lang.in: Update to use options.c and options.h.
7727         * lang.c: Include options.h not j-options.h.
7728         (java_handle_option): Abort on unrecognized option.
7729         (java_init_options): Request Java switches.
7731 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
7733         * Make-lang.in: Handle mostlyclean.
7735 2003-06-11  Tom Tromey  <tromey@redhat.com>
7737         * lang.c (java_handle_option): Update dependency_tracking for
7738         OPT_MF case.
7740         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7741         empty argument.
7743 2003-06-10  Andrew Haley  <aph@redhat.com>
7745         * resource.c (write_resource_constructor): Use expand_expr to
7746         generate the address of the label attached to a resource.
7747         * Make-lang.in (java/resource.o): Add expr.h
7749 2003-06-10  Andrew Haley  <aph@redhat.com>
7751         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7752         (java_decl_ok_for_sibcall): New.
7754 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
7756         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7757         (java/j-options.c, java/j-options.h): New.
7758         * java-tree.h (resource_name, compile_resource_file,
7759         compile_resource_data): Constify.
7760         * jcf-write.c (jcf_write_base_directory): Similarly.
7761         * jcf.h (jcf_write_base_directory): Similarly.
7762         * lang.c: Include j-options.h.
7763         (cl_options_count, cl_options, string_option, java_decode_option,
7764         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7765         process_option_with_no): Remove.
7766         (resource_name): Constify.
7767         (LANG_HOOKS_HANDLE_OPTION): Override.
7768         (java_handle_option): New.
7769         (java_init): Don't call jcf_path_init.
7770         (java_init_options): Call jcf_path_init.
7771         * lang.opt: New.
7772         * resource.c (compile_resource_data, compile_resource_file): Constify.
7774 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
7776         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7777         (struct lang_decl_func): Add last_line field.
7778         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7779         DECL_SOURCE_LINE_LAST): Remove.
7780         * parse.y (missing_return_error, finish_method_declaration,
7781         lookup_cl, start_artificial_method_body, source_end_java_method,
7782         start_complete_expand_method): Adjust.
7784 2003-06-08  Tom Tromey  <tromey@redhat.com>
7786         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7787         fno-assume-compiled.
7789 2003-06-08  Roger Sayle  <roger@eyesopen.com>
7791         * builtins.c (define_builtin_type, builtin_types): Delete.
7792         (define_builtin): Rewritten to take just the built-in code,
7793         the function's name, type and fallback library function name.
7794         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7795         (initialize_builtins): Overhaul to define the GCC builtins
7796         used by gcj manually, providing the Java run-time's
7797         implementations as the fallback library function.
7799 2003-06-08  Anthony Green  <green@redhat.com>
7801         * parse.y (patch_cast): Fix conversions from floating-point to
7802         integral types.
7804 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
7806         * Make-lang.in: Update.
7807         * lang.c: Include opts.h. Define cl_options_count and cl_options.
7809 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
7811         * lang.c (java_init_options): Update.
7813 2003-06-05  Jan Hubicka  <jh@suse.cz>
7815         * Make-lang.in:  Add support for stageprofile and stagefeedback
7817 2003-05-31  Roger Sayle  <roger@eyesopen.com>
7819         * lang.c (java_init_options): Prescribe wrap-around two's
7820         complement arithmetic overflow by setting flag_wrapv.
7822 2003-05-29  Roger Sayle  <roger@eyesopen.com>
7824         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7825         (builtin_record): Add an additional builtin_code field to
7826         record which GCC built-in corresponds to the Java function.
7827         (java_builtins):  Add new entries for atan, atan2, exp, log,
7828         pow and tan.
7829         (max_builtin, min_builtin, abs_builtin): Perform constant
7830         folding on the resulting tree.
7831         (java_build_function_call_expr): Likewise, perform constant
7832         folding on the resulting tree.
7833         (initialize_builtins): The NULL creators are now allowed in
7834         the java_builtins table, which is now terminated by an entry
7835         with builtin_code == END_BUILTINS.
7836         (check_for_builtin): Likewise.  If the matching creator is
7837         NULL, construct the call using java_build_function_call_expr
7838         directly with the decl for the corresponding builtin_code.
7840 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
7842         * win32-host.c: Normalize copyright boilerplate.
7844 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7846         * parse.y (print_int_node): Use string concatentation on
7847         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7848         function calls into one.
7850 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
7852         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7853         fatal_io_error with calls to fatal_error; add ": %m" to the end of
7854         all the affected error messages.
7856 2003-05-13  Richard Henderson  <rth@redhat.com>
7858         * class.c (layout_class_method): Set DECL_EXTERNAL.
7859         * decl.c (java_mark_decl_local, java_mark_class_local): New.
7860         * java-tree.h (java_mark_class_local): Declare.
7861         * jcf-parse.c (parse_class_file): Use it.
7862         * parse.y (java_expand_classes): Likewise.
7864 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
7866         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7867         * lex.h: #include input.h.
7868         * jv-scan.c (input_filename): Remove.
7870 2003-05-02  Tom Tromey  <tromey@redhat.com>
7872         PR java/10491:
7873         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7874         (handle_inner_classes): New function.
7876 2003-05-01  Tom Tromey  <tromey@redhat.com>
7878         PR java/10459:
7879         * parse.y (finish_for_loop): Do nothing if update expression is a
7880         EXPR_WFL_NODE wrapping nothing.
7881         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7883 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
7885         * lex.h (input_lineno): Remove declaration.
7886         * parse-scan.y: #include input.h.
7887         (input_filename): Remove declaration.
7888         (input_location): Add definition.
7889         (input_line): Remove definition.
7891 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7893         * lex.h (lineno): Rename to ...
7894         (input_line): ... here
7895         * parse-scan.y (lineno): Rename to ...
7896         (input_line): ... here.
7897         (reset_report): Rename lineno to input_line.
7898         * check-init.c (check_init): Likewise.
7899         * class.c (push_class): Likewise.
7900         * decl.c (complete_start_java_method, end_java_method): Likewise.
7901         * expr.c (expand_byte_code): Likewise.
7902         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7903         * jcf-write.c (generate_bytecode_insns): Likewise.
7904         * lex.c (java_init_lex, java_allocate_new_line,
7905         do_java_lex): Likewise.
7906         * parse.h (YYNOT_TWICE): Likewise.
7907         * parse.y (empty_statement, expression_statement,
7908         java_pop_parser_context, java_parser_context_save_global,
7909         yyerror, register_fields, method_header, safe_layout_class,
7910         find_in_imports_on_demand, create_artificial_method,
7911         source_end_java_method, start_complete_expand_method,
7912         build_thisn_assign, java_complete_lhs,
7913         maybe_absorb_scoping_block): Likewise.
7915 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
7917         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7918         '/' when computing java source filename
7920 2003-04-13  Tom Tromey  <tromey@redhat.com>
7922         * gjavah.c (print_c_decl): Indentation fix.
7924 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
7926         * class.c (make_field_value, make_method_value, get_dispatch_table)
7927         (make_class_data, emit_offset_symbol_table)
7928         * constants.c (build_constants_constructor)
7929         * java-tree.h (START_RECORD_CONSTRUCTOR)
7930         * parse.y (maybe_build_array_element_wfl):
7931         Use build_constructor.
7933 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
7935         PR java/10253:
7936         * parse.y (string_convert_int_cst): Always use at least one digit
7937         in string conversion. Remove ASCII dependence.
7938         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7940 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
7942         * Make-lang.in: added win32-host.c
7943         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7944         resolves to open() on non-Win32 platforms and
7945         Win32-specific jcf_open_exact_case() on Win32
7946         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7947         when trying .java and .class files
7948         * win32-host.c: added to repository. Defines
7949         Win32-specific jcf_open_exact_case()
7951 2003-04-10  Andrew Haley  <aph@redhat.com>
7953         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7954         (maybe_free_localvar): Renamed from localvar_free.
7955         Add new arg, really.
7956         (generate_bytecode_insns): Set new variable, jsrs.
7957         Only free local vars if no jsr insns have been emittted.
7958         Call maybe_free_localvar, not localvar_free.
7960 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
7962         * gcj.texi: Remove @ at start of file.
7964 2003-03-25  Tom Tromey  <tromey@redhat.com>
7966         * parse.y (create_interface): Call CHECK_DEPRECATED.
7968 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
7970         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7972 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
7974         * javaop.h (jfloat, jdouble): Make them structures mirroring
7975         the bit fields of IEEE float and double respectively.
7976         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7977         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7978         (union Word, union DWord): Delete.
7979         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7981         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7982         D_NAN_MASK): Delete.
7983         (jni_print_float, jni_print_double): New.  Generate
7984         hexadecimal floating constants.
7985         (print_field_info): Use jni_print_float/double.
7987         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
7988         finite floating point numbers for output; special case
7989         non-finite floats.
7991 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
7993         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7994         Replace 0 and 1 with true and false in return statements.
7996 2003-03-19  Tom Tromey  <tromey@redhat.com>
7998         * lex.c (do_java_lex): Renamed from java_lex.
7999         (java_lex): New function.
8000         Include timevar.h.
8002 2003-03-13  Tom Tromey  <tromey@redhat.com>
8004         * parse.y (resolve_inner_class): Error if qualifier is a primitive
8005         type.
8007 2003-03-04  Andrew Haley  <aph@redhat.com>
8009         * gjavah.c (is_first_data_member): New global variable.
8010         (print_c_decl): If it's the first data member, align it as the
8011         superclass.
8012         (process_file): Set is_first_data_member.
8014 2003-03-11  Tom Tromey  <tromey@redhat.com>
8016         * parse.y (resolve_field_access): Initialize class if field is
8017         found in another static field.
8018         * expr.c (build_class_init): Don't optimize out initialization of
8019         implemented interface.
8021 2003-03-11  Andrew Haley  <aph@redhat.com>
8023         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
8024         warning.
8026 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
8028         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
8029         and DIR_SEPARATOR_2 for a target.
8030         Correct minor typos.
8032         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
8033         and DIR_SEPARATOR_2 for a target into account.
8035 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
8037         * lang.c (java_init): Update prototype, move code to java_post_options.
8038         (java_post_options): Similarly.
8040 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
8042         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
8043         compare file name components depending on the case-sensitivity
8044         or otherwise of the host file system.
8046         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
8047         "strcmp" to compare file name components.
8048         Use IS_DIR_SEPARATOR instead of comparing directly against
8049         DIR_SEPARATOR.
8050         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
8051         comparing directly against DIR_SEPARATOR.
8053 2003-03-04  Tom Tromey  <tromey@redhat.com>
8055         * Make-lang.in (java.tags): New target.
8057 2003-03-01  Roger Sayle  <roger@eyesopen.com>
8059         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
8060         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
8062 2003-03-01  Tom Tromey  <tromey@redhat.com>
8064         * parse.y (jdep_resolve_class): Only check deprecation if we found
8065         a decl.
8067 2003-02-28  Tom Tromey  <tromey@redhat.com>
8069         PR java/9695:
8070         * class.c (maybe_layout_super_class): Always pass a WFL to
8071         do_resolve_class.
8072         * parse.y (do_resolve_class): Updated comment to explain
8073         parameters.
8075 2003-02-26  Tom Tromey  <tromey@redhat.com>
8077         * jcf-write.c (generate_classfile): Check whether class is
8078         deprecated before writing attribute count.
8080 2003-02-25  Roger Sayle  <roger@eyesopen.com>
8082         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
8083         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
8085 2003-02-23  Tom Tromey  <tromey@redhat.com>
8087         * lang-options.h: Added -Wdeprecated.
8088         * gcj.texi (Warnings): Document -Wdeprecated.
8089         * java-tree.h (flag_deprecated): Declare.
8090         * lang.c (lang_W_options): Added deprecated.
8091         (flag_deprecated): New global.
8092         * chartables.h: Rebuilt.
8093         * gen-table.pl (process_one): Look at whitespace.
8094         (print_tables): Define LETTER_SPACE, LETTER_MASK.
8095         * parse.h (CLEAR_DEPRECATED): New macro.
8096         (CHECK_DEPRECATED_NO_RESET): New macro.
8097         * jcf-parse.c (handle_deprecated): New function.
8098         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
8099         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
8100         * parse.y (resolve_type_during_patch): Check deprecation.
8101         (jdep_resolve_class): Likewise.
8102         (process_imports): Likewise.
8103         (resolve_expression_name): Likewise.
8104         (check_deprecation): Strip arrays from decl.  Check
8105         flag_deprecated.
8106         (patch_method_invocation): Also check the particular constructor
8107         for deprecation.
8108         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
8109         * jcf-write.c (append_deprecated_attribute): New function.
8110         (generate_classfile): Generate deprecated attribute when
8111         appropriate.
8112         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
8113         (java_lex) [case '*']: Simplify logic.
8114         (java_start_char_p): Use LETTER_MASK.
8115         (java_part_char_p): Likewise.
8116         (java_space_char_p): New function.
8118 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
8120         Change base class access representation.
8121         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
8122         (add_interface_do): Likewise.
8124 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
8126         * decl.c (java_init_decl_processing): Change
8127         soft_lookupjnimethod_node to reflect the change in
8128         signature of _Jv_LookupJNIMethod in libjava/jni.cc
8129         * expr.c (build_jni_stub): Calculate and pass the size
8130         on the stack of the arguments to a JNI function. Use
8131         new target macro MODIFY_JNI_METHOD_CALL to allow a
8132         target to modify the call to a JNI method.
8134 2003-02-08  Roger Sayle  <roger@eyesopen.com>
8136         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
8137         instead of basename to avoid compiler warnings on Tru64.
8139 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
8141         * gcj.texi: Update to GFDL 1.2.
8143 2003-01-31  Andrew Haley  <aph@redhat.com>
8145         * parse.y (java_expand_classes): Scan the whole class list looking
8146         for access methods that haven't yet been expanded.
8148 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
8150         Fix for java/4269:
8152         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
8153         to fix bootstrap on sparc-unknown-netbsdelf1.5.
8154         * jcf-parse.c: Likewise.
8156 2003-01-31  Mark Wielaard  <mark@klomp.org>
8158         * gjavah.c (throwable_p): Allocate 1 more byte for string.
8160 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
8162         * class.c (make_class): Use BINFO_ELTS.
8163         (set_super_info): Likewse.
8164         (add_interface_do): Likewise.
8166 2003-01-30  Tom Tromey  <tromey@redhat.com>
8168         * jcf-parse.c (read_class): Update identifier's class value if it
8169         changed during parsing.
8171 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
8173         * Make-lang.in (po-generated): Find the targets in $(parsedir).
8174         Propagate change to all other rules as required.
8175         (java/parse-scan.o): Add explicit dependency on
8176         $(parsedir)/java/parse-scan.c .
8178 2003-01-29  Tom Tromey  <tromey@redhat.com>
8180         * parse.y (patch_assignment): Only transform the rhs of an
8181         assignment when compiling to native.
8183 2003-01-28  Tom Tromey  <tromey@redhat.com>
8185         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
8187 2003-01-28  Tom Tromey  <tromey@redhat.com>
8189         * lex.c (java_lex): Don't include UEOF as part of token.
8190         (java_read_unicode): Error if \u sequence prematurely terminated.
8192 2003-01-27  Tom Tromey  <tromey@redhat.com>
8194         * parse.y (java_check_regular_methods): Check for construct after
8195         checking types in throws clause.
8197 2003-01-24  Tom Tromey  <tromey@redhat.com>
8199         * class.c (build_static_field_ref): Only a String or numeric field
8200         can fold to a constant.
8202 2003-01-23  Tom Tromey  <tromey@redhat.com>
8204         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8205         file name in resource buffer.
8207 2003-01-23  Tom Tromey  <tromey@redhat.com>
8209         * expr.c (build_known_method_ref): Use method's context to find
8210         method table index.
8212 2003-01-23  Tom Tromey  <tromey@redhat.com>
8214         * constants.c (set_constant_entry): Allocated cleared memory.
8216 2003-01-22  Tom Tromey  <tromey@redhat.com>
8218         * java-tree.h: Don't use PARAMS.
8219         * resource.c: Add prototypes for all functions.
8220         (write_resource_constructor): Use `const char *' to avoid
8221         warning.
8223 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
8225         * jcf-parse.c (process_zip_dir): Remove unused variable.
8227 2003-01-22  Tom Tromey  <tromey@redhat.com>
8229         * expr.c (build_invokeinterface): Abort if method's context is not
8230         an interface.
8232 2003-01-22  Tom Tromey  <tromey@redhat.com>
8234         * gcj.texi (Input and output files): Mention non-class entries.
8235         * decl.c (java_init_decl_processing): Call
8236         init_resource_processing.
8237         * java-tree.h (compile_resource_data, write_resource_constructor,
8238         compile_resource_file, init_resource_processing): Declare.
8239         * config-lang.in (gtfiles): Added resource.c.
8240         * Make-lang.in (gt-java-resource.h): New target.
8241         (JAVA_OBJS): Added resource.o.
8242         (java/resource.o): New target.
8243         * resource.c: New file.
8244         * class.c (compile_resource_file): Moved to resource.c.
8245         (registerResource_libfunc): Likewise.
8246         (utf8_decl_list): Mark with GTY; now static.
8247         * jcf-parse.c (classify_zip_file): New function.
8248         (parse_zip_file_entries): Use it; compile .properties files.
8249         (process_zip_dir): Use classify_zip_file and compute_class_name.
8250         Don't write class name into zip directory.
8251         (java_parse_file): Call write_resource_constructor.
8252         (compute_class_name): New function.
8253         * jcf-io.c (read_zip_member): Reindented.
8255 2003-01-21  Tom Tromey  <tromey@redhat.com>
8257         * class.c (supers_all_compiled): New function.
8258         (make_class_data): Use it.
8260 2003-01-21  Tom Tromey  <tromey@redhat.com>
8262         * parse.y (method_header): Native method can't be strictfp.
8263         No method can be transient or volatile.
8265 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8267         Make-lang.in (jvspec.o-warn): Add -Wno-error.
8269 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
8271         * check-init.c: Fix comment typos.
8272         * class.c: Likewise.
8273         * constants.c: Likewise.
8274         * decl.c: Likewise.
8275         * except.c: Likewise.
8276         * expr.c: Likewise.
8277         * java-except.h: Likewise.
8278         * java-tree.h: Likewise.
8279         * javaop.h: Likewise.
8280         * jcf-dump.c: Likewise.
8281         * jcf-io.c: Likewise.
8282         * jcf-parse.c: Likewise.
8283         * jcf-write.c: Likewise.
8284         * lang.c: Likewise.
8285         * mangle.c: Likewise.
8286         * typeck.c: Likewise.
8287         * verify.c: Likewise.
8289 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8291         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8292         * jcf-write.c: Include "tm_p.h".
8294 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8296         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8298 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8300         * builtins.c (java_build_function_call_expr): Renamed from
8301         build_function_call_expr.  All callers changed.
8303         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8304         * jcf-parse.c: Include tm_p.h.
8306         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8307         warning.
8309 2003-01-14  Tom Tromey  <tromey@redhat.com>
8311         * class.c (make_class_data): Check that super is compiled before
8312         building class reference to it.
8314 2003-01-14  Andrew Haley  <aph@redhat.com>
8316         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8317         varargs function -- correct.
8319 2003-01-14  Andrew Haley  <aph@redhat.com>
8321         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8323 2003-01-14  Andrew Haley  <aph@redhat.com>
8325         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8326         varargs function -- correct.
8328         * parse.y (patch_assignment): Copy the rhs of an assignment into a
8329         temporary if the RHS is a reference.
8331 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8333         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8334         * keyword.h: Regenerated.
8336         * All Files: Convert to ISO C style function definitions.
8338 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
8340         * parse.y (check_pkg_class_access): ANSIfy definition.
8342 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8344         * decl.c, parse-scan.y, parse.y: Don't cast return value of
8345         xmalloc et al.
8347         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8349 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
8351         Merge from pch-branch:
8353         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
8355         * Make-lang.in (java/gjavah.o): Update dependencies.
8356         * gjavah.c: Include ggc.h.
8358         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
8360         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8361         (JCFDUMP_OBJS): Add ggc-none.o.
8362         (java/jcf-dump.o): Depend on GGC_H.
8363         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8364         CPool substructures.
8365         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8366         * jcf-dump.c: Include ggc.h.
8368         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
8370         * jcf.h (union cpool_entry): New.
8371         (struct CPool): Use gengtype to mark.  Change field 'data' to be
8372         an array of unions.
8373         (struct JCF): Use gengtype to mark.
8374         (CPOOL_UINT): Update for new cpool_entry type.
8375         (CPOOL_USHORT1): Likewise.
8376         (CPOOL_USHORT2): Likewise.
8377         (CPOOL_FINISH): Use GC to free cpool subfields.
8378         * parse.h (struct parser_ctxt): Mark field current_jcf.
8379         * lex.c (java_init_lex): Use GC to allocate struct JCF.
8380         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8381         (main_jcf): Use gengtype to mark.
8382         (ggc_mark_jcf): Delete.
8383         (get_constant): Update for new cpool_entry type.
8384         (give_name_to_class): Likewise.
8385         (get_class_constant): Likewise.
8386         (init_outgoing_cpool): Use GGC to allocate struct CPool.
8387         (java_parse_file): Use GGC to allocate struct JCF.
8388         (init_jcf_parse): Don't call ggc_add_root.
8389         * jcf-reader.c (jcf_parse_constant_pool): Update for new
8390         cpool_entry type.
8391         * java-tree.h (current_jcf): Use gengtype to mark.
8392         (CPOOL_UTF): Update for new cpool_entry type.
8393         (outgoing_cpool): Use gengtype to mark.
8394         (struct lang_type): GC struct JCF and struct CPool.
8395         * config-lang.in (gtfiles): Add jcf.h.
8396         * constants.c (find_tree_constant): New.
8397         (set_constant_entry): Allocate cpool subfields using GGC.  Update
8398         for new cpool_entry type.
8399         (find_constant1): Update for new cpool_entry type.
8400         (find_constant2): Likewise.
8401         (find_utf8_constant): Use find_tree_constant.
8402         (find_class_or_string_constant): Remove unnecessary cast to jword.
8403         Update for new cpool_entry type.
8404         (count_constant_pool_bytes): Update for new cpool_entry type.
8405         (write_constant_pool): Likewise.
8406         (alloc_name_constant): Use find_tree_constant.
8407         (build_constants_constructor): Update for new cpool_entry type.
8409         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
8411         * parse.y (mark_parser_ctxt): Delete.
8412         (goal): Don't use ggc_add_root.
8413         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8414         (java_pop_parser_context): Let GC free parser_ctxt.
8415         (java_parser_context_resume): Likewise.
8416         * parse.h (struct parser_ctxt): Use gengtype to mark.
8417         (ctxp): Likewise.
8418         (ctxp_for_generation): Likewise.
8419         * lex.h (struct java_lc_s): Mark for gengtype.
8420         (java_lexer): Rearrange for gengtype.
8421         * config-lang.in (gtfiles): Add lex.h, parse.h.
8423 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8425         * All Files: Remove PARAMS macro.
8427         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8428         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8429         `__STDC__' macros.
8431         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8432         VA_CLOSE.
8434 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
8436         * Make-lang.in (java.install-common, java.uninstall,
8437         java.install-info, java.install-man): Prepend $(DESTDIR)
8438         to destination paths in all (un)installation commands.
8439         (java.install-common): Rewrite $(LN) command to support
8440         DESTDIR with "ln" as well as with "ln -s".
8442 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
8444         * java-tree.h: Protect against multiple inclusion.
8446 2003-01-07  Tom Tromey  <tromey@redhat.com>
8448         * class.c (add_assume_compiled): Don't adjust parent if we're
8449         already at the root of tree.
8451 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8453         * lang.c (dump_compound_expr): Prototype.
8455 2003-01-03  Tom Tromey  <tromey@redhat.com>
8457         Fix for PR java/8712:
8458         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8459         when simply checking against `null'.
8461 2003-01-03  Tom Tromey  <tromey@redhat.com>
8463         * gcj.texi (Standard Properties): Document http.proxyHost and
8464         http.proxyPort.
8466         * gcj.texi (GNU Classpath Properties): Document new properties.
8468 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
8470         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8471         java/lang-options.h, java/mangle.c, java/mangle_name.c,
8472         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8474 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
8476         * Make-lang.in, boehm.c, buffer.c,
8477           buffer.h, builtins.c, class.c,
8478           config-lang.in, constants.c,
8479           convert.h, decl.c, except.c,
8480           expr.c, java-except.h,
8481           java-tree.h, javaop.def,
8482           jcf-parse.c, jcf-write.c,
8483           jv-scan.c, jvgenmain.c,
8484           jvspec.c, keyword.gperf,
8485           keyword.h, lang-options.h,
8486           lang-specs.h, lang.c, lex.c,
8487           lex.h, mangle.c, mangle_name.c,
8488           parse-scan.y, parse.h, parse.y,
8489           typeck.c, verify.c, xref.c,
8490           xref.h: Replace "GNU CC" with
8491           "GCC" in the copyright header.
8493         * check-init.c, gjavah.c, javaop.h,
8494           jcf-depend.c, jcf-dump.c, jcf-io.c,
8495           jcf-path.c, jcf-reader.c, jcf.h,
8496           zextract.c, zipfile.h: These files are
8497           "part of GCC". Also say "GCC" not "GNU CC".
8499 2002-12-30  DJ Delorie  <dj@redhat.com>
8501         * Make-lang.in: Protect against texi2pod/pod2man failing.
8503 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
8505         * gcj.texi: Use @copying.
8507 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
8509         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8510         print_cxx_classname.
8511         (print_cxx_classname): Add add_scope parameter.
8512         (print_class_decls): Do not emit a semicolon after the extern
8513         "Java" block.
8514         (process_file): Adjust calls to print_cxx_classname.
8516 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8518         * gcj.texi: Include Cover Texts in man page.
8520 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
8522         * class.c (build_static_field_ref): Check FIELD_FINAL.
8524         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8525         instead of current_constant_pool_data_ref.
8526         * java-tree.h (current_constant_pool_data_ref): Undefine.
8527         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8528         * jcf-parse.c (init_outgoing_cpool): Don't initialize
8529         current_constant_pool_data_ref.
8531         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8532         not build_internal_class_name.
8534         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8535         Use it when class ref isn't certain to be compiled.
8537 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8539         * gcj.texi: Include gcc-common.texi.
8540         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8541         $(srcdir)/doc/include/gcc-common.texi.
8543 2002-12-22  Anthony Green  <green@redhat.com>
8545         * gcj.texi (Limitations): Add note about org.xml.sax and
8546         org.w3c.dom.
8548 2002-12-20  Tom Tromey  <tromey@redhat.com>
8550         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8551         where minimum case value is Integer.MIN_VALUE.
8552         Fixes PR java/8955.
8554 2002-12-18  Andrew Haley  <aph@redhat.com>
8556         * parse.y (patch_invoke): Force evaluation order when `check' is
8557         set.  For PR libgcj/8945.
8559 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
8561         * gcj.texi: Change version number to 3.4.
8563 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
8564         Andrew Haley <aph@redhat.com>
8566         * parse.y (source_end_java_method): Remove custom encoding of line
8567         numbers for a function decl before passing it to the back end.
8569 2002-12-03  Andrew Haley  <aph@redhat.com>
8571         * class.c (make_class_data): New field, "chain".
8572         * decl.c (java_init_decl_processing): Likewise.
8574 2002-12-02  Tom Tromey  <tromey@redhat.com>
8576         For PR java/8740:
8577         * parse.y (do_resolve_class): Handle qualified name via
8578         recursion.
8580 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
8582         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8583         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8584         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8585         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8586         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8587         Include coretypes.h and tm.h.
8588         * Make-lang.in: Update dependencies.
8590 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8592         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8594 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8596         * jcf-reader.c: Don't expand JCF_readu4 inside the
8597         expansion of JCF_SKIP.
8599 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8601         * jcf-reader.c: Don't expand JCF_readu4 inside the
8602         expansion of JCF_SKIP.
8604 2002-11-22  Tom Tromey  <tromey@redhat.com>
8606         * parse.y (patch_binop): Cast right hand side of shift expression
8607         to `int'.  Fixes PR java/8676.
8609 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
8610             Andrew Haley <aph@redhat.com>
8612         * gcc/java/jcf-write.c (write_classfile): Remove target
8613         class file, if it exists, before renaming the temporary
8614         class file to it.
8616 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
8618         * jvspec.c (lang_specific_spec_functions): New.
8620 2002-11-18  Tom Tromey  <tromey@redhat.com>
8622         Fix for PR java/7912:
8623         * expr.c (can_widen_reference_to): Allow cast of array to
8624         Cloneable or Serializable.
8625         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8626         (java_io_serializable_identifier_node): Likewise.
8627         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8628         (valid_ref_assignconv_cast_p): Use new identifier nodes.
8629         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8630         java_io_serializable.
8631         * decl.c (java_init_decl_processing): Initialize
8632         java_lang_cloneable_identifier_node and
8633         java_io_serializable_identifier_node.
8634         (java_lang_cloneable_identifier_node): New global.
8635         (java_io_serializable_identifier_node): Likewise.
8637 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
8639         * buffer.c: Remove unnecessary casts.
8640         * check-init.c: Likewise.
8641         * class.c: Likewise.
8642         * constants.c: Likewise.
8643         * decl.c: Likewise.
8644         * except.c: Likewise.
8645         * gjavah.c: Likewise.
8646         * jcf-io.c: Likewise.
8647         * jcf-parse.c: Likewise.
8648         * jcf-path.c: Likewise.
8649         * jvspec.c: Likewise.
8650         * lang.c: Likewise.
8651         * lex.c: Likewise.
8652         * verify.c: Likewise.
8654 2002-11-06  Tom Tromey  <tromey@redhat.com>
8656         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8657         a JNI header.
8659 2002-11-05  Tom Tromey  <tromey@redhat.com>
8661         Fix for PR java/6388.
8662         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8663         * java-tree.h (enum java_tree_index): New values
8664         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8665         (decimal_int_max, decimal_long_max): New defines.
8666         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
8667         (error_if_numeric_overflow): Rewrote range checking.
8668         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8669         decimal_long_max.
8671 2002-11-02  Tom Tromey  <tromey@redhat.com>
8673         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8675         * class.c (make_method_value): Put class name, not signature, into
8676         `throws' field.  For PR java/8415.
8678 2002-10-24  Tom Tromey  <tromey@redhat.com>
8680         * gcj.texi (Invoking gij): Document --showversion.
8681         (Standard Properties): java.library.path now set.
8683 2002-10-23  Tom Tromey  <tromey@redhat.com>
8685         * gjavah.c (decode_signature_piece): In JNI mode, print
8686         `jobjectArray' when array depth is nonzero.
8687         Fixes PR java/8296.
8689 2002-10-15  Andrew Haley  <aph@redhat.com>
8691         * parse.y (patch_invoke): Call force_evaluation_order on a static
8692         arg list.
8693         (resolve_qualified_expression_name): Call force_evaluation_order
8694         on a arg list that is part of a Qualified Expression Name.
8696         * lang.c (dump_compound_expr): New.
8697         (java_dump_tree): New.
8699 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
8701         * gcj.texi: Added item describing the GCJ runtime property
8702         "gnu.gcj.progname".
8704 2002-10-15  Richard Henderson  <rth@redhat.com>
8706         * jcf-parse.c (get_constant): Fix type warning.
8708 2002-10-15  Andrew Haley  <aph@redhat.com>
8710         * java-tree.h (java_inlining_merge_static_initializers): Declare.
8711         (java_inlining_map_static_initializers): Declare.
8713 2002-10-14  Andrew Haley  <aph@redhat.com>
8715         * tree-inline.c (remap_block): All local class initialization
8716         flags go in the outermost scope.
8717         (expand_call_inline): Call java_inlining_map_static_initializers.
8718         (expand_call_inline): Call java_inlining_merge_static_initializers.
8719         * java/lang.c (merge_init_test_initialization): New.
8720         (java_inlining_merge_static_initializers): New.
8721         (inline_init_test_initialization): New.
8722         (java_inlining_map_static_initializers): New.
8724 2002-10-11  Mark Wielaard  <mark@klomp.org>
8726         * gcj.texi (Compatibility): Add Limitations and Extensions section.
8728 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8730         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8732 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8734         * parse.y (merge_string_cste): Add parentheses around & within |.
8736 2002-10-08  Tom Tromey  <tromey@redhat.com>
8738         * parse.y (variable_declarator_id): Simplify error path for
8739         array declarator error.  For PR java/8003.
8741 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
8743         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8744         bug_report_url.
8746 2002-10-08  Andrew Haley  <aph@redhat.com>
8748         * parse.y (attach_init_test_initialization_flags): Check for
8749         error_mark_node.
8751 2002-10-07  Anthony Green  <green@redhat.com>
8753         * parse.y (merge_string_cste): Fix bug in string concatenation.
8755 2002-10-03  Michael Koch  <konqueror@gmx.de>
8757         * gcj.texi (Standard properties):
8758         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8760 2002-10-02  Roger Sayle  <roger@eyesopen.com>
8762         PR optimization/6627
8763         * lang.c (java_init): If storing the vbit in function
8764         pointers, ensure that force_align_functions_log is atleast
8765         one to aid compatability with g++ vtables.
8767 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
8769         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8770         foul of type-based aliasing.
8772 2002-09-30  Anthony Green  <green@redhat.com>
8774         * gcj.texi (Invoking jv-scan): Fix texinfo.
8776 2002-09-28  Anthony Green  <green@redhat.com>
8778         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8779         (Code Generation): Add -fno-assert documentation.
8780         * jv-scan.c (flag_assert): New global.
8781         (options): Add assert option.
8782         (help): Add --no-assert documentation.
8783         * parse-scan.y (flag_assert): New global.
8784         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8785         (flag_assert): New global.
8786         * java-tree.h (flag_assert): New global.
8787         * lex.c (java_lex): Obey flag_assert.
8788         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8789         calling cc1.
8791 2002-09-26  Andrew Haley  <aph@redhat.com>
8793         * expr.c (build_java_array_length_access): Check for null pointer.
8794         * expr.c (expand_java_arrayload): Likewise.
8796 2002-09-21  Richard Henderson  <rth@redhat.com>
8798         * jcf-parse.c (get_constant): Decode from IEEE no matter
8799         what the target format.
8801 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
8803         * ChangeLog: Follow spelling conventions.
8804         * class.c: Likewise.
8805         * decl.c: Likewise.
8806         * expr.c: Likewise.
8807         * gjavah.c: Likewise.
8808         * java-tree.h: Likewise.
8809         * jcf-dump.c: Likewise.
8810         * jcf-parse.c: Likewise.
8811         * jvspec.c: Likewise.
8812         * lang.c: Likewise.
8813         * mangle.c: Likewise.
8814         * parse.y: Likewise.
8816 2002-09-17  Tom Tromey  <tromey@redhat.com>
8818         * lex.c (java_read_unicode_collapsing_terminators): Handle case
8819         where \r appears at EOF.  Fixes PR java/7950.
8821 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
8823         * jvspec.c (lang_specific_driver): Remove unused variable.
8825 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8827         * java-tree.h (union lang_tree_node): Add chain_next option.
8829 2002-09-16  Richard Henderson  <rth@redhat.com>
8831         * jcf-parse.c (get_constant): Runtime check for IEEE format;
8832         use new real.h interface.
8833         * jcf-write.c (find_constant_index): Use new real.h interface.
8834         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8836 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8838         * lang.c: Follow spelling conventions.
8840 2002-09-11  Per Bothner  <per@bothner.com>
8842         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
8843         constant to the type of the field.
8844         (java_complete_tree):  Remove now-redundant code.
8846         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
8848 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
8850         For PR java/5794:
8851         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8852         return label if a ret instruction for the jsr has been reached.
8854 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
8856         * parse.y (DIR_SEPARATOR): Don't define.
8857         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8859 2002-08-28  Andrew Haley  <aph@redhat.com>
8861         * verify.c (verify_jvm_instructions): Allow exception handler
8862         inside code that is being protected, but generate a warning.
8863         * except.c (link_handler): Initialize `expanded' in new eh_range.
8864         (binding_depth, is_class_level, current_pc): Declare extern.
8866 2002-09-01  Mark Wielaard <mark@klomp.org>
8868         * gcj.texi: Add chapter about system properties.
8869         Fixed some typos.
8871 2002-08-26  Tom Tromey  <tromey@redhat.com>
8873         * parse.y (try_builtin_assignconv): Allow narrowing primitive
8874         conversion if RHS_TYPE is byte, short, or char.
8876 2002-08-22  Tom Tromey  <tromey@redhat.com>
8878         * gcj.texi (Invoking gij): Document -cp and -classpath.
8880 2002-08-21  Tom Tromey  <tromey@redhat.com>
8882         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8883         $(prefix)/share.  For PR libgcj/7633.
8885         For PR java/6005 and PR java/7611:
8886         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8887         (java_can_use_bit_fields_p): New function.
8889 2002-08-16  Tom Tromey  <tromey@redhat.com>
8891         * gcj.texi (Class Initialization): Mention class initialization of
8892         arrays.
8894 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
8896         * Make-lang.in (java-tree-inline.o): New.
8897         (JAVA_OBJS): Add java-tree-inline.o.
8898         * parse.y (source_end_java_method): Call java_optimize_inline.
8899         (java_expand_method_bodies): Save method's tree in
8900         DECL_SAVED_TREE.
8901         (add_stmt_to_compound): Keep track of the number of statments.
8902         * lang.c (java_init): Enable flag_inline_trees.
8903         (java_post_options): If flag_inline_functions is on, enable
8904         flag_inline_trees instread.
8905         (decl_constant_value): New.
8906         (java_tree_inlining_walk_subtrees): New.
8907         * java-tree.h (DECL_NUM_STMTS): New macro.
8908         (java_optimize_inline): Declare.
8909         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8910         Handle a LABEL_EXPR.
8911         * decl.c (build_result_decl): If we already have a DECL_RESULT
8912         don't make another.
8913         (dump_function): New.
8914         (java_optimize_inline): New.
8915         (dump_function): New.
8917 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
8919         For PR java/7483:
8920         * parse.y (build_assertion): Invert return from
8921         desiredAssertionStatus.
8923 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8925         * jcf-write.c (get_access_flags): Return correct access flags for
8926         private and protected inner classes.
8928 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8930         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8932 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8934         * mangle_name.c: Don't include obstack.h twice.
8935         * xref.c: Don't include obstack.h.
8937 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8939         * class.c: (permanent_obstack): Delete declaration.
8940         * constants.c: (permanent_obstack): Delete declaration.
8941         * except.c: (permanent_obstack): Delete declaration.
8942         * expr.c: (permanent_obstack): Delete declaration.
8943         * jcf-parse.c: (permanent_obstack): Delete declaration.
8944         (saveable_obstack): Delete declaration.
8945         * parse.h: (permanent_obstack): Delete declaration.
8946         * typeck.c: (permanent_obstack): Delete declaration.
8948 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
8950         * gcj.texi (version-gcc): Increase to 3.3.
8952 2002-07-22  Tom Tromey  <tromey@redhat.com>
8954         * lex.c (java_lex): Check for `e' or `E' after 0.
8956 2002-07-21  Richard Henderson  <rth@redhat.com>
8958         * lang.c (java_unsafe_for_reeval): New.
8959         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8961 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
8963         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8964         (jcf_path_init): Use GET_ENVIRONMENT.
8966 2002-07-10  Roger Sayle  <roger@eyesopen.com>
8967             Zack Weinberg <zack@codesourcery.com>
8969         * builtins.c (initialize_builtins): Remove defines that
8970         handled C/C++ specific junk hereby removed from builtins.def.
8972 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
8974         * lang.c (java_post_options): Update prototype.
8976 2002-07-05  Roger Sayle  <roger@eyesopen.com>
8978         * builtins.c (initialize_builtins): Ignore the additional
8979         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
8980         the builtins.def file.
8982 2002-07-01  Tom Tromey  <tromey@redhat.com>
8984         For PR libgcj/7073:
8985         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8986         specially.
8988 2002-07-01  Roger Sayle  <roger@eyesopen.com>
8990         * java/decl.c (builtin_function): Accept additional parameter.
8991         (java_init_decl_processing): Pass an additional NULL_TREE
8992         argument to builtin_function.
8994 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
8996         * gcj.texi: Fixed gcj invocation example so that it compiles.
8998 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9000         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
9001         * parse.y (mark_parser_ctxt): Likewise.
9002         (check_modifiers, declare_local_variables): Avoid incorrect
9003         hardcoded constant 10.
9005         * lex.c (java_read_char): Avoid "comparison is always true"
9006         warning.
9008 2002-06-25  Andreas Schwab  <schwab@suse.de>
9010         * expr.c (JSR): Avoid undefined operation on PC.
9012 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9014         * decl.c (clear_binding_level): Const-ify.
9016 2002-06-13  Akim Demaille  <akim@epita.fr>
9018         * parse.y (class_declaration, interface_declaration): Make sure
9019         all their rules have an action, in order to avoid meaningless `$$
9020         = $1' and their type clashes.
9022 2002-06-11  Tom Tromey  <tromey@redhat.com>
9024         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
9025         * parse-scan.y (statement_without_trailing_substatement): Added
9026         assert_statement.
9027         (assert_statement): New rule.
9028         * java-tree.h (struct lang_type) [assertions]: New field.
9029         (TYPE_USES_ASSERTIONS): New macro.
9030         (CLASS_USES_ASSERTIONS): Likewise.
9031         (FIELD_SYNTHETIC): New define.
9032         * lex.c (java_lval;): Added ASSERT_TK.
9033         * parse.y (ASSERT_TK): Added.
9034         (statement_without_trailing_substatement): Added assert_statement.
9035         (assert_statement): New rule.
9036         (build_assertion): New function.
9037         (maybe_generate_pre_expand_clinit): Create and initialize
9038         $assertionsDisabled.
9039         (lookup_package_type): Removed decl.
9040         * keyword.h: Rebuilt.
9041         * keyword.gperf (assert): New token.
9043 2002-06-10  Akim Demaille  <akim@epita.fr>
9045         * parse.y (interface_type_list, class_member_declaration)
9046         (unary_expression_not_plus_minus): Remove duplicate %type.
9047         Whitespace changes.
9049 2002-06-09  Tom Tromey  <tromey@redhat.com>
9051         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
9053         * parse.y (method_header): Give error message in all cases.
9054         Fixes PR java/6865.
9056 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9058         Don't use RTL inlining. Fix for PR java/6820.
9059         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
9060         (flag_really_inline): New.
9061         (java_decode_option): Set flag_really_inline if -finline-functions
9062         is seen.
9063         (java_post_options): New function. Turn off inlining unless
9064         flag_really_inline is set.
9066 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9068         * gjavah.c (throwable_p): Accept argument as either a classname or
9069         signature fragment. Create null-terminated classname string for super
9070         when calling itself recursively.
9071         (decode_signature_piece): Skip first character from class name
9072         signature when calling throwable_p.
9074 2002-06-08  H.J. Lu  (hjl@gnu.org)
9076         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
9078 2002-06-04  Tom Tromey  <tromey@redhat.com>
9080         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
9082 2002-06-04  Michael Koch  <konqueror@gmx.de>
9084         * gcj.texi (Input Options): Fixed typo.
9086 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
9088         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
9089         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
9090         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
9091         and all now-pointless local variables.  Rename other local
9092         variables to reflect their not being handles.
9094         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
9095         #if JCF_USE_STDIO blocks.
9097         * parse.y: Add missing semicolon at end of rule.
9099 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
9101         * check-init.c (attach_initialized_static_class): Delete, unused.
9102         * parse.y: Use htab_t instead of struct hashtable, update
9103         all uses.
9104         * java-tree.h: Include hashtab.h instead of hash.h.
9105         (struct lang_decl_func): Use htab_t, set up for gengtype.
9106         (struct init_test_hash_entry): Delete.
9107         (struct treetreehash_entry): New.
9108         (java_treetreehash_find): New
9109         (java_treetreehash_new): New prototype.
9110         (java_treetreehash_create): New prototype.
9111         (java_mark_tree): Delete prototype.
9112         (java_hash_hash_tree_node): Delete prototype.
9113         (java_hash_compare_tree_node): Delete prototype.
9114         (attach_initialized_static_class): Delete prototype.
9115         * expr.c (build_class_init): Update to use java_treetreehash
9116         functions.
9117         (java_expand_expr): Update to use htab_t.
9118         (emit_init_test_initialization): Likewise.
9119         * decl.c (java_mark_tree): Delete.
9120         * class.c (init_test_hash_newfunc): Delete.
9121         (java_hash_hash_tree_node): Delete.
9122         (java_hash_compare_tree_node): Delete.
9123         (add_method_1): Update to use java_treetreehash functions.
9124         (JAVA_TREEHASHHASH_H): New macro.
9125         (java_treetreehash_hash): New function.
9126         (java_treetreehash_compare): New function.
9127         (java_treetreehash_find): New function.
9128         (java_treetreehash_new): New function.
9129         (java_treetreehash_create): New function.
9130         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
9132         * Make-lang.in (java/parse.o): Depend on debug.h.
9133         * java-tree.h (struct lang_identifier): Use gengtype.
9134         (union lang_tree_node): New.
9135         (struct lang_decl_func): Use gengtype.
9136         (struct lang_decl_var): Likewise.
9137         (struct lang_decl): Likewise.
9138         * parse.y: Include debug.h.
9139         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
9141         * lang.c (struct language_function): New dummy structure.
9143         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
9144         descriminator for DECL_LANG_SPECIFIC.
9145         (struct lang_decl_func): Rename from struct lang_decl.
9146         (enum lang_decl_desc): New.
9147         (struct lang_decl): Make it a union.  Update all the accessor macros.
9148         (struct lang_type): Use gengtype.
9149         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
9150         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
9151         are now the same size.
9152         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
9153         use discriminator to mark DECL_LANG_SPECIFIC.
9155         * Make-lang.in (gt-java-builtins.h): New rule.
9156         (java/builtins.o): Add dependency on gt-<filename>.h.
9157         * builtins.c: Use gengtype for roots.
9158         (union string_or_tree): Use gengtype.
9159         (struct builtin_record): Use gengtype.
9160         * config-lang.in (gtfiles): Add builtins.c.
9162         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
9163         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
9164         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
9165         gt-java-parse.h, gtype-java.h): Add rules to generate.
9166         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
9167         (class.o): Add dependency on gt-*.h.
9168         (constants.o): Likewise.
9169         (decl.o): Likewise.
9170         (expr.o): Likewise.
9171         (jcf-parse.o): Likewise.
9172         (jcf-write.o): Likewise.
9173         (lang.o): Likewise.
9174         * config-lang.in (gtfiles): New.
9175         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9176         * constants.c: Replace uses of ggc_add_* with GTY markers.
9177         Include gt-*.h.
9178         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9179         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9180         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
9181         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
9182         Include gt-*.h.
9183         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
9184         Include gt-*.h.
9185         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9186         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
9187         gt-*.h.
9188         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
9189         Include gtype-java.h.
9191 2002-06-02  Tom Tromey  <tromey@redhat.com>
9193         Fix for PR java/5913:
9194         * parse.y (patch_binop): Call patch_string on op1.
9196 2002-06-02  Tom Tromey  <tromey@redhat.com>
9198         Fix for PR java/1343, PR java/6336:
9199         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9200         formatting.  Changed return type.
9201         (anonymous_class_counter): Moved to top of file.
9202         (maybe_make_nested_class_name): Append number to class name for
9203         function-local classes.
9205 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
9207         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9208         * Make-lang.in: Update dependency lists.
9210 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
9212         * gjavah.c (throwable_p): Do not free the name of the class after
9213         passing it to find_class.
9214         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9215         * jcf-io.c (dirent.h): Include it.
9216         (fnmatch.h): Likewise.
9217         (compare_path): New function.
9218         (java_or_class_file): Likewise.
9219         (memoized_dirlist_entry): New type.
9220         (memoized_dirlist_lookup_eq): New function.
9221         (memoized_dirlists): New variable.
9222         (caching_stat): New function.
9223         (memoized_class_lookup_eq): New function.
9224         (memoized_class_lookups): Likewise.
9225         (find_class): Use memoized_class_lookups and caching_stat.
9226         * jcf.h (JCF_USE_SCANDIR): Define.
9227         * parse.y (java_expand_classes): Write the class files in reverse
9228         order.
9230 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9232         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9234 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
9236         * jcf-write.c (write_classfile): Unlink the temporary file if it
9237         cannot be renamed.  Use concat to build up the name of the
9238         temporary file.
9240 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
9242         * jcf-write.c (write_classfile): Write the file to a
9243         temporary file and then rename it.
9245 2002-05-07  Tom Tromey  <tromey@redhat.com>
9247         * gjavah.c (throwable_p): Use xstrdup, not strdup.
9249         Fix for PR java/1200:
9250         * gjavah.c (throwable_p): New function.
9251         (decode_signature_piece): Use it.  A `WeakReference' isn't the
9252         same as a `jweak'.
9253         Include hashtab.h.
9254         (gcjh_streq): New function.
9256 2002-05-07  Andreas Jaeger  <aj@suse.de>
9258         * parse.y (finish_for_loop): Fix if statement.
9260 2002-05-06  Tom Tromey  <tromey@redhat.com>
9262         Fix for PR java/5941:
9263         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9264         loop update expression.
9265         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9266         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9268 2002-05-04  Mark Wielaard  <mark@klomp.org>
9270         For PR java/6519:
9271         * parse.y (build_string_concatenation): Return just op1 only when op2
9272         is null and op1 is a STRING_CST, otherwise always construct a
9273         StringBuffer.
9275 2002-04-27  Tom Tromey  <tromey@redhat.com>
9277         For PR java/6382:
9278         * parse.y (string_convert_int_cst): New function.
9279         (merge_string_cste): Use it.
9281 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9283         * java-tree.h (java_parse_file): Update.
9284         (java_set_yydebug): Remove.
9285         * jcf-parse.c (yydebug): Remove.
9286         (java_set_yydebug): Die.
9287         (java_parse_file): Update.
9288         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9290 2002-04-24  Tom Tromey  <tromey@redhat.com>
9292         For PR java/6425:
9293         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9294         EXPR_WFL_QUALIFICATION of qual_wfl.
9296 2002-04-23  Per Bothner  <per@bothner.com>
9298         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
9299         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
9300         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
9302 2002-04-23  Tom Tromey  <tromey@redhat.com>
9304         For PR java/6314:
9305         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
9306         recognize `-fcompile-resource='.
9307         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
9308         a bit.
9310 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9312         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9313         paths. Fixes PR java/2791.
9315 2002-04-19  Andrew Haley  <aph@redhat.com>
9317         * jcf-write.c (push_long_const): lo, hi: New variables.
9318         Use rshift_double to extract the high part of a 64-bit long.
9319         Use WORD_TO_INT to extract the low part.
9321         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9322         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
9323         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9325 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9327         * typeck.c (incomplete_type_error): Remove.
9329 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9331         * class.c (make_class_data): Set DECL_ALIGN on static class data,
9332         for hash synchronization.
9333         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9334         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9335         class_type_node.
9337 2002-04-16  Mark Wielaard  <mark@klomp.org>
9339         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9340         negative zero.
9342 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9344         Fix for PR java/6294:
9345         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9346         interfaces.
9348 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9350         Fix for PR java/6085:
9351         * parse.y (patch_method_invocation): Always use build_access_to_thisn
9352         to get enclosing "this" argument for inner-class constructor
9353         invocation. Pass correct arguments to build_access_to_thisn.
9355 2002-04-10  Andreas Jaeger  <aj@suse.de>
9357         * gcj.texi (Input Options): Fix extdirs patch.
9359 2002-04-10  Anthony Green  <green@redhat.com>
9361         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9363 2002-04-09  Anthony Green  <green@redhat.com>
9365         * gcj.texi (Input Options): Add --extdirs documentation.
9366         * jcf-dump.c (OPT_extdirs): New macro.
9367         (options): Add extdirs option.
9368         (help): Describe --extdirs.
9369         (main): Handle OPT_extdirs.
9370         * gjavah.c (OPT_extdirs): New macro.
9371         (options): Add extdirs option.
9372         (help): Describe --extdirs.
9373         (main): Handle OPT_extdirs.
9374         * jcf-path.c (jcf_path_init): Add extdirs support.
9375         (jcf_path_extdirs_arg): New function.
9376         (extensions): New variable to hold extensions path entries.
9377         * jvspec.c: Remove -fextdirs= when compiling main().
9378         * lang.c (java_decode_option): Handle -fextdirs=.
9379         * jcf.h (jcf_path_extdirs_arg): Declare new function.
9380         * Make-lang.in: Compile jcf-path with version info for use in
9381         identifying the appropriate libgcj.jar.
9383 2002-04-08  Tom Tromey  <tromey@redhat.com>
9385         For PR libgcj/5303:
9386         * .cvsignore: Added rmic.1 and rmiregistry.1.
9387         * gcj.texi (Top): Link to new nodes.
9388         (Invoking rmic): New node.
9389         (Invoking rmiregistry): Likewise.
9390         * Make-lang.in (java.generated-manpages): Added rmic.1 and
9391         rmiregistry.1.
9392         (java.maintainer-clean): Likewise.
9393         ($(srcdir)/java/rmic.1): New target.
9394         ($(srcdir)/java/rmiregistry.1): Likewise.
9395         (java.install-man): Handle rmic.1 and rmiregistry.1.
9397 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9399         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9400         Add note about handling uncaught exceptions. Add an exception handler
9401         to example.
9403 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9405         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9406         after using it to patch CALL_EXPR.
9408 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9410         * gcj.texi (Invocation): Document CNI invocation API.
9412 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9414         * expr.c (truthvalue_conversion): Rename.  Update.
9415         (expand_compare): Update.
9416         * java-tree.h (java_truthvalue_conversion): New.
9417         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9419 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9421         * java-tree.h (java_mark_addressable): New.
9422         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9423         * typeck.c (mark_addressable): Rename, update.
9425 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9427         * expr.c (build_java_binop): Update.
9428         * java-tree.h (java_signed_type, java_unsigned_type,
9429         java_signed_or_unsigned_type): Update.
9430         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9431         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9432         * parse.y (patch_binop): Update.
9433         * typeck.c (signed_or_unsigned_type, unsigned_type,
9434         signed_type): Update.
9436 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9438         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9439         (java_dummy_print): Remove.
9440         (lang_print_error): Rename.  Exit early if inhibiting output.
9441         (inhibit_error_printing_function): New.
9442         (java_init): Don't set hook.
9443         (lang_init_source): Use new boolean.
9445 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
9447         * parse.y (do_resolve_class): Fix infinite recursion.
9449 2002-03-29  Tom Tromey  <tromey@redhat.com>
9451         * parse.y (check_inner_circular_reference): Ignore incomplete
9452         types.
9454 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9456         * Make-lang.in (builtins.o): Update.
9457         * boehm.c (get_boehm_type_descriptor): Update.
9458         * builtins.c: Include langhooks.h.
9459         * decl.c (java_init_decl_processing): Update.
9460         * java-tree.h (java_type_for_mode, java_type_for_size): New.
9461         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9462         Redefine.
9463         * typeck.c (type_for_mode, type_for_size): Update.
9465 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
9467         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9469 2002-03-28  Tom Tromey  <tromey@redhat.com>
9471         * except.c (expand_end_java_handler): If the handler type is NULL,
9472         use java.lang.Throwable.  Fixes PR java/5986.
9474 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9476         Fix for PR java/4715:
9477         * jcf-parse.c (parse_source_file_3): New function.
9478         (read_class): Call it.
9479         (java_parse_file): Likewise.
9481 2002-03-28  Jan Hubicka  <jh@suse.cz>
9483         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9485 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9487         * parse.y (resolve_package): Initialize "decl".
9488         (lookup_package_type): Remove unused function.
9490 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9492         Fix for PR java/5993:
9493         * parse.y (resolve_package): Return the decl if resolution was
9494         successful. Don't special case "java.lang" and "java.lang.reflect"
9495         packages. Set type_name to the merged identifier.
9496         (resolved_qualified_expression_name): Print error using "name" if
9497         resolve_package returns NULL_TREE.
9499 2002-03-27  Tom Tromey  <tromey@redhat.com>
9501         * expr.c (expand_invoke): Don't generate null pointer check if
9502         we're calling <init>.
9504 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9506         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9507         fix prototype.
9508         * java-tree.h (java_lang_expand_expr): Similarly.
9509         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9510         (java_init): Don't set hook.
9512 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9514         Fix for PR java/5850:
9515         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9516         context if field was not found in the current scope.
9517         * expr.c (lookup_field): Don't look in enclosing contexts.
9519 2002-03-26  Tom Tromey  <tromey@redhat.com>
9521         Fix for PR java/5942:
9522         * parse.y (init_src_parse): Added sanity check.
9523         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9524         elements, not 11.
9526 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9528         * decl.c (lang_mark_tree): Rename java_mark_tree.
9529         * java-tree.h (java_mark_tree): New.
9530         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9532 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
9534         * lex.c: Change java_perform_atof to take normal parameters
9535         instead of a pointer to a parameter block.  Call it directly
9536         from java_lex.
9538 2002-03-22  Mark Wielaard  <mark@klomp.org>
9540         Fix for PR java/5368:
9541         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9542         when printing error message.
9544 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9546         * decl.c (maybe_build_cleanup): Remove.
9548 2002-03-22  Tom Tromey  <tromey@redhat.com>
9550         Andrew Haley  <aph@cambridge.redhat.com>
9552         * expr.c (build_field_ref): Don't build a check if the field is a
9553         member of `this'.
9555 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
9557         Fix for PR java/6026:
9558         * lex.c (java_lex): Fix parsing of consecutive floats.
9560 2002-03-21  Tom Tromey  <tromey@redhat.com>
9562         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9563         class.
9565 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9567         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9568         insert_block, getdecls, kept_level_p, global_bindings_p): New.
9570 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9572         * gcj.texi: @code{gcj} becomes @command{gcj}.
9573         @code{gcc} becomes @command{gcc}.
9574         GcjRaw changed to gnu.gcc.RawData.
9576 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9578         * decl.c (start_java_method): Use new hook.
9579         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9580         (java_init): Remove old hook.
9582 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9584         * builtins.c (define_builtin): Do nothing if `type' is null.
9585         Fixes PR java/5876.
9587 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9589         * parse.y (parser_check_super_interface): Fix error message
9590         grammar/order.
9592 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9594         * jcf-parse.c (get_constant): Delete unused variables.
9596 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9598         * java-tree.h (java_parse_file): New.
9599         * jcf-parse.c (yyparse): Rename java_parse_file.
9600         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9602 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9604         * parse.y (craft_constructor): Return the constructor decl.
9605         (java_expand_classes): Update comments.
9606         (lookup_method_invoke): Call fix_constructors immediately for
9607         anonymous class. Fixes PR java/5935.
9609 2002-03-15  Anthony Green  <green@redhat.com>
9611         * jcf-parse.c (yyparse): Don't emit class registration
9612         constructor when compiling resource files.
9614 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9616         * lang.c (java_tree_code_type, java_tree_code_length,
9617         tree_code_name): Delete.
9618         (tree_code_type, tree_code_length, tree_code_name): Define.
9619         (java_init): Don't try to copy into the various tree_code
9620         arrays.
9622 2002-03-12  Tom Tromey  <tromey@redhat.com>
9624         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9625         UTF-8, not UCS-2.  Fixes PR java/5923.
9627         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9628         a call_expr wrapped in a convert.  Fixes PR java/5848.
9630 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9632         * jcf-write.c (write_classfile): Improve error strings.
9634 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9636         * lex.c: Adjust comments to GNU standards.
9638 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9640         Fix for PR java/5902:
9641         * lex.c (java_lex): Fix parsing of literals.
9643 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9645         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9646         to prevent it getting evaluated twice in the store checking case.
9647         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9648         examining OBJECT.
9650 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9652         * decl.c (java_init_decl_processing): Make sure class_type_node
9653         alignment is not less than 64 bits if hash synchronization is enabled.
9655 2002-03-08  Per Bothner  <per@bothner.com>
9657         * parse.y (java_complete_lhs):  Check if patch_assignment
9658         returned an error-mark.
9660         * parse.y (try_builtin_assignconv):  Don't special-case zero.
9662 2002-03-08  Per Bothner  <per@bothner.com>
9664         Fix for PR java/5812.
9665         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
9666         here instead of in JSR macro.  Likewise with load_type_state call.
9667         Do the latter on if the return_pc has been verified (the jsr returns).
9668         (JSR):  Now just call build_java_jsr.
9670 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
9672         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9673         (java.install-common): Link native driver to
9674         JAVA_TARGET_INSTALL_NAME.
9676 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
9678         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9679         * builtins.c(sin_builtin): Likewise
9680         * builtins.c(sqrt_builtin): Likewise
9682 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
9684         * java/expr.c, java/jcf-parse.c, java/lex.c:
9685         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9686         REAL_ARITHMETIC blocks unconditional.  Delete some further
9687         #ifdef blocks predicated on REAL_ARITHMETIC.
9689 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9691         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9692         explicit sizeof/sizeof.
9693         * decl.c (java_init_decl_processing): Likewise.
9694         * jcf-parse.c (init_jcf_parse): Likewise.
9695         * parse.y (init_src_parse): Likewise.
9697 2002-03-02  Per Bothner  <per@bothner.com>
9699         Make --CLASSPATH by a synonym for --classpath and -classpath.
9700         Implement --bootclasspath.
9701         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
9702         (classpath_l):  Remove.
9703         (jcf_path_CLASSPATH_arg):  Remove.
9704         (jcf_path_bootclasspath_arg):  New function.
9705         (jcf_path_seal):  Simplify accordingly.
9707         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
9708         (jcf_path_CLASSPATH):  Remove declaration.
9709         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
9710         (lang_specific_driver):  Translate -bootclasspath.
9711         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
9712         * lang.c (decode_lang_options):  Do jcf_path_init first.
9713         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
9714         * gjavah.c:  Also handle --bootclasspath.
9715         Handle --CLASSPATH as a synonum for --classpath.
9716         * jcf-dump.c: Likewise.
9718         "." is not part of system path, but is the default for --classpath.
9719         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
9720         (jcf_path_seal):  Add "." if no CLASSPATH specified.
9722         * gcj.texi:  Document changes.
9724 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9726         * expr.c (build_java_arraystore_check): Fix formatting.
9728 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9730         Fix for PR java/5758, java/5632:
9731         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9732         inner-class separator too.
9733         * parse.y (do_resolve_class): New local `decl_result.'
9734         Progressively build a name for what can have been loaded.
9736 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9738         * expr.c (java_array_data_offset): Removed function.
9739         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9740         (build_java_array_length_access): Obtain "length" value using a
9741         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9742         (build_java_arrayaccess): Correct comment. Access "data" using a
9743         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9744         (build_java_arraystore_check): New function.
9745         (expand_java_arraystore): Use build_java_arraystore_check.
9746         * parse.y (patch_assignment): Simplify code to insert a store check
9747         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9748         * check-init.c (check_init): Update to reflect that an array length
9749         access is now a COMPONENT_REF.
9750         * gcj.texi (Code Generation): Improve documentation of
9751         -fno-bounds-check. Add documentation for -fno-store-check.
9752         * java-tree.h (flag_store_check): Declare.
9753         (build_java_arraystore_check): Declare.
9754         * lang.c (flag_store_check): Initialize to 1.
9755         (lang_f_options): Add store-check option.
9756         * jvspec.c: Don't pass store-check option to jvgenmain.
9757         * lang-options.h: Add help string for -fno-store-check.
9759 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9761         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9762         * java-tree.h (java_dup_lang_specific_decl): New.
9763         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9765 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9767         * builtins.c, decl.c: Delete traditional-mode-related code
9768         copied from the C front end but not used, or used only to
9769         permit the compiler to link.
9771 2002-02-22  Tom Tromey  <tromey@redhat.com>
9773         Fix for PR java/2369:
9774         * jvspec.c (verify_class_name): New function.
9775         (lang_specific_driver): Call it.
9776         (JAVA_START_CHAR_P): New macro.
9777         (JAVA_PART_CHAR_P): Likewise.
9779 2002-02-22  Per Bothner  <per@bothner.com>
9781         * class.c:  Change vtable to be more compatible with g++ v3 abi.
9782         (get_dispatch_table):  Prepend offset-to-top (always 0) and
9783         type_info pointer (currently unimplemented hence NULL) to vtable.
9784         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9785         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
9786         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9787         (build_dtable_decl):  Add declarations for new fields.
9789 2002-02-20  Per Bothner  <per@bothner.com>
9791         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9792         to finit$ (otherwise generate_bytecode_insns drops it). However, we
9793         don't need to set it on the COMPOUND_EXPR - the caller does that.
9795 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9797         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9798         `--CLASSPATH' becomes `--classpath.'
9799         * gjavah.c: Likewise.
9800         * jcf-dump.c: Likewise.
9801         * lang-options.h: Likewise.
9802         * lang.c: Likewise.
9803         * jcf-path.c: Updated comment.
9804         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9805         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9806         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9807         (jcf_path_CLASSPATH_arg): Ditto.
9808         (classpath_u): Updated leading comment.
9810 2002-02-20  Per Bothner  <per@bothner.com>
9812         * builtins.c (check_for_builtin):  New function.
9813         (build_call_or_builtin):  Remove.
9814         * java-tree.h:  Update accordingly.
9815         * expr.c (expand_invoke):  Use build + check_for_builtin instead
9816         of build_call_or_builtin.
9817         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
9818         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9819         flag (which had caused jcf-write to incorrectly emit invokevirtual).
9821 2002-02-17  Tom Tromey  <tromey@redhat.com>
9823         * java-tree.h (TYPE_STRICTFP): New macro.
9824         (struct lang_type) [strictfp]: New field.
9825         (CLASS_STRICTFP): New macro.
9826         (METHOD_STRICTFP): New macro.
9827         (struct lang_decl) [strictfp]: New field.
9828         * parse.y (method_header): Disallow strictfp constructor or
9829         abstract method.
9830         (STRICT_TK): Move before MODIFIER_TK.
9831         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9832         (METHOD_MODIFIERS): Likewise.
9833         (INTERFACE_MODIFIERS): Likewise.
9834         * jcf-write.c (get_access_flags): Likewise.
9835         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9836         (add_method_1): Likewise.
9837         (get_access_flags_from_decl): Likewise.
9838         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
9839         recognize strictfp flag.
9840         * jcf.h (ACC_STRICT): New define.
9842 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
9844         * class.c(build_utf8_ref): Move declaration of decl_size
9846 2002-02-07  Tom Tromey  <tromey@redhat.com>
9848         * gcj.texi (Input Options): --CLASSPATH does not suppress system
9849         path.
9851 2002-02-04  Anthony Green  <green@redhat.com>
9853         * class.c (build_utf8_ref): Put UTF-8 constants into merged
9854         sections if available.
9856 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9858         * parse.y (java_expand_classes): Fix typo in static field loop.
9860 2002-02-02  Richard Henderson  <rth@redhat.com>
9862         * class.c (add_field): Mark static fields external.
9863         (build_class_ref): Remove redundant set.
9864         * parse.y (java_expand_classes): Mark static fields of classes
9865         to be compiled as local.
9866         * jcf-parse.c (parse_class_file): Likewise.
9868 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9870         * gcj.texi (About CNI): New node.
9872 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9874         PR java/5080
9875         * jcf-parse.c : Check for HAVE_LOCALE_H before using
9876         setlocale() with LC_CTYPE as a parameter.
9877         * jv-scan.c: Same.
9879 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
9881         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9882         Follow GNU Coding Standards for --version.
9884 2002-01-28  Tom Tromey  <tromey@redhat.com>
9886         * expr.c (build_jni_stub): Ensure storage for `meth' is
9887         generated.
9888         * parse.y (java_complete_expand_methods): Set
9889         current_function_decl before building JNI stub.
9891 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9893         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9894         BUILT_IN_SQRTF.
9896 2002-01-22  Tom Tromey  <tromey@redhat.com>
9898         * decl.c (java_init_decl_processing): Use add_predefined_file.
9899         Predefine RawData.java.
9900         (predef_filenames): Removed.
9901         (java_init_decl_processing): Don't register predef_filenames.
9902         * jcf-parse.c (add_predefined_file): New function.
9903         (predefined_filename_p): Rewrote.
9904         (predefined_filename_p): No longer static.
9905         * decl.c (java_init_decl_processing): Call initialize_builtins.
9906         * Make-lang.in (JAVA_OBJS): Added builtins.o.
9907         (java/builtins.o): New target.
9908         * builtins.c: New file.
9909         * parse.y (patch_invoke): Use build_call_or_builtin.
9910         * java-tree.h (build_call_or_builtin): Declare.
9911         (initialize_builtins): Declare.
9912         (java_set_exception_lang_code): Removed unused declaration.
9913         (PREDEF_FILENAMES_SIZE): Removed.
9914         (java_tree_index): Added JTI_PREDEF_FILENAMES.
9915         (predef_filenames): New define.
9916         (add_predefined_file): Declare.
9917         (predefined_filename_p): Declare.
9918         * expr.c (expand_invoke): Use build_call_or_builtin.
9920 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9922         * parse.y (patch_switch_statement): Fix format specifier.
9924 2002-01-16  Tom Tromey  <tromey@redhat.com>
9926         More for PR java/5365:
9927         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9928         default.
9929         (process_file): Generate include for
9930         java.lang.UnsupportedOperationExceptions.
9932 2002-01-15  Andreas Jaeger  <aj@suse.de>
9934         * .cvsignore: Add man pages.
9936 2002-01-15  Tom Tromey  <tromey@redhat.com>
9938         Fix for PR java/5365:
9939         * gjavah.c (process_file): Turn class name into a file name.
9941 2002-01-14  Matthias Klose  <doko@debian.org>
9943         * gcj.texi: Fix whitespace and formatting errors in the
9944         synopsis of the man pages. Update copyright.
9946 2002-01-14  Tom Tromey  <tromey@redhat.com>
9948         For PR libgcj/5303:
9949         * Make-lang.in (java.install-man): Handle jv-convert man page.
9950         (java.generated-manpages): Added jv-convert.1.
9951         (java.uninstall): Remove jv-convert.1.
9952         (java.maintainer-clean): Likewise.
9953         ($(srcdir)/java/jv-convert.1): New target.
9954         * gcj.texi (Top): Link to jv-convert node.
9955         (Individual utilities): Likewise.
9956         (Invoking jv-convert): New node.
9958 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
9959             Martin Kahlert  <martin.kahlert@infineon.com>
9961         * jcf-parse.c (get_constant): Don't swap lo/hi for big
9962         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9964 2002-01-03  Graham Stott  <grahams@redhat.com>
9966         * class.c (compile_resource_file): Update copyright date.
9967         Constify filename parameter.
9968         (java-tree.h): Update copyright date.
9969         (compile_resource_file): Constify filename parameter.
9971 2002-01-03  Graham Stott  <grahams@redhat.com>
9973         * gcc/jcf-parse.c: Update copyright date.
9974         (yyparse): Constify resource_filename.
9976 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9978         * parse.y (src_parse_roots): Don't needlessly zero init.
9980 2001-12-31  Tom Tromey  <tromey@redhat.com>
9982         * parse.y (dump_java_tree): New function.
9983         (source_end_java_method): Call it.
9984         (end_class_declaration): Likewise.
9985         * lang.c (java_decode_option): Call dump_switch_p.
9987 2001-12-28  Tom Tromey  <tromey@redhat.com>
9989         * gen-table.pl: Don't process characters after \uffff.  Added
9990         comment pointing to input file.
9992 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9994         * gen-table.pl: Const-ify output.  Document the location of a
9995         suitable unicode input file.
9997         * chartables.h: Regenerate.
9999 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10001         * chartables.h: Const-ify.
10002         * gjavah.c (options): Likewise.
10003         * jcf-dump.c (options): Likewise.
10004         * jv-scan.c (options): Likewise.
10005         * lex.c (java_start_char_p, java_part_char_p): Likewise.
10006         * parse.y (binop_lookup): Likewise.
10008 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10010         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
10011         the static arrays that are output.
10012         * jvspec.c (jvgenmain_spec): Make static.
10013         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
10014         * keyword.h: Regenerate.
10015         * lang.c (string_option, process_option_with_no, lang_f_options,
10016         lang_W_options): Const-ify.
10017         * lex.c (java_lex): Likewise.
10019 2001-12-21  Richard Henderson  <rth@redhat.com>
10021         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
10022         (get_boehm_type_descriptor): ... here.  Arrange for the
10023         TREE_TYPE to get set properly.
10025 2001-12-21  Richard Henderson  <rth@redhat.com>
10027         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
10028         only if the target requires collect2.
10030         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
10032 2001-12-20  Tom Tromey  <tromey@redhat.com>
10034         For PR java/4509:
10035         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
10036         CAN_COMPLETE_NORMALLY for the node.
10037         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
10038         generate code for second branch if first branch can't complete
10039         normally.
10040         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
10041         the loop head if the loop body can't complete normally.
10043 2001-12-20  Tom Tromey  <tromey@redhat.com>
10045         For PR java/4766:
10046         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
10047         case where `finally' clause can't complete normally.
10049 2001-12-20  Tom Tromey  <tromey@redhat.com>
10051         Fixes PR java/5057:
10052         * parse.y (analyze_clinit_body): Added this_class parameter.
10053         Check for more cases where we must keep <clinit>.
10054         (maybe_yank_clinit): Cleaned up flow control.
10056 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10058         * decl.c (java_init_decl_processing): Don't initialize
10059         finit_leg_identifier_node.
10060         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
10061         (finit_leg_identifier_node): Remove.
10062         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
10064 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10066         * mangle.c (mangle_member_name): Don't special-case for
10067         NO_DOLLAR_IN_LABEL.
10068         * mangle_name.c (unicode_mangling_length): Likewise.
10069         (append_unicode_mangled_name): Likewise.
10070         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
10071         code.
10073 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10075         * expr.c (build_java_array_length_access): Don't force null pointer
10076         check unless flag_check_references is set.
10078 2001-12-20  Tom Tromey  <tromey@redhat.com>
10080         Fix for PR java/3417:
10081         * parse.y (patch_assignment): Added special processing for
10082         `return'.
10083         (patch_return): Don't convert booleans to integers, and don't
10084         special-case `null'.
10086 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10088         * config-lang.in (diff_excludes): Remove.
10090 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10092         * gcj.texi: Update link to GCC manual.
10094 2001-12-17  Tom Tromey  <tromey@redhat.com>
10096         * parse.y (link_nested_class_to_enclosing): Removed useless
10097         statement.
10099 2001-12-16  Tom Tromey  <tromey@redhat.com>
10101         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
10102         Fixes PR java/5088.
10104 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10106         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
10107         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
10108         spelling errors.
10110 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10112         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
10114 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10116         * decl.c (java_init_decl_processing): Build otable_type correctly.
10117         otable_decl is an otable_type.
10119 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10121         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
10122         otable_type, otable_ptr_type, method_symbol_type,
10123         method_symbols_array_type, method_symbols_array_ptr_type): New
10124         field/global tree definitions.
10125         (flag_indirect_dispatch): New flag.
10126         * decl.c (java_init_decl_processing): Initialize new otable and
10127         otable_syms type nodes and decls. Add new field "index" to
10128         method_type_node.
10129         * class.c (build_method_symbols_entry): New function.
10130         (make_method_value): Set "index" to to method's vtable index for
10131         virtual methods when indirect-dispatch is not used.
10132         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
10133         and set vtable_method_count to -1. Set otable and otable_syms field
10134         if indirect-dispatch is used and there was something to put in them.
10135         (build_method_symbols_entry): New function.
10136         (emit_offset_symbol_table): New function.
10137         * expr.c (get_offset_table_index): New function.
10138         (build_invokevirtual): Build array reference to otable at the index
10139         returned by get_offset_table_index, and use the result as the vtable
10140         offset.
10141         (build_invokeinterface): Similar.
10142         * jcf-parse.c (yyparse): If indirect-dispatch, call
10143         emit_offset_symbol_table at the end of compilation, after all classes
10144         have been generated.
10145         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
10146         * lang.c (flag_indirect_dispatch): Define.
10147         (lang_f_options): Add indirect-dispatch flag.
10149 2001-12-14  Matthias Klose  <doko@debian.org>
10151         * gcj.texi: Markup for man page generation. Document missing
10152         options printed by <tool> --help.
10153         Terminate description of gij's -ms option with a dot.
10154         * Make-lang.in ($(srcdir)/java/*.1): New targets.
10155         (java.generated-manpages java.install-man, java.uninstall,
10156         java-maintainer-clean) Updated.
10158 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
10160         * class.c (get_dispatch_table): Fix java vtable layout
10161         for TARGET_VTABLE_USES_DESCRIPTORS.
10162         * decl.c (java_init_decl_processing): Initialize
10163         alloc_no_finalizer_node, finalize_identifier_node.
10164         * expr.c (class_has_finalize_method): New function.
10165         (expand_java_NEW): Generate calls for finalizer-free allocation.
10166         (build_invokevirtual): Fix java vtable layout for
10167         TARGET_VTABLE_USES_DESCRIPTORS.
10168         * java-tree.h (enum java_tree_index): New entries:
10169         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
10170         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
10171         (class_has_finalize_method): declare.
10172         (HAS_FINALIZER_P): New macro.
10173         * parse.y (patch_invoke): Generate calls for finalizer-free
10174         allocation.
10176 2001-12-12  Matthias Klose  <doko@debian.org>
10178         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
10179         whitespace at end of line.
10181 2001-12-11  Tom Tromey  <tromey@redhat.com>
10183         * lex.c (java_init_lex): Define wfl_to_string as
10184         gnu.gcj.runtime.StringBuffer unless generating bytecode.
10186 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
10188         * class.c (make_method_value): Use null_pointer_node to
10189         represent empty exception table.
10191 2001-12-10  Tom Tromey  <tromey@redhat.com>
10193         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
10195 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
10197         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10199 2001-12-09  Per Bothner  <per@bothner.com>
10201         * check-init.c (current_switch_has_default):  New static field.
10202         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
10203         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
10204         DEFAULT_EXPR seen, simulate a default alternative that copies state.
10206 2001-12-09  Tom Tromey  <tromey@redhat.com>
10208         * check-init.c (check_init): Don't allow pre- or post- increment
10209         or decrement of final variable.
10210         (final_assign_error): Minor error message rewording.
10212 2001-12-08  Tom Tromey  <tromey@redhat.com>
10214         * java-tree.h: Fixed typo.
10216         * gjavah.c (decompile_method): Don't decompile to `return this'
10217         for static methods.
10219         * gjavah.c (cxx_keywords): Re-sorted.
10220         * lex.c (cxx_keywords): Re-sorted.
10222         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10223         else.
10225         * gjavah.c (print_namelet): Clear subnamelets.
10226         (HANDLE_METHOD): Set `method_printed' earlier.
10228 2001-12-07  Tom Tromey  <tromey@redhat.com>
10230         * lang.c (lang_f_options): Added
10231         optimize-static-class-initialization.
10232         (java_decode_option): Removed special case.
10234 2001-12-07  Per Bothner  <per@bothner.com>
10236         * check-init.c (check_init):  Fix typo freeing memory twice.
10238 2001-12-05  Per Bothner  <per@bothner.com>
10240         Restore support for static class initialization optimization.
10241         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10242         * check-init.c (check_int):  At end of BLOCK handle initialization
10243         blocks, which used to be done in java_complete_expand_method but did
10244         not handle the case where check_for_initialization might allocate
10245         more than a word of bits.
10246         * decl.c (lang_make_tree):  The smic field is now a tree.
10247         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
10248         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
10250         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
10252         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10253         Change from a hash table to a list.
10254         (struct_lang_decl):  Change field 'smic' to match.
10255         * class.c (add_method_1):  Initialize
10256         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10257         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
10258         (java_expand_method_bodies): -here, since 'smic' is now a list.
10259         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
10261         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
10263         * class.c (java_hash_compare_tree_node):  Fix casts.
10265 2001-12-04  Per Bothner  <per@bothner.com>
10267         * check-init.c:   Handle definite unassignment to finals in addition
10268         to definite assignment.
10269         (loop_current_locals):  New field.
10270         (num_current_locals, int start_current_locals, num_current_words):
10271         Make static.
10272         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
10273         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10274         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
10275         (get_variable_decl, check_final_reassigned):  New functions.
10276         (check_init, check_bool_init):  Modify as needed for checking finals.
10277         (check_for_initialization):  Take extra parameter and return void.
10278         Do extra start-up logic to check final fields for assignment.
10279         * parse.y (check_static_final_variable_assignment_flag,
10280         reset_static_final_variable_assignment_flag, check_final_assignment,
10281         check_final_variable_local_assignment_flag,
10282         reset_final_variable_indirect_assignment_flag,
10283         reset_final_variable_global_assignment_flag):  Remove functions.
10284         (java_complete_expand_methods, outer_field_access_fix,
10285         patch_assignment): Remove no-longer used logic.
10286         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
10287         * parse.y (register_fields, java_complete_tree):  Update accordingly.
10289         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
10290         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
10291         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
10293         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
10295         * java-tree.h (DECL FINAL):  New bit-field.
10296         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
10297         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
10298         (DECL_INIT_CALLS_THIS):  New macro.
10299         (struct lang_decl):  New bit-field init_calls_this.
10300         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10301         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10302         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
10303         use it for both local variables and final fields.
10304         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
10305         and local_final.
10306         (struct lang_type):  Remove hfv bit-field.
10307         (check_for_initialization):  Change to return void.
10309         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
10310         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
10311         * check-init.c (final_assign_error):  New helper function.
10312         (check_final_reassigned, check_init):  Use it.
10313         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10315         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
10316         bit-fields to unsigned.
10318 2001-12-03  Per Bothner  <per@bothner.com>
10320         * parse.y (patch_binop):  Minor constant folding.
10322         * parse.y (build_current_thisn):  Shorter 'buffer'.
10324 2001-12-03  Per Bothner  <per@bothner.com>
10326         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
10327         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10328         * jcf-write.c (generate_bytecode_insns):  Remove support for
10329         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10330         * check-init.c (check_init):  Likewise.
10332 2001-12-03  Per Bothner  <per@bothner.com>
10334         * verify.c (subroutine_nesting):  New function.
10335         (verify_jvm_instructions):  Use it to fix logic for checking that
10336         we're done with the current subroutine.
10338         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10339         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10341 2001-12-03  Per Bothner  <per@bothner.com>
10343         * jcf.h:  Fix obvious typo in comment.
10344         * typeck.c (build_null_signature):  Add comment.
10346 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10348         * expr.c: Remove leading capital from diagnostic messages, as
10349         per GNU coding standards.
10350         * jcf-io.c: Similarly.
10351         * jcf-parse.c: Similarly.
10352         * jv-scan.c: Similarly.
10353         * jvspec.c: Similarly.
10354         * mangle.c: Similarly.
10356 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
10357             Alexandre Petit-Bianco  <apbianco@redhat.com>
10359         * expr.c (build_java_arrayaccess): Call save_expr on array for
10360         correct evaluation order, modified comment, fixed indentation.
10361         * parse.y: (patch_assignment): Correctly extract the array base
10362         from the tree generate by build_java_arrayaccess, added comments.
10363         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10364         Fixes PR java/3096, PR java/3803, PR java/3965.
10366 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10368         * expr.c (expand_byte_code): Remove trailing periods from messages.
10369         * jcf-parse.c (load_class, jcf_parse): Similarly.
10370         * jcf-write.c (generate_classfile): Similarly.
10371         * lex.c (java_lex): Similarly.
10373 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10375         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10377 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10379         * Make-lang.in (java.generated-manpages): New dummy target.
10381 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10383         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10384         ASM_FINAL_SPEC.
10385         (lang_specific_pre_link): Use set_input to set input_filename.
10386         Append `main' here.
10387         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10388         (main): Fix definition.
10389         Strip `main' from classname.
10390         Fixes PR java/227.
10392 2001-11-18  Roger Sayle <roger@eyesopen.com>
10394         * parse.h (java_expand_switch): Remove old prototype.
10396 2001-11-18  Tom Tromey  <tromey@redhat.com>
10398         Fix for PR java/1401:
10399         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10400         arg0 is null.
10401         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10402         correctly.
10404 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10406         * lang.c (finish_parse): Rename to java_finish.
10407         (LANG_HOOKS_FINISH, java_finish): New.
10409 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10411         * decl.c (init_decl_processing): Rename java_init_decl_processing.
10412         * java-tree.h: New prototype.
10413         * lang.c (java_init): Update prototype.  Combine with old init_parse.
10415 2001-11-13  Tom Tromey  <tromey@redhat.com>
10417         * gjavah.c (method_signature): New global.
10418         (HANDLE_METHOD): Set it.
10419         (decompile_return_statement): New function.
10420         (decompile_method): Use it.
10421         (print_method_info): Removed `synth' argument.
10423 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10425         * java-tree.h (java_set_yydebug): New.
10426         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10427         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10428         (print_lang_decl, print_lang_type, print_lang_identifier,
10429         print_lang_statistics, lang_print_xnode): Remove.
10431 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10433         * jcf-parse.c (init_lex): Remove.
10434         * lang.c (language_string, lang_identify): Remove.
10435         (struct lang_hooks): Constify.
10436         (LANG_HOOKS_NAME): Override.
10437         (init_parse): Update.
10439 2001-11-08  Andreas Franck  <afranck@gmx.de>
10441         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10442         program_transform_name the way suggested by autoconf.
10443         (java.install-common): Also transform auxiliary program names with
10444         program_transform_name.
10446 2001-11-08  Tom Tromey  <tromey@cygnus.com>
10448         * parse.y (trap_overflow_corner_case): New rule.
10449         (unary_expression): Use it.
10450         * lex.c (java_init_lex): Don't set minus_seen.
10451         (yylex): Don't use minus_seen.  Communicate overflow to parser for
10452         it to handle.
10453         (error_if_numeric_overflow): New function.
10454         * parse.h (minus_seen): Removed field.
10455         (JAVA_RADIX10_FLAG): New define.
10457 2001-11-07  Tom Tromey  <tromey@redhat.com>
10459         Patch for PR java/1414:
10460         * parse.y (case_label_list): New global.
10461         (goal): Register case_label_list with GC.
10462         (java_complete_lhs): Save new case on case_label_list.
10463         (patch_switch_statement): Check for duplicate case labels.
10465 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10467         * parse.y (patch_assignment): Removed unused third argument.
10468         (java_complete_lhs): Removed unused third argument to patch_assignment.
10470 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10472         * lang.c: Include langhooks-def.h.
10473         * Make-lang.in: Update.
10475 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
10477         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10479 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10481         * mangle.c (find_compression_record_match): Don't match compression
10482         records for package name elements unless they occur at the start of
10483         the name. Fix for PR java/4717.
10485 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10487         * expr.c (expand_java_field_op): Don't special-case references to
10488         java.lang.PRIMTYPE.TYPE.
10489         (build_primtype_type_ref): Removed.
10490         * java-tree.h (build_primtype_type_ref): Remove prototype.
10491         * parse.y (maybe_build_primttype_type_ref): Removed.
10492         (complete_function_arguments): Don't special-case references to
10493         java.lang.PRIMTYPE.TYPE.
10494         (patch_assignment): Likewise.
10495         (array_constructor_check_entry): Likewise.
10497 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10499         * mangle.c (static tree compression_table): Fixed leading comment.
10500         * parse.h (struct parser_ctxt): Fixed field comment.
10501         * parse.y (check_pkg_class_access): New prototype, fixed leading
10502         comment, new parameter used to emit error only if passed as true.
10503         (parse_check_super): Pass extra argument to check_pkg_class_access.
10504         (do_resolve_class): Likewise.
10505         (process_imports): Likewise.
10506         (read_import_dir): Fixed indentation.
10507         (find_in_imports_on_demand): New local class_type_name. Local
10508         node_to_use deleted. while loop changed into for loop. Report
10509         multiple definition only for accessible classes. Improved error
10510         message.
10511         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10512         assigned to parameter list, fixed indentation. while loop changed
10513         into for loop, restore TREE_CHAIN on local `tem' before the next
10514         iteration.
10516 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10518         * lang.c (lang_get_alias_set): Deleted.
10520 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10522         * gjavah.c (jni_print_char): Fix thinko in last change.
10524         * gjavah.c (jni_print_char, decode_signature_piece): Use
10525         safe-ctype macros and/or fold extra calls into fewer ones.
10526         * lex.c (java_read_unicode, java_lex): Likewise.
10527         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10528         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10529         * mangle_name.c (append_unicode_mangled_name,
10530         unicode_mangling_length): Likewise.
10532 2001-10-17  Richard Henderson  <rth@redhat.com>
10534         * Make-lang.in (java/lang.o): Depend on langhooks.h.
10536 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10538         * lang.c (langhooks.h): Included.
10539         (LANG_HOOKS_INIT): Redefined.
10540         (LANG_HOOKS_INIT_OPTIONS): Likewise.
10541         (LANG_HOOKS_DECODE_OPTION): Likewise.
10542         (struct lang_hooks lang_hooks): New initialization.
10544 2001-10-11  Per Bothner  <per@bothner.com>
10546         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
10547         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10548         The former is simpler, and jcf-write.c handles it better.
10549         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
10550         or WITH_CLEANUP_EXPR.
10551         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
10552         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10554         * parse.y (patch_if_else_statement):  If the condition is constant,
10555         optimize away the test.
10557 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10559         * parse.y (patch_cast): Call patch_string on the first operand of
10560         the incoming node, update it if necessary. Fixes PR java/4510.
10562 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10564         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10565         when name qualifier matches a package name.
10567 2001-10-08  Tom Tromey  <tromey@redhat.com>
10569         Fix for PR java/4489:
10570         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10571         force a new label when computing `body_block'.
10573 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10575         * jcf-io.c (format_uint): Const-ify.
10576         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10577         * lex.c (java_get_line_col): Likewise.
10578         * parse.y (build_incdec): Likewise.
10580 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10582         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10583         a NULL enclosing context if appropriate. Fixes PR java/4466.
10585 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10587         * parse.y (patch_assignment): Use lvalue's original TYPE when
10588         building the final COMPOUND_EXPR.
10589         (try_reference_assignconv): Fixed leading comment.
10591 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10593         * parse.y (check_final_variable_indirect_assignment): For
10594         COMPOUND_EXPR, return only if finals were found initialized
10595         properly, if not, keep on checking.
10596         (check_final_variable_global_assignment_flag): New local
10597         error_found, set when appropriate and used to decide whether to
10598         report uninitialized finals. Fixed typo in comment.
10600 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10602         * decl.c (init_decl_processing): Fixed typo in predef_filenames
10603         last three initializations. Fixes PR java/4360.
10605 2001-09-21  Richard Henderson  <rth@redhat.com>
10607         * class.c (get_dispatch_table): Handle function descriptors.
10608         (build_dtable_decl): Likewise.
10609         * expr.c (build_invokevirtual): Likewise.
10611 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10613         * parse.y (patch_method_invocation): Build class initialization
10614         when static finals are used to qualify method invocation.
10615         Fixes PR java/4366.
10617 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
10619         * parse.h: (WFL_STRIP_BRACKET): Re-written using
10620         build_type_name_from_array_name.
10621         (STRING_STRIP_BRACKETS): New macro.
10622         * parse.y (build_type_name_from_array_name): New function.
10623         (array_creation_expression:): Accumulate []s instead of [s.
10624         (cast_expression:): Accumulate []s instead of [s after cast type
10625         name.
10626         (build_array_from_name): Local string deleted, use
10627         build_type_name_from_array_name.
10628         (build_unresolved_array_type): Accumulate []s instead of [s after
10629         type name.
10630         (register_fields): Fixed comment.
10631         (resolve_class): Local name, base deleted, new locals tname and
10632         array_dims. Use build_type_name_from_array_name. Use array_dims to
10633         build array type.
10634         (purify_type_name): Use STRING_STRIP_BRACKETS.
10636 2001-09-18  Andreas Jaeger  <aj@suse.de>
10638         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10639         * jv-scan.c: Likewise.
10641 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10643         * parse.y (patch_method_invocation): Inner class creation context
10644         check not enforced within constructors. Fixes PR java/1873.
10646 2001-09-16  Tom Tromey  <tromey@redhat.com>
10648         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10649         NOTE_PUSH for single-case push.  Fixes PR java/4189.
10651 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10653         * java-tree.h (TYPE_IMPORT_LIST): New macro.
10654         (TYPE_IMPORT_DEMAND_LIST): Likewise.
10655         (struct lang_type): New fields import_list and import_demand_list.
10656         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10657         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10658         (do_resolve_class): New local saved_enclosing_type, initialized,
10659         passed as parameter to find_in_imports and find_in_imports_on_demand.
10660         (find_in_imports): Added paramater enclosing_type, use its
10661         TYPE_IMPORT_LIST when applicable.
10662         (find_in_imports_on_demand): Added parameter enclosing_type, use
10663         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10664         declaration and initialization.
10665         (fold_constant_for_init): Switch/restore current_class to the
10666         appropriate context.
10668 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
10670         * verify.c (verify_jvm_instructions): Fix typo.
10672 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10674         * expr.c (expand_invoke): Const-ification.
10675         * parse.y (patch_method_invocation): Likewise.
10677 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10679         * gjavah.c (cxx_keywords): Const-ification.
10680         * keyword.gperf (java_keyword): Likewise.
10681         * lang.c (java_tree_code_name): Likewise.
10682         * lex.c (cxx_keywords): Likewise.
10683         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10685 2001-09-11  Richard Henderson  <rth@redhat.com>
10687         * parse.h (ctxp_for_generation): Mark extern.
10689 2001-09-10  Richard Henderson  <rth@redhat.com>
10691         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10693 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10695         * typeck.c (java_array_type_length, build_prim_array_type):
10696         Represent empty arrays by NULL index.
10698 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
10700         * java-tree.h (compile_resource_file): Grouped with other prototypes.
10701         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10703 2001-09-06  Anthony Green  <green@redhat.com>
10705         * class.c (O_BINARY): Define if necessary.
10706         (registerResource_libfunc): Declare.
10707         (init_class_processing): Initilize registerResource_libfunc.
10708         (compile_resource_file): New function.
10709         * java-tree.h (resource_name): Declare.
10710         (compile_resource_file): Declare.
10711         * jcf-parse.c (yyparse): Handle compiling java resource files.
10712         * lang.c (java_decode_option): Handle -fcompile-resource option.
10713         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10714         resource files.
10715         * gcj.texi (Code Generation): Add documentation for -R flag.
10717 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
10719         * jcf-write.c (generate_classfile): Issue an error in case of
10720         field/initial value mismatch.
10721         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10722         being initialized and we're generating bytecode.
10723         (java_complete_lhs): In MODIFY_EXPR section: added comments,
10724         set DECL_INITIAL properly when appropriate.
10725         Fixes PR java/4230
10726         Fixes PR java/4204
10728 2001-09-01  Per Bothner  <per@bothner.com>
10730         * parse.y (maybe_yank_clinit):  A field without an initializer is not
10731         relevant.  All initializers except static final and constant require
10732         <clinit>, regardless of flag_emit_class_files.
10734 2001-08-31  Per Bothner  <per@bothner.com>
10736         * class.c (set_constant_value):  When not emitting class files, then a
10737         String ConstantValue is a utf8const_ptr_type.
10739 2001-08-30  Per Bothner  <per@bothner.com>
10741         * jcf-write.c (generate_classfile):  Check that field is primitive
10742         or string before emitting ConstantValue attribute.
10744 2001-08-30  Per Bothner  <per@bothner.com>
10746         * parse.y (resolve_qualified_expression_name):  If creating a
10747         COMPOUND_EXPR, set it's type correctly.
10749 2001-08-30  Per Bothner  <per@bothner.com>
10751         * jcf-io.c (open_class):  Set filename field.
10753         * jcf-parse,c (parse_class_file):  Set current_function_decl
10754         for better error message when Code attribute is missing.
10756         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
10757         better diagnostics, especially for constructors.
10759 2001-08-30  Per Bothner  <per@bothner.com>
10761         * jcf-write.c (generate_classfile):  Don't write ConstantValue
10762         attribute if field is not final, for compatibility with jdk.
10764         * jcf-write.c (generate_classfile):  Convert ConstantValue values
10765         to correct type.  Work-around for front-end bug.
10766         * class.c (set_constant_value):  Error if constant has wrong type.
10768 2001-08-30  Per Bothner  <per@bothner.com>
10770         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
10771         "Double" are printed at verbosity 1.
10773         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
10775         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
10777 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10779         * parse.y (patch_assignment): Don't verify final re-assignment here.
10780         (java_complete_lhs): Verify assignments to finals calling
10781         patch_assignment. Verify re-assignments to finals before calling
10782         patch_assignment.
10784 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
10786         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10787         Fixes PR java/1413
10789 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
10791         * lex.c (java_lex): new local found_hex_digits. Set and then used
10792         in test to reject invalid hexadecimal numbers.
10793         * parse.y (java_complete_tree): Prevent unwanted cast with
10794         initialized floating point finals.
10795         (patch_binop): Emit a warning when detecting a division by zero,
10796         mark result not constant, don't simplify non integer division.
10798 2001-08-28  Per Bothner  <per@bothner.com>
10800         * jcf-write.c  (generate_bytecode_insns):  For increments and
10801         decrements just recurse to push constant.  Improvement on Mark's patch.
10803 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
10805         * jcf-write.c (generate_bytecode_insns): Generate an integer to
10806         real conversion for increments and decrements of reals.
10808 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10810         * parse.y (resolve_qualified_expression_name): Handle unresolved
10811         qualified expressions, prevent numerical qualifiers, fixed typo.
10812         Fixes PR java/4141
10814 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10816         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10817         don't report anything but deprecated class when marked so. Handle
10818         VAR_DECL.
10819         (patch_method_invocation): Check deprecation on methods and types.
10820         (patch_binop): code becomes an enum tree_code, added default: to
10821         switch to handle that. Detect division by zero, try to fold and
10822         return before using a subroutine.
10824 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10826         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10827         file smaller than 4 bytes.
10828         * parse.y (check_inner_circular_reference): New function.
10829         (check_circular_reference): Likewise.
10830         (array_initializer:): Accept {,}.
10831         (java_check_circular_reference): Rewritten using
10832         check_circular_reference and check_inner_circular_reference.
10833         (java_complete_expand_method): Unconditionally save and restore
10834         the unpurged exception list.
10835         (build_dot_class_method_invocation): Unmangle signature parameter.
10837 2001-08-21  Tom Tromey  <tromey@redhat.com>
10839         * decl.c (init_decl_processing): Add `throws' field to method
10840         descriptor.
10841         * class.c (make_method_value): Compute `throws' field for method.
10843 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10845         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10846         circularity is detected.
10847         (ctors_unchecked_throws_clause_p): Fixed leading comment.
10849 2001-08-17  Richard Henderson  <rth@redhat.com>
10851         * class.c (emit_register_classes): Add align parameter to
10852         call to assemble_integer.
10854 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
10856         * jcf-parse.c (load_class): New locals saved and class_loaded. If
10857         loading a class_or_name fails, try considering an innerclass name
10858         and load the enclosing context.
10859         * parse.y (resolve_inner_class): New function.
10860         (find_as_inner_class): Added leading comment.
10861         (register_incomplete_type): Keep the current context as enclosing
10862         context for JDEP_FIELD dependencies.
10863         (do_resolve_class): Locals new_class_decl and super initialized to
10864         NULL. Call resolve_inner_class, explore the enclosing context
10865         superclass if necessary.
10866         Fixes PR java/4007
10868 2001-08-16  Tom Tromey  <tromey@redhat.com>
10870         * jcf-dump.c (main): Updated for change to jcf_path_seal.
10871         * gjavah.c (main): Updated for change to jcf_path_seal.
10872         * lang.c (version_flag): New global.
10873         (java_decode_option): Recognize `-version'.
10874         (java_init): Update for change to jcf_path_seal.
10875         * jcf.h (jcf_path_seal): Added `print' argument.
10876         * jcf-path.c (jcf_path_seal): Added `print' argument.
10878 2001-08-13  Zack Weinberg  <zackw@panix.com>
10880         * Make-lang.in (java/decl.o): Update dependencies.
10881         * decl.c: Include libfuncs.h, don't include toplev.h.
10883 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10885         * decl.c (init_decl_processing): exception_type_node,
10886         class_not_found_type_node, and no_class_def_found_type_node
10887         initialized. predef_filenames augmented accordingly.
10888         instinit_identifier_node initialized.
10889         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10890         * java-tree.h (enum java_tree_index): New entries
10891         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10892         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10893         (exception_type_node): New macro.
10894         (class_not_found_type_node): Likewise.
10895         (no_class_def_found_type_node): Likewise.
10896         (instinit_identifier_node): Likewise.
10897         (PREDEF_FILENAMES_SIZE): Adjusted.
10898         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10899         (struct lang_type): Fixed typo in bitfield name.
10900         (DECL_INSTINIT_P): New macro.
10901         (ID_INSTINIT_P): Likewise.
10902         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10903         attribute.
10904         * parse.y (encapsulate_with_try_catch): New function.
10905         (generate_instinit): Likewise.
10906         (build_instinit_invocation): Likewise.
10907         (ctors_unchecked_throws_clause_p): Likewise.
10908         (add_instance_initializer): Deleted.
10909         (build_instance_initializer): Likewise.
10910         (in_instance_initializer): Likewise.
10911         (check_method_redefinition): instinit$ not to be verified.
10912         (java_complete_expand_methods): Generate instinit$, simplified code.
10913         (build_dot_class_method): Eliminated unnecessary locals. Use
10914         encapsulate_with_try_catch, removed unnecessary code.
10915         (fix_constructors): New local iii. Use build_instinit_invocation.
10916         (patch_method_invocation): Added comment.
10917         (maybe_use_access_method): Don't consider instinit$.
10918         (find_applicable_accessible_methods_list): Shorten the search for
10919         instinit$ too.
10920         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10921         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10922         (patch_throw_statement): Likewise. Fixed typo.
10924 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
10926         Revert:
10927         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10928         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10929         ASM_FINAL_SPEC.
10930         (lang_specific_pre_link): Use set_input to set input_filename.
10931         Append `main' here.
10932         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10933         (main): Fix definition.
10934         Strip `main' from classname.
10935         Fixes PR java/227.
10937 2001-08-11  Zack Weinberg  <zackw@panix.com>
10939         * lex.h: Don't include setjmp.h.  Don't define
10940         SET_FLOAT_HANDLER or prototype set_float_handler.
10942 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10944         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10945         `poplevel' in the right order.
10947 2001-08-09  Richard Henderson  <rth@redhat.com>
10949         * Make-lang.in (class.o): Depend on TARGET_H.
10950         * class.c (emit_register_classes): Use target hooks instead of
10951         assemble_constructor and assemble_destructor.
10953 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
10955         * check-init.c (flags.h): Include
10956         (check_init): Don't report uninitialized static class
10957         initialization flags, don't free bit index when doing static class
10958         initialization optimization.
10959         (check_for_initialization): Return type changed to `unsigned int.'
10960         (attach_initialized_static_class): New function.
10961         * class.c (add_method_1): Create the initialized static class
10962         table if necessary.
10963         (finish_class): Always emit deferred inline methods.
10964         * decl.c (emit_init_test_initialization): Moved to expr.c
10965         (complete_start_java_method): Don't traverse
10966         DECL_FUNCTION_INIT_TEST_TABLE.
10967         (lang_mark_tree): Mark hash tables in function decls.
10968         * expr.c (emit_init_test_initialization): Moved from decl.c.
10969         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10970         initialization flag, set DECL_CONTEXT and
10971         LOCAL_CLASS_INITIALIZATION_FLAG.
10972         (java_lang_expand_expr): Emit initialization code for static class
10973         initialized flags when entering block, if necessary.
10974         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10975         * java-tree.h (flag_optimize_sci): New global variable declaration.
10976         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10977         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10978         (LOCAL_FINAL_P): Fixed typo in comment.
10979         (FINAL_VARIABLE_P): Likewise.
10980         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10981         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10982         (struct lang_decl): New fields `ict', `smic' and `cif.'
10983         (check_for_initialization): New returned value for global.
10984         (attach_initialized_static_class): New global function.
10985         (STATIC_CLASS_INIT_OPT_P): New macro.
10986         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10987         * lang.c (java_decode_option): Handle
10988         `-fno-optimize-static-class-initialization'
10989         * parse.y (start_complete_expand_method): New function.
10990         (java_expand_method_bodies): Likewise.
10991         (attach_init_test_initialization_flags): Likewise.
10992         (adjust_init_test_initialization): Likewise.
10993         (emit_test_initialization): Likewise.
10994         (java_complete_expand_methods): Nullify abstract and native method
10995         bodies.
10996         (java_complete_expand_method): New locals `fbody', `block_body'
10997         and `exception_copy.' Reorganized: directly return on empty method
10998         bodies, call `start_complete_expand_method', remember definitely
10999         initialized static class in function, don't expand method bodies.
11000         (java_expand_classes): Call `java_expand_method_bodies' before
11001         `finish_class' when compiling to native.
11002         (resolve_expression_name): Use `orig' after building outer class
11003         field access.
11004         (patch_invoke): Remember static method invocations.
11006 2001-08-06  Richard Henderson  <rth@redhat.com>
11008         * class.c (emit_register_classes): Pass a symbol_ref and priority
11009         to assemble_constructor.
11011 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
11013         * java-tree.h (all_class_filename): New macro.
11014         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
11015         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
11016         newly created IDENTIFIER_NODE to `all_class_filename.'
11018 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
11020         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
11021         Use ggc_add_tree_root to register roots.
11023 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11025         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
11026         second operand calling check_init.
11027         * decl.c (complete_start_java_method): Swaped second and third
11028         arguments while creating WITH_CLEANUP_EXPR node.
11029         * jcf-write.c (generate_bytecode_insns): Use second operand
11030         instead of third when handling WITH_CLEANUP_EXPR.
11031         * parse.y (java_complete_lhs): Expand second operand of
11032         WITH_CLEANUP_EXPR nodes.
11033         (patch_synchronized_statement): Swaped second and third arguments
11034         while creating WITH_CLEANUP_EXPR node.
11036 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
11038         * parse.y (create_interface): Avoid cyclic inheritance report when
11039         syntax error encountered during class definition.
11040         Fixes PR java/2956
11042 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
11044         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
11045         ASM_FINAL_SPEC.
11046         (lang_specific_pre_link): Use set_input to set input_filename.
11047         Append `main' here.
11048         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
11049         (main): Fix definition.
11050         Strip `main' from classname.
11051         Fixes PR java/227.
11053 2001-07-18  Tom Tromey  <tromey@redhat.com>
11055         For PR java/2812:
11056         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
11057         * lex.c (java_new_lexer): Use ICONV_CONST.
11058         (java_read_char): Likewise.
11059         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
11060         (jv-scan$(exeext)): Likewise.
11062 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
11064         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
11065         * parse.y (check_class_interface_creation): Allow `private' if the
11066         enclosing is not an interface.
11067         (create_interface): Interface tagged public if the enclosing
11068         context is an interface.
11069         (create_class): Class tagged public if the enclosing context
11070         is an interface.
11071         Fixes PR java/2959
11073 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
11075         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
11076         Fixes PR java/2665
11078 2001-07-14  Tim Josling  <tej@melbpc.org.au>
11080         * check-init.c (check_init): Remove references to EXPON_EXPR.
11082 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
11084         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
11085         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
11086         Fixes PR java/3602
11088 2001-07-13  Tom Tromey  <tromey@redhat.com>
11090         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
11091         invocation.
11093 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
11095         * parse.y (patch_method_invocation): Don't override primary if one
11096         is already provided, but let this$<n> be built. Fixed comment.
11098 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
11100         * parse.y (empty_statement:): Report empty statement error only
11101         when found at class declaration level.
11102         Fixes PR java/3635
11104 2001-07-12  Tom Tromey  <tromey@redhat.com>
11106         * expr.c (expand_load_internal): New function.
11107         (LOAD_INTERNAL): Use it.
11109 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
11111         * parse.y (verify_constructor_super): Compare anonymous class ctor
11112         args with `valid_method_invocation_conversion_p.'
11113         Fixes PR java/3285
11115 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
11117         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
11118         `-fsyntax-only.' Fixes PR java/3248
11120 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
11122         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
11124 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
11126         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
11127         current function is static. Fixes PR java/1970
11129 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11131         * parse.y (patch_method_invocation): Add enclosing context to ctor
11132         calls if necessary. Fixes PR java/2953
11134 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11136         * parse.y (resolve_package): Abort if qualified expression member
11137         isn't right.
11138         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
11139         Fixes PR java/1391
11141 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
11143         * verify.c: Don't use // comments.
11145 2001-07-05  Tom Tromey  <tromey@redhat.com>
11147         * lang.c (flag_assume_compiled): Removed.
11148         * java-tree.h (flag_assume_compiled): Removed.
11149         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
11150         -fhash-synchronization, -fuse-divide-subroutine,
11151         -fcheck-references, -femit-class-file, -femit-class-files,
11152         -fassume-compiled.  Updated --encoding information.  Changed
11153         -foutput-class-dir to `-d'.
11155 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
11157         * jcf-parse.c (parse_class_file): Add lineno parameter to
11158         debug_start_source_file call.
11160 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11162         * gcj.texi: Use gpl.texi.
11163         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
11164         dependencies and use doc/include in search path.
11166 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
11168         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
11169         `this'.  If so, don't build instance initializers.
11171 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
11173         * parse.y (resolve_expression_name): Improved error message for
11174         inner class cases. Fixes PR java/1958
11176 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
11178         * lang.c: #include diagnostic.h
11179         (lang_print_error): Add a `diagnostic_context *' parameter.
11180         (java_dummy_print): Likewise.
11181         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
11183 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
11185         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
11186         * jcf.h (typedef struct JCF): New bitfield `finished.'
11187         (JCF_FINISH): Set `finished.'
11188         (JCF_ZERO): Reset `finished.'
11189         Fixes PR java/2633
11191 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
11193         * parse.y (class_body_declaration:): Don't install empty instance
11194         initializers.
11195         Fixes PR java/1314
11197 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
11199         * class.c (set_super_info): Call `set_class_decl_access_flags.'
11200         (set_class_decl_access_flags): New function.
11201         * java-tree.h (set_class_decl_access_flags): New prototype.
11202         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11203         (parse_class_file): New local `decl_max_locals.' Take wide types
11204         into account to compute DECL_MAX_LOCALS.
11205         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11206         imports on demand.
11208 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
11210         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11212 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11214         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11215         * parse.y (do_resolve_class): Moved comments out to leading comment
11216         section. Removed local `start', New local `_ht' and
11217         `circularity_hash.'  Record `enclosing' in hash table and search
11218         it to detect circularity.  Use `enclosing' as an argument to
11219         `lookup_cl.' Free the hash table when done.
11221 2001-06-19  Tom Tromey  <tromey@redhat.com>
11223         * lex.c (java_read_char): Disallow invalid and overlong
11224         sequences.  Fixes PR java/2319.
11226 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
11228         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11230 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11232         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11233         arguments accordingly.
11235 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11237         * gcj.texi: Move contents to just after title page.
11239 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
11241         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11242         builtin type.
11243         (patch_incomplete_class_ref): Build the class ref, build the class
11244         init if necessary, complete the tree.
11245         Fixes PR java/2605
11247 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11249         * parse.y (lookup_field_wrapper): Test `name' code.
11250         (resolve_qualified_expression_name): Test `qual_wfl' code.
11251         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11252         handle `qual_wfl' by code.
11253         (maybe_build_primttype_type_ref): Test `wfl' code.
11255 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11257         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11258         fdl.texi.
11259         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
11260         the dvi file in the java directory.
11262 2001-05-25  Sam TH  <sam@uchicago.edu>
11264         * gen-table.pl javaop.h jcf.h lex.h,
11265         parse.h: Fix header include guards.
11267 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
11269         * jv-scan.c (version): Update copyright year.
11271 2001-05-21  Per Bothner  <per@bothner.com>
11273         * jcf-parse.c (read_class):  If class is from .class or .zip file
11274         and it's already been read, don't push/pop parser context.
11276 2001-05-18  Per Bothner  <per@bothner.com>
11278         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
11279         command line so the jvgenmain-generated main program comes first.
11281 2001-05-15  Tom Tromey  <tromey@redhat.com>
11283         * class.c (build_utf8_ref): Don't generate identifier based on
11284         utf8const contents.
11286 2001-05-12  Richard Henderson  <rth@redhat.com>
11288         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11289         * expr.c (java_lang_expand_expr): Expand it.
11290         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11291         calling build_exception_object_ref.
11292         * parse.y (catch_clause_parameter): Likewise.
11293         (build_dot_class_method): Likewise.
11294         (try_reference_assignconv): Likewise.
11295         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11296         * jcf-write.c (generate_bytecode_insns): Likewise.
11298 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
11300         * parse.y (build_unresolved_array_type): Set
11301         EXPR_WFL_QUALIFICATION on the newly created wfl.
11302         Fixes PR java/2538. Fixes PR java/2535.
11304 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
11306         * parse.y (fix_constructors): Removed unnecessary assignment to
11307         local. Moved assignment to `this$<n>', fixed comments and
11308         indentation.
11309         (build_wfl_wrap): Fixed indentation.
11310         Fixes PR java/2598, java/2579 and java/2658.
11312 2001-05-03  Mo DeJong  <mdejong@redhat.com>
11314         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11315         check for byte swap.
11317 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
11319         * expr.c (build_class_init): Move MODIFY_EXPR
11320         outside of COND_EXPR.  Remove variable `call'.
11322 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11324         * decl.c: NULL_PTR -> NULL.
11325         * jcf-write.c: Likewise.
11327 2001-05-01  Tom Tromey  <tromey@redhat.com>
11329         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11330         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11331         * gcj.texi: Updated copyright text.  Include fdl.texi.
11332         (Top): Link to new node.
11334 2001-05-01  Per Bothner  <per@bothner.com>
11336         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
11338 2001-05-01  Per Bothner  <per@bothner.com>
11340         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
11341         import_list contains the name, not the TREE_PURPOSE.
11343 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11345         * jcf-io.c (read_zip_member): Cast to long in comparison with
11346         signed value.
11348         * jvspec.c (lang_specific_driver): Initialize variables.
11350         * mangle.c (find_compression_record_match): Likewise.
11352         * typeck.c (build_null_signature): Provide static prototype.  Mark
11353         parameter with ATTRIBUTE_UNUSED.
11355         * verify.c (verify_jvm_instructions): Initialize variable.
11357 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11359         * parse.y (do_resolve_class): Check for cyclic inheritance during
11360         inner class resolution.
11362 2001-04-27  Per Bothner  <per@bothner.com>
11364         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
11365         while iterating, since that could cause gc to lose stuff.
11367 2001-04-26  Per Bothner  <per@bothner.com>
11369         Fix method search wrt scope of inner classes to match JLS2.
11370         * typeck.c (build_null_signature):  New static function.
11371         (has_method):  New function.  Uses build_null_signature and lookup_do.
11372         * java-tree.h (has_method):  New declaration.
11373         * parse.y (find_applicable_accessible_methods_list):  Do not search
11374         context of inner classes here.
11375         (patch_method_invocation):  Search scope, ie. current and outer clases,
11376         for method matching simple name, to find class.
11378 2001-04-26  Per Bothner  <per@bothner.com>
11380         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11381         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
11383         * constants.c (find_methodref_with_class_index):  New function.
11384         (find_methodref_index):  Use find_methodref_with_class_index.
11385         * java-tree.h (find_methodref_with_class_index):  New declaration.
11386         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
11387         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11388         If context changed from interface to class, don't use invokeinterface.
11390 2001-04-25  Per Bothner  <per@bothner.com>
11392         * verify.c (verify_jvm_instructions):  For field instructions,
11393         check that field index is valid.  For invoke instructions, check that
11394         method index is valid.
11396 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
11398         * config-lang.in (target_libs): Copy from $libgcj_saved.
11400 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11402         * decl.c (init_decl_processing): Add new class "protectionDomain"
11403         field.
11404         * class.c (make_class_data): Set initial value for "protectionDomain".
11406 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11408         * jvspec.c (lang_specific_driver): Fix memory allocation
11409         deficit, by using concat in lieu of xmalloc/sprintf.
11411 2001-04-20  Per Bothner  <per@bothner.com>
11413         Fixes to compile multiple .class files at once.
11414         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
11415         * java-tree.h (CLASS_PARSED_P):  New macro.
11416         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11417         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
11418         (read_class):  Avoid some code duplication.
11419         Don't call JCF_FINISH for a .class file - might be needed later.
11420         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
11421         rather than CLASS_LOADED_P, since latter implies class laid out.
11422         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
11423         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
11425 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11427         * Make-lang.in (java/boehm.o): Depend on toplev.h.
11429         * boehm.c: Include toplev.h.
11431 2001-04-06  Tom Tromey  <tromey@redhat.com>
11432             Alexandre Petit-Bianco  <apbianco@redhat.com>
11434         Fix for PR gcj/1404 and PR gcj/2332:
11435         * parse.y (build_array_from_name): If we use the type_wfl then
11436         accumulate dimensions from the original type as well.
11437         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11439 2001-04-06  Tom Tromey  <tromey@redhat.com>
11441         * parse.y (analyze_clinit_body): Return true if the second operand
11442         of a METHOD_EXPR is nonzero.
11444 2001-04-06  Tom Tromey  <tromey@redhat.com>
11446         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11447         directory.
11448         ($(srcdir)/java/parse.c): Likewise.
11450 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
11452         * gcj.texi: Use `which-gcj' instead of `which-g77.'
11453         (version-gcc): Initialized.
11454         (which-gcj): Likewise.
11456 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11458         * java-tree.h (struct lang_decl): New macro
11459         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11460         * parse.y (build_instance_initializer): New function.
11461         (add_instance_initializer): Use it.
11462         (java_fix_constructors): Set `current_class' before fix pass.
11463         (fix_constructors): Just return if already fixed. Move `super()'
11464         invocation ahead. Use `build_instance_initializer.'
11465         Fixes PR java/1315.
11467 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11469         * parse.y (resolve_qualified_expression_name): Pass field's
11470         DECL_CONTEXT to `not_accessible_p.'
11471         (not_accessible_p): Changed parameters order in `inherits_from_p'
11472         invocation.
11474 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
11476         * lang-options.h: Add flag_check_references.
11478 2001-04-04  Per Bothner  <per@bothner.com>
11480         * java-tree.h (CONSTANT_VALUE_P):  New macro.
11481         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
11482         * parse.y (maybe_build_class_init_for_field):  New static function.
11483         (resolve_expression_name, resolve_field_access):  Use
11484         maybe_build_class_init_for_field instead of build_class_init
11485         This does not do the init if the field is compile-time-constant.
11486         (resolve_field_access):  Simplify.
11488         * parse.y (fold_constant_for_init):  Merge test into switch.
11490 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
11492         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11493         on gansidecl.h.
11494         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11496 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
11498         * expr.c (pop_type_0): Save the result of the first
11499         lang_printable_name call in a scratch buffer, so it
11500         won't be clobbered by the second call.
11502 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
11504         * parse-scan.y (array_type:): Rewritten.
11505         (type_declaration:): `empty_statement' replaces `SC_TK.'
11506         (class_member_declaration:): `empty statement' added.
11507         (method_body:): Simplified.
11508         (static_initializer:): Likewise.
11509         (primary_no_new_array:): Use `type_literals.'
11510         (type_literals:): New rule.
11511         (dims:): Set and update `bracket_count.'
11512         Fixes PR java/1074. Fixes PR java/2412.
11514 2001-03-28  Hans Boehm  <boehm@acm.org>
11516         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11517         (get_boehm_type_descriptor): Set type on returned value to be a
11518         pointer length integer.
11520 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11522         * expr.c (pop_type_0): Call `concat' rather than building the
11523         string manually.
11524         (pop_type): Add format specifier in call to `error'.
11526         * parse.y (patch_method_invocation): Avoid casting away
11527         const-ness.
11529 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
11531         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11533 2001-03-28  Richard Henderson  <rth@redhat.com>
11535         IA-64 ABI Exception Handling:
11536         * Make-lang.in (except.o): Don't depend on eh-common.h.
11537         * check-init.c (check_init): Handle EXC_PTR_EXPR.
11538         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11539         [soft_exceptioninfo_call_node]: Remove.
11540         [eh_personality_libfunc, lang_eh_runtime_type]: New.
11541         (end_java_method): No emit_handlers.
11542         * except.c (java_set_exception_lang_code): Remove.
11543         (method_init_exceptions): Don't call it.
11544         (prepare_eh_table_type): No CATCH_ALL_TYPE.
11545         (build_exception_object_ref): New.
11546         (expand_end_java_handler): Update for except.h name changes.
11547         (emit_handlers, expand_resume_after_catch): Remove.
11548         * expr.c (java_lang_expand_expr): Update for except.h name changes.
11549         (process_jvm_instruction): Use build_exception_object_ref.
11550         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11551         (soft_exceptioninfo_call_node): Remove.
11552         (build_exception_object_ref): Declare.
11553         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11554         soft_exceptioninfo_call_node.  Move processing ...
11555         [EXC_PTR_EXPR]: ... here.
11556         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11557         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11558         (source_end_java_method): No java_set_exception_lang_code or
11559         emit_handlers.
11560         (build_dot_class_method): Use build_exception_object_ref.
11561         (try_reference_assignconv): Check EXC_PTR_EXPR not
11562         soft_exceptioninfo_call_node.
11564 2001-03-28  Richard Henderson  <rth@redhat.com>
11566         * java-tree.h (throw_node): Define as a single member of
11567         java_global_trees instead of a separate array.
11568         (JTI_THROW_NODE): New.
11569         * decl.c (throw_node): Don't declare.
11570         (init_decl_processing): Init a scalar throw_node.
11571         Don't register it for gc.
11572         * check-init.c (check_init): Reference scalar throw_node.
11573         * expr.c (build_java_athrow): Likewise.
11574         * jcf-write.c (generate_bytecode_insns): Likewise.
11575         * parse.h (BUILD_THROW): Likewise.
11577 2001-03-28  Richard Henderson  <rth@redhat.com>
11579         * decl.c (end_java_method): Do not save and restore
11580         flag_non_call_exceptions.
11581         * parse.y (source_end_java_method): Likewise.
11582         * lang.c (flag_exceptions): Don't declare.
11583         (java_init_options): Set flag_non_call_exceptions.  Set
11584         flag_exceptions here ...
11585         (java_init): ... not here.
11587 2001-03-27  Richard Henderson  <rth@redhat.com>
11589         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11590         exceptions_via_longjmp.
11592         * lang.c (flag_new_exceptions): Don't declare it.
11593         (java_init_options): Or set it.
11595 2001-03-27  Richard Henderson  <rth@redhat.com>
11597         * decl.c (end_java_method): Rename asynchronous_exceptions to
11598         flag_non_call_exceptions.
11599         * parse.y (source_end_java_method): Likewise.
11601 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11603         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11605 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11607         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11609 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
11611         * parse.y (find_as_inner_class): Follow current package
11612         indications not to mistakingly load an unrelated class.
11614 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11616         * constants.c (PUTN): Use memcpy, not bcopy.
11618         * lex.c (java_read_char): Use memmove, not bcopy.
11620         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11622 2001-03-23  Per Bothner  <per@bothner.com>
11624         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
11625         macro for better error pin-pointing.
11626         * java-tree.h:  Fix typo in comment.
11628         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
11629         Don't include jsr/goto in exception range.
11630         Check if start and end of exception range are the same (also TRY_EXPR).
11631         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11632         However, do emit the following goto even if try_block is empty.
11633         Defer freeing exception_decl until after the finalizer, to make
11634         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
11636         * parse.y (java_complete_lhs):  If the try-clause is empty, just
11637         return the finally-clause and vice versa.
11639 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
11641         * gcj.texi (Input Options): documented the check for attribute
11642         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11643         * java-tree.h (flag_force_classes_archive_check): Declared extern.
11644         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11645         (jcf_parse): Check for the right classes archive if necessary.
11646         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11647         (jcf_parse_fields): Fixed indentation.
11648         * jcf-write.c (append_gcj_attribute): New function.
11649         (generate_classfile): Compute the attribute count, invoke
11650         `append_gcj_attribute'.
11651         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11652         turned into bit-fields. New bit-field `right_zip.'
11653         (JCF_ZERO): Set `right_zip' to zero.
11654         * lang-options.h (-fforce-classes-archive-check): Added flag.
11655         * lang.c (flag_force_classes_archive_check): New flag.
11656         (lang_f_options): New entry `force-classes-archive-check.'
11657         Fixes PR java/1213.
11659 2001-02-07  Andrew Haley  <aph@redhat.com>
11661         * gcj.texi (Configure-time Options): Add -fcheck-references.
11662         * expr.c (build_java_indirect_ref): New function.
11663         (java_check_reference): New function.
11664         (build_java_array_length_access): Use build_java_indirect_ref to
11665         check for null references.
11666         (build_java_arrayaccess): Likewise.
11667         (build_get_class): Likewise.
11668         (build_field_ref): Likewise.
11669         (invoke_build_dtable): Likewise.
11670         (build_invokeinterface): Likewise.
11671         * lang.c (lang_f_options): Add flag_check_references.
11672         * jvspec.c (jvgenmain_spec): Add flag_check_references.
11673         * java-tree.h (flag_check_references): New variable.
11674         * lang.c (flag_check_references): Likewise.
11675         * parse.y (patch_invoke): Use java_check_reference.
11676         (patch_assignment): Allow for extra nesting in
11677         _Jv_CheckArrayStore.
11679 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
11681         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11682         * lex.c (cxx_keywords): Likewise.
11684 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11686         * parse.y (qualify_ambiguous_name): Broaden `length'
11687         recognition. Help MODIFY_EXPR be resolved as expression names.
11688         Fixes PR java/2066. Fixes PR java/2400.
11690 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
11692         * gjavah.c (process_file): Mark interface definitions with
11693         "__attribute__ ((java_interface))".
11695 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11697         * class.c (layout_class): Fixed push_super_field's second
11698         argument. Fixes PR java/2333.
11699         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11700         too early to lay innerclasses out.
11702 2001-03-20  Tom Tromey  <tromey@redhat.com>
11703             Alexandre Petit-Bianco <apbianco@redhat.com>
11705         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11706         inside an array reference. Insertion of the array store check
11707         rewritten. Fixes PR java/2299.
11709 2001-03-20  Tom Tromey  <tromey@redhat.com>
11711         * lex.c (java_read_unicode): Only accept leading `u's.
11713 2001-03-20  Tom Tromey  <tromey@redhat.com>
11715         * jcf-parse.c (read_class): Initialize `class'.
11717 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11719         * jcf_parse.c (jcf_parse): Eliminate unused variable.
11721 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11723         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11724         (layout_class): Likewise.
11725         (layout_class_method): Likewise.
11726         (emit_register_classes): Likewise.
11727         * decl.c (builtin_function): Likewise.
11728         (give_name_to_locals): Likewise.
11730 2001-03-19  Per Bothner  <per@bothner.com>
11732         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
11733         before trying to load an inner class.
11735         Fixes to process to command-line .class files in two passes.
11736         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
11737         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
11738         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
11739         * class.c (is_compiled_class):  Fix for renamed flag.
11740         * parse.y (maybe_create_class_interface_decl):  Likewise.
11741         * jcf-parse.c (yyparse):  Also set if compiling .class files.
11742         * jcf-parse.c (read_class);  Read current_class.
11743         (jcf_parse):  Make static.
11744         (load_inner_classes):  New function, with code moved from jcf_parse,
11745         because we need to inner classes after the command-line files are read.
11746         (yyparse):  Set finput to NULL when it doesn't need to be closed.
11747         Reduce use of main_jcf (basically only for archive) and
11748         use finput instead of main_jcf->read_state.
11749         Inline jcf_figure_file_type into yyparse.
11750         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11751         Defer load_inner_classes and parse_class_file to a second pass,
11752         after we've correctly mapped command-line .clas fiels to classes.
11753         (jcf_figure_file_type):  Removed.
11754         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
11755         (JCF_ZERO):  Also clear zipd field.
11756         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
11758 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11760         * jcf-parse.c (yyparse): Change ch from char * to char.
11762 2001-03-19  Per Bothner  <per@bothner.com>
11764         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
11765         Add constructed filelist-file at end, following -xjava.  Thus any .o
11766         and library files are not affected by the -xjava.  Also wrap
11767         explicit @FILE with -xjava and -xnone.
11769 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
11771         * class.c (build_static_field_ref): Call make_decl_rtl() after
11772         setting the DECL_EXTERNAL flag.
11774 2001-03-17  Per Bothner  <per@bothner.com>
11776         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
11778         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
11779         when result is is needed (target is STACK_TARGET).
11781         * parse.h (JDEP_SOLV):  Removed.
11782         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
11784         * parse.y (incomplete_class_list): Removed.
11785         (obtain_incomplete_type): Don't use or set incomplete_class_list.
11786         It doesn't work if resolve_class changes the name of an array type
11787         that is on the list and then someone else looks for the modified name.
11788         Also, seems liable to break when compiling multiple source files at
11789         once.  So the simplest is to just remove incomplete_class_list -
11790         it is only a minor space win and it is not even clear it saves time.
11792         * parse.y (resolve_class):  Remove unneeded promote_type.
11794 2001-03-15  Per Bothner  <per@bothner.com>
11796         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
11797         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
11798         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11799         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11801         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
11802         * parse.y (java_expand_classes):  Likewise.
11804         * parse.y (expand_start_java_method):  Was only called once and had a
11805         misleading name, so inline in caller java_complete_expand_method.
11806         (enter_a_block):  Likewise inline in enter_block and remove.
11808         Remove junk from when gcc/java was created (by copying from C/C++).
11809         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
11810         (struct binding_level):  Remove fields keep, keep_if_subblocks,
11811         more_cleanups_ok, have_cleanups (which have never been used).
11812         (pushlevel, poplevel):  Remove related useless code.
11814         * class.c (make_class_data):  The class_dtable_decl (i.e. the
11815         vtable for Class) should be external, except when compiling Class.
11817         * jvspec.c (lang_specific_driver):  Fix -C handling.
11818         Check -save-temps to see if temp @FILE should be deleted.
11819         Follow-up to/fix for February 16 patch.
11821         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
11822         (type_stack_dup):  Remove no-longer neded error check.
11824 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
11826         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11827         to 'for_pointer'. If this type is for a pointer (argument) mangling,
11828         don't surround the element with 'N..E' if the type name is
11829         unqualified.
11831 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11833         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11834         DECL_RTL_SET_P, etc.
11835         (make_method_value): Likewise.
11836         (get_dispatch_table): Likewise.
11838         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11840 2001-03-07  Tom Tromey  <tromey@redhat.com>
11842         * config-lang.in (lang_requires): Define.
11844 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
11846         * typeck.c (convert): Check flag_unsafe_math_optimizations,
11847         not flag_fast_math.
11849 2001-03-05  Per Bothner  <per@bothner.com>
11851         Fix a problem where rest_of_decl_compilation applied to
11852         class_dtable_decl causes problems because it was done too early,
11853         before output file was opened.
11854         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
11855         * class.c (class_dtable_decl):  Add macro - element of class_roots.
11856         (make_class_data):  Define class_dtable_decl.
11857         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
11859 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11861         * java/class.c, java/decl.c, java/java-tree.h: Replace all
11862         uses of 'boolean' with 'bool'.
11864 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11866         * lang-specs.h: Add zero initializer for cpp_spec field to all
11867         array elements.
11869 2001-02-16  Per Bothner  <per@bothner.com>
11871         Handle compiling multiple input files at once, and @FILE syntax.
11872         * gcj.texi:  Updated documentation to match.
11873         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
11874         * jcf-parse.c (parse_source_file):  Split into ...
11875         (parse_source_file_1):  New function - and:
11876         (parse_source_file_2):  New function.
11877         (yyparse):  On -ffilelist-file, open and scan named file.
11878         On first pass over files, only do parse_source_file_1.
11879         A new second pass calls parse_source_file_2 for each file to compile.
11880         (init_jcf_parse):  Call init_src_parse.
11881         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
11882         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
11883         as multiple input file combined in one compilation.
11884         * lang-options.h:  Add -ffilelist-file
11885         * lang.c (flag_filelist_file):  New flag variable.
11886         (lang_f_options):  Handle -ffilelist-file.
11887         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11888         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
11889         gclass_list - use global fields of src_parse_roots instead.
11890         * parse.y (src_parse_roots):  New array.
11891         (incomplete_class_list, gclass_list):  New macros.
11892         (push_parser_context, java_pop_parser_context,
11893         java_parser_context_resume):  Don't fiddle with deleted fields.
11894         (various):  Use incomplete_class gclass_list and global macros
11895         instead of parse_ctxt fields - the lists are global.
11896         (init_src_parse):  New function.
11898 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11900         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11902 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11904         * parse.y (check_inner_class_access): Moved declaration of local
11905         `enclosing_decl_type' to the right location.
11907 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
11909         * parse.y (parser_check_super_interface): Don't call
11910         check_pkg_class_access for an inner interface.
11911         (parser_check_super): Don't call check_pkg_class_access for inner
11912         class.
11913         (do_resolve_class): Simplify enclosing type loop. Don't call
11914         check_pkg_class_access if CL and DECL are not set.
11915         (find_in_imports_on_demand): Set DECL if class_type needed to be
11916         loaded. Don't call check_pkg_class_access for an inner class.
11917         (check_inner_class_access): Rewritten to implement member access
11918         rules as per spec 6.6.1.
11919         (check_pkg_class_access): Handle the empty package correctly.
11920         (in_same_package): New function. Determine if two classes are in the
11921         same package.
11923 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
11925         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11926         method into array types.
11927         * parse.y (patch_method_invocation): Bypass access check on clone call
11928         to array instance.
11930 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
11932         * expr.c (build_instanceof): Check for arrays when trying fold to
11933         false.
11935 2001-02-15  Jim Meyering  <meyering@lucent.com>
11937         * Make-lang.in (java.install-common): Depend on `installdirs'.
11938         (java.install-info): Likewise.
11940 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
11942         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11944 2001-02-14  Tom Tromey  <tromey@redhat.com>
11945             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11947         Fix for PR java/1261.
11948         * typeck.c (build_java_array_type): Add public `clone' method to
11949         arrays.
11950         * parse.y (resolve_qualified_expression_name): Use current_class
11951         when checking for inaccessibility.
11952         (patch_method_invocation): Fixed error message when accessibility
11953         denied.  Added `from_super' argument.
11955 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11957         * parse.y (resolve_class): Don't build a fake decl. Use the one
11958         already built.
11959         * typeck.c (build_java_array_type): Build and assign decl to array
11960         type.
11962 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11964         * parse.y (not_accessible_p): Changed leading comment. Added extra
11965         `where' argument. Use it to enforce protected access rules.
11966         (resolve_qualified_expression_name): Added extra argument to
11967         not_accessible_p.
11968         (patch_method_invocation): Use argument `primary' to provide
11969         not_accessible_p with an extra argument.
11970         (lookup_method_invoke): Added extra argument to not_accessible_p.
11971         (search_applicable_method_list): Likewise.
11973 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
11975         * parse.y (resolve_qualified_expression_name): Try to resolve as
11976         an inner class access only if `decl' is a TYPE_DECL.
11978 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11980         * decl.c (classdollar_identifier_node): Initialize.
11981         * java-tree.h (enum java_tree_index): New entry
11982         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11983         (classdollar_identifier_node): New macro.
11984         (ID_CLASSDOLLAR_P): Likewise.
11985         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11986         (build_dot_class_method_invocation): Likewise.
11987         (find_applicable_accessible_methods_list): `class$' can't be
11988         inherited.
11990 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
11992         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11994 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11996         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11997         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11998         gone.
12000 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
12002         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
12003         outside of the `__U' sequence too.
12004         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
12005         sequence too.
12007 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
12009         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
12011 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12013         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
12014         (JVGENMAIN_OBJS): Likewise.
12015         * java-tree.h (append_gpp_mangled_name): New prototype.
12016         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
12017         Removed cast calling `gcc_add_root.'
12018         * jvgenmain.c (mangle_obstack): New global, initialized.
12019         (main): Use it.
12020         (do_mangle_class): Constify local `ptr.'
12021         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
12022         append_gpp_mangle_name and update `count' if necessary.
12023         Use `mangle_obstack.'
12024         * mangle.c (append_unicode_mangled_name): Removed.
12025         (append_gpp_mangled_name): Likewise.
12026         (unicode_mangling_length): Likewise.
12027         (mangle_member_name): Return type set to `void.'
12028         (mangle_field_decl): Don't append `U' in escaped names.
12029         (mangle_method_decl): Likewise.
12030         (mangle_member_name): Just use `append_gpp_mangled_name.'
12031         * mangle_name.c: New file.
12033 2001-02-07  Per Bothner  <per@bothner.com>
12035         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
12037         * check-init.c (check_init):  Don't call done_alternative after
12038         processing loop code, as a LOOP_EXPR never terminates normally.
12040 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12042         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
12044 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12046         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
12047         DECLs.
12049 2001-02-06  Tom Tromey  <tromey@redhat.com>
12051         * lex.c (java_new_lexer): Longer error message.
12053 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
12054             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12056         * typeck.c (build_prim_array_type): Added leading comment.
12057         (build_java_array_type): Moved locals out of
12058         block. Always create the `data' field, fixed alignment to match
12059         C++.
12061 2001-02-04  Tom Tromey  <tromey@redhat.com>
12063         * expr.c (java_lang_expand_expr): Don't bother recomputing
12064         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
12065         Fixes PR java/1866.
12067 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12069         * parse.y (process_imports): Save the original name of the import
12070         for better error report.
12072 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
12074         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
12075         of macros used when compiling jvspec.c.
12076         * jvspec.c (lang_specific_driver): Link with the shared
12077         libgcc by default.
12079 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12081         * check-init.c (check_init): Call internal_error instead of fatal.
12082         * expr.c (java_lang_expand_expr): Likewise.
12083         * jcf-parse.c (get_constant): Likewise.
12084         * mangle.c (java_mangle_decl): Likewise.
12085         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
12086         (operator_string): Likewise.
12087         * check-init.c (check_init): Call abort instead of fatal.
12088         * class.c (build_class_ref): Likewise.
12089         * constants.c (write_constant_pool): Likewise.
12090         * decl.c (start_java_method): Likewise.
12091         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
12092         (java_stack_dup, encode_newarray_type): Likewise.
12093         (build_java_array_length_access): Likewise.
12094         (build_java_check_indexed_type, expand_java_pushc): Likewise.
12095         (build_java_soft_divmod, build_invokeinterface): Likewise.
12096         * java-tree.h (INNER_CLASS_P): Likewise.
12097         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
12098         (give_name_to_class, get_class_constant): Likewise.
12099         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
12100         (find_constant_index, generate_bytecode_conditional): Likewise.
12101         (generate_bytecode_insns, perform_relocations): Likewise.
12102         * lex.c (java_unget_unicode, java_lex): Likewise.
12103         * mangle.c (mangle_type, mangle_record_type): Likewise.
12104         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
12105         (finish_mangling): Likewise.
12106         * parse.h (MARK_FINAL_PARMS): Likewise.
12107         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
12108         (obtain_incomplete_type, java_complete_class): Likewise.
12109         (java_check_regular_methods, java_complete_expand_method): Likewise.
12110         (cut_identifier_in_qualified, check_deprecation): Likewise.
12111         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
12112         (java_complete_lhs, lookup_name_in_blocks): Likewise.
12113         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
12114         * typeck.c (set_local_type, parse_signature_type): Likewise.
12115         (parse_signature_string, build_java_signature): Likewise;
12116         (set_java_signature): Likewise.
12117         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
12118         * class.c (add_method): Call fatal_error instead of fatal.
12119         (build_static_field_ref): Likewise.
12120         * expr.c (build_known_method_ref, expand_invoke): Likewise.
12121         * jcf-parse.c (get_constant, jcf_parse): Likewise.
12122         * lex.c (java_new_new_lexer): Likewise.
12123         * jv-scan.c (main): Likewise.
12124         (fatal_error): Renamed from fatal.
12125         * jcf-parse.c (yyparse): Call fatal_io_error instead of
12126         pfatal_with_name.
12127         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
12128         (yyparse): Likewise.
12129         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
12130         * lex.c (java_get_line_col): Likewise.
12131         * jcf-parse.c (load_class): Make errors non-fatal.
12132         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
12134 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
12136         * jvgenmain.c (class_mangling_suffix): Remove unused string.
12137         (error): Remove unused function.
12138         (main): Don't use "__attribute__ alias" on generated class symbol.
12140 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12142         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
12143         argument.
12144         * parse.y (finish_method_declaration): Code accounting for WFLed
12145         method DECL_NAMEs deleted.
12146         (check_abstract_method_definitions): Likewise.
12147         (resolve_type_during_patch): Layout resolved type.
12148         * typeck.c (lookup_do): Removed unused local.
12150 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
12152         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
12153         * decl.c (init_decl_processing): Use integer_minus_one_node, not
12154         integer_negative_one_node.
12155         * expr.c (build_java_binop): Likewise.
12157 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
12159         * zextract.c (read_zip_archive): Read file_offset before writing
12160         zipd and consequently clobbering the header contents.
12162 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12164         * Make-lang.in: Remove all dependencies on defaults.h.
12165         * decl.c: Don't include defaults.h.
12166         * expr.c: Likewise.
12167         * parse.y: Likewise.
12169 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12171         * ChangeLog (2001-01-21): Fixed typo.
12172         * class.c (layout_class_method): Code accounting for WFLed
12173         method DECL_NAMEs deleted.
12174         * constant.c (find_methodref_index): Likewise.
12175         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
12176         * java-tree.h (DECL_FUNCTION_WFL): New macro.
12177         (struct lang_decl): New field `wfl'.
12178         (java_get_real_method_name): Prototype deleted.
12179         * mangle.c (mangle_method_decl): Code accounting for WFLed
12180         method DECL_NAMEs deleted.
12181         * parse.h (GET_METHOD_NAME): Macro deleted.
12182         * parse.y (reset_method_name): Deleted.
12183         (method_header): Set DECL_FUNCTION_WFL.
12184         (check_abstract_method_header): Code accounting for WFLed method
12185         DECL_NAMEs deleted.
12186         (java_get_real_method_name): Deleted.
12187         (check_method_redefinition): Code accounting for WFLed method
12188         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
12189         (java_check_regular_methods): Likewise.
12190         (java_check_abstract_methods): Likewise.
12191         (java_expand_classes): Don't call `reset_method_name.'
12192         (search_applicable_method_list): Use DECL_NAMEs instead of
12193         GET_METHOD_NAME.
12194         * typeck.c (lookup_do): Code accounting for WFLed method
12195         DECL_NAMEs deleted.
12197 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
12199         * lex.c (java_read_char): Check for EOF from getc first.
12201 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12203         * class.c (layout_class): Don't lay the superclass out if it's
12204         already being laid out.
12205         * jcf-parse.c (handle_innerclass_attribute): New function.
12206         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12207         handle_innerclasses_attribute.
12208         (jcf_parse): Don't load an innerclasses if it's already being
12209         laid out.
12210         * jcf-write.c (append_innerclass_attribute_entry): Static
12211         `anonymous_name' and its initialization deleted. `ocii' and `ini'
12212         to be zero for anonymous classes.
12214 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12216         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12217         necessary.
12218         * jcf-parse.c (set_source_filename): Use
12219         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12221 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12223         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12224         gets a unique asm name.
12226 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12228         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12229         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12230         if necessary.
12231         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12232         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12233         * parse.y (lookup_package_type_and_set_next): Deleted.
12234         (resolve_package): Removed unnecessary code.
12235         (find_applicable_accessible_methods_list): `finit$' can't be
12236         inherited.
12237         * verify.c (pop_argument_types): Added missing prototype.
12239 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
12241         * config-lang.in: Disable java by default.
12243 2001-01-23  Tom Tromey  <tromey@redhat.com>
12245         * gcj.texi (Copying): New node.
12246         Added copyright information.
12248 2001-01-21  Per Bothner  <per@bothner.com>
12250         Various fixes to allow compiling a compressed .jar/.zip archive.
12251         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
12252         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
12253         (struct ZipDirectory):  New field zipf points to owning ZipFile.
12254         * jcf.h (struct ZipDirectory):  Add forward declaration.
12255         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
12256         Remove seen_in_zip and zip_offset fields.
12257         (JCF_SEEN_IN_ZIP):  New macro.
12258         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
12259         * jcf-io.c:  Change all ZipFileCache to ZipFile.
12260         (read_zip_member):  New function.
12261         (open_in_zip):  Call read_zip_member.
12262         * jcf-parse.c (find_in_current_zip):  Remove function.
12263         (read_class):  Merge in find_in_current_zip functionality.
12264         Call read_zip_member if needed.
12265         (parse_zip_file_entries):  Use read_zip_member.
12266         (process_zip_dir):  Update for removed and added JCF fields.
12267         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
12269 2001-01-21  Per Bothner  <per@bothner.com>
12271         Minor optimization of static ggc roots.
12272         * jcf-parse.c (parse_roots):  New static field.
12273         (current_field, current_method, current_file_list):  Replace by macros
12274         naming fields of parse_roots.
12275         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
12276         * class.c (class_roots):  New static field.
12277         (registered_class, fields_ident, info_ident, class_list):
12278         New macros naming fields of parse_roots.
12279         (build_static_field_ref):  Don't register roots here.
12280         (layout_class):  Static field list replaced by macro class_list.
12281         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
12282         Initialize fields_ident and info_ident here.
12284 2001-01-21  Per Bothner  <per@bothner.com>
12286         * jcf-parse.c (ggc_mark_jcf):  New function.
12287         (init_jcf_parse):  Register current_jcf as ggc root.
12289 2001-01-21  Per Bothner  <per@bothner.com>
12291         * lang.c (put_decl_node):  Print method's name.
12293 2001-01-21  Per Bothner  <per@bothner.com>
12295         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
12296         (verify_jvm_instructions):  Use it, for better error messages on loads.
12298 2001-01-21  Per Bothner  <per@bothner.com>
12300         * verify.c (merge_type_state):  Still may have to merge even if
12301         LABEL_VERIFIED (label).
12303 2001-01-21  Per Bothner  <per@bothner.com>
12305         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
12306         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12308 2001-01-19  Per Bothner  <per@bothner.com>
12310         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
12311         if expeting an interface type.  Refines Tom's change of 2000-09-12.
12313 2001-01-18  Per Bothner  <per@bothner.com>
12315         * gcj.texi (Input Options): Mention .java files.
12317 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12319         * lang-options.h (-Wunsupported-jdk11): Removed.
12320         * lang.c (flag_not_overriding): Deleted.
12321         (flag_static_local_jdk1_1): Likewise.
12322         (lang_W_options): Removed "unsupported-jdk11" entry.
12323         * parse.y (java_check_methods): Removed dead code.
12325 2001-01-17  Tom Tromey  <tromey@redhat.com>
12327         Changes suggested by Per Bothner:
12328         * gcj.texi (Input Options): Don't mention input files.
12329         (Code Generation): Updated --main information.
12330         (Invoking jcf-dump): Mention that --javap is incomplete.
12331         From Alexandre Petit-Bianco:
12332         (Warnings): Don't mention -Wunsupported-jdk11.
12333         My stuff:
12334         (Compatibility): Mention JDK 1.2-ness of libraries.
12335         (Resources): Mention resources used when writing gcj.
12337 2001-01-17  Tom Tromey  <tromey@redhat.com>
12339         * gcj.texi: New file.
12340         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12341         (java.info): Depend on gcj.info.
12342         (java/gcj.dvi): New target.
12343         (java.dvi): Depend on gcj.dvi.
12344         (java.install-info): Wrote.
12346 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
12348         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12349         having called make_decl_rtl.
12351 2001-01-14  Per Bothner  <per@bothner.com>
12353         Various patches to emit better messages on verification errors.
12354         * expr.c (push_type_0):  Return error indication on stack overflow,
12355         instead of callinfg fatal.
12356         (push_type):  Now just call push_type_0 (nd fatal on overflow).
12357         (pop_type_0):  Return detailed error message (in a char** argument).
12358         (pop_type):  If pop_type_0 fails, print error message.
12359         (pop_argument_types):  Moved to verify.c.
12360         * verify.c (pop_argument_types):  Moved from expr.c.
12361         Return a (possible) error message, rather than void.
12362         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
12363         (verify_jvm_instruction):  Use new macros, improving error messages.
12364         For case OPCODE_astore use object_ptr_type_node.
12365         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
12366         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
12368         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12369         constant, return body without wrapper.  (Improves constant folding.)
12370         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
12372 2001-01-13  Per Bothner  <per@bothner.com>
12374         * expr.c (expand_java_field_op):  Assigning to a final field outside
12375         an initializer does not violate JVM spec, so should be warning, not
12376         error.  (Sun's verifier does not complain - though MicroSoft's does.)
12378 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
12380         * gjavah.c (version), jcf-dump.c (version): Update copyright year
12381         to 2001.
12383 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
12385         * parse.y (resolve_expression_name): Permit instance variables from
12386         enclosing context in super constructor call.
12387         (resolve_qualified_expression_name): Permit enclosing class's qualified
12388         "this" in super constructor call.
12390 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12392         * class.c (build_utf8_ref): Remove last argument in call to
12393         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12394         (build_class_ref): Likewise.
12395         (build_static_field_ref): Likewise.
12396         (get_dispatch_table): Likewise.
12397         (layout_class_method): Likewise.
12398         (emit_register_classes): Likewise.
12399         * constants.c (build_constant_data_ref): Likewise.
12400         * decl.c (builtin_function): Likewise.
12401         (create_primitive_vtable): Likewise.
12402         * expr.c (build_known_method_def): Likewise.
12403         (build_jni_stub): Likewise.
12404         (java_lang_expand_expr): Likewise.
12406 2001-01-10  Tom Tromey  <tromey@redhat.com>
12408         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12410 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12412         * java-tree.h (lang_printable_name_wls): New prototype.
12413         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12414         rather than `current_class' to print type name. Don't prepend type
12415         names when printing constructor names.
12416         (lang_printable_name_wls): New function.
12417         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12418         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12419         * parse.y (patch_method_invocation): Message tuned for constructors.
12420         (not_accessible_p): Grant `private' access from within
12421         enclosing contexts.
12423 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12425         All files with updated copyright when applicable.
12426         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12427         * class.c (mangle_class_field): Function removed.
12428         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12429         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12430         (build_class_ref): Call `java_mangle_class_field' instead of
12431         `mangle_class_field.'
12432         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12433         (layout_class): Call `java_mangle_decl' instead of
12434         `mangle_static_field.'
12435         (cxx_keywords): Initialized static array moved to `lex.c.'
12436         (layout_class_method): Changed leading comment. Simplified to
12437         call `java_mangle_decl.' Local `ptr' moved in for loop body.
12438         * decl.c (lang_mark_tree): Mark field `package_list.'
12439         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12440         (struct lang_type): New field `package_list.'
12441         (unicode_mangling_length): Prototype removed.
12442         (append_gpp_mangled_name, append_gpp_mangled_classtype,
12443         emit_unicode_mangled_name): Likewise.
12444         (cxx_keyword_p): New prototype.
12445         (java_mangle_decl, java_mangle_class_field,
12446         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12447         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12448         `build_expr_wfl.'
12449         * jvgenmain.c (main_method_prefix): Global variable removed.
12450         (main_method_suffix): Likewise.
12451         (do_mangle_classname): New function.
12452         (main): Call it. Format changed to accommodate new mangling scheme.
12453         * lex.c: (utf8_cmp): Conditionally prototyped.
12454         (cxx_keywords): Moved from class.c, conditionally defined.
12455         (utf8_cmp, cxx_keyword_p): Likewise.
12456         * mangle.c (obstack.h, ggc.h): Included.
12457         (mangle_field_decl): New function.
12458         (mangle_method_decl, mangle_type, mangle_pointer_type,
12459         mangle_array_type, mangle_record_type,
12460         find_compression_pointer_match, find_compression_array_match,
12461         find_compression_record_match,
12462         find_compression_array_template_match, set_type_package_list,
12463         entry_match_pointer_p, emit_compression_string, init_mangling,
12464         finish_mangling, compression_table_add, mangle_member_name): Likewise.
12465         (mangle_obstack): New global.
12466         (MANGLE_RAW_STRING): New macro.
12467         (unicode_mangling_length): Turned static.
12468         (append_unicode_mangled_name): Renamed from
12469         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
12470         replaces `obstack', removed from the parameter list.
12471         (append_gpp_mangled_name): Turned static. `mangle_obstack'
12472         replaces parameter `obstack', removed from the parameter list. Call
12473         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12474         (append_gpp_mangled_classtype): Removed.
12475         (compression_table, compression_next): New static variables.
12476         * parse.y (temporary_obstack): Extern declaration removed.
12478 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12480         * parse.y (patch_binop): Compute missing type in error situations.
12482 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
12484         * class.c (make_class_data): Push initial value for "arrayclass".
12485         * decl.c (init_decl_processing): Add new class field "arrayclass".
12487 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
12489         From patha@softlab.ericsson.se:
12490         * parse.y (switch_label): Use build, not build1, to construct
12491         DEFAULT_EXPR.
12493 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
12495         * lang.c (lang_decode_option): Change -MA to -MP.
12496         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12497         Update to new prototype; do quote targets.
12498         (jcf_dependency_write): Update.
12500 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
12502         Shorten primitive array allocation path:
12503         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12504         to create new primitive arrays.
12505         * expr.c (build_newarray): If generating native code, call
12506         soft_newarray_node with a reference to the primitive TYPE identifier
12507         instead of type_value.
12509 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
12511         Fix for PRs gcj/312 and gcj/253:
12512         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12513         dest if they arn't already.
12514         * class.c (layout_class): Call maybe_layout_super_class on
12515         superinterfaces also, but only if compiling from bytecode.
12517         Fix for PR gcj/373:
12518         * parse.y (create_class): Set ACC_STATIC if class is declared in an
12519         interface.
12521 2000-12-15  Tom Tromey  <tromey@redhat.com>
12523         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12524         set.
12526 2000-12-14  Andrew Haley  <aph@redhat.com>
12528         * boehm.c (mark_reference_fields): Change test to correctly detect
12529         bitmap overflow.
12531 2000-12-15  Andreas Jaeger  <aj@suse.de>
12533         * config-lang.in (lang_dirs): Added.
12535 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12537         * parse.y (end_artificial_method_body): Fixed undefined behavior.
12538         Credits go to rth for finding it.
12540 2000-12-13  Mike Stump  <mrs@wrs.com>
12542         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12544 2000-11-07  Tom Tromey  <tromey@cygnus.com>
12546         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12547         * lex.c (java_ignorable_control_p): Removed.
12548         (java_letter_or_digit_p): Removed.
12549         (java_start_char_p): New function.
12550         (java_read_char): Return `int', not `unicode_t'.  Changed
12551         callers.
12552         (java_read_unicode): Likewise.
12553         (java_read_unicode_collapsing_terminators): Likewise.
12554         (java_get_unicode): Likewise.
12555         (java_new_lexer): Initialize hit_eof.
12556         (java_parse_end_comment): Take `int' argument.
12557         (java_parse_doc_section): Likewise.
12558         (java_parse_escape_sequence): Don't allow backlash-newline.
12559         Return `int'.
12560         * lex.h (JAVA_DIGIT_P): Removed.
12561         (_JAVA_LETTER_OR_DIGIT_P): Removed.
12562         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12563         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12564         (JAVA_PART_CHAR_P): New macro.
12565         (UEOF): Now -1.
12566         (JAVA_CHAR_ERROR): Now -2.
12567         (java_lexer): New field `hit_eof'.
12568         * chartables.h: New file.
12569         * gen-table.pl: new file.
12571 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12572             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12574         * parse.y (java_complete_lhs): Only allow compound assignment of
12575         reference type if type is String.
12577 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12579         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12580         jcf-path.c: Likewise.
12582 2000-12-09  Anthony Green  <green@redhat.com>
12584         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12585         filestart and filename_length as int values.
12587 2000-12-07  Mo DeJong  <mdejong@redhat.com>
12589         * jcf-io.c (find_class): Correct the logic that tests to see if a
12590         .java file is newer than its .class file. The compiler was
12591         incorrectly printing a warning when file mod times were equal.
12593 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
12595         * jvgenmain.c: Use ISPRINT not isascii.
12597 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12599         * parse.y (end_artificial_method_body): Fixed typo.
12601 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12603         * parse.y (patch_method_invocation): Pick the correct enclosing
12604         context when creating inner class instances.
12605         Fixes gcj/332.
12607 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
12609         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12610         Update copyright year to 2000.
12612 2000-11-23  Anthony Green  <green@redhat.com>
12614         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12615         Move current_file_list out of yyparse and make it static.
12617         * expr.c: Declare quick_stack and tree_list_free_list as static
12618         (init_expr_processing): Register quick_stack and
12619         tree_list_free_list roots.
12621 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12623         * parse.y (build_outer_field_access): New local `decl_ctx', use
12624         it. Check for field's context and current class immediate outer
12625         context inheritance.
12626         (outer_field_access_p): Consider fields inherited from the last
12627         enclosing context.
12628         (build_access_to_thisn): Stop at the last enclosing context if
12629         necessary.
12630         Fixes gcj/367.
12632 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12634         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12636 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
12638         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12639         scratch buffer.
12641 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12643         * jv-scan.c (help): Document --complexity.
12644         (options): Added --complexity.
12645         (flag_complexity): New global.
12646         (main): Call `report'.
12647         * parse-scan.y (complexity): New global.
12648         (if_then_statement, if_then_else_statement,
12649         if_then_else_statement_nsi, switch_block_statement_group,
12650         while_expression, do_statement, for_begin, continue_statement,
12651         throw_statement, catch_clause, finally, method_invocation,
12652         conditional_and_expression, conditional_or_expression,
12653         conditional_expression): Update complexity.
12654         (reset_report): Reset complexity.
12655         (report): New function.
12657 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12659         * lex.c (yylex): Added STRICT_TK case.
12660         * parse.y (STRICT_TK): Added.
12661         * parse-scan.y (STRICT_TK): Added.
12662         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12663         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
12664         file.
12665         * keyword.h: Rebuilt.
12666         * keyword.gperf (strictfp): Added.
12668 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12670         * lex.c (yylex): Recognize floating point constants with leading
12671         0.
12673 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12675         * java-tree.h (cyclic_inheritance_report): Constify.
12676         * parse.y (cyclic_inheritance_report): Likewise.
12678 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12680         * parse.y (goal): Remove call to ggc_add_string_root.
12682 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12684         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12685         Create string in scratch buffer, then pass to build_string.
12687 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12689         * parse.y (issue_warning_error_from_context): Add
12690         ATTRIBUTE_PRINTF.
12692 2000-11-11  Anthony Green  <green@redhat.com>
12694         * jcf-parse.c (process_zip_dir): Add finput parameter.
12695         (jcf_figure_file_type): Call process_zip_dir with appropriate
12696         argument.
12698 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12700         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12701         * jcf-parse.c (jcf_figure_file_type): Likewise.
12703 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12705         * parse.y (create_new_parser_context): Use memset () instead of
12706         bzero ().
12708 2000-11-08  Tom Tromey  <tromey@cygnus.com>
12710         * gjavah.c (process_file): Only include gcj/cni.h when generating
12711         CNI stubs.
12713 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12715         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12716         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12717         instead of bzero ().
12719 2000-11-05  Tom Tromey  <tromey@cygnus.com>
12721         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12722         * lex.c (IS_ZERO): New define.
12723         (java_perform_atof): Error on floating point underflow.
12725 2000-11-04  Tom Tromey  <tromey@cygnus.com>
12727         * lex.c (java_parse_escape_sequence): Only read two octal
12728         characters if the first one is greater than 3.  Don't allow
12729         "octal" numbers to include the digits 8 or 9.
12731 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12733         * Make-lang.in (java.distdir): Remove.
12735 2000-11-03  Tom Tromey  <tromey@cygnus.com>
12737         * Make-lang.in (java.dvi): New target.
12738         Partial fix for PR other/567.
12740         * lang-options.h: Mention -Wout-of-date.
12741         * jcf-dump.c (flag_newer): New global.
12742         * gjavah.c (flag_newer): New global.
12743         * jcf-io.c (find_class): Only warn when flag_newer set.
12744         * lang.c (flag_newer): New global.
12745         (struct string_option): New declaration.
12746         (lang_W_options): New global.
12747         (process_option_with_no): New function.
12748         (lang_decode_option): Use it.
12750         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12751         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12752         `$'.
12754         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12755         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12756         * lex.c (java_read_unicode): Removed `term_context' argument.
12757         Recognize any number of `u' in `\u'.
12758         (java_read_unicode_collapsing_terminators): New function.
12759         (java_get_unicode): Use it.
12760         (java_lineterminator): Removed.
12761         (yylex): Produce error if character literal is newline or single
12762         quote.  Return if eof found in middle of `//' comment.  EOF in
12763         `//' comment is only an error if pedantic.
12764         (java_ignorable_control_p): New function.
12765         (java_parse_end_comment): Return if eof found in middle of
12766         comment.
12767         Include flags.h.
12768         * jv-scan.c (pedantic): New global.
12770 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12772         * parse.y (outer_field_access_p): Inherited fields aren't
12773         consider outer fields.
12774         (maybe_build_thisn_access_method): Use
12775         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12776         (resolve_expression_name): Trigger an error if a static field
12777         is being accessed as an outer field.
12779 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12781         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12782         Fixes gcj/365.
12784 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12786         * Make-lang.in: Move all build rules here from Makefile.in,
12787         adapt to new context.  Wrap all rules that change the current
12788         directory in parentheses.  Expunge all references to $(P).
12789         When one command depends on another and they're run all at
12790         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12791         all object-file generation rules.  Delete obsolete variables.
12793         * Makefile.in: Delete.
12794         * config-lang.in: Delete outputs= line.
12796 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12798         * parse.y (patch_method_invocation): NULLify this_arg when already
12799         inserted.
12800         (maybe_use_access_method): Handle call to methods unrelated to the
12801         current class. Fixed comment.
12802         Fixes gcj/361.
12804 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12806         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12807         scope.
12809 2000-10-24  Tom Tromey  <tromey@cygnus.com>
12811         * lex.c (java_new_lexer): Initialize new fields.  Work around
12812         broken iconv() implementations.
12813         (java_read_char): Swap bytes if required.  Use fallback decoder if
12814         required.
12815         (byteswap_init, need_byteswap): New globals.
12816         (java_destroy_lexer): Only close iconv handle if it is in use.
12817         * lex.h (java_lexer): New fields read_anything, byte_swap,
12818         use_fallback.
12819         Made out_buffer unsigned.
12821 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12823         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12824         where an enclosing context can be set on the jdep.
12825         (do_resolve_class): Fixed identation.
12827 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12829         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12831         * jcf-reader.c (peek_attribute, skip_attribute): Only define
12832         when requested.
12834         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12836         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12838 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12840         * jcf-write.c (OP1): Update `last_bc'.
12841         (struct jcf_block): Fixed indentation and typo in comments.  New
12842         field `last_bc'.
12843         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12844         follows `monitorenter'.
12845         * parse.y (patch_synchronized_statement): New local `tmp'. Call
12846         `patch_string'.
12847         Fixes gcj/232.
12849 2000-10-16  Tom Tromey  <tromey@cygnus.com>
12851         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12852         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12853         * lang-options.h: Added -MA, -MT, -MF..
12854         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12855         (DEPEND_TARGET_SET): New macro.
12856         (DEPEND_FILE_ALREADY_SET): Likewise.
12857         (init_parse): Handle new flags.
12858         * jcf.h (jcf_dependency_print_dummies): Declare.
12859         * Make-lang.in (s-java): Added mkdeps.o.
12860         * Makefile.in (BACKEND): Added mkdeps.o.
12861         (../gcjh$(exeext)): Added mkdeps.o.
12862         (../jcf-dump$(exeext)): Added mkdeps.o.
12863         * jcf-depend.c: Include mkdeps.h.
12864         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12865         add_entry): Removed.
12866         (jcf_dependency_reset): Rewrote.
12867         (dependencies): New global.
12868         (jcf_dependency_set_target): Rewrote.
12869         (jcf_dependency_add_target): Likewise.
12870         (jcf_dependency_add_file): Likewise.
12871         (munge): Removed.
12872         (print_ents): Removed.
12873         (jcf_dependency_write): Rewrote.
12874         (print_dummies): New global.
12875         (jcf_dependency_print_dummies): New function
12876         (jcf_dependency_write): Call deps_dummy_targets if required.
12878 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12880         * gjavah.c (add_class_decl): Removed unused variables `tname',
12881         `tlen' and `name_index'.
12882         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12883         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12884         in `wfl_operator' with value.
12885         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12886         (jcf_figure_file_type): Fixed identation.
12887         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12888         * parse.y (analyze_clinit_body): New function.
12889         (static_initializer:): Reset `current_static_block'.
12890         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12891         `wfl_operator' with new value.
12892         (lookup_cl): Use EXPR_WFL_FILENAME.
12893         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12894         analyze_clinit_body.
12895         (build_outer_field_access): Access to this$<n> built from
12896         current_class, not its outer context.
12897         (build_access_to_thisn): Fixed leading comment. Tidied things up.
12898         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12899         (patch_method_invocation): Use `is_static_flag' when already
12900         initialized.
12901         (patch_newarray): Removed assignment in ternary operator.
12903 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12905         * except.c (free_eh_ranges): Don't free `whole_range'.
12907 2000-10-15  Anthony Green  <green@redhat.com>
12909         * decl.c (init_decl_processing): Call init_class_processing before
12910         anything else.
12912 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12914         * check-init.c (check_init): Fixed leading comment. Use
12915         LOCAL_FINAL_P.
12916         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12917         (give_name_to_locals): Likewise.
12918         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12919         fields in lang_decl_var.
12920         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12921         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12922         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12923         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12924         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12925         (LOCAL_FINAL): Rewritten.
12926         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12927         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12928         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12929         `init_final' fields.
12930         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12931         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12932         (TYPE_HAS_FINAL_VARIABLE): New macro.
12933         (struct lang_type): Added `afv' field.
12934         * parse.y (check_static_final_variable_assignment_flag): New function.
12935         (reset_static_final_variable_assignment_flag): Likewise.
12936         (check_final_variable_local_assignment_flag): Likewise.
12937         (reset_final_variable_local_assignment_flag): Likewise.
12938         (check_final_variable_indirect_assignment): Likewise.
12939         (check_final_variable_global_assignment_flag): Likewise.
12940         (add_inner_class_fields): Use LOCAL_FINAL_P.
12941         (register_fields): Handle local finals and final variables.
12942         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12943         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12944         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12945         on local finals.
12946         (java_complete_expand_methods): Loop to set
12947         TYPE_HAS_FINAL_VARIABLE. Call
12948         `reset_final_variable_local_assignment_flag' and
12949         `check_final_variable_local_assignment_flag' accordingly before
12950         and after constructor expansion. Call
12951         `reset_static_final_variable_assignment_flag'
12952         before expanding <clinit> and after call
12953         `check_static_final_variable_assignment_flag' if the
12954         current_class isn't an interface. After all methods have been
12955         expanded, call `check_final_variable_global_assignment_flag' and
12956         `check_static_final_variable_assignment_flag' if the current class
12957         is an interface.
12958         (maybe_yank_clinit): Fixed typo in comment.
12959         (build_outer_field_access_methods): Removed old sanity check. Use
12960         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12961         Don't create access methods for finals.
12962         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12963         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12964         existing DECL_INIT has been processed.
12965         (java_complete_lhs): Likewise.
12966         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12967         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12968         logic.
12969         (patch_assignment): Use LOCAL_FINAL_P.
12970         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12971         DECL_INITIAL is nullified.
12972         Fixes gcj/163.
12974 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12976         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12978         * Makefile.in (parse.c, parse-scan.c): Likewise.
12980 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12982         * class.c (temporary_obstack): Remove.
12983         (make_class): Don't mess with obstascks.
12984         (push_class): Likewise.
12985         (set_super_info): Likewise.
12986         (add_method_1): Likewise.
12987         (add_method): Likewise.
12988         (add_field): Likewise.
12989         (build_utf8_ref): Likewise.
12990         (build_class_ref): Likewise.
12991         (build_static_field_ref): Likewise.
12992         (finish_class): Likewise.
12993         (push_super_field): Likewise.
12994         (layout_class): Likewise.
12995         (layout_class_methods): Likewise.
12996         (init_class_processing): Likewise.
12997         * constants.c (get_tag_node): Likewise.
12998         (build_constant_data_ref): Likewise.
12999         * decl.c (ggc_p): Remove.
13000         (copy_lang_decl): Use ggc_alloc.
13001         (complete_start_java_method): Don't mess with obstacks.
13002         (start_java_method): Likewise.
13003         (end_java_method): Likewise.
13004         * except.c (link_handler): Use xmalloc.
13005         (free_eh_ranges): New function.
13006         (method_init_exceptions): Use it.
13007         (add_handler): Use xmalloc.
13008         (expand_start_java_handler): Don't mess with obstacks.
13009         (prepare_eh_table_type): Likewise.
13010         (expand_end_java_handler): Likewise.
13011         * expr.c (push_value): Likewise.
13012         (create_label_decl): Likewise.
13013         (build_jni_stub): Likewise.
13014         (java_lang_expand_expr): Likewise.
13015         (note_instructions): Use xrealloc.
13016         (java_push_constant_from_pool): Don't mess with obstacks.
13017         (process_jvm_instruction): Likewise.
13018         * java-tree.h (cyclic_inheritance_report): Remove duplicate
13019         declaration.
13020         * jcf-parse.c (get_constant): Don't mess with obstacks.
13021         (read_class): Likewise.
13022         (jcf_parse): Likewise.
13023         * lex.c (expression_obstack): Remove.
13024         (java_lex): Don't use obstack_free.
13025         * parse.h (exit_java_complete_class): Don't mess with obstacks.
13026         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
13027         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
13028         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
13029         * parse.y (gaol): Add more GC roots.
13030         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
13031         (lookup_field_wrapper): Likewise.
13032         (obtain_incomplete_type): Don't mess with obstacks.
13033         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
13034         macros.
13035         (craft_constructor): Don't mess with obstacks.
13036         (safe_layout_class): Likewise.
13037         (java_complete_class): Likewise.
13038         (source_end_java_method): Likewise.
13039         (build_outer_field_access_methods): Likewise.
13040         (build_outer_method_access_method): Likewise.
13041         (maybe_build_thisn_access_method): Likewise.
13042         (build_dot_class_method_invocation): Likewise.
13043         (java_complete_tree): Likewise.
13044         (java_complete_lhs): Likewise.
13045         (do_merge_string_cste): Likewise.
13046         (patch_string_cst): Likewise.
13047         (array_constructor_check_entry): Likewise.
13048         * typeck.c (build_java_array_type): Likewise.
13049         (parse_signature_string): Likewise.
13050         (build_java_signature): Likewise.
13052 2000-10-12  Tom Tromey  <tromey@cygnus.com>
13054         Fix for PR gcj/356:
13055         * gjavah.c (add_class_decl): Don't special-case inner classes.
13056         (add_namelet): Likewise.
13058 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
13060         * java-tree.h: Constify current_encoding.
13061         * lang.c: Constify current_encoding.
13063 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
13065         * jvgenmain.c (class_mangling_suffix): Omit `.'.
13066         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
13068 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13070         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
13071         patch. Fixes gcj/340.
13073 2000-10-10  Tom Tromey  <tromey@cygnus.com>
13075         * lex.c (java_new_lexer): Initialize out_first and out_last
13076         fields.
13077         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
13079 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13081         * parse.y (pop_current_osb): New function.
13082         (array_type:): Use `dims:', changed actions
13083         accordingly. Suggested by Anthony Green.
13084         (array_creation_expression:): Used pop_current_osb.
13085         (cast_expression:): Likewise.
13086         (search_applicable_method_list): Fixed indentation.
13088 2000-10-08  Anthony Green  <green@redhat.com>
13090         * parse.y (array_type_literal): Remove production.
13091         (type_literals): Refer to array_type, not array_type_literal.
13093 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13095         Patch contributed by Corey Minyard.
13096         * decl.c (check_local_named_variable): New function.
13097         (tree check_local_unnamed_variable): Likewise.
13098         (find_local_variable): Splitted. Call check_local_{un}named_variable.
13100 2000-10-07  Anthony Green  <green@redhat.com>
13102         * class.c (layout_class): Handle case where superclass can't be
13103         layed out yet.
13105 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13107         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
13108         gperf.
13110 2000-10-05  Tom Tromey  <tromey@cygnus.com>
13112         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
13113         * jvgenmain.c (class_mangling_prefix): Removed.
13114         (class_mangling_suffix): New global.
13115         (main): Use it.
13116         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
13117         `$'.
13118         (print_method_info): Handle overrides for static and final
13119         methods.
13120         (process_file): Generate declaration for class object field.
13121         * class.c (cxx_keywords): New array.
13122         (utf8_cmp): New function.
13123         (cxx_keyword_p): New function.
13124         (layout_class_method): Mangle C++ keywords by appending `$'.
13125         (mangle_field): New function.
13126         (mangle_class_field): Use mangle_field.  Mangle class name as
13127         `class$'.
13128         (mangle_static_field): Use mangle_field.
13130 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13132         * decl.c (find_local_variable): Removed uncessary type check and
13133         fixed range check typo. From Corey Minyard.
13135 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13137         * decl.c (give_name_to_locals): New local `code_offset'. Call
13138         `maybe_adjust_start_pc'.
13139         * expr.c (note_instructions): New function.
13140         (expand_byte_code): Don't collect insn starts here.
13141         (peek_opcode_at_pc): New function.
13142         (maybe_adjust_start_pc): Likewise.
13143         * java-tree.h (maybe_adjust_start_pc): Declare.
13144         (note_instructions): Likewise.
13145         * jcf-parse.c (parse_class_file): Call `note_instructions'.
13147 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13149         * parse.y (field_access:): Fixed indentation.
13150         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
13152 2000-09-07  Tom Tromey  <tromey@cygnus.com>
13154         Fix for PR gcj/307:
13155         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
13156         JPRIMITIVE_TYPE_P, for arithmetic operators.
13157         (patch_method_invocation): Indentation fix.
13158         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
13159         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
13160         (do_unary_numeric_promotion): Cleaned up code.
13161         (valid_cast_to_p): Handle boolean correctly.
13163 2000-09-27  Tom Tromey  <tromey@cygnus.com>
13165         * lex.c (java_read_unicode): Reset bs_count when finished with
13166         `\u' sequence.
13168 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
13170         Convert to GC.
13171         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
13172         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
13173         (typeck.o): Depend on ggc.h.
13174         * class.c (add_method_1): Use GC functions for allocation.
13175         (init_class_processing): Register roots.
13176         * decl.c (ggc_p): Set to 1.
13177         (pending_local_decls): Make it static.
13178         (push_jvm_slot): Use GC functions for allocation.
13179         (init_decl_processing): Register roots.
13180         (give_name_to_locals): Use GC functions for allocation.
13181         (lang_mark_tree): New function.
13182         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
13183         functions for allocation.
13184         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
13185         * lex.c (java_lex): Use build_string, rather than replicating it
13186         inline.
13187         * parse.y (goal): Add more roots.
13188         (mark_parser_ctxt): New function.
13189         * typeck.c: Include ggc.h.
13191 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13193         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
13194         contains something else than MODIFY_EXPR.
13196 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
13198         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13199         * Makefile.in (parse.o): Depend on ggc.h.
13200         (class.o): Likewise.
13201         (constants.o): Likewise.
13202         (decl.o): Likewise.
13203         (expr.o): Likewise.
13204         (jcf-parse.o): Likewise.
13205         (jcf-write.o): Likewise.
13206         (mangle.o): Likewise.
13207         * class.c: Include ggc.h.
13208         (build_static_field_ref): Register GC roots.
13209         (layout_class): Likewise.
13210         (init_class_processing): Likewise.
13211         * constants.c: Include ggc.h.
13212         (current_constant_pool_data_ref): Remove.
13213         (tag_nodes): Move it to ...
13214         (get_tag_node): ... here.  Register GC roots.
13215         * decl.c: Include ggc.h.  Remove many global tree definitions.
13216         (throw_node): Define.
13217         (java_global_trees): Likewise.
13218         (predef_filenames): Make the size a constant.
13219         (init_decl_processing): Adjust accordingly.
13220         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
13221         * expr.c: Include ggc.h.
13222         (init_expr_processing): Register GC roots.
13223         (build_invokeinterface): Likewise.
13224         * java-tree.h: Replace extern tree declarations with macros.
13225         (java_global_trees): New variable.
13226         (java_tree_index): New enumeration.
13227         (init_jcf_parse): Declare.
13228         * jcf-parse.c: Include ggc.h.
13229         (current_class): Remove declaration.
13230         (main_class): Likewise.
13231         (all_class_list): Likewise.
13232         (predefined_filename_p): Adjust for constant size of
13233         predef_filenames.
13234         (init_jcf_parse): New function.
13235         * jcf-write.c: Include ggc.h.
13236         (generate_classfile): Register GC roots.
13237         (append_synthetic_attribute): Likewise.
13238         (append_innerclass_attribute_entry): Likewise.
13239         * lang.c: Include ggc.h.
13240         (lang_print_error): Register GC roots.
13241         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13242         with macros.
13243         * parse.y: Include ggc.h.
13244         (wfl_operator): Remove.
13245         (goal): Register GC roots.
13246         (java_pop_parser_context): Adjust for new field names.
13247         (java_parser_context_save_global): Likewse.
13248         (java_parser_context_restore_global): Likewise.
13249         (java_parser_context_suspend): Likewise.
13250         (java_parser_context_resume): Likewise.
13251         (verify_constructor_circularity): Register GC roots.
13252         (lookup_cl): Likewise.
13253         (java_reorder_fields): Likewise.
13254         (build_current_this): Likewise.
13255         (class_in_current_package): Likewise.
13256         (argument_types_convertible): Likewise.
13257         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13259 2000-09-14  Tom Tromey  <tromey@cygnus.com>
13261         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13263 2000-09-13  Tom Tromey  <tromey@cygnus.com>
13265         * jcf-parse.c: Include <locale.h>.
13266         * jv-scan.c: Include <locale.h>.
13268 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13270         * expr.c (pop_type_0): Return `Object' if trying to merge two
13271         interface types.
13272         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13273         interface types; `Object' is always a valid supertype.
13275 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13277         Fix for PR gcj/33:
13278         * jv-scan.c (help): Document --encoding.
13279         (options): Added `encoding' entry.
13280         (OPT_ENCODING): New define.
13281         (main): Handle --encoding.
13282         Include <langinfo.h> if nl_langinfo exists.
13283         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13284         --encoding.
13285         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13286         (parse_source_file): Correctly call java_init_lex.  Added `finput'
13287         argument.  Use nl_langinfo to determine default encoding.
13288         * java-tree.h (current_encoding): Declare.
13289         * parse.y (java_parser_context_restore_global): Don't restore
13290         `finput'.
13291         (java_parser_context_save_global): Don't set `finput' field.
13292         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
13293         if required.
13294         * lang.c (current_encoding): New global.
13295         (lang_decode_option): Recognize `-fencoding='.
13296         (finish_parse): Don't close finput.
13297         * parse.h (struct parser_ctxt): Removed `finput' and
13298         `unget_utf8_value' fields.  Added `lexer' field.
13299         (java_init_lex): Fixed declaration.
13300         * lex.c (java_new_lexer): New function.
13301         (java_destroy_lexer): Likewise.
13302         (java_read_char): Added `lex' argument.  Handle iconv case.
13303         (java_read_unicode): Added `lex' argument.  Count backslashes in
13304         lexer structure.
13305         (java_init_lex): Added `finput' and `encoding' arguments.  Set
13306         `lexer' field in ctxp.
13307         (BAD_UTF8_VALUE): Removed.
13308         (java_lex): Handle seeing UEOF in the middle of a string literal.
13309         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13310         (java_lexer): New structure.
13311         (UNGETC): Removed.
13312         (GETC): Removed.
13313         (DEFAULT_ENCODING): New define.
13314         (java_destroy_lexer): Declare.
13316 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13318         Fix for PR gcj/343:
13319         * lex.c (java_init_lex): Initialize java_io_serializable.
13320         * parse.y (java_io_serializable): New global.
13321         (valid_ref_assignconv_cast_p): An array can be cast to
13322         serializable.
13324 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
13326         * decl.c, expr.c: Include defaults.h if not already included.
13327         Don't define the *_TYPE_SIZE macros.
13329 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
13331         * typeck.c (build_java_array_type): Correct first parameter
13332         in ADJUST_FIELD_ALIGN invocation.
13334 2000-09-06  Tom Tromey  <tromey@cygnus.com>
13336         * lang-specs.h: Also recognize `-femit-class-files'.
13338 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13340         * verify.c (merge_types): Load the types to merge if necessary.
13342 2000-09-02  Anthony Green  <green@redhat.com>
13344         * jcf-io.c: Include zlib.h.
13345         (open_in_zip): Read compressed class file archives.
13346         * zipfile.h (ZipDirectory): Add uncompressed_size and
13347         compression_method fields.
13348         * zextract.c (read_zip_archive): Collect file compression info.
13350 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
13352         * parse.y (do_resolve_class): Also explore superclasses of
13353         intermediate enclosing contexts when searching for inner classes.
13355 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13357         * parse.y (variable_declarator_id:): Better error message.
13358         (expression_statement:): Use YYNOT_TWICE.
13359         (cast_expression:): Likewise.
13360         (assignment:): Likewise.
13362 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13364         * parse.y (do_merge_string_cste): New locals. Create new
13365         STRING_CSTs each time, use memcpy. Fixes gcj/311.
13367 2000-08-07  Hans Boehm  <boehm@acm.org>
13369         * boehm.c (mark_reference_fields): Set marking bits for all words in
13370         a multiple-word record.
13371         (get_boehm_type_descriptor): Use the procedure marking descriptor for
13372         java.lang.Class.
13374 2000-08-31  Mike Stump  <mrs@wrs.com>
13376         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13377         jcf-dump$(exeext)): Make parallel safe.
13379 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13381         * jcf-parse.c (set_source_filename): Constify a char *.
13382         * jcf-write.c (append_innerclasses_attribute,
13383         make_class_file_name): Constify a char *.  Don't recycle a
13384         variable for an unrelated purpose.
13385         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13386         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13388 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13390         * expr.c (can_widen_reference_to): Fixed indentation.
13391         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13392         * parse.y: `finit$' replaces `$finit$' in comments.
13393         (try_builtin_assignconv): Fixed leading comment.
13395 2000-08-25  Greg McGary  <greg@mcgary.org>
13397         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13399 2000-08-24  Greg McGary  <greg@mcgary.org>
13401         * lang.c (lang_decode_option): Use ARRAY_SIZE.
13402         * parse.y (BINOP_LOOKUP): Likewise.
13404 2000-08-22  Andrew Haley  <aph@cygnus.com>
13406         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13407         sign extending. Fixes gcj/321.
13408         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13409         combining to make a jlong. Fixes gcj/321.
13411 2000-08-21  Nix  <nix@esperi.demon.co.uk>
13413         * lang-specs.h: Do not process -o or run the assembler if
13414         -fsyntax-only.
13416 2000-08-16  Andrew Haley  <aph@cygnus.com>
13418         * typeck.c (build_java_array_type): Rewrite code to do array
13419         alignment.  Take into account back-end macros when aligning array
13420         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13421         user to set alignment. Fixes gcj/252 and 160.
13423 2000-08-09  Tom Tromey  <tromey@cygnus.com>
13425         * parse.y (check_abstract_method_definitions): Now return `int'.
13426         Check implemented interfaces.  Fixes PR gcj/305.
13428         * parse.y (patch_switch_statement): Disallow `long' in switch
13429         expressions.  Fixes PR gcj/310.
13431 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13433         * decl.c (finit_leg_identifier_node): New global.
13434         (init_decl_processing): Use `finit$' to initialize
13435         finit_identifier_node. Use `$finit$' to initialize
13436         finit_leg_identifier_node.
13437         * expr.c (expand_java_field_op): Use ID_FINIT_P.
13438         * java-tree.h (finit_identifier_node): Changed attached comment.
13439         (finit_leg_identifier_node): New declaration.
13440         (ID_FINIT_P): Take finit_identifier_node and
13441         finit_leg_identifier_node into account. This is a backward
13442         compatibility hack.
13444 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13446         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13447         Jan 6 2000 patch.
13448         (generate_bytecode_insns): Check `nargs' before emitting it.
13449         * verify.c (merge_type_state): Fixed typo.
13450         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13451         generate_bytecode_{conditional,insns}.
13453 2000-08-13  Anthony Green  <green@redhat.com>
13455         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13456         for -pg builds).
13458 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13460         * class.c (maybe_layout_super_class): Fixed indentation.
13461         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13462         (java_check_methods): New function declaration.
13463         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13464         instead of `str_ptr'.
13465         * jcf-write.c (generate_bytecode_insns): Emit number the of args
13466         of a `invokeinterface' at the right time.
13467         * parse.h (WFL_STRIP_BRACKET): New macro.
13468         (SET_TYPE_FOR_RESOLUTION): Use it.
13469         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13470         (check_class_interface_creation): Don't check for cross package
13471         innerclass name clashes.
13472         (method_header): Behave properly if MDECL is `error_mark_node'.
13473         (method_declarator): Return `error_mark_node' if bogus current
13474         class.
13475         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13476         (resolve_and_layout): New local `decl_type', set and used. Call
13477         java_check_methods.
13478         (java_check_methods): New method.
13479         (java_layout_classes): Use it.
13480         (resolve_qualified_expression_name): No EH check necessary in
13481         access$<n>.
13482         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13483         `case' statement.
13484         (patch_assignment): Set DECL_INITIAL on integral final local.
13486 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13488         * java-tree.h (flag_extraneous_semicolon): New extern.
13489         * lang-options.h: (-Wextraneous-semicolon): New option.
13490         * lang.c (flag_redundant): Fixed typo in leading comment.
13491         (flag_extraneous_semicolon): New global.
13492         (lang_decode_option): Set `flag_extraneous_semicolon' when
13493         -Wall. Decode `-Wextraneous-semicolon'.
13494         * parse.y (type_declaration:): Removed `SC_TK' hack, added
13495         `empty_statement' rule.
13496         (class_body_declaration): Likewise.
13497         (method_body:): Accept `;' as a method body.
13498         (static_initializer:): Removed `SC_TK' hack.
13499         (constructor_block_end:): Likewise.
13500         (empty_statement:): Report deprecated empty declaration. Fixes
13501         gcj/295
13503 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13505         * parse.y (build_dot_class_method_invocation): Changed parameter
13506         name to `type'. Build signature from `type' and convert it to a
13507         STRING_CST if it's an array.
13508         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13509         to use `ref_type' directly.
13511 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
13513         * lang-options.h: Added a comma after the last element to avoid
13514         syntax errors when other languages define additional options.
13516 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
13518         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13519         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13520         (jc1): Link with $(BACKEND).
13521         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13523 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
13525         * jvspec.c: Adjust type of second argument to
13526         lang_specific_driver, and update code as necessary.
13528         * class.c (build_dtable_decl): Initialize dummy.
13530 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13532         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13533         method bodies not to rule out discarding `<clinit>'; don't use
13534         <clinit> to initialize static fields with constant initializers.
13536 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13538         * gjavah.c (print_method_info): Added `synth' parameter. Skip
13539         synthetic methods.
13540         (method_synthetic): New global.
13541         (HANDLE_METHOD): Recognize synthetic method and tell
13542         `print_method_info' about it.
13543         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13544         processing a synthetic method.
13545         * jcf-reader.c (skip_attribute): New function.
13546         ( skip_attribute): Likewise.
13548 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13550         * parse.y (build_outer_field_access): Fixed comments.
13551         (fix_constructors): Emit the initialization of this$<n> before
13552         calling $finit$.
13553         (resolve_qualified_expression_name): Build an access to `decl' if
13554         necessary.
13556 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13558         * parse-scan.y (curent_class): Non longer const.
13559         (inner_qualifier, inner_qualifier_length): Deleted.
13560         (current_class_length): New global.
13561         (bracket_count): Fixed typo in leading comment.
13562         (anonymous_count): New global.
13563         (class_instance_creation_expression:): Handle anonymous classes.
13564         (anonymous_class_creation:): New rule.
13565         (push_class_context): Rewritten.
13566         (pop_class_context): Likewise.
13567         (INNER_QUALIFIER): Macro deleted.
13568         (report_class_declaration): call `push_class_context' when
13569         entering the function. `fprintf' format modified not to use
13570         INNER_QUALIFIER.
13571         (report_class_declaration): Assign `package_name' and
13572         `current_class' to NULL separately.
13574 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13576         * expr.c (build_invokeinterface): Call layout_class_methods on
13577         target interface.
13579 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13580             Anthony Green  <green@cygnus.com>
13581             Alexandre Petit-Bianco  <apbianco@cygnus.com>
13583         * class.c (make_class_data): Create vtable for abstract classes.
13584         (get_dispatch_table): Changed to cope with abstract classes.
13586 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13588         * parse.y (patch_method_invocation): Don't reverse the argument
13589         list when dealing with anonymous class constructors. Fixed typo in
13590         comment.
13592 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13594         * parse.y (build_alias_initializer_parameter_list): Reverse
13595         crafted list when building aliases for anonymous class
13596         constructors.
13598 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13600         * parse.y (jdep_resolve_class): Don't bother checking potential
13601         innerclass access if `decl' is NULL.
13602         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13603         WFL.
13605 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13607         * parse.c: Remove (again.)
13609 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13611         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13612         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13613         outside the `if' statement, alias to innerclass removed, `decl'
13614         used to mark the class complete.
13616 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13618         * parse.y (simple_name:): Fixed typo in error message.
13620 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13622         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13623         or its first operand can be error marks.
13625 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13627         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13628         * parse.y (method_header): Likewise.
13630 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13632         * parse.y (process_imports): Consider that one might be trying to
13633         import an innerclass. Fixes gcj/254
13635 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13637         * parse.y (find_as_inner_class): Handle the case where the
13638         enclosing context of an innerclass has been loaded as bytecode.
13640 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13642         * parse.y (simple_name:): Reject `$' in type names.
13643         (resolve_type_during_patch): Use `type' as a second
13644         argument to resolve_no_layout. Fixes gcj/257.
13646 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
13648         * parse.y (find_most_specific_methods_list): Select the only
13649         non-abstract method even if max has been set.
13650         Fixes gcj/285, gcj/298.
13652 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
13654         * lang-specs.h: Added %(jc1) to java compiler options.
13656 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13658         * .cvsignore: New file.
13660 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13662         * parse.y (not_accessible_p): Access granted to innerclasses
13663         (indirectly) extending the reference type. Fixes gcj/249.
13665 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13667         * parse.y (patch_method_invocation): Fixed comment.
13668         (maybe_use_access_method): Build this$<n>s to the context of the
13669         target method, or a type that extends it. Fixes gcj/242.
13671 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13673         * parse.c: Remove.
13675 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13677         * parse.y (fold_constant_for_init): Avoid bullish conversion.
13679 2000-07-13  Tom Tromey  <tromey@cygnus.com>
13681         * lang-specs.h: Added %{I*}.
13683 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13685         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13687 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13689         * parse-scan.c: Remove.
13691 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13693         * class.c (set_super_info): Handled protected inner classes.
13694         (common_enclosing_context_p): Bail early if arguments aren't both
13695         inner classes.
13696         (get_access_flags_from_decl): Handle private and protected inner
13697         classes.
13698         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13699         (CLASS_PROTECTED): Likewise.
13700         (struct lang_type): New bitfield `poic'.
13701         * parse.y (jdep_resolve_class): Call check_inner_class_access on
13702         inner classes only.
13703         (check_inner_class_access): Renamed arguments, added
13704         comments. Handles protected inner classes (fixes gcj/225)
13705         (not_accessible_p): Fixed comments. Avoid handling inner classes.
13707 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13709         * parse.y (resolve_qualified_expression_name): Verify qualified
13710         access to `this'. Fixes gcj/239.
13712 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13714         * jcf-write.c (generate_classfile): Don't install ConstantValue
13715         for null pointers.
13717 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13719         * parse.y (resolve_qualified_expression_name): Handle inner class
13720         access. Fixes gcj/256.
13722 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13724         * jcf-write.c (generate_classfile): Properly install the
13725         ConstantValue attribute and the initial value constant pool index
13726         on string constants.
13727         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13728         class files.
13730 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13732         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13733         construct.
13734         * parse.y (find_as_inner_class): Fixed typo.
13735         (do_resolve_class): Explore enclosing contexts when searching for
13736         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13737         (check_inner_class_access): Check `decl' which can be null in case
13738         of previous errors.
13740 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13742         * java-tree.h (java_debug_context): Declared `extern'.
13743         (safe_layout_class): Likewise.
13744         * parse.y (resolve_field_access): Field must be `static' in order
13745         to be replaced by its initial value. Added comments.
13746         (find_applicable_accessible_methods_list): Fixed typo.
13747         (find_most_specific_methods_list): Methods found in innerclasses
13748         take over methods founds in the enclosing contexts.
13749         (java_complete_tree): Loosen restrictions on the type of DECLs
13750         that can be replaced by their initialization values.
13751         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13753 2000-07-05  Tom Tromey  <tromey@cygnus.com>
13755         * Make-lang.in (PARSE_DIR): New macro.
13756         (PARSE_RELDIR): Likewise.
13757         (PARSE_C): Likewise.
13758         (PARSE_SCAN_C): Likewise.
13759         ($(PARSE_C)): New target.
13760         ($(PARSE_SCAN_C)): Likewise.
13761         (SET_BISON): New macro.
13762         (BISONFLAGS): Likewise.
13763         (JAVABISONFLAGS): Likewise.
13765 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
13767         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13768         argument on the first pass for CNI as well as JNI.
13769         (print_method_info): Set up method name on the first pass only.
13771 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13773         * parse.y (parser_qualified_classname): Removed parameter
13774         `is_static'.
13775         (create_interface): Removed first passed parameter to
13776         parser_qualified_classname.
13777         (create_class): Likewise. Don't install alias on static
13778         innerclasses. Fixes gcj/275.
13780 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13782         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13783         debugable statement with empty_stmt_node. Fixes gcj/272
13785 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13787         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13788         gcj/271.
13790 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13792         * jcf-write.c (push_long_const): Appropriately cast short negative
13793         constant to jword.
13795 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13797         * parse.y (verify_constructor_super): Use loop variable
13798         `m_arg_type' initialized with `mdecl_arg_type'.
13800 2000-06-29  Tom Tromey  <tromey@cygnus.com>
13802         * parse.y (resolve_field_access): Handle case where `type_found'
13803         is NULL.
13805 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13807         * expr.c (lookup_field): The same field can be found through two
13808         different interface. Don't declare it ambiguous in that case.
13810 2000-06-27  Tom Tromey  <tromey@cygnus.com>
13812         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
13813         follows \r, then unget it at a lower level.
13815 2000-06-26  Tom Tromey  <tromey@cygnus.com>
13817         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13818         java_complete_tree.
13820 2000-06-25  Tom Tromey  <tromey@cygnus.com>
13822         * parse.y (for_statement): Wrap expression in a WFL if it is a
13823         constant.  For PR gcj/268.
13825 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13827         * parse.y (do_resolve_class): Minor optimiztion in the package
13828         list search. Removed unnecessary test and return statement.
13829         (valid_ref_assignconv_cast_p): Order of arguments to
13830         enclosing_context_p fixed.
13832 2000-06-24  Tom Tromey  <tromey@cygnus.com>
13834         * expr.c (lookup_field): Print error and return error_mark_node if
13835         field reference is ambiguous.
13837         * parse.y (check_abstract_method_definitions): Also check if
13838         `other_method' is abstract.
13840 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13842         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13843         classes.
13844         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13845         (struct lang_type): New field `pic'.
13846         (CLASS_PRIVATE): New macro.
13847         * parse.y (check_inner_class_access): New function.
13848         (jdep_resolve_class): Call it.
13850 2000-06-23  Tom Tromey  <tromey@cygnus.com>
13852         * parse.y (patch_incomplete_class_ref): Initialize the returned
13853         class.  For PR gcj/260.
13855 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13857         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13859 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13861         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13862         Java specific checks.
13863         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13864         screened by DECL_P.
13865         * java-tree.def (CASE_EXPR): Marked 'e'.
13866         (DEFAULT_EXPR): Likewise.
13867         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13868         screened by DECL_P.
13869         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13870         Java specific checks.
13871         (generate_bytecode_insns): Test try_block for BLOCK before using
13872         BLOCK_EXPR_BODY.
13873         * parse.y (build_wfl_wrap): Added `location' argument. Set
13874         EXPR_WFL_LINECOL accordingly.
13875         (dim_expr:): Wrap constants with WFLs.
13876         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13877         (resolve_package): Check for `stmt' not being a BLOCK before
13878         building a debuggable statement with it.
13879         (make_qualified_primary): Added extra parameter to build_wfl_wrap
13880         invocation.
13881         (resolve_field_access): Make sure `decl' is a DECL before treating
13882         it as such.
13883         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13884         IDENTIFIER_NODE before treating it as such.
13885         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13886         treating it as such.
13887         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13888         to be applied only on non array types.
13890 2000-06-16  Per Bothner  <per@bothner.com>
13892         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
13893         define in terms of DECL_RESULT, as that fails when --enable-checking.
13895 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13897         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
13898         types the same in comparison.
13899         (CHECK_OP): Add static prototype.
13901 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13903         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13904         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13905         * parse.c: Rebuilt.
13907 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13909         * decl.c (create_primitive_vtable): Prototype.
13911         * jcf-write.c (generate_bytecode_insns): Initialize variable
13912         `saved_context'.
13914         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13916 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13918         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13919         to track searched classes, and do not search the same class more than
13920         once. Call find_applicable_accessible_methods_list on immediate
13921         superclass, instead of search_applicable_method_list on all ancestors.
13922         Fix for PR gcj/238.
13924 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13926         * parse.y (register_fields): Permit static fields in inner classes
13927         if they are final. Fix for PR gcj/255.
13929 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13931         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13932         * parse.y (find_in_imports): Returned type changed to void,
13933         leading comment fixed.
13934         (register_package): New function.
13935         (qualify_and_find): Likewise.
13936         (package_declaration:): Use `register_package'.
13937         (single_type_import_declaration:): Removed local variable
13938         `node'. Added missing `;' for consistency.
13939         (type_import_on_demand_declaration:): Use `chainon' to link new
13940         entries.
13941         (lookup_field_wrapper): Lookup local variables defined in outer
13942         contexts first.
13943         (java_complete_class): Don't reverse the list of imported on demand.
13944         (do_resolve_class): Reorganized. Removed local variable
13945         `original_name'. Call `qualify_and_find' with the current package
13946         name, invoke `find_in_imports_on_demand' right after. Call
13947         `qualify_and_find' with the packages we've seen so far. Fixed
13948         operations numbering in comments.
13949         (java_expand_class): Don't reverse `package_list'.
13950         (find_most_specific_methods_list): New local variables `abstract'
13951         and `candidates'. Use them to pick the right method.
13953 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
13955         * parse.y (check_modifiers_consistency): Don't subtract out
13956         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13958 2000-06-04  Philipp Thomas  <pthomas@suse.de>
13960         * Makefile.in (INTLLIBS): New.
13961         (LIBS): Add above.
13962         (DEPLIBS): Ditto.
13964 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13966         * class.c (get_dispatch_table): Build the vtable dummy entry list
13967         element with a null purpose. Fixed leading comment.
13968         (build_dtable_decl): Build an accurate dtable type when appropriate
13969         and use it.
13971 2000-06-02  Richard Henderson  <rth@cygnus.com>
13973         * lang.c (lang_get_alias_set): New.
13975 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13977         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13978         before using it as the accessed field.
13980 2000-05-31  Tom Tromey  <tromey@cygnus.com>
13982         * java-tree.h (boolean_array_vtable, byte_array_vtable,
13983         char_array_vtable, short_array_vtable, int_array_vtable,
13984         long_array_vtable, float_array_vtable, double_array_vtable):
13985         Declare.
13986         * expr.c (get_primitive_array_vtable): New function.
13987         (create_primitive_vtable): New function.
13988         (java_lang_expand_expr): Enable code to statically generate
13989         arrays.
13990         * decl.c (init_decl_processing): Create primitive vtables.
13991         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13992         short_array_vtable, int_array_vtable, long_array_vtable,
13993         float_array_vtable, double_array_vtable): Define.
13995 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
13997         * java/parse.y (find_applicable_accessible_methods_list):
13998         Don't add an uninitialized value to the list.
14000 2000-05-25  Tom Tromey  <tromey@cygnus.com>
14002         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
14003         when trying to see if field's class should be initialized.  Always
14004         initialize field's declaring class, not qualified class.
14005         For PR gcj/162.
14007         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
14008         `wfl_operator', to maybe_build_primttype_type_ref.
14009         Fixes PR gcj/235.
14011 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
14013         * parse.y (patch_method_invocation): Don't try to lookup methods
14014         in primitive types.
14016 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14018         * parse.y (resolve_field_access): Call the appropriate <clinit>
14019         before accessing the length of a static array. Craft a decl for
14020         the field while its time. Fixes PR gcj/129.
14022 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14024         * parse.y (resolve_package): Correctly set `*next' (was off by
14025         one.)
14026         (resolve_qualified_expression_name): Fixed comment.
14028 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14030         * jcf-parse.c (jcf_parse_source): Reset current_class and
14031         current_function_decl to NULL before parsing a new file.
14033 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14035         * parse.y (block_end:): If the collected block doesn't feature a
14036         statement, insert an empty statement.
14038 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14040         * parse.y (maybe_yank_clinit): New function.
14041         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
14042         end of the list of methods belonging to a class.
14043         (java_complete_expand_method): Check whether <clinit> is really
14044         necessary and expand it accordingly.
14046 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14048         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
14049         processed by the method's switch statement.
14051 2000-05-19  Tom Tromey  <tromey@cygnus.com>
14053         * java-tree.h: Added init state enum.
14054         * decl.c (emit_init_test_initialization): Initialize class
14055         initialization check variable by looking at class' state.
14057 2000-05-19  Tom Tromey  <tromey@cygnus.com>
14059         * java-tree.h (build_instanceof): Declare.
14060         (build_get_class): Declare.
14061         * parse.y (patch_binop): Use build_instanceof.
14062         * expr.c (build_instanceof): New function.  If class is final,
14063         don't make a function call.
14064         (expand_java_INSTANCEOF): Use it.
14065         (build_get_class): New function.
14067 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
14069         * jcf-write.c (generate_classfile): Scan the source_file for
14070         slashes with the right pointer variable.
14072 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
14074         * lang.c (lang_decode_option): Update -Wunused flags by calling
14075         set_Wunused.
14076         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
14078 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14080         * check_init.c (check_init): Constify local char *.
14081         * class.c (push_class): Constify local char *.
14082         * java_tree.h: Update prototypes.
14083         * jcf-io.c (open_class): Constify filename parameter and
14084         return value.
14085         (find_class): Remove redundant string copy.  Cast return from
14086         open_class.
14087         * jcf-parse.c (read_class, parse_class_file, yyparse):
14088         Constify local char *.
14089         * jcf-write.c (generate_bytecode_insns, generate_classfile):
14090         Constify local char *.
14091         * jcf.h (JCF): Constify filename and classname.
14092         (JCF_FINISH): Cast args to FREE to char * when appropriate.
14093         * lang.c (init_parse): Constify parameter and return value.
14094         * lex.c (java_get_line_col): Constify filename parameter.
14095         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
14096         * parse.y (java_parser_context_suspend,
14097         issue_warning_error_from_context, safe_layout_class): Constify
14098         local char *.
14099         * parse.c: Regenerate.
14101 2000-05-08  Tom Tromey  <tromey@cygnus.com>
14103         * expr.c (build_jni_stub): Cache the result of
14104         _Jv_LookupJNIMethod.
14106 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14108         * decl.c (predef_filenames_size): Now 7.
14109         (predef_filenames): New seventh entry.
14111 2000-05-04  Tom Tromey  <tromey@cygnus.com>
14113         * boehm.c (mark_reference_fields): Don't mark RawData fields.
14114         Keep track of when we've seen a reference field after a
14115         non-reference field.
14116         (get_boehm_type_descriptor): Handle case where we see
14117         non-reference fields but no trailing reference field.
14118         * decl.c (rawdata_ptr_type_node): Define.
14119         (init_decl_processing): Initialize rawdata_ptr_type_node.
14120         * java-tree.h (rawdata_ptr_type_node): Declare.
14122 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14124         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
14125         specifiers in calls to fprintf.
14127 2000-05-03  Andrew Haley  <aph@cygnus.com>
14129         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
14131         * javaop.h (WORD_TO_INT): New function.
14132         (IMMEDIATE_s4): Use WORD_TO_INT.
14133         * jcf.h (JPOOL_INT): Ditto.
14135         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
14136         separator.
14138 2000-04-19  Tom Tromey  <tromey@cygnus.com>
14140         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
14141         on native function.
14142         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
14143         JNI methods.
14144         * expr.c (build_jni_stub): New function.
14145         * lang-specs.h: -fjni and -femit-class-file are incompatible.
14146         * parse.c: Rebuilt.
14147         * parse.y (java_complete_expand_methods): Expand a native method
14148         and call build_jni_stub if -fjni given.
14149         * lang-options.h: Document -fjni.
14150         * lang.c (flag_jni): New global.
14151         (lang_f_options): Added `jni' entry.
14152         * java-tree.h (soft_lookupjnimethod_node,
14153         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
14154         Declare.
14155         (flag_jni): Declare.
14156         (build_jni_stub): Declare.
14157         (struct lang_decl): Added `native' flag.
14158         (METHOD_NATIVE): Redefined to use `native' field of lang specific
14159         structure.
14160         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
14161         soft_jnipopsystemframe_node): New globals.
14162         (init_decl_processing): Set them.  _Jv_InitClass only takes one
14163         argument.
14165         * java-tree.def: Put into `C' mode.
14167 2000-04-27  Tom Tromey  <tromey@cygnus.com>
14169         Fix for PR gcj/2:
14170         * expr.c (expand_invoke): Generate check to see if object pointer
14171         is null in nonvirtual invocation case.
14172         * java-tree.h (soft_nullpointer_node): Declare.
14173         * decl.c (soft_nullpointer_node): New global.
14174         (init_decl_processing): Initialize soft_nullpointer_node.
14175         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14176         or `private' methods.
14177         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14179 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14181         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14182         from <clinit>
14184 2000-04-26  Tom Tromey  <tromey@cygnus.com>
14186         * zextract.c (find_zip_file_start): New function.
14187         (read_zip_archive): Use it.
14189 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14191         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
14193 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14195         * class.c (common_enclosing_context_p): New function.
14196         * java-tree.h (common_enclosing_context_p): Added prototype.
14197         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14198         classes sharing an outer context with the current instance.
14199         * parse.y (build_access_to_thisn): Fixed leading comment.
14200         (verify_constructor_super): New local `supper_inner'. Skip
14201         enclosing context argument in the case of inner class constructors.
14202         (patch_method_invocation): Insert proper context as second
14203         parameter to pure inner class constructor super invocations.
14205 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14207         * parse.y (end_class_declaration): Reset the interface number
14208         counter.
14210 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14212         * parse.y (source_start_java_method): Deleted unnecessary code.
14213         (patch_method_invocation): Fixed comment.
14215 2000-04-24  Robert Lipe <robertlipe@usa.net>
14217         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14219 2000-04-23  Tom Tromey  <tromey@cygnus.com>
14221         * boehm.c (mark_reference_fields): Use int_byte_position.
14223 2000-04-22  Tom Tromey  <tromey@cygnus.com>
14225         * boehm.c (mark_reference_fields): Only call byte_position on
14226         non-static fields.
14228 2000-04-22  Tom Tromey  <tromey@cygnus.com>
14230         * boehm.c (mark_reference_fields): Added `last_view_index'
14231         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
14233 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
14235         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14236         * parse.y (check_class_interface_creation): Fixed comments. Select
14237         permitted modifiers for (inner) interfaces. Changed error message
14238         to report rejected modifiers used with local classes.
14240 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14242         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14243         of directly inherited type considered in scope.
14244         * parse.y (do_resolve_class): Search inherited classes for inner
14245         classes.
14247 2000-04-20  Tom Tromey  <tromey@cygnus.com>
14249         * parse.y (not_accessible_p): Use member's class, not current
14250         class, when doing inheritance check for protected reference.
14251         Fixes PR gcj/124.
14253 2000-04-20  Jason Schroeder  <shrode@subnature.com>
14255         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14257 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14259         * parse.y (lookup_field_wrapper): Search for final local aliases.
14260         (resolve_expression_name): Let lookup_field_wrapper search for
14261         final local aliases. Force the value of `name' if one is found.
14262         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14263         an expression name. Fixed comments.
14265 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14267         * parse.y (yyerror): `msg' can be null, don't use it in that case.
14269 2000-04-19  Tom Tromey  <tromey@cygnus.com>
14271         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14273 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14275         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14277 2000-04-18  Tom Tromey  <tromey@cygnus.com>
14279         PR gcj/211:
14280         * gjavah.c (utf8_cmp): Changed return value.
14281         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
14282         result.
14283         (cxx_keywords): New global.
14284         (get_field_name): Handle new result of cxx_keyword_subst.
14285         (print_method_info): Likewise.
14287 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
14289         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14290         with a newline, for CNI.
14291         (print_stub_or_jni): Print a space or newline before method name for
14292         CNI as well as JNI.
14293         (print_cxx_classname): Don't write leading "::" in CNI stub method.
14294         (process_file): Include gcj/cni.h if generating CNI stubs.
14296 2000-04-16  Tom Tromey  <tromey@cygnus.com>
14298         * gjavah.c (decompile_method): Use print_field_name.
14299         Fixes PR gcj/205.
14301 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14303         * parse.y (java_expand_classes): Reverse the package list once.
14304         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14305         reduction.
14306         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14307         the `==' and `!=' operators.
14309 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14311         * jcf-write.c (generate_bytecode_insns): At invocation time,
14312         always relate an interface method to the type of its selector.
14314 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14316         Fix for PR gcj/2:
14317         * expr.c (expand_invoke): Generate check to see if object pointer
14318         is null in nonvirtual invocation case.
14319         * java-tree.h (soft_nullpointer_node): Declare.
14320         * decl.c (soft_nullpointer_node): New global.
14321         (init_decl_processing): Initialize soft_nullpointer_node.
14322         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14323         or `private' methods.
14324         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14326 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14328         Fix for PR gcj/140:
14329         * parse.y (check_final_assignment): Recognize assignments to the
14330         `length' field of an array when generating class files.
14332 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14334         * class.c (decl_hash): Prototype removed.
14335         (decl_compare): Likewise.
14337 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14339         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14340         * parse.y (check_modifiers_consistency): Check for final/volatile
14341         clash.  Fixes PR gcj/164.
14343 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14345         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14346         made global.
14347         (java_hash_compare_tree_node): Renamed from `decl_compare, made
14348         global.
14349         (add_method_1): Use `java_hash_hash_tree_node' and
14350         `java_hash_compare_tree_node'.
14351         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14352         (java_hash_compare_tree_node): Likewise.
14353         * parse.y (find_applicable_accessible_methods_list): Create,
14354         delete and use a hash table to remember already searched interfaces.
14356 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
14358         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14359         with latest entry.
14361 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14363         * boehm.c (mark_reference_fields, set_bit): Prototype.
14364         (set_bit): Un-ANSI-fy definition.
14366         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14367         Prototype.
14369         * decl.c (emit_init_test_initialization): Likewise.
14371         * gjavah.c (jni_print_char): Likewise.
14373         * parse.y (create_new_parser_context): Likewise.
14375 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14377         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14378         patch missing hunk. Fixed indentation.
14380 2000-03-30  Tom Tromey  <tromey@cygnus.com>
14382         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14383         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14385 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14387         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14388         when negative *before* using it as an array index.
14389         * ChangeLog: Fixed typo.
14391 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14393         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14394         to 0 when it reaches -1.
14396 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14398         * jcf-parse.c (get_constant): Properly cast `num' during the
14399         invocation of `add_double'.
14400         * jcf-write.c (push_long_const): Properly cast `lo' before
14401         comparing it to short bounds.
14402         * parse-scan.y (interface_declaration:): Rule re-arrange so that
14403         `interface_body:' is reduced after the current interface is
14404         pushed.
14406 2000-03-26  Tom Tromey  <tromey@cygnus.com>
14408         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14409         Java-specific `-f' option.
14411 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14413         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14414         Adjust order of making types.
14415         Make bitsize_*_node values.
14417 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14419         * class.c (make_field_value): Use byte_position.
14420         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14421         (java_array_data_offset): Likewise.
14422         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14423         bzero call.
14425 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14427         * parse.y (check_abstract_method_definitions): New local
14428         `end_type_reached'. Make sure we also consider `end_type'.
14429         (java_check_abstract_method_definitions): Make sure we eventually
14430         consider `java.lang.Object'.
14431         (maybe_use_access_method): Don't use access method if not in the
14432         context of a pure inner class or if the method's context is right.
14433         (find_applicable_accessible_methods_list): New static flag
14434         `object_done'. Don't search abstract classes as interfaces. Fixed
14435         indentation. Fixed the `java.lang.Object' only search. Search
14436         class interface(s) first, then fully search enclosing contexts.
14437         (find_most_specific_methods_list): Pick the closest candidate when
14438         they're all abstract.
14440 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14442         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14443         properly initialize `finished_label'. Don't emit gotos for empty
14444         try statements.
14446 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14448         * except.c (emit_handlers): Clear catch_clauses_last.
14450 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14452         * parse.y (check_method_types_complete): New function.
14453         (create_class): Reset anonymous class counter only when seeing an
14454         non inner classe.
14455         (java_complete_class): JDEP_METHOD: Don't recompute signature
14456         if incomplete.
14458 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14460         * class.c (build_static_ref): Fixed indentation in comment.
14461         * java-tree.def (TRY_EXPR): Fixed typo in name.
14462         (CLASS_LITERAL): Likewise.
14463         * java-tree.h: (TYPE_DOT_CLASS): New macro.
14464         (struct lang_type): New field `dot_class'.
14465         * jcf-write.c (generate_bytecode_insns): Fixed error message.
14466         (generate_classfile): Method `class$' is synthetic.
14467         * parse.y (build_do_class_method): New function.
14468         (build_dot_class_method_invocation): Likewise.
14469         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14470         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14471         (qualify_ambiguous_name): Likewise.
14472         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14473         (build_try_statement): Fixed leading comment.
14475 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14477         * class.c (make_field_value): Properly handle sizes.
14478         (get_dispatch_vector): Use tree_low_cst and host_integerp.
14479         (layout_class_method): Count using trees.
14480         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14481         * expr.c (java_array_data_offset): Use int_bit_position.
14482         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14483         (build_invokevirtual): Use tree_low_cst and do computations with trees.
14485 2000-03-16  Tom Tromey  <tromey@cygnus.com>
14487         * lang.c (flag_hash_synchronization): New global.
14488         (lang_f_options): Added `hash-synchronization'.
14489         * lang-options.h: Mention -fhash-synchronization.
14490         * java-tree.h (flag_hash_synchronization): Declare.
14491         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14492         hash table synchronization is disabled.
14493         * decl.c (init_decl_processing): Only push `sync_info' value when
14494         hash table synchronization is disabled.
14495         * class.c (make_class_data): Only push `sync_info' field when hash
14496         table synchronization is disabled.  Removed dead code.
14498 2000-03-16  Tom Tromey  <tromey@cygnus.com>
14500         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14502 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14504         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14505         classes.
14506         * parse.y (patch_method_invocation): Handle anonymous classes
14507         creation in static context.
14509 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14511         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14512         * parse.y (resolve_qualified_expression_name): Use it.
14513         (patch_method_invocation): Likewise.
14515 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14517         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14518         depending on the type of dependency which dictates what the
14519         current class is.
14520         (unresolved_type_p): Resolved types limited to the current class.
14522 2000-03-15  Tom Tromey  <tromey@cygnus.com>
14524         * decl.c (init_decl_processing): Set type of `sync_info' to be
14525         pointer to Object.
14527         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14528         Correctly compute bit number for current slot.  Zero `high' and
14529         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
14530         mark_reference_fields.
14531         (mark_reference_fields): New function.
14533 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14535         * parse.y (register_incomplete_type): Fixed initialization of
14536         JDEP_ENCLOSING.
14538 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14540         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14541         static globals.
14542         (push_class_context, pop_class_context): New function.
14543         (class_body:): Call pop_class_context.
14544         (interface_body:): Likewise.
14545         (INNER_QUALIFIER): New macro.
14546         (report_class_declaration): Changed output format and use
14547         INNER_QUALIFIER. Call push_class_context.
14549 2000-02-14  Andrew Haley  <aph@cygnus.com>
14551         * check-init.c (check_init): Add new cases for unary and binary
14552         tree nodes.
14554 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14556         * parse.y (resolve_package): Set `next' once a type name has been
14557         progressively discovered.
14558         (resolve_qualified_expression_name): Propagate resolution only if
14559         there are remaining qualifiers. Take into account `q' might have
14560         been cleared after re-qualification.
14561         * parse.y (patch_method_invocation): New local `resolved'.
14562         Section dealing with qualified expression rewritten to use
14563         resolve_field_access.
14565 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14567         * parse.h (PUSH_CPC): Fixed indentation.
14568         (DEBUG_CPC): New macro.
14569         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14570         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14571         * parse.y (class_body_declaration:): Use
14572         SET_CPC_INSTANCE_INITIALIZER_STMT.
14573         (method_declaration:): Check for null current_function_decl.
14574         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14575         (java_parser_context_pop_initialized_field): Better handling of
14576         empty lists.
14577         (maybe_make_nested_class_name): Mark nested class name as
14578         qualified when necessary.
14579         (end_class_declaration): Don't call java_parse_context_resume when
14580         one or more error occurred.
14581         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14582         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14583         SET_CPC_INITIALIZER_STMT.
14584         (method_header): Check for inner classes declaring static methods.
14585         (resolve_qualified_expression_name): Handle situation where `this'
14586         is implied.
14588 2000-03-13  Hans Boehm <boehm@acm.org>
14590         * typeck.c (build_prim_array_type): Correctly set the high word too.
14592 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14594         * parse.y (java_complete_expand_methods): Leave <clinit> out of
14595         ordinary methods.
14596         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14597         list of methods for interfaces.
14599 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14601         * parse.y (qualify_ambiguous_name): Properly handle expressions
14602         using `null'.
14604 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14606         * parse.y (check_final_assignment): Extended to process
14607         COMPOUND_EXPR.
14608         (patch_assignment): Have check_final_assignment called only once.
14610 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14612         * java-tree.h (IS_INIT_CHECKED): New flag.
14613         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14614         * parse.y (patch_string): Call force_evaluation_order on the
14615         completed string concatenation tree.
14616         * expr.c (force_evaluation_order): Call force_evaluation_order on
14617         function's arguments too.
14619 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14621         * decl.c (emit_init_test_initialization): Mark KEY as unused.
14622         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14623         (build_anewarray): Likewise.
14624         * parse.y (patch_newarray): Likewise.
14625         * parse.c: Regenerated.
14627 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
14629         * decl.c (init_decl_processing): Added new class fields `depth',
14630         `ancestors', and `idt' to class_type_node. Use
14631         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14632         * class.c (make_class_data): Push initial values for new fields.
14633         * java-tree.h: Updated prototype for `build_invokeinterface'.
14634         * expr.c (build_invokeinterface): Changed parameters to accept
14635         `method' tree. Calculate index of `method' in its declaring
14636         interface. Build call to _Jv_LookupInterfaceMethodIdx.
14637         (expand_invoke): Call `build_invokeinterface' with new parameters.
14638         * parse.y (patch_invoke): Call `build_invokeinterface' with new
14639         parameters.
14641 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
14643         * typeck.c (lookup_do): Search superinterfaces first
14644         when looking up an interface method. From Godmar Back
14645         <gback@cs.utah.edu>
14647 2000-03-06  Tom Tromey  <tromey@cygnus.com>
14649         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14651 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14653         * java-tree.h (lookup_argument_method2): Declared.
14654         (safe_layout_class): Prototype moved from parse.h.
14655         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14656         * parse.y (java_check_regular_methods): Local `super_class' gone.
14657         Call lookup_argument_method2 instead of lookup_argument_method.
14658         Perform modifier match for methods found declared in implemented
14659         interfaces. Fixed indentation problem. Overriding/hiding error
14660         report to take place only for methods found in classes.
14661         * typeck.c (lookup_argument_method): Changed leading
14662         comment. Re-written by calling lookup_do.
14663         (lookup_argument_method2): New function.
14664         (lookup_java_method): Re-written by calling lookup_do.
14665         (lookup_do): New function.
14667 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14669         * check-init.c (check_init): Removed dead code. Handle (blank)
14670         final variables.
14671         * parse.y (declare_local_variables): New local `final_p', set it
14672         and use it to initialize LOCAL_FINAL.
14673         (check_final_assignment): Only check FIELD_DECLs.
14675 2000-02-17  Tom Tromey  <tromey@cygnus.com>
14677         * Makefile.in (JAVA_OBJS): Added boehm.o.
14678         (boehm.o): New target.
14679         * Make-lang.in (JAVA_SRCS): Added boehm.c.
14680         * java-tree.h (flag_use_boehm_gc): Declare.
14681         (get_boehm_type_descriptor): Declare.
14682         * lang.c (lang_f_options): Added `use-boehm-gc'.
14683         (flag_use_boehm_gc): New global.
14684         * lang-options.h: Added -fuse-boehm-gc.
14685         * boehm.c: New file.
14686         * class.c (get_dispatch_table): If class uses a Boehm type
14687         descriptor, put it in the vtable.
14688         (make_class_data): Removed dead code.
14690 2000-03-03  Per Bothner  <per@bothner.com>
14692         * decl.c (init_decl_processing):  Initialize sizetype properly.
14694 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14696         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14697         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14698         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14699         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14700         (jcf_parse): New local `current'. Load innerclasses seen in outer
14701         context being processed.
14702         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14703         * jcf-write.c (append_innerclasses_attribute): New function.
14704         (append_innerclasses_attribute_entry): Likewise.
14705         (get_access_flags): Handle static classes. Set anonymous and local
14706         classes to be private.
14707         (generate_classfile): Attribute count adjusted. Call
14708         append_innerclasses_attribute.
14709         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14710         PURE_INNER_CLASS_TYPE_P.
14711         * parse.y (parser_qualified_classname): New parameter `is_static',
14712         produce non qualified name accordingly.
14713         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14714         (create_interface): Added argument to parser_qualified_classname.
14715         (create_class): Added argument to parser_qualified_classname. Setup
14716         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14717         (add_inner_class_fields): Fixed indentation.
14718         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14719         (method_declarator): Fixed typo in comment.
14720         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14721         (build_current_thisn): Likewise.
14722         (patch_method_invocation): Likewise.
14724 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14726         * decl.c (current_function_decl): Move to toplev.c.
14728 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14730         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14731         (DECL_BIT_INDEX): Use underlying representation.
14732         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14734 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14736         * expr.c (build_java_ret): Pass proper type to size_binop.
14738 2000-02-25  Anthony Green  <green@cygnus.com>
14740         * expr.c (build_class_init): Mark the decl to be ignored by
14741         check_init.
14742         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14743         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14744         * class.c (init_test_hash_newfunc): New function.
14745         (decl_hash): New function.
14746         (decl_compare): New function.
14747         * decl.c (emit_init_test_initialization): New function.
14748         (complete_start_java_method): Traverse the init test hashtable,
14749         calling emit_init_test_initialization.
14750         (always_initialize_class_p): Define.
14751         * expr.c (build_class_init): Use initialization tests when
14752         emitting class initialization code.
14753         (always_initialize_class_p): Declare.
14754         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14755         1.
14756         * java-tree.h: Include hash.h.
14757         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14758         (struct lang_decl): Add init_test_table field.
14759         (init_test_hash_entry): Define.
14761 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14763         * gjavah.c (main): Avoid using `argi' to report unimplemented
14764         options.
14766 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14768         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14769         initialize locals to avoid warnings. Local `exception_type' moved
14770         into if statement.
14772 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14774         * parse.y (resolve_expression_name): Use `orig' as a second
14775         argument to resolve_field_access.
14776         (resolve_field_access): Removed unnecessary code when dealing with
14777         static fields.
14779 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14781         * class.c (push_super_field): Don't push the field twice.
14782         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14783         * parse.h (java_reorder_fields): Prototyped.
14784         * parse.y (java_reorder_fields): New function.
14785         (java_layout_class): Simplified not to worry about re-ordering.
14787 2000-02-23  Tom Tromey  <tromey@cygnus.com>
14789         * gjavah.c (print_name): In JNI case, correctly quote string.
14790         (print_method_info): Don't handle overrides in JNI mode.
14792 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14794         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14795         value type set to `boolean_type_node'.
14797 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14799         * jcf-dump.c (main): Test for correct condition after
14800         output file creation.
14802 2000-02-19  Anthony Green  <green@cygnus.com>
14804         * jcf-depend.c (add_entry): Fix test for first list entry.
14806 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14808         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14809         * constants.c (build_constants_constructor): Likewise.
14811 2000-02-19  Anthony Green  <green@cygnus.com>
14813         * jcf-depend.c (add_entry): Add entries to the end of the list.
14815 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
14817         * decl.c (INT_TYPE_SIZE): Define if necessary.
14818         (expand_java_return): Handle the case of a native integer smaller
14819         than a JVM integer.
14821 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14823         * gjavah.c (help): Use GCCBUGURL.
14824         * jv-scan.c (help): Likewise.
14825         * jcf-dump.c (help): Likewise.
14827 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14829         * jcf-write.c (generate_bytecode_insns): Don't generate empty
14830         `finally' clauses.
14832 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14834         * jcf-parse.c (load_class): Call `fatal' if no file containing
14835         the target class are found.
14837 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
14839         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14840         lex.c, lex.h, and PARSE_H to...
14841         (parse.o, parse-scan.o): ...here, respectively.
14843         * lex.c: Split out code that may trigger SIGFPE from yylex()
14844         to its own function.
14845         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14847 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14849         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14851 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14853         * parse.y (outer_field_access_p): Stop in time when outer contexts
14854         are exhausted.
14855         (resolve_qualified_expression_name): Properly qualify *everything*
14856         after a package.type to be resoled as expression names.
14857         (find_applicable_accessible_methods_list): Save/restore `class' to
14858         isolate it from a possible outer context search.
14860 2000-02-15  Tom Tromey  <tromey@cygnus.com>
14862         * gjavah.c (jni_print_char): New function.
14863         (print_full_cxx_name): Use it.
14864         (decode_signature_piece): Likewise.
14865         (print_cxx_classname): Likewise.
14867 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14869         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14870         version.o.
14871         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14873         * gjavah.c: Include version.h.
14875         * jcf-dump.c: Likewise.
14877         * jv-scan.c: Likewise.
14879 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14881         * parse.y (outer_field_access_fix): First parameter now a tree
14882         node. Check for assignment to final. First argument to
14883         build_outer_field_access_fix modified to accommodate prototype.
14884         (build_outer_field_access): Don't check for assignment to final
14885         here.
14886         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14887         possibly returned by outer_field_access_fix. Changed
14888         outer_field_access_fix's first argument.
14889         (check_final_assignment): $finit$'s context is OK.
14890         (patch_unaryop): Use node instead of its line/column value when
14891         calling outer_field_access_fix.
14893 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14895         * parse.y (interface_declaration:): No longer tagged
14896         <node>. Re-installed default action.
14897         (class_member_declaration:): Handle inner interfaces.
14898         (interface_member_declaration): Handle inner interfaces and
14899         classes.
14900         (create_interface): Push error if one seen. Suspend parsing
14901         context when processing an inner interface.
14902         (register_fields): Inner class static field limitations not to
14903         apply to inner interfaces.
14905 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14907         * jcf-parse.c (load_class): Update `java_error_count' when a
14908         class' file can't be found.
14909         (parse.y): Avoid (byte)code generation when errors seen.
14911 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14913         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14914         decodes a valid node.
14915         (patch_binop): Handle TRUNC_DIV_EXPR.
14917 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14919         * parse.y (resolve_package): New local `acc'. Try to progressively
14920         build and guess a package and type name.
14922 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14924         * parse.y (find_applicable_accessible_methods_list): Load and
14925         layout the search class if necessary.
14926         (java_complete_tree): Keep to original type of the folded initial
14927         value.
14929 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14931         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14932         Generate error message if circularity is detected. New static
14933         local `list'.
14934         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
14935         * jcf-write.c (generate_bytecode_insns): Very simply handle
14936         SAVE_EXPR.
14937         * parse.y (java_check_circular_reference): Use
14938         `cyclic_inheritance_report' during report, if necessary.
14939         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14940         walking NEW_ARRAY_INIT twice.
14942 2000-02-09  Tom Tromey  <tromey@cygnus.com>
14944         * parse.y (check_class_interface_creation): Allow inner classes to
14945         be `private' or `protected', check modifiers' consistency. Prevent
14946         block local classes from bearing any modifiers.
14948 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14950         * except.c (check_start_handlers): Re-add prototype lost in last
14951         patch.
14952         (maybe_start_try): Remove excess argument to `check_start_handlers'.
14954 2000-02-09  Andrew Haley  <aph@cygnus.com>
14956         * decl.c (clear_binding_level): Remove excess initializer.
14957         (maybe_poplevels): Remove unused variable.
14958         (force_poplevels): Ditto.
14959         (struct binding_level): Add comment.
14961 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14963         * jcf-write.c (generate_classfile): Don't consider
14964         pre-initialization with reference value (use <clinit> instead.)
14965         * parse.y (java_fix_constructors): No generated constructor for
14966         interfaces.
14967         (build_outer_field_access): Removed debug message.
14968         (outer_field_expanded_access_p): Adapted to bytecode generation.
14969         (build_outer_field_access_method): Use fix_method_argument_names.
14970         (build_outer_method_access_method): Fixed indentation. Added
14971         comment. Handle access method generation for static and also void
14972         methods.
14973         (build_access_to_thisn): Inserted debug message.
14974         (maybe_build_thisn_access_method): Use fix_method_argument_names.
14975         (resolve_qualified_expression_name): Fixed comment.
14976         (not_accessible_p): Adapted to bytecode generation. Added comment.
14977         (patch_method_invocation): Added comment.
14978         (maybe_use_access_method): Fixed leading comment. Handle static
14979         methods.
14980         (java_complete_lhs): Don't shortcut handling of initialized upon
14981         declaration String type static fields when generating bytecode.
14982         (patch_unaryop): Handle outer field access when generating
14983         bytecode.
14985 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14987         * java-tree.h (FIELD_THISN): New macro.
14988         * jcf-write.c (append_synthetic_attribute): New function.
14989         (generate_classfile): Set "Synthetic" attribute on this$<n>,
14990         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14991         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14992         this$<n> fields.
14993         (build_outer_field_access): Turned on access functions usage and
14994         generation when compiling to bytecode.
14995         (maybe_use_access_method): Likewise.
14997 2000-01-25  Andrew Haley  <aph@cygnus.com>
14999         * java-except.h (struct eh_range): Add `expanded' field.
15000         (maybe_start_try): Add end_pc arg.
15001         (maybe_end_try): Ditto.
15002         * java-tree.h (force_poplevels): new function.
15003         * expr.c (expand_byte_code): Don't call maybe_start_try or
15004         maybe_end_try.
15005         * except.c (add_handler): Reset expanded.
15006         (expand_start_java_handler): Set expanded.
15007         (check_start_handlers): Don't expand a start handler that's
15008         already been expanded.
15009         (maybe_start_try): Add end_pc arg.  Only expand a handler which
15010         ends after end_pc.
15011         (expand_end_java_handler): call force_poplevels.
15012         (force_poplevels): new function.
15013         * decl.c (binding_level): Add start_pc of binding level.
15014         (maybe_pushlevels): Call maybe_start_try when pushing binding
15015         levels.
15016         (maybe_poplevels): Call maybe_end_try when popping binding levels.
15017         (LARGEST_PC): Define.
15018         (clear_binding_level): Use LARGEST_PC.
15020         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
15021         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
15022         (binding_depth, is_class_level, current_pc): new variables.
15023         (struct binding_level): ditto.
15024         (indent): new function.
15025         (push_jvm_slot): add debugging info.
15026         (maybe_pushlevels): ditto.
15027         (maybe_poplevels): ditto.
15028         (pushlevel): ditto.
15029         (poplevel): ditto.
15030         (start_java_method): ditto.
15031         (give_name_to_locals): comment only.
15032         * except.c (binding_depth, is_class_level, current_pc):
15033         new variables.
15034         (expand_start_java_handler): add debugging info.
15035         (expand_end_java_handler): ditto.
15037 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15039         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
15040         (print_name_for_stub_or_jni, process_file): Constify a char*.
15042 2000-02-03  Tom Tromey  <tromey@cygnus.com>
15044         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
15046 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
15048         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
15049         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
15050         defined to be 1.
15052 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15054         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
15055         * java-tree.h (TYPE_II_STMT_LIST): New macro.
15056         (struct lang_type): New field `ii_block'.
15057         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
15058         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
15059         * parse.h (struct parser_ctxt): New field `instance_initializers'.
15060         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
15061         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
15062         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
15063         macros.
15064         * parse.y (add_instance_initializer): New function.
15065         (in_instance_initializer): New static global.
15066         (class_body_declaration:): Link instance initializer block.
15067         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
15068         (array_creation_expression:): Remove unused local.
15069         (java_parser_context_push_initialized_field): Fixed leading
15070         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
15071         CPC_INSTANCE_INITIALIZER_LIST.
15072         (java_parser_context_pop_initialized_field): Likewise.
15073         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
15074         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
15075         CPC_INITIALIZER_STMT.
15076         (fix_constructors): New local `class_type'. Use it. Call
15077         add_instance_initializer.
15078         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
15079         (patch_return): Forbid return in instance initializers.
15080         (patch_throw_statement): Enforce exception handling in the context
15081         of instance initializers.
15083 2000-02-03  Tom Tromey  <tromey@cygnus.com>
15085         * Make-lang.in (java.mostlyclean): Remove executables in
15086         `mostlyclean'.
15088 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
15090         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
15091         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
15092         (java_float_finite): Convert to use union Word from javaop.h.
15093         (java_double_finite): Convert to use union DWord from javaop.h.
15095 2000-02-02  Tom Tromey  <tromey@cygnus.com>
15097         * gjavah.c (options): Added `jni' entry.
15098         (help): Document -jni.
15099         (flag_jni): New global.
15100         (process_file): Handle JNI output.  Don't print text from
15101         -prepend, -add, etc, when generating stubs.  Only remove `.class'
15102         suffix if it actually exists.
15103         (main): Create a `.c' file when run with `--jni --stubs'.  Create
15104         correct output file name with `--jni'.
15105         (print_include): Mangle header name differently in JNI case.
15106         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
15107         method list.
15108         (print_method_info): Handle JNI case.  Put signature info into
15109         method name.  Handle case when STREAM is NULL.
15110         (print_name_for_stub_or_jni): New function.
15111         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
15112         (print_cxx_classname): Handle JNI.
15113         (print_full_cxx_name): Likewise.
15114         (decode_signature_piece): Likewise.
15115         (overloaded_jni_method_exists_p): New function.
15116         (struct method_name): Added `signature' and `sig_length' fields.
15117         (HANDLE_END_FIELD): Do nothing in JNI mode.
15119 2000-02-02  Tom Tromey  <tromey@cygnus.com>
15121         * jv-scan.c: Include version.c, <getopt.h>.
15122         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
15123         (options): New array.
15124         (usage): New function.
15125         (version): New function.
15126         (main): Use getopt_long to parse command line.
15127         * jcf-dump.c: Include version.c, <getopt.h>.
15128         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
15129         OPT_JAVAP): New macros.
15130         (options): New array.
15131         (usage): Return `void'.  Changed message.
15132         (help): New function.
15133         (version): New function.
15134         (main): Use getopt_long_only to parse command line.
15135         * gjavah.c: Include <getopt.h>.
15136         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
15137         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
15138         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
15139         (options): New array.
15140         (java_no_argument): Removed.
15141         (help): Updated with missing options.
15142         (main): Use getopt_long_only to parse command line.
15143         (usage): Changed message.
15145 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15147         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
15148         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
15149         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
15150         * parse.y (array_creation_expression:): Handle anonymous arrays.
15151         (build_array_from_name): Don't set `ret_name' if null.
15152         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
15153         (qualify_ambiguous_name): Likewise.
15154         (java_complete_expand_class): Likewise.
15156 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15158         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
15159         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
15160         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
15161         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
15162         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
15163         AIPL_FUNCTION_COMPLETED_INVOCATION.
15164         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
15165         AIPL_FUNCTION_INVOCATION_READY.
15166         (AIPL_FUNCTION_DECLARATION): New enum entry.
15167         * parse.y (reorder_static_initialized): New function.
15168         (java_parser_context_pop_initialized_field): Use it.
15169         (add_inner_class_fields): Use
15170         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
15171         augmented. Install marker after last alias initializer, if any.
15172         (generate_finit): Fixed typo. Don't try to retain only the used
15173         fields.
15174         (method_header): Compute and set DECL_FUNCTION_NAP.
15175         (method_declarator): Fixed comment. Insert alias initializer in
15176         parameter list.
15177         (build_alias_initializer_parameter_list): Fixed leading
15178         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
15179         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
15180         (java_complete_expand_class): Code to retain only used aliases
15181         removed.
15182         (java_complete_expand_methods): New local `first_decl'. Generate
15183         $finit$ first, then expand the constructors, regular methods and
15184         <clinit>.
15185         (java_complete_expand_method): Don't report error on missing
15186         return statement if previously detected bogus.
15187         (fix_constructors): Don't patch constructor parameters list.
15188         (patch_method_invocation): Use new AIPL enum values. Reverse
15189         alias initializer list for anonymous classes.
15191 2000-01-30  Anthony Green  <green@redhat.com>
15193         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
15194         determine how many stack slots to pop.
15196 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15198         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15199         error handling/recovery.
15200         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15202 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15204         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
15205         FIELD_LOCAL_ALIAS_USED): New macros.
15206         (DECL_FUNCTION_NAP): New macro.
15207         (struct lang_decl): New field `nap'.
15208         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15209         (struct lang_type): New fields `finit_stmt_list' and
15210         `clinit_stmt_list'.
15211         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15212         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15213         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
15214         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
15215         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
15216         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
15217         (BUILD_THROW): Macro line separator re-indented.
15218         * parse.y (end_class_declaration): New function.
15219         (maybe_generate_pre_expand_clinit): New name for
15220         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15221         pre-expand static fields.
15222         (maybe_generate_clinit): Function deleted.
15223         (check_for_static_method_reference): Prototype's parameter list
15224         indented.
15225         (generate_finit): New name for maybe_generate_finit. Changed
15226         leading comment. Function rewritten to use
15227         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
15228         (build_alias_initializer_parameter_list): New function.
15229         (java_parser_context_pop_initialized_field): Likewise.
15230         (add_inner_class_fields): Likewise.
15231         (type_declaration:): Call end_class_declaration.
15232         (class_member_declaration:): Likewise.
15233         (formal_parameter_list:): Fixed typos.
15234         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
15235         element. Improved error handling.
15236         (block_statement:): Call end_class_declaration.
15237         (anonymous_class_creation:): Likewise.
15238         (create_anonymous_class): Fixed comments.
15239         (create_class): Call add_inner_class_fields.
15240         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15241         (method_header): Use MARK_FINAL_PARMS.
15242         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15243         (method_declarator): Propagate final argument flag.
15244         (craft_constructor): New local `artificial'. Call
15245         build_alias_initializer_parameter_list. Use
15246         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
15247         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
15248         necessary.
15249         (complete_expand_class): Get rid of unused outer context local
15250         alias fields.
15251         (java_complete_expand_methods): Fixed leading
15252         comment. Generate/pre-expand <clinit> first. Changed method
15253         expansion order to regular, $finit$, constructors, <clinit>.
15254         (java_complete_expand_method): Set current_function_decl.
15255         (fix_constructors): Fix constructor parameter list to account for
15256         outer context local alias initializers.
15257         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15258         (resolve_expression_name): Lookup outer context local aliases. New
15259         local `access', use it.
15260         (patch_method_invocation): Patch inner class ctor invocation with
15261         outer context local aliases initialization values. $finit$
15262         invocation patching now includes things generated with
15263         build_alias_initializer_parameter_list.
15264         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15265         (build_super_invocation): Likewise.
15266         (patch_assignment): Changed comment.
15268 2000-01-27  Andrew Haley  <aph@cygnus.com>
15270         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15271         (emit_if): Ditto.
15272         (emit_jsr): Ditto.
15274 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15276         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15277         concatenation.
15278         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15280         * parse.y (register_fields): Don't pass a format specifier to
15281         OBSOLETE_MODIFIER_WARNING.
15282         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15283         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15284         specifier.
15285         (check_modifiers): Change function into a macro.
15286         (check_class_interface_creation): Pass a literal format string.
15288 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15290         * buffer.h: PROTO -> PARAMS.
15291         * check-init.c: Likewise.
15292         * class.c: Likewise.
15293         * constants.c: Likewise.
15294         * convert.h: Likewise.
15295         * decl.c: Likewise.
15296         * except.c: Likewise.
15297         * expr.c: Likewise.
15298         * gjavah.c: Likewise.
15299         * java-except.h: Likewise.
15300         * java-tree.h: Likewise.
15301         * jcf-depend.c: Likewise.
15302         * jcf-dump.c: Likewise.
15303         * jcf-parse.c: Likewise.
15304         * jcf-path.c: Likewise.
15305         * jcf-reader.c: Likewise.
15306         * jcf-write.c: Likewise.
15307         * jcf.h: Likewise.
15308         * jv-scan.c: Likewise.
15309         * jvgenmain.c: Likewise.
15310         * jvspec.c: Likewise.
15311         * lang.c: Likewise.
15312         * lex.c: Likewise.
15313         * lex.h: Likewise.
15314         * parse-scan.y: Likewise.
15315         * parse.h: Likewise.
15316         * parse.y: Likewise.
15317         * typeck.c: Likewise.
15318         * verify.c: Likewise.
15319         * xref.c: Likewise.
15320         * xref.h: Likewise.
15321         * zextract.c: Likewise.
15322         * zipfile.h: Likewise.
15324 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15326         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15327         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15328         * constants.c (build_constant_data_ref): Check for cached
15329         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15330         in TYPE_CPOOL_DATE_REF.
15331         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15332         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15333         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15334         (LOCAL_FINAL): New macro.
15335         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15336         constant pool -- don't try to reuse.
15337         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15338         TYPE_LANG_SPECIFIC.
15339         (find_in_current_zip): Use TYPE_JCF.
15340         * parse.h (java_check_final): Prototype removed.
15341         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15342         (maybe_create_class_interface_decl,
15343         check_class_interface_creation): Likewise.
15344         (java_expand_finals): Function removed.
15345         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15346         (block_statement:): Fixed comment.
15347         (anonymous_class_creation:): Likewise.
15348         (check_class_interface_creation): Reversed Jan 12, 2000 extra
15349         argument patch.
15350         (check_class_interface_creation): Loosened error report on (inner)
15351         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15352         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15353         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15354         argument patch.
15355         (create_interface): Likewise.
15356         (anonymous_class_counter): New static global.
15357         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15358         patch. Fixed comments.
15359         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15360         anonymous_class_counter when declaring a toplevel class.
15361         (craft_constructor): Fixed constructor name when handling
15362         anonymous classes. Anonymous class constructors to feature hidden
15363         this$<n> parameter.
15364         (java_fix_constructors): Added comment.
15365         (java_check_final): Function removed.
15366         (java_complete_expand_methods): Fixed comment. Don't generate
15367         class data, save its outgoing constant pool instead.
15368         (verify_constructor_super): Skip anonymous class constructor
15369         hidden this$<n> parameter.
15370         (java_expand_classes): New local `saved_ctxp'. Removed call to
15371         java_expand_finals and java_check_final. Expand anonymous class
15372         constructors. Generate class data.
15373         (build_super_invocation): Skip anonymous class hidden this$<n>
15374         parameter.
15375         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15376         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15377         (set_java_signature): Likewise.
15379 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
15381         * gjavah.c: Delete ACC_VISIBILITY define.
15382         * jcf.h: Add ACC_VISIBILITY define.
15383         * parse.y: final: rule tagged <value>.
15384         (java_check_regular_methods): Use ACC_VISIBILITY define for
15385         default package access check.
15386         (local_variable_declaration_statement): Use final: rule.
15388 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
15390         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15391         (final:): New rule.
15393 2000-01-17  Tom Tromey  <tromey@cygnus.com>
15395         * gjavah.c (print_field_info): Allow non-static final fields.
15397 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15399         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15400         * parse.y (patch_anonymous_class): New function.
15401         (create_anonymous_class): Register incomplete type when the
15402         class/interface to extends/implement isn't known yet.
15403         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15404         (verify_constructor_super): Tuned error message.
15406 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15408         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15409         (ANONYMOUS_CLASS_P): New macro.
15410         (TYPE_SIGNATURE, TYPE_JCF): New macros.
15411         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15412         * parse.y (create_class): Added leading argument.
15413         (maybe_create_class_interface_decl,
15414         check_class_interface_creation): Likewise.
15415         (craft_constructor): New function.
15416         (verify_constructor_super): Added argument in prototype.
15417         (class_declaration:): Inserted leading argument.
15418         (for_begin:): Use FOR_LOOP_P.
15419         (anonymous_class_creation): Create WFL of the anonymous class to
15420         instantiate. Call build_new_invocation. Added comments.
15421         (check_class_interface_creation): Handle parameter `anonymous' in
15422         verbose mode class creation announce.
15423         (link_nested_class_to_enclosing): Exclude anonymous classes.
15424         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15425         anonymous class, even though they appear to have an enclosing
15426         context.
15427         (create_interface): Pass extra argument to
15428         check_class_interface_creation.
15429         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15430         (create_class): Call check_class_interface_creation and
15431         maybe_create_class_interface_decl with extra new argument. Don't
15432         add private this$<n> to anonymous classes.
15433         (method_declarator): Insert hidden this$<n> to anonymous class
15434         constructors.
15435         (java_fix_constructors): Deleted code creating default
15436         constructor. Call craft_constructor instead.
15437         (java_check_regular_methods): Set `saw_constructor' to 1 for
15438         anonymous classes.
15439         (fix_constructors): Pass extra argument to verify_constructor_super.
15440         (verify_constructor_super): New local `sdecl', use it. Search for
15441         matching constructor (possibly featuring arguments) in super
15442         class.
15443         (lookup_method_invoke): Craft constructor according to arguments
15444         list when dealing with anonymous class constructors.
15445         (build_super_invocation): Pass arguments to anonymous class super
15446         constructors.
15447         (search_loop): Use FOR_LOOP_P.
15448         (labeled_block_contains_loop_p): Likewise.
15450 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15452         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15453         (enclosing_context_p): New function.
15454         (get_access_flags_from_decl): Handle CLASS_STATIC.
15455         (maybe_layout_super_class): Extra first argument passed to
15456         do_resolve_class.
15457         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15458         ID_INIT_P.
15459         * decl.c (access0_identifier_node): New global.
15460         (init_decl_processing): access0_identifier_node initialized.
15461         (pushdecl): Set DECL_CONTEXT only on non type decls.
15462         * expr.c (lookup_field): Lookup inner class fields in enclosing
15463         contexts.
15464         (expand_invoke): Use ID_INIT_P.
15465         (expand_java_field_op): Use DECL_CLINIT_P.
15466         * java-tree.def (CLASS_LITERAL): New tree code.
15467         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15468         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15469         (struct lang_decl): New field `inner_access'.
15470         (enclosing_context_p): Prototyped.
15471         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15472         ID_CLINIT_P): New macros.
15473         (CLASS_STATIC): New macro.
15474         (CLASS_ACCESS0_GENERATED_P): New macro.
15475         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15476         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15477         INNER_CLASS_P): New macros.
15478         (DECL_INNER_CLASS_LIST): New macro.
15479         * jcf-parse.c (yyparse): Avoid the use of ANSI string
15480         concatenation.
15481         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15482         the shift value to int. Fixed typo in comment.
15483         * lex.c (inst_id, wpv_id): Initialize.
15484         * mangle.c (unicode_mangling_length): Take `$' into account.
15485         * parse.h (DRECOVER, RECOVER): Terminate properly.
15486         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15487         (typedef struct _jdep): New field `enclosing'.
15488         (JDEP_ENCLOSING): New macro.
15489         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15490         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15491         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15492         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15493         GET_ENCLOSING_CPC_CONTEXT): New macros.
15494         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15495         (do_resolve_class): Added extra argument in prototype.
15496         * parse.y (resolve_class): Added extra argument in prototype.
15497         (maybe_create_class_interface_decl): Likewise.
15498         (maybe_use_access_method, build_wfl_wrap): New functions.
15499         (java_complete_expand_classes, java_complete_expand_class):
15500         Likewise.
15501         (java_parser_context_push_initialized_field,
15502         java_parser_context_suspend, java_parser_context_resume):
15503         Likewise.
15504         (maybe_make_nested_class_name, make_nested_class_name,
15505         set_nested_class_simple_name_value,
15506         link_nested_class_to_enclosing, find_as_inner_class,
15507         find_as_inner_class_do, check_inner_class_redefinition,
15508         build_thisn_assign, build_current_thisn, build_access_to_thisn,
15509         maybe_build_thisn_access_method, build_outer_field_access,
15510         build_outer_field_access_methods, build_outer_field_access_expr,
15511         build_outer_method_access_method, build_new_access_id,
15512         build_outer_field_access_method, outer_field_access_p,
15513         outer_field_expanded_access_p, outer_field_access_fix,
15514         build_incomplete_class_ref, patch_incomplete_class_ref,
15515         create_anonymous_class): Likewise.
15516         (inst_id, wpv_id): New static global variables.
15517         (synchronized:): New rule, tagged <node>.
15518         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15519         rules.
15520         (anonymous_class_creation:): New rule, tagged <node>.
15521         (NEW_TK): Tagged <node>.
15522         (type_literals, array_type_literal): New rules, tagged <node>.
15523         (class_declaration:): Removed action when reducing by class_body:
15524         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15525         using GET_CPC in sub-rules.
15526         (class_member_declaration): Handle inner classes.
15527         (method_declaration): When reducing method_header:, reset
15528         current_function_decl when appropriate.
15529         (method_declarator:): Set the number of formal parameter to 0 for
15530         method declared without arguments.
15531         (constructor_declarator:): Likewise.
15532         (static_initializer:): List of elements kept in a list.
15533         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15534         use of the keyword `static' for type declarations.
15535         (block_statement:): Handle inner class declarations.
15536         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15537         type qualified `this'.
15538         (class_instance_creation_expression): Use anonymous_class_creation:
15539         to handle inner class instances creation. Handle qualified `new'.
15540         (something_dot_new): Added appropriate actions.
15541         (create_new_parser_context): New function.
15542         (java_push_parser_context, java_parser_context_save_global,
15543         java_parser_context_suspend): Use create_new_parser_context.
15544         (check_modifiers): Changed leading comment.
15545         (check_class_interface_creation): Handle interclasses.
15546         (add_superinterfaces): Fixed comment.
15547         (create_interface): Build qualified name from the raw_name instead
15548         of its matching WFL. Push the initialized fields list. raw_name added
15549         as an extra argument to maybe_create_class_interface_decl.
15550         (create_class): Build qualified name from the raw_name instead of
15551         its matching WFL. Removed assignment to current_parsed_class_un.
15552         Call PUSH_ERROR before returning an error. Suspend the current
15553         parser context when processing an inner class. Push the
15554         initialized fields list. raw_name added as an extra argument to
15555         maybe_create_class_interface_decl. Add the private this$<n>
15556         field.
15557         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15558         (register_fields): Get the class type from GET_CPC and handle
15559         previous errors.  Added code to handle the creation of static
15560         fields in inner classes. Initialized fields initialization
15561         statements kept in a list of lists.
15562         (maybe_generate_finit): Initialized fields initialization
15563         statements kept in a list of lists. Use GET_CPC.
15564         (maybe_generate_clinit): Likewise.
15565         (method_header): Use GET_CPC and GET_CPC_UN.
15566         (parser_qualified_classname): Handle inner classes.
15567         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15568         (java_fix_constructors): Hide pointer to enclosing context
15569         instance in constructor list when dealing with inner classes.
15570         (jdep_resolve_class): Call resolve_class with extra first argument
15571         JDEP_ENCLOSING.
15572         (resolve_class): Add enclosing context as a first extra argument
15573         to do_resolve_class.
15574         (do_resolve_class): Call find_as_inner_class. Handle WFLs
15575         properly.
15576         (resolve_no_layout): Extra argument added to resolve_class
15577         invocation.
15578         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15579         (java_get_real_method_name): Use GET_CPC_UN.
15580         (check_abstract_method_definitions): Use DECL_CLINIT_P.
15581         (java_check_abstract_methods): Handle static method declared in
15582         inner classes by an error.
15583         (java_check_regular_methods): Use DECL_CLINIT_P.
15584         (source_start_java_method): Also set DECL_MAX_LOCALS.
15585         (create_artificial_method): Call java_parser_context_save_global
15586         and java_parser_context_restore_global instead of saving/restoring
15587         the context by hand.
15588         (expand_start_java_method): Improved verbose mode message.
15589         (java_complete_expand_methods): Fixed leading comment. Use
15590         DECL_CLINIT_P.
15591         (fix_constructors): Added assignment to this$<n> if necessary.
15592         (java_expand_classes): Call java_complete_expand_classes instead
15593         of java_complete_expand_methods.
15594         (make_qualified_primary): Simplified.
15595         (merge_qualified_name): Optimized for missing left or right parts.
15596         (resolve_expression_name): Handle access to outer class fields from
15597         interclasses.
15598         (resolve_qualified_expression_name): New macro
15599         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15600         classes. Report error on non appropriate qualification of
15601         `new'. Handle qualified `this'.
15602         (not_accessible_p): Allow access to outer class private fields from
15603         inner classes.
15604         (patch_method_invocation): Handle method invocations through
15605         access methods and inner class constructor invocations.
15606         (find_applicable_accessible_methods_list): Search enclosing
15607         contexts of an inner class.
15608         (search_applicable_methods_list): Fixed typo.
15609         (argument_types_convertible): Handle inner class constructors'
15610         hidden outer context reference argument.
15611         (qualify_ambiguous_name): Handle qualified `this'.
15612         (java_complete_lhs): Handle use of field accessed through
15613         artificial access methods in various cases of assignments. Handle
15614         CLASS_LITERAL node.
15615         (check_final_assignment): Use DECL_CLINIT_P.
15616         (valid_ref_assignconv_cast_p): Handle the destination being an
15617         enclosing context of the source.
15618         (patch_unaryop): Handle use of field accessed through artificial
15619         access methods.
15620         (patch_return): Use DECL_CLINIT_P.
15621         (patch_throw_statement): Use DECL_CLINIT_P.
15622         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15623         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15624         ID_INIT_P.
15626 2000-01-16  Anthony Green  <green@cygnus.com>
15628         * parse.y (build_string_concatenation): Only use
15629         StringBuffer(String) shortcut if String arg is constant.
15631 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15633         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15634         the shift value to int. Fixed typo in comment.
15636 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15638         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15639         * jcf-write.c: Likewise.
15640         * parse.y: Likewise.
15641         * parse.c: Regenerate.
15643 2000-01-09  Anthony Green  <green@cygnus.com>
15645         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15646         bytecodes in the correct order.
15648 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15650         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15652 2000-01-06  Anthony Green  <green@cygnus.com>
15654         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15655         before building constant array decl.
15657 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15659         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15660         method invocation and typo in conditional expression.
15661         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15662         the appropriate NOTE_POP.
15663         * parse.y (patch_binop): Shift value mask to feature the right
15664         type.
15666 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15668         * class.c (assume_compiled, assume_compiled_node): Add static
15669         prototype.
15670         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15672         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15674         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15676         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15677         to `__modifier' to avoid stringifying it.
15679         * parse.y (verify_constructor_circularity): Don't call a variadic
15680         function with a non-literal format string.
15681         (java_check_abstract_methods): Move unreachable code inside
15682         `continue' statement.
15683         (lookup_method_invoke): Call xstrdup, not strdup.
15685         * expr.c (expand_java_field_op): Avoid the use of ANSI string
15686         concatenation.
15688         * jcf-parse.c (yyparse): Likewise.
15690         * jv-scan.c (main): Likewise.
15692 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15694         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15695         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15696         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15697         concatenation.
15699         * parse.y (synchronized, variable_redefinition_error,
15700         check_class_interface_creation, create_interface, create_class,
15701         method_header, finish_method_declaration,
15702         check_modifiers_consistency, method_declarator,
15703         complete_class_report_errors, check_abstract_method_definitions,
15704         java_check_regular_methods, check_throws_clauses,
15705         java_check_abstract_methods, read_import_dir,
15706         check_pkg_class_access, declare_local_variables, fix_constructors,
15707         cut_identifier_in_qualified, resolve_expression_name,
15708         resolve_qualified_expression_name, patch_method_invocation,
15709         java_complete_lhs, patch_assignment, try_builtin_assignconv,
15710         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15711         patch_exit_expr, patch_exit_expr, patch_switch_statement,
15712         patch_try_statement, patch_synchronized_statement,
15713         patch_throw_statement, check_thrown_exceptions,
15714         patch_conditional_expr): Likewise.
15716 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15718         * Makefile.in (LIBDEPS): Added gcc's errors.o
15719         (../jcf-dump$(exeext):): Link with gcc's errors.o
15720         (../gcjh$(exeext):): Likewise.
15721         * expr.c (expand_java_NEW): Layout the entire target type instead of
15722         laying out its methods only.
15723         (lookup_field): Layout the class after having loaded it.
15724         * java-tree.h (java_debug_context): Declared.
15725         * jcf-io.c (toplev.h): Included.
15726         (find_class): Removed assignment to jcf's outofsynch
15727         field. Force source file to be read if newer than its matching
15728         class file. Tweaked debug messages.
15729         * jcf-parse.c (jcf_out_of_synch): Deleted.
15730         (read_class): Call to jcf_out_of_synch removed.
15731         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15732         (jcf_out_of_synch): Prototype deleted.
15733         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15734         `deprecated' and `class_err': integer turned into bit-fields.
15735         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15736         * parse.y (package_list): New global.
15737         (package_declaration:): Record newly parsed package name.
15738         (extra_ctxp_pushed_p): Static global deleted.
15739         (java_parser_context_save_global): Create buffer context for the
15740         purpose of saving globals, if necessary.
15741         (java_parser_context_restore_global): Pop context pushed for the
15742         purpose of saving globals, if necessary.
15743         (java_debug_context_do): New prototype and function.
15744         (java_debug_context): Likewise.
15745         (do_resolve_class): Use already parsed package names to qualify
15746         and lookup class candidate.
15747         (java_pre_expand_clinit): Removed unnecessary local variable.
15749 1999-12-17  Tom Tromey  <tromey@cygnus.com>
15751         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
15752         fixes PR gcj/119.
15753         (process_file): Use `\n\' at end of each line in string.
15755 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15757         * expr.c (expand_invoke): Layout the loaded class before
15758         attempting to use it.
15759         (expand_java_field_op): Allow final field assignments to take
15760         place in $finit$.
15761         * typeck.c (convert): Return error_mark_node if expr is null.
15763 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15765         * class.c (class_depth): Return -1 if the class doesn't load
15766         properly.
15767         * expr.c (can_widen_reference_to): Check for errors during depth
15768         computation and return 0 accordingly.
15769         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15770         create default constructors and add an other error check.
15771         * parse.h (java_fix_constructors): Prototyped.
15772         * parse.y (java_pre_expand_clinit): Likewise.
15773         (build_super_invocation): Re-prototyped to feature one argument.
15774         (java_check_circular_reference): Directly use `current'.
15775         (java_fix_constructors): New function.
15776         (java_check_regular_methods): Don't create default constructors
15777         here, but abort if none were found.
15778         (java_complete_expand_methods): Pre-process <clinit> calling
15779         java_pre_expand_clinit.
15780         (java_pre_expand_clinit): New function.
15781         (fix_constructors): build_super_invocation invoked with the
15782         current method declaration as an argument.
15783         (build_super_invocation): Use the context of the processed method
15784         decl argument instead of current_class.
15785         * typeck.c (lookup_java_method): Take WFLs in method names into
15786         account.
15788 1999-12-14  Per Bothner  <per@bothner.com>
15790         * class.c (make_class_data): flag_keep_inline_functions to keep
15791         private methods in the method array.
15793 1999-12-15  Anthony Green  <green@cygnus.com>
15795         * check-init.c (check_init): Take into account both types of
15796         `throw's when checking for uninitialized variables.
15798 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15800         * parse.y (java_complete_lhs): Force conversion of array
15801         dimensions to int_type_node, that's what runtime's ABI expects.
15803 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15805         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15806         operand of a WFL, until the Java front-end gets fixed with regard
15807         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15809 1999-12-10  Andrew Haley  <aph@cygnus.com>
15811         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15812         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15813         expr.c (build_java_athrow): Add support for sjlj-exceptions.
15814         java-tree.h: Ditto.
15815         jcf-write.c: Ditto.
15817 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15819         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15820         before calling expand_eh_region_start and expand_start_all_catch.
15821         * except.c (expand_start_java_handler): Switch to permanent
15822         obstack before calling expand_eh_region_start.
15823         (expand_end_java_handler): Switch to permanent obstack before
15824         calling expand_start_all_catch.
15826 1999-12-5  Anthony Green  <green@cygnus.com>
15828         * decl.c (init_decl_processing): Mark throw_node as a noreturn
15829         function with side effects.
15830         (init_decl_processing): Mark all memory allocating DECLs with
15831         DECL_IS_MALLOC.
15833 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15835         * except.c (expand_end_java_handler): Call
15836         expand_resume_after_catch and end_catch_handler.
15838 1999-11-30  Anthony Green  <green@cygnus.com>
15840         * verify.c (verify_jvm_instructions): Create new return label
15841         chain if non existent (don't rely on the verified state of the jsr
15842         target.)
15844 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15846         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15847         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15849         * parse.y (patch_assignment): Removed bogus final class test on
15850         lhs when checking on whether to emit an ArrayStoreException runtime
15851         check.
15852         * expr.c (expand_java_arraystore): Likewise.
15854 1999-11-28 Anthony Green <green@cygnus.com>
15856         * decl.c (find_local_variable): Reuse single slot decls when
15857           appropriate.
15859 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15861         * jcf-parse.c (saw_java_source): Global variable removed.
15862         (read_class): Don't use `saw_java_source'. Added extra braces.
15863         (yyparse): Code setting `saw_java_source' removed.
15865 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
15867         * except.c (emit_handlers): Zero catch_clauses after emitting them.
15869 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15871         * verify.c (merge_type_state): Non verified subroutines being
15872         considered more than once to trigger passive type merge.
15874 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15876         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15877         in case of error. Error message tuned.
15879 1999-11-21  Anthony Green  <green@cygnus.com>
15881         * constants.c (find_methodref_index): Unwrap method names before
15882         inserting them in the constant pool.
15884         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15886         * class.c (assume_compiled_node): New typedef.
15887         (assume_compiled_tree): New static data.
15888         (find_assume_compiled_node): New function.
15889         (add_assume_compiled): New function.
15890         (assume_compiled): New function.
15891         * class.c (make_class_data): Use assume_compiled.
15892         (is_compiled_class): Use assume_compiled.
15894         * java-tree.h (add_assume_compiled): Declare.
15896         * lang.c (lang_decode_option): Parse new options.
15898 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15900         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15901         int_type_node: that's what `_Jv_AllocObject' expects.
15903 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15905         * parse.y (lookup_method_invoke): Use lang_printable_name to
15906         reliably build the type name during error report. Fixes PR gcj/97.
15908 1999-11-09  Tom Tromey  <tromey@cygnus.com>
15910         * jcf-path.c: Include <sys/stat.h>.
15911         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
15912         (DIR_UP): New macro.
15914 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15916         * parse.y (source_end_java_method): Resume permanent allocation,
15917         reversing Apr 27 1998 patch.
15918         (patch_string_cst): Pop obstacks after having pushed the permanent
15919         ones.
15921 1999-11-05  Tom Tromey  <tromey@cygnus.com>
15923         * class.c (finish_class): Emit inlined methods if any native
15924         methods exist in the class.  Fixes PR gcj/85.
15926 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15928         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15929         (qualify_ambiguous_name): Likewise.
15931 1999-11-03  Godmar Back <gback@cs.utah.edu>
15933         * typeck.c: (lookup_java_method):  search all inherited
15934         interfaces when looking up interface method.
15936 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15938         * parse.y (method_header:): Issue error message for rule `type
15939         error'.
15940         (synchronized:): Error report when not using synchronized.
15942 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15944         * parse.y (resolve_qualified_expression_name): Prevent `this' from
15945         being used before the superclass constructor has been called.
15946         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15947         instead of `CALL_THIS_CONSTRUCTOR_P'.
15949 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
15951         * check-init.c: Fix typo in comment.
15953 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15955         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15956         and final method.
15958 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15960         * parse.y (expression_statement:): Call function to report
15961         improper invocation of a constructor.
15962         (parse_ctor_invocation_error): New function.
15964 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
15966         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15967         remember_end_note.
15969 1999-10-21  Tom Tromey  <tromey@cygnus.com>
15971         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15972         in generated `main'.
15974 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15976         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15977         (qualify_ambiguous_name): Likewise.
15979 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15981         * parse.y (java_complete_tree): fold_constant_for_init to work on
15982         permanent_obstack.
15983         (java_complete_lhs): Likewise.
15984         (array_constructor_check_entry): Complete an initializer element
15985         on permanent_obstack.
15987 1999-10-19  Tom Tromey  <tromey@cygnus.com>
15989         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15990         From Mike Moreton <mike@pillim.demon.co.uk>.
15992 1999-10-15  Greg McGary  <gkm@gnu.org>
15994         * java-tree.h (flag_bounds_check): Remove extern decl.
15995         * lang.c (flag_bounds_check): Remove global variable.
15996         (lang_f_options): Remove "bounds-check" entry.
15997         (lang_init_options): Default flag_bounds_check to "on".
15999 1999-10-14  Tom Tromey  <tromey@cygnus.com>
16001         * jvgenmain.c (usage): New function.
16002         (main): Use it.  Also, handle `-D' options.
16003         * jvspec.c (lang_specific_driver): Recognize -D.
16004         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
16006         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
16008 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16010         * jcf-dump.c (print_constant, disassemble_method): Don't call a
16011         variadic function with a non-literal format string.
16013         * parse-scan.y (report_main_declaration): Likewise.
16015         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
16017         * parse.y (read_import_dir, patch_assignment, patch_binop,
16018         patch_array_ref): Likewise.
16020         * typeck.c (build_java_array_type): Likewise.
16022         * verify.c (verify_jvm_instructions): Likewise.
16024 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16026         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
16028 1999-10-07  Anthony Green  <green@cygnus.com>
16030         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
16031         where CHECK_PUT may fail for valid reasons.
16033         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
16034         UNSAFE_PUTN): New macros.
16036 1999-10-04  Tom Tromey  <tromey@cygnus.com>
16038         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
16039         well.  Fixes Java PR gcj/59.
16040         * parse-scan.y (yyerror): Report errors.
16042 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
16044         * decl.c (insert_block): Remove unconditional `abort'.
16046 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
16048         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
16049         FUNCTION_CODE now of type int.  All callers changed.
16050         Set the builtin's DECL_BUILT_IN_CLASS.
16052 1999-09-23  Tom Tromey  <tromey@cygnus.com>
16054         * jvspec.c (lang_specific_driver): Don't read spec file if
16055         -fsyntax-only given.
16057 1999-09-22  Tom Tromey  <tromey@cygnus.com>
16059         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
16061         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
16062         (WORDS_TO_LONG): Likewise.
16063         (WORDS_TO_DOUBLE): Likewise.
16065 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16067         * jcf-write.c (RELOCATION_VALUE_0): New macro.
16068         (RELOCATION_VALUE_1): Likewise.
16069         (emit_iinc, emit_reloc, push_constant1, push_constant2,
16070         push_in_const, push_long_const): Prototyped.
16071         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
16072         (push_constant2): Likewise.
16073         (push_int_const): Cast find_constant1's integer arguments to `jword'.
16074         (find_constant_wide): Cast find_constant2's integer arguments to
16075         `jword'.
16076         (find_constant_index): Cast find_constant2's and find_constant2's
16077         integer arguments to `jword'.
16078         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
16079         (emit_switch_reloc): Use RELOCATION_VALUE_0.
16080         (emit_if): Use RELOCATION_VALUE_1.
16081         (emit_goto): Likewise.
16082         (emit_jsr): Likewise.
16083         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
16084         argument to push_long_const to HOST_WIDE_INT.
16086 1999-09-15  Andreas Schwab  <schwab@suse.de>
16088         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
16090 1999-09-20  Nick Clifton  <nickc@cygnus.com>
16092         * lang.c (lang_decode_option): Extend comment.
16094 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16096         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
16097         instead of fndecl.
16099 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16101         * gjavah.c (get_field_name, print_method_info, print_include,
16102         add_namelet): Use xmalloc, not malloc.
16104         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
16105         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
16106         NULL pointer.
16108         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
16110         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
16112         * jcf-path.c (add_entry): Likewise.
16114         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
16116         * jv-scan.c (xmalloc): Remove definition.
16118         * jvgenmain.c (xmalloc): Likewise.
16120         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
16122         * lex.c (java_store_unicode): Use xrealloc, not realloc.
16124         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
16125         concat, not xmalloc/sprintf.
16126         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
16127         (xstrdup): Remove definition.
16129         * parse.y (duplicate_declaration_error_p,
16130         constructor_circularity_msg, verify_constructor_circularity,
16131         check_abstract_method_definitions, java_check_regular_methods,
16132         java_check_abstract_methods, patch_method_invocation,
16133         check_for_static_method_reference, patch_assignment, patch_binop,
16134         patch_cast, array_constructor_check_entry, patch_return,
16135         patch_conditional_expr): Use xstrdup, not strdup.
16137         * zextract.c (ALLOC): Use xmalloc, not malloc.
16139 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16141         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
16143         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
16144         (do_spec, lang_specific_pre_link, lang_specific_driver,
16145         input_filename, input_filename_length): Don't declare.
16146         (main_class_name, jvgenmain_spec, lang_specific_driver):
16147         Constify a char*.
16148         (lang_specific_driver): All calls to the function pointer
16149         parameter now explicitly call `fatal'.
16151 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16153         * parse.y (find_applicable_accessible_methods_list): Search
16154         abstract classes as interfaces.
16156 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16158         * class.c (finish_class): We're now outside a valid method
16159         declaration. Tell the rest of gcc so.
16161 1999-09-08  Bruce Korb  autogen@linuxbox.com
16163         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
16165 1999-09-07  Tom Tromey  <tromey@cygnus.com>
16167         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
16168         java-array.h.
16169         (decode_signature_piece): Don't emit "::" in JArray<>.
16170         (print_namelet): Only print trailing `;' when printing a class.
16172 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
16174         * java-tree.h: Delete declarations for all tree nodes now moved to
16175         global_trees.
16176         * decl.c: Delete their definitions.
16178 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
16180         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
16181         * Makefile.in (OBJS): Add ggc-callbacks.o.
16182         (OBJDEPS): Likewise.
16184 1999-09-03  Tom Tromey  <tromey@cygnus.com>
16186         * parse.y (strip_out_static_field_access_decl): Return operand if
16187         it satisfies JDECL_P.
16189 1999-09-02  Tom Tromey  <tromey@cygnus.com>
16191         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
16192         Handle nested arrays, like `[[I'.
16194 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16196         * class.c (finish_class): Remove unused parameter, all callers
16197         changed.
16199         * expr.c (build_java_athrow): Change return type to void.
16200         (java_lang_expand_expr): Make sure each case in switch returns a
16201         value.
16203         * java-tree.h (finish_class): Fix prototype to take void args.
16205         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16206         (main): Issue return from main, not exit.
16208         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16210         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16212         * jv-scan.c (main): Issue return from main, not exit.
16214         * parse.y (check_abstract_method_definitions,
16215         java_check_abstract_method_definitions): Add static prototypes.
16216         (java_complete_expand_methods): Fix call to `finish_class'.
16218         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16219         and `prevpc'.
16221 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16223         * lang.c (language_string): Constify.
16225 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16227         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16228         Remove hacks for stuff which comes from libiberty.
16230         * Make-lang.in: Likewise.
16232 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
16234         * Makefile.in (xref.o): Depend on xref.c explicitly.
16236 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16238         * java-tree.h (lang_printable_name): Constify a char*.
16240         * lang.c (lang_printable_name): Likewise.
16242 1999-08-27  Jeffrey A Law  (law@cygnus.com)
16244         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16245         comments in C code.
16247 1999-08-26  Tom Tromey  <tromey@cygnus.com>
16249         * gjavah.c (print_cxx_classname): Print "::" before qualified
16250         name.
16252 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16254         * parse.y (lookup_cl): Changed leading comment. Now does its best
16255         to set the column number.
16256         (qualify_ambiguous_name): Take WFL wrappers into account.
16258 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
16260         * verify.c (verify_jvm_instructions): Don't check instruction
16261         validity beyond end of method.
16263 1999-08-25  Tom Tromey  <tromey@cygnus.com>
16265         * jvspec.c (lang_specific_driver): Correctly handle --help again.
16267 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16269         * gjavah.c (print_name, print_base_classname, utf8_cmp,
16270         cxx_keyword_subst, generate_access, name_is_method_p,
16271         get_field_name, print_field_name, super_class_name, print_include,
16272         decode_signature_piece, print_class_decls, usage, help,
16273         java_no_argument, version, add_namelet, print_namelet): Add static
16274         prototype.
16275         (print_base_classname, utf8_cmp, cxx_keyword_subst,
16276         name_is_method_p): Constify a char*.
16277         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
16278         Provide a final else clause in an if-else-if.
16279         (print_field_info): Add missing final arg in function call to
16280         `print_field_name'.
16281         (print_method_info, decompile_method, decode_signature_piece,
16282         print_c_decl, print_full_cxx_name, print_stub,
16283         print_mangled_classname, super_class_name, print_include,
16284         add_namelet, add_class_decl, print_class_decls, process_file,
16285         help): Constify a char*.
16287         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16288         push_int_const, find_constant_wide, find_constant_index,
16289         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16290         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16291         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16292         emit_if, emit_goto, emit_jsr, call_cleanups,
16293         make_class_file_name): Add static prototypes.
16294         (generate_bytecode_return, generate_bytecode_insns): Pass a
16295         NULL_PTR, not a NULL_TREE.
16297         * jv-scan.c: Include "jcf.h".
16298         (main): Declare using DEFUN macro.
16300         * jvspec.c (find_spec_file, lang_specific_pre_link,
16301         lang_specific_driver): Add prototypes.
16302         (find_spec_file): Constify a char*.
16304         * keyword.gperf (hash, java_keyword): Add prototypes.
16306         * lang.c (lang_print_error): Add static prototype.
16307         (lang_init): Prefer memcpy over bcopy to avoid casts.
16309         * lex.c (yylex): Add static prototype.
16311         * parse-scan.y: Include "lex.c" earlier.
16313         * parse.h: Remove redundant declaration for `yylex'.
16315         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16316         labeled_block_contains_loop_p): Add static prototypes.
16317         (not_accessible_p): Make static to match prototype.
16319         * verify.c (start_pc_cmp): Don't needlessly cast away const.
16321 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16323         * parse.y (check_method_redefinition): Changed leading comment.
16324         (check_abstract_method_definitions): New function.
16325         (java_check_abstract_method_definitions): New function.
16326         (java_check_regular_methods): Call it.
16327         (verify_constructor_super): Fixed indentation.
16328         (lookup_method_invoke): Likewise.
16330 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16332         * parse.y (method_header): Return a null pointer if the current
16333         class node is null.
16334         (finish_method_declaration): Return if the current function decl
16335         is null.
16336         (source_start_java_method): Likewise.
16337         (java_method_add_stmt): Likewise.
16339 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16341         * class.c (emit_register_class): Removed unnecessary call to
16342         start_sequence.
16343         * parse.y (labeled_block_contains_loop_p): Removed unused local
16344         variable.
16346 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16348         * parse.y (java_refold): Added prototype.
16350 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16352         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16353         (java_stabilize_reference): Removed unnecessary `else'.
16354         (java_complete_lhs): Set flag to remember boolean. Call
16355         java_refold. Added comments.
16356         (java_decl_equiv): New function.
16357         (binop_compound_p): Likewise.
16358         (java_refold): Likewise.
16359         (patch_unaryop): Striped static field access assigned to decl and
16360         op. Changed promotion scheme for ++/-- operators.
16361         (search_loop): New function.
16362         (labeled_block_contains_loop_p): Likewise.
16363         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16364         comment.
16365         (patch_bc_statement): Call search_loop. Fixed comment.
16367 1999-08-14  Anthony Green  <green@cygnus.com>
16369         * expr.c (java_lang_expand_expr): Mark static array data as
16370         referenced.
16372 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
16374         * jvgenmain.c (main): NUL-terminate name_obstack.
16376 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16378         * check-init.c (check_bool2_init, done_alternative): Add static
16379         prototypes.
16381         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16382         (add_method, build_utf8_ref, build_class_ref,
16383         append_gpp_mangled_type, layout_class_method): Constify a char*.
16385         * decl.c (push_promoted_type, make_binding_level): Add static
16386         prototypes.
16387         (push_promoted_type, pushdecl): Constify a char*.
16389         * except.c (find_handler_in_range, link_handler,
16390         check_start_handlers): Add static prototypes.
16392         * expr.c (process_jvm_instruction): Constify a char*.
16394         * gjavah.c (main): Constify a char*.
16396         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16397         Constify a char*.
16399         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16400         static prototypes.
16401         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16402         munge, print_ents): Constify a char*.
16404         * jcf-dump.c (disassemble_method): Constify a char*.
16405         (print_constant_pool, print_exception_table): Add static prototypes.
16406         (print_constant, print_exception_table, main, disassemble_method):
16407         Constify a char*.
16409         * jcf-io.c (find_classfile, find_class): Likewise.
16411         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16412         (set_source_filename, predefined_filename_p): Add static prototypes.
16413         (set_source_filename, get_constant, get_class_constant,
16414         find_in_current_zip): Constify a char*.
16416         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16417         static prototypes.
16418         (add_entry, add_path, jcf_path_classpath_arg,
16419         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16421         * jcf-reader.c (get_attribute, jcf_parse_preamble,
16422         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16423         jcf_parse_one_method, jcf_parse_methods,
16424         jcf_parse_final_attributes): Add static prototypes.
16425         (get_attribute): Constify a char*.
16427         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16428         jcf_dependency_add_target, jcf_path_classpath_arg,
16429         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16431         * jv-scan.c (main): Constify a char*.
16432         (gcc_obstack_init): Add prototype arguments.
16434         * jvgenmain.c (gcc_obstack_init): Likewise.
16435         (main): Constify a char*.
16437         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16438         static prototypes.
16439         (put_decl_string, lang_print_error): Constify a char*.
16440         (lang_init): Remove redundant extern prototype.
16442         * mangle.c (emit_unicode_mangled_name): Constify a char*.
16444         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16445         Add static prototypes.
16446         (get_type_from_signature): Constify a char*.
16448         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16449         Add static prototypes.
16450         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16451         (verify_jvm_instructions): Constify a char*.
16453         * xref.c (xref_flag_value): Likewise.
16455         * xref.h (xref_flag_value): Likewise.
16457         * zextract.c (makeword, makelong): Add static prototypes.
16458         (makeword, makelong): Constify a uch*.
16460 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16462         * lang.c (java_dummy_print): Constify a char*.
16463         (lang_print_error): Likewise.
16464         (lang_init): Remove redundant prototype for `print_error_function'.
16465         (lang_init_source): Likewise.
16466         (lang_identify): Constify a char*.
16468 1999-08-09  Tom Tromey  <tromey@cygnus.com>
16470         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16471         (WORDS_TO_LONG): Likewise.
16472         (WORDS_TO_DOUBLE): Likewise.
16474 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16476         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16478         * expr.c (java_stack_pop, java_array_data_offset,
16479         build_java_throw_out_of_bounds_exception, case_identity,
16480         build_java_check_indexed_type): Add static prototypes.
16481         (linenumber_table, expand_invoke, expand_java_field_op,
16482         build_primtype_type_ref, expand_byte_code): Constify a char*.
16484         * java-tree.h (build_primtype_type_ref, linenumber_table):
16485         Constify a char*.
16486         (java_lang_expand_expr): Add prototype.
16488         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
16489         `java_lang_expand_expr'.
16491         * lex.c (java_lex_error): Constify a char*.
16492         (java_get_unicode, java_read_char, java_allocate_new_line,
16493         java_unget_unicode, java_sneak_unicode): Prototype.
16495         * parse-scan.y (current_class, package_name, method_declarator,
16496         report_class_declaration, yyerror): Constify a char*.
16498         * parse.h (java_report_errors): Prototype.
16499         (yyerror): Constify a char*.
16501         * parse.y (classitf_redefinition_error, check_modifiers,
16502         parse_jdk1_1_error, lookup_package_type,
16503         lookup_package_type_and_set_next, get_printable_method_name,
16504         purify_type_name): Constify a char*.
16505         (build_super_invocation, maybe_generate_finit,
16506         verify_constructor_super, parser_add_interface,
16507         add_superinterfaces, jdep_resolve_class, note_possible_classname,
16508         java_complete_expand_methods, java_expand_finals,
16509         cut_identifier_in_qualified, java_stabilize_reference,
16510         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16511         merge_string_cste): Prototype.
16512         (single_type_import_declaration, yyerror,
16513         variable_redefinition_error, build_array_from_name,
16514         build_unresolved_array_type, check_class_interface_creation,
16515         resolve_class, complete_class_report_errors,
16516         note_possible_classname, read_import_dir,
16517         find_in_imports_on_demand, resolve_package, fix_constructors,
16518         check_deprecation, lookup_method_invoke,
16519         maybe_build_primttype_type_ref, array_constructor_check_entry):
16520         Constify a char*.
16521         (java_complete_expand_methods, java_expand_finals): Make static.
16522         (convert_narrow): Remove static prototype.
16524 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
16526         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16528 1999-08-02  Richard Henderson  <rth@cygnus.com>
16530         * decl.c: Include defaults.h instead of expr.h.
16531         * parse.y: Likewise.
16533 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
16535         * java/decl.c (start_java_method): Change all uses of
16536         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16537         Ensure expr.h is included.
16538         * java/expr.c (pop_arguments): Ditto.
16539         * java/parse.y (expand_start_java_method): Ditto.
16541 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16543         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16545 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
16547         * decl.c: Include "function.h".
16548         * except.c: Likewise.
16549         * parse.y: Likewise.
16550         * Makefile.in: Update dependencies.
16552 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16554         * expr.c (build_java_soft_divmod): Provide a default case in switch.
16555         (java_lang_expand_expr): Mark parameters `target', `tmode' and
16556         `modifier' with ATTRIBUTE_UNUSED.
16558         * gjavah.c (process_file): Add braces around ambiguous `else'.
16560         * jcf-dump.c (print_access_flags, localvar_free): Change return
16561         type to void.
16563         * parse.y (java_complete_expand_method): Initialize variable
16564         `exception_copy'.
16565         (resolve_qualified_expression_name): Likewise for `field_decl'.
16566         (patch_method_invocation): Likewise for `class_to_search'.
16567         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16568         (patch_assignment): Likewise for `lhs_type'.
16570         * verify.c (verify_jvm_instructions): Remove unused variable
16571         `caller'.
16573 1999-07-25  Richard Henderson  <rth@cygnus.com>
16575         * decl.c (va_list_type_node): New.
16577 1999-07-25  Anthony Green  <green@cygnus.com>
16579         * gjavah.c (print_stub): New function.
16580         (METHOD_IS_NATIVE): New macro.
16581         (print_mangled_classname): Make static.
16582         (HANDLE_END_FIELD): Don't emit fields during stub generation.
16583         (process_file): Perform stub generation.
16584         (HANDLE_METHOD): Don't emit class decls during stub
16585         generation.
16586         (HANDLE_END_METHOD): Take into account stub generation.
16587         (print_method_info): Handle stub generation.
16588         (print_stub): New function.
16589         (print_cxx_classname): Make signature consistant with others.
16590         (help): Describe -stubs option.
16591         (main): Create stub file.
16592         (version): Use version.c.
16593         (print_full_cxx_name): New function.
16594         (print_c_decl): Use print_full_cxx_name.
16596 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16598         * check-init.c (check_init): Handle MAX_EXPR.
16600 1999-07-15  Andrew Haley  <aph@cygnus.com>
16602         * lang.c (flag_use_divide_subroutine): New variable.
16603         * typeck.c: (convert_ieee_real_to_integer): Bounds check
16604         fp-to-integer conversion.
16605         (convert): Call convert_ieee_real_to_integer when flag_fast_math
16606         is not set.
16608         * expr.c (build_java_soft_divmod): New function.
16609         (build_java_binop): Call build_java_soft_divmod if
16610         flag_use_divide_subroutine is set.
16611         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16612         soft_lrem_node: new builtin functions.
16613         (init_decl_processing) Initialize the new builtins.
16614         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16615         soft_lrem_node: new builtin functions.
16616         (build_java_soft_divmod): New function.
16617         * parse.y: Call build_java_soft_divmod if
16618         flag_use_divide_subroutine is set.
16619         * parse.c: Rebuilt.
16621         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16622         a --specs= arg) even if not linking.
16623         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16624         -fuse-divide-subroutine
16626 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16628         * parse.y (resolve_and_layout): Check methods only once.
16629         (resolve_qualified_expression_name): Verify thrown exceptions
16630         compatibility.
16631         (check_thrown_exceptions): Reject exceptions thrown in
16632         initializer. Error message tuned.
16634 1999-07-14  Andrew Haley  <aph@cygnus.com>
16636         * expr.c (expand_expr): Do not return the last statement in a
16637         block as the block's value.
16639 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16641         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16642         CALL_EXPR, to avoid order of evaluation changes.
16644 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16646         * parse.y (qualify_ambiguous_name): Do not use
16647         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16649 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16651         * check-init.c (check_init): Handle MAX_EXPR.
16652         * expr.c (force_evaluation_order): Force method call arguments to
16653         be evaluated in left-to-right order.
16654         * parse.y (qualify_ambiguous_name): Loop again to qualify
16655         NEW_ARRAY_EXPR properly.
16657 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16659         * parse.y (patch_invoke): Resolve unresolved invoked method
16660         returned type.
16661         (qualify_ambiguous_name): STRING_CST to qualify expression for
16662         type name resolution.
16664 1999-06-24  Andrew Haley  <aph@cygnus.com>
16666         * class.c (finish_class): Whenever a deferred method is
16667         output, rescan the list of methods to see if a new candidate for
16668         output can be found.
16670 1999-06-28  Tom Tromey  <tromey@cygnus.com>
16672         * jvspec.c (lang_specific_driver): Recognize --help.
16674 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16676         * parse.y (resolve_package): Fixed bogus return statement.
16677         (patch_method_invocation): Resolve method invocation beginning with
16678         a package name qualifier.
16680 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16682         * Make-lang.in (java.stage1): Depend on stage1-start.
16683         (java.stage2): Likewise for stage2-start.
16684         (java.stage3): Likewise for stage3-start.
16685         (java.stage4): Likewise for stage4-start.
16687 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16689         * parse.y (java_complete_lhs): When doing cross referencing, don't
16690         try to keep file location on a WFL expanded as a CALL_EXPR.
16692 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16694         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16695         compiling to class file a void method with an empty method body.
16696         As a side effect, the bytecode backend will generate the
16697         appropriate `return' instruction.
16699 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16701         * parse.y (lookup_package_type_and_set_next): New function prototype.
16702         (resolve_package): Search current and imported packages.
16703         (lookup_package_type_and_set_next): New function.
16705 1999-06-22  Andrew Haley  <aph@cygnus.com>
16707         * verify.c (verify_jvm_instructions): Check for pending blocks
16708         before invalid PC test and opcode switch, not after.
16710 1999-06-21  Andrew Haley  <aph@cygnus.com>
16712         * except.c (find_handler_in_range): The upper limit for exception
16713         ranges is exclusive, not inclusive: (start <= pc < end).
16714         (link_handler): find child pointer which points to outer by
16715         searching sibling list: previous code incorrectly assumed that
16716         outer->outer->first_child must point to outer.
16717         * verify.c (verify_jvm_instructions): FIXME added to code for
16718         `athrow'.
16719         (verify_jvm_instructions): Do not assume that the last block
16720         processed in a subroutine is a block which ends with a `ret'
16721         instruction.  With some control flows it is possible that the last
16722         block ends with an `athrow'.
16724 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16726         * parse.y (qualify_ambiguous_name): Reorganized the post
16727         evaluation of non WFL leading expression nodes.
16729 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16731         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16732         CONVERT_EXPR.
16734 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16736         * parse.y (qualify_ambiguous_name): Handle qualified expression
16737         beginning with a STRING_CST.
16739 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16741         * parse.y (register_fields): Set DECL_INITIAL on both
16742         pre-initialized static and public fields.
16743         (resolve_field_access): Static field access expressions to always
16744         use pointer types.
16745         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16746         qualification. CONVERT_EXPR to be resolved as an expression name.
16747         (java_complete_lhs): Identify and access qualified final
16748         initialized field in switch statement case expression.
16749         (fold_constant_for_init): Pre-initialized field decl constant to
16750         be folded.
16752 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16754         * parse.y (note_possible_classname): Mark returned node with
16755         QUALIFIED_P only if the original class name contained a '/'.
16757 1999-06-05  Anthony Green  <green@cygnus.com>
16759         * Make-lang.in (gcjh): More parallel build fixes.
16761 1999-06-03  Mike Stump  <mrs@wrs.com>
16763         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16765 1999-06-02  Anthony Green  <green@cygnus.com>
16767         * except.c (link_handler): Chain exception handlers in order.
16769 1999-06-02  Anthony Green  <green@cygnus.com>
16771         * expr.c (expand_byte_code): Fill unreachable bytecode regions
16772         with nops and process as usual in order to always set correct EH
16773         ranges.  Emit detailed warnings about unreachable bytecodes.
16775 1999-06-02  Anthony Green  <green@cygnus.com>
16777         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16778         constant.
16780 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16782         * parse.y (lookup_field_wrapper): Unified returned value to NULL
16783           or the searched field decl.
16785 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16787         * parse.y (fold_constant_for_init): Convert numerical constant
16788         values to the type of the assigned field.
16790 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16792         * expr.c (lookup_field): Relaxed the test on class loading error
16793         detection.
16794         * parse.y (fold_constant_for_init): Enabeled old code.
16796 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16798         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16799         decide the validity of the cast of a java.lang.Cloneable reference
16800         to an array.
16801         (patch_conditional_expr): Fixed first argument passed to
16802         binary_numeric_promotion.
16804 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16806         * parse.y (qualify_ambiguous_name): Take into account that a
16807         CONVERT_EXPR might specify a type as a WFL.
16809 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16811         * parse.y (patch_assignment): Save the rhs before using it as an
16812         argument to _Jv_CheckArrayStore.
16814 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16816         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16818 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16820         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16821         floating point literal only when the exponent indicator has been
16822         parsed.
16824 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16826         * parse.y (formal_parameter:): Construct argument tree list
16827         element even if a yet unsupported final parameter was encountered.
16829 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16831         * parse.y (finish_method_declaration): Issue errors for native or
16832         abstract methods declared with a method body, as well as for non
16833         native or non abstract methods with no method body.
16835 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16837         * class.c (build_utf8_ref): Initialize variable `field'.
16839         * decl.c (init_decl_processing): Initialize variable `field'.
16841         * expr.c (build_known_method_ref): Mark parameters `method_type',
16842         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16843         (process_jvm_instruction): Likewise for parameter `length'.
16845         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16846         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16847         ATTRIBUTE_UNUSED.
16849         * parse.y (maybe_generate_clinit): Remove unused variable
16850         `has_non_primitive_fields'.
16851         (find_in_imports_on_demand): Initialize variables `node_to_use'
16852         and `cl'.
16853         (patch_binop): Likewise for variable `prom_type'.
16854         (patch_unaryop): Likewise for variable `prom_type'.
16856         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16858         * xref.c (xref_table): Add missing initializer.
16860 1999-05-14  Tom Tromey  <tromey@cygnus.com>
16862         * java-except.h (struct eh_range): Removed unused `next' member.
16863         * verify.c (verify_jvm_instructions): Call check_nested_ranges
16864         after adding all exception handlers.  Sort exception ranges in
16865         order of start PC.
16866         (struct pc_index): New structure.
16867         (start_pc_cmp): New function.
16868         * except.c (add_handler): Return `void'.  Don't call link_handler;
16869         instead construct an ordinary linked list and do range
16870         coalescing.
16871         (check_nested_ranges): New function.
16872         (link_handler): Changed interface to allow merging of eh_ranges.
16873         Split overlapping ranges.  Return `void'.
16875 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16877         * parse.y (constructor_block_end:): New rule, tagged <node>.
16878         (constructor_body:): Use `constructor_block_end' instead of
16879         `block_end'.
16881 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16883         * parse.y (statement_nsi:): Pop `for' statement block.
16884         (java_complete_lhs): Labeled blocks containing no statement are
16885         marked as completing normally.
16887 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16889         * xref.c (xref_set_current_fp): New function, defined.
16890         * xref.h (xref_set_current_fp): New function, prototyped.
16892 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16894         * check-init.c (check_init): Take into account that
16895         LABELED_BLOCK_STMT can be empty.
16897 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16899         * parse.y (java_check_regular_methods): Warning check on not
16900         overriding methods with default access in other packages does not
16901         apply to `<clinit>'.
16902         (java_complete_lhs): If block body is an empty_stmt_node, replace
16903         it by NULL_TREE. This prevents gcc from generating an irrelevant
16904         warning.
16906 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16908         * check-init.c (check_init): Removed code accepting to see things
16909         falling through default:, when doing xrefs.
16910         * java-tree.h (do_not_fold): New global variable, declared.
16911         * parse.y (do_not_fold): New global variable, defined.
16912         (java_complete_expand_method): Set `do_not_fold' to the value of
16913         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16914         and reinstall them after them have been purged; do not check for
16915         initializations; do not issue missing return errors.
16916         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16917         when doing xrefs.
16918         (patch_binop): Skip the fold part when doing xrefs.
16919         (build_string_concatenation): Skip the concatenation part when
16920         doing xrefs.
16921         (patch_synchronized_statement): Do not generate a try-finally when
16922         doing xrefs.
16923         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16924         and keep the location where the throw was seen.
16925         * typeck.c (convert): When `do_not_fold' is set, do not attempt
16926         any treatment on the converted node an simply return a NOP_EXPR of
16927         the targeted type.
16928         * xref.c (xref_get_data): New function, defined.
16929         * xref.h (xref_get_data): New function, declared.
16930         (XREF_GET_DATA): Use xref_get_data.
16932 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16934         * gjavah.c (print_include): Cast the result of `strlen' to int
16935         when comparing against a signed value.
16936         (add_namelet): Likewise.
16938 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16940         * expr.c (expand_invoke): Mark parameter `nargs' with
16941         ATTRIBUTE_UNUSED.
16942         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16944         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16945         ATTRIBUTE_UNUSED.
16947         * jcf-reader.c (get_attribute): Cast a value to long
16948         when comparing against a signed expression.  Likewise.
16950         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16951         HOST_BITS_PER_CHAR.
16953 1999-05-11  Andrew Haley  <aph@cygnus.com>
16955         * parse.y (source_end_java_method): If the current method contains
16956         any exception handlers, force asynchronous_exceptions: this is
16957         necessary because signal handlers in libjava may throw exceptions.
16958         * decl.c (end_java_method): Ditto.
16960 1999-05-11  Tom Tromey  <tromey@cygnus.com>
16962         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16963         flags.
16964         * jvspec.c (THREAD_NAME): Removed.
16965         (GC_NAME): Likewise.
16966         (MATHLIB): Likewise.
16967         (WITHLIBC): Likewise.
16968         (GCLIB): Likewise.
16969         (THREADLIB): Likewise.
16970         (MATH_LIBRARY): Likewise.
16971         (lang_specific_driver): Don't add `-l' options to command line.
16972         Instead, add a single --specs option.  Recognize `-L' options and
16973         use them to search for spec file.
16974         (find_spec_file): New function.
16975         (SPEC_FILE): New define.
16977 1999-05-11  Dave Brolley  <brolley@cygnus.com>
16979         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16980         cpplib-enabled build.
16982 1999-05-05  Per Bothner  <bothner@cygnus.com>
16984         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
16985         temporarily zero it while calling rest_of_decl_compilation.
16987         * java-tree.h (string_ptr_type_node):  Add declaration.
16988         * decl.c:  Define and initialize string_ptr_type_node.
16989         * parse.y (patch_string_cst):  Use string_ptr_type_node.
16991         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
16992         * parse.y (for_statement):  Now unconditionally exit_block.
16993         (finish_labeled_statement):  No longer exit_block if for-loop.
16994         (patch_loop_statement):  Check harder if the loop is already labeled.
16996         * parse.y (patch_initialized_static_field):  Removed function.
16997         (maybe_generate_clinit):  Removed special handling for interfaces.
16998         (java_complete_expand_methods):  Do a preliminary java_complete_tree
16999         on <clinit> to determine if it can be removed.
17000         (java_complete_expand_method):  Remove special handling for <clinit>.
17001         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
17002         optimize if we get back empty_stmt_node.
17003         For MODIFY_EXPR, re-do checking of static initializers.
17004         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
17005         For VAR_DECL, pass correct context.
17007         * verify.c (verify_jvm_instructions):  Better error messages.
17009 1999-05-03  Tom Tromey  <tromey@cygnus.com>
17011         * parse-scan.y (interface_declaration): Call
17012         report_class_declaration for interfaces.
17014 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
17016         * Makefile.in: Remove -v from bison command lines.
17018 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17020         * check-init.c (check_init): Exclude a case of error when doing
17021         xrefs.
17022         * class.c (layout_class_method): Don't generate the error message
17023         twice when compiling from source.
17024         * lang-options.h: Added `-Wredundant-modifers' and
17025         `-Wunusupported-jdk11' flags and help text.
17026         * lang.c (lang_decode_option): Added support for
17027         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
17028         flag_static_local_jdk11 and flag_redundant set accordingly.
17029         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
17030         * parse.h (EXPR_WFL_ADD_COL): New macro.
17031         (DECL_END_SOURCE_LINE): Likewise.
17032         (DECL_INHERITED_SOURCE_LINE): Likewise.
17033         * parse.y (static_ref_err): New function, prototyped.
17034         (CCB_TK): Now tagged <operator>.
17035         (class_body:): Remember the location of the closing '}' of a class
17036         definition when doing xrefs.
17037         (block:): Likewise.
17038         (block_end:): Likewise.
17039         (create_class): Remember the location of the inherited class
17040         identifier when doing xrefs.
17041         (register_fields): Added test on first operand of `init' before
17042         testing it TREE_CODE.
17043         (method_header): Store the location of the class identifier in the
17044         class decl when doing xrefs.
17045         (finish_method_declaration): Don't combine first/last method line
17046         when doing xref.
17047         (java_check_regular_methods): Warning check on not overriding
17048         methods with default access on other packages move before check on
17049         static methods. Initialization of `aflags' also moved up.
17050         (resolve_expression_name): Call static_ref_err to report the error.
17051         (static_ref_err): New function, implemented.
17052         (resolve_field_access): Returned simplified static field access
17053         when doing xrefs.
17054         (resolve_qualified_expression_name): Check for illegal use of
17055         static fields in a non static context. Call static_ref_err to
17056         report error in various places.
17057         (java_complete_tree): Do not fold initialized static fields when
17058         doing xrefs.
17059         (java_complete_lhs): Likewise.
17061 1999-04-29  Anthony Green  <green@cygnus.com>
17063         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
17064         create internal labels.
17065         (lookup_label): Ditto.
17067 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17069         * class.c (layout_class_method): Generate <clinit>'s rtl for
17070         interfaces.
17071         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
17072         for interfaces' <clinit>.
17073         * expr.c (lookup_field): Search for fields in interfaces.
17074         (expand_invoke): Fixed indentation.
17075         (expand_java_field_op): Likewise. Use IS_CLINIT.
17076         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
17077         (IS_CLINIT): New macro.
17078         * parse.y (type_declaration:): Call maybe_generate_clinit after an
17079         interface was parsed.
17080         (maybe_generate_clinit): Don't generate if the current class is an
17081         interface with only fields of primitive types.
17082         (reset_method_name): Use IS_CLINIT.
17083         (java_complete_expand_method): Expand <clinit> when it exists for
17084         interfaces. Use IS_CLINIT.
17085         (resolve_expression_name): Use DECL_CONTEXT instead of
17086         current_class to build static field references.
17087         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
17088         ARRAY_REF when doing xreferencing.
17089         (check_final_assignment): Fixed typo in leading comment. Use
17090         IS_CLINIT.
17091         (patch_array_ref): Don't fully expand array references when
17092         xreferencing.
17093         (patch_return): Use IS_CLINIT.
17094         (patch_throw_statement): Likewise.
17096 1999-04-22  Tom Tromey  <tromey@cygnus.com>
17098         * Make-lang.in (JAVA_SRCS): Added check-init.c.
17100 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17102         * decl.c (predef_filenames, predef_filenames_size): New globals
17103         (init_decl_processing): predef_filenames and predef_filenames_size
17104         initialized.
17105         * java-tree.h (predef_filenames, predef_filenames_size): Declared
17106         extern.
17107         * jcf-parse.c (predefined_filename_p): New function.
17108         (yyparse): Check that files on the command line are specified only
17109         once and issue a warning otherwise.
17110         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
17111         * parse.y (source_end_java_method): Nullify NOP method bodies, to
17112         avoid a gcc warning with -W -Wall turned on.
17113         (java_expand_classes): Abort if errors were encountered.
17114         (java_complete_lhs): If the cross reference flag is set, wrap
17115         field DECL node around a WFL when resolving expression name.
17117 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17119         * lang.c (lang_decode_option): Fixed returned value when parsing
17120         `-fxref=...' and `-Wall'.
17121         * parse.y (source_end_java_method): Do not generate code when
17122         flag_emit_xref is set.
17123         (resolve_expression_name): Do not build static field access when
17124         flag_emit_xref is set.
17125         (resolve_field_access): No special treatment on `length' when
17126         flag_emit_xref is set. Do not build qualified static field access
17127         when flag_emit_xref is set.
17128         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
17129         when flag_emit_xref is set.
17130         (patch_assignment): Do not generate array store runtime check when
17131         flag_emit_xref is set.
17132         * xref.c (xref_flag_value): Fixed function declaration
17133         indentation.
17134         (xset_set_data): New function.
17135         * xref.h (xref_set_data): Added prototype for new function.
17136         (typedef struct xref_flag_table): New field data.
17137         (XREF_GET_DATA): New macro.
17139 1999-04-19  Tom Tromey  <tromey@cygnus.com>
17141         * xref.h (enum): Removed trailing comma.
17143         * parse.y (resolve_qualified_expression_name): Added missing
17144         `break'.
17146 1999-04-15  Anthony Green  <green@cygnus.com>
17148         * gjavah.c: New prototypes for java_float_finite and
17149         java_double_finite.
17151 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17153         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
17154         references.
17156 1999-04-06  Jeffrey A Law  (law@cygnus.com)
17158         * Makefile.in (TREE_H): Add tree-check.h.
17159         (RTL_H): Add genrtl.h.
17161 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17163         * parse.y (patch_assignment): Added ArrayStoreException runtime
17164         check.
17166 1999-04-06  Per Bothner  <bothner@cygnus.com>
17168         * expr.c (pop_type_0):  New function.
17169         (pop_type):  Use pop_type_0.
17170         * java-tree.h (pop_type_0):  New declaration.
17171         * verify.c (verify_jvm_instructions):  Check return instructions.
17173         * parse.y (patch_binop):  Don't fold if non-constant and emiting
17174         class files.
17176 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17178         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
17180         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
17181         (main_jcf): Don't define.
17182         (process_file): Don't set `main_jcf'.
17184         * java-tree.h (main_jcf): Don't declare.
17186         * jcf-parse.c (main_jcf): Add static definition.
17188         * lang.c (main_jcf): Don't define.
17190 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17192         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
17194         * decl.c (copy_lang_decl): Likewise for `bcopy'.
17196         * jcf-depend.c: Include "config.h", not <config.h>.
17198         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
17199         `bcopy' to PTR.
17201         * jcf-path.c: Include "config.h", not <config.h>.
17203         * lex.c: Don't include various system header files.
17204         (java_init_lex): Cast the argument of `bzero' to PTR
17206         * parse-scan.y (java_push_parser_context): Likewise.
17208         * parse.y (java_push_parser_context): Likewise.
17209         (patch_bc_statement): Match format specifier to variable argument.
17211         * xref.c: Don't include <stdio.h>.
17213 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17215         * parse.y (struct parser_ctxt *ctxp): Now global.
17216         (declare_local_variables): Use WFL compound value for the
17217         declaration source line value, when doing cross-referencing.
17219 1999-03-31  Tom Tromey  <tromey@cygnus.com>
17221         * gjavah.c (print_field_info): Allow constants of other types.
17222         (print_include): Generate include when new name is proper prefix
17223         of already printed name.
17224         (add_namelet): Likewise.
17225         (cxx_keyword_subst): New function.
17226         (print_method_info): Use it.
17227         (print_field_name): New function.
17228         (get_field_name): New function.
17229         (print_field_info): Use get_field_name and print_field_name.
17231 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17233         * Makefile.in (keyword.h): Generate using gperf language 'C', not
17234         'KR-C', so gperf uses the `const' keyword on strings.
17236         * keyword.gperf (java_keyword): Const-ify a char*.
17238 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17240         * parse.y (patch_bc_statement): Fixed identation and a bogus
17241         `printf' format.
17243 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17245         * parse.y (patch_assignment): Allow static variables in other
17246         classes to be assigned.
17248 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17250         * class.c (maybe_add_interface): Remove unused variable
17251         `interface_binfo'.
17252         (make_class_data): Use = for assignment, not ==.  Likewise.
17253         (emit_register_classes): Remove unused variable `decl'.
17255         * lex.c: Fix comment so as not to contain an embedded `/*'.
17257         * verify.c (verify_jvm_instructions): Remove unused variable
17258         `self_type'.
17260 1999-03-27  Per Bothner  <bothner@cygnus.com>
17262         * parse.y (complete_loop_body):  Rename to finish_loop_body.
17263         (complete_labeled_statement):  Rename to finish_labeled_statement.
17264         (complete_for_loop):  Rename to finish_for_loop.
17265         (complete_method_declaration):  Rename to finish_method_declaration.
17267         * java-tree.h (continue_identifier_node):  New global node.
17268         * decl.c:  Define and initialize continue_identifier_node.
17269         * parse.y (generate_labeled_block):  Remove - no longer needed.
17270         (build_loop_body):  Use continue_identifier_node for continue block.
17271         (finish_labeled_statement):  Also do pop_labeled_block actions.
17272         (java_complete_lhs):  POP_LOOP even if error.
17273         (build_labeled_block):  Special handling for continue_identifier_node.
17274         (patch_loop_statement):  Re-organize.
17275         (patch_bc_statement):  Re-write.
17277 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17279         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17280         using a WFL compound value.
17281         * parse.y (xref.h): Include.
17282         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17283         WFL compound value.
17284         (register_fields): Set WFL compound value to lineno if doing
17285         xrefs.
17286         (java_complete_expand_method): Call expand_xref if flag_emit_xref
17287         is set.
17288         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17289         * xref.h (expand_xref): Prototype renamed from xref_generate.
17291 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17293         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17294         (GET_CURRENT_BLOCK): New macro.
17295         * parse.y (current_static_block): New global variable.
17296         (method_body:): Define action.
17297         (complete_method_declaration): Set current_function_decl to NULL
17298         when work on the current method is done.
17299         (declare_local_variables): Use GET_CURRENT_BLOCK.
17300         (java_method_add_stmt): Likewise.
17301         (java_complete_expand_method): Disable the use of `this' when
17302         expanding <clinit>.
17303         (enter_a_block): If no current method exist, use
17304         current_static_block to link static initializer blocks.
17305         (exit_block): Rewritten to use current_static_block when no current
17306         method decl exists.
17307         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17308         (patch_return): Forbid the use of `return' in static initializers.
17309         (patch_throw_statement): Fixed indentation. Issue specific error
17310         for uncaught thrown checked exception in static initializer
17311         blocks. Removed FIXME.
17313 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
17315         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17316         Link gcj from gcc.o.
17318 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17320         * parse.y (find_applicable_accessible_methods_list): When dealing
17321         with interface: ensure that a given interface or java.lang.Object
17322         are searched only once.
17324 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17326         * gjavah.c (print_c_decl): Remove unused argument `flags'.
17328         * jcf-dump.c (print_access_flags): Add braces around if-else.
17330         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17331         COMBINE_INPUTS.
17333         * lex.c (build_wfl_node): Add static prototype.
17335         * lex.h (build_wfl_node): Remove static prototype.
17337         * parse.y: Include lex.c early enough to declare everything needed.
17338         Ensure calls to `build_wfl_node' pass the proper arguments.
17339         (create_class): Remove unused variable `super_decl'.
17340         (get_printable_method_name): Initialize variable `name'.
17342 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17344         * Changelog: Fixed 1999-03-22 typos.
17345         * lang.c (lang_decode_option): Fixed typo in error string in the
17346         XARG section.
17348 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17350         * Makefile.in (JAVA_OBJS): Added entry xref.o.
17351         (xref.o): New rule.
17352         * java-tree.h (flag_emit_xref): Declared extern.
17353         * lang.c (xref.h): Included.
17354         (flag_emit_xref): New global variable.
17355         (lang_decode_option): Added support for -fxref.
17356         * xref.c: Created.
17357         * xref.h: Likewise.
17359 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
17361         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17362         linked with.
17364 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17366         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17367         $(srcdir)/../system.h and $(JAVA_TREE_H).
17368         (jcf-io.o): Depend on $(JAVA_TREE_H).
17369         (mangle.o): Likewise.
17371         * check-init.c (check_cond_init): Add static prototype.
17373         * class.c (build_java_method_type, hashUtf8String,
17374         make_field_value, get_dispatch_vector, get_dispatch_table,
17375         append_gpp_mangled_type, mangle_static_field): Likewise.
17376         (strLengthUtf8): Hide unused definition.
17377         (hashUtf8String): Const-ify.
17378         (make_field_value): Un-ANSI-fy.
17380         * constants.c: Move inclusion of jcf.h above java-tree.h.
17381         (set_constant_entry, find_class_or_string_constant,
17382         find_name_and_type_constant, get_tag_node,
17383         build_constant_data_ref): Add static prototype.
17385         * decl.c (push_jvm_slot, builtin_function,
17386         lookup_name_current_level): Likewise.
17387         (builtin_function): Const-ify.
17389         * except.c (expand_start_java_handler, expand_end_java_handler):
17390         Add static prototype.
17392         * expr.c (flush_quick_stack, push_value, pop_value,
17393         java_stack_swap, java_stack_dup, build_java_athrow,
17394         build_java_jsr, build_java_ret, expand_java_multianewarray,
17395         expand_java_arraystore, expand_java_arrayload,
17396         expand_java_array_length, build_java_monitor, expand_java_pushc,
17397         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17398         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17399         expand_compare, expand_test, expand_cond, expand_java_goto,
17400         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17401         expand_java_field_op, java_push_constant_from_pool): Likewise.
17403         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17404         (build_java_arraynull_check): Mark parameters `node' and `type'
17405         with ATTRIBUTE_UNUSED.
17406         (note_label): Likewise for parameter `current_pc'.
17407         (expand_java_call, expand_java_ret): Hide unused definition.
17409         * java-tree.h (make_class, build_constants_constructor,
17410         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17411         init_outgoing_cpool, register_class, emit_register_classes,
17412         java_layout_seen_class_methods): Prototype.
17413         (unicode_mangling_length): Const-ify.
17414         (append_gpp_mangled_name, append_gpp_mangled_classtype,
17415         emit_unicode_mangled_name, format_int, format_uint,
17416         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17417         jcf_print_utf8_replace, open_class): Prototype.
17419         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
17420         <stdio.h>.  Include tree.h/java-tree.h.
17421         (utf8_equal_string usage, process_class): Add static prototype.
17422         (open_class): Don't prototype this here.
17423         (utf8_equal_string): Match arguments to format specifiers.
17424         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17425         TABLE_SWITCH, disassemble_method): Likewise.
17427         * jcf-io.c: Include tree.h/java-tree.h.
17428         (open_class, find_classfile, jcf_print_utf8,
17429         jcf_print_utf8_replace): Const-ify.
17431         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17432         parse_class_file): Add static prototype.
17433         (find_in_current_zip): Match definition to existing static
17434         prototype.
17436         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17437         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17438         finish_jcf_block, define_jcf_label, get_jcf_label_here,
17439         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17440         write_chunks, adjust_typed_op, generate_bytecode_conditional,
17441         generate_bytecode_return, perform_relocations, init_jcf_state,
17442         init_jcf_method, release_jcf_state, generate_classfile):
17443         Add static prototype.
17444         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17445         (make_class_file_name): Const-ify.
17447         * jcf.h (find_classfile): Const-ify.
17449         * jv-scan.c (reset_report): Remove prototype.
17451         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17452         (error): Rewrite to allow varargs.
17454         * lang.c (lang_f_options): Const-ify.
17456         * lex.c (java_parse_escape_sequence): Add static prototype.
17457         (java_allocate_new_line): Match definition to existing static
17458         prototype.
17460         * mangle.c Include tree.h/java-tree.h.
17461         (unicode_mangling_length, emit_unicode_mangled_name,
17462         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17464         * parse.h (jdep_code): Remove trailing comma in enumeration.
17465         (java_get_line_col): Move prototype outside of !JC1_LITE test.
17466         (reset_report): Add prototype.
17468         * verify.c (push_pending_label, merge_types): Add static
17469         prototypes.
17471         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17473 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17475         * parse.y (find_applicable_accessible_methods_list): Extend the
17476         search to superinterfaces when relevant.
17477         (search_applicable_methods_list): New function.
17479 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17481         * class.c (unmangle_classname): Implemented stricter testing
17482         before setting the QUALIFIED_P flag on an identifier.
17484 1999-03-16  Per Bothner  <bothner@cygnus.com>
17486         * parse.y (java_complete_lhs):  Call force_evaluation_order
17487         after patch_newarray.
17488         (patch_binop):  Don't call fold if there are side effects.
17490 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17492         * parse.y (java_stabilize_reference): Use save_expr instead of
17493         building a SAVE_EXPR node.
17494         (java_complete_lhs): Patch the resulting string of the `+='
17495         operator (if necessary) and complete the RHS after having built
17496         the cast.
17498 1999-03-15  Per Bothner  <bothner@cygnus.com>
17500         * class.c (make_class):  Don't set CLASS_P here (because
17501         this function is also called by build_java_array_type).
17502         (push_class):  Set CLASS_P here instead.
17503         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
17505         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
17506         context.  If the context is class, perfer "super" over "synchronized".
17507         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
17509         * parse.y (create_class):  Don't call parser_check_super here;
17510         it is not robust.  Always wait until later.
17512         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
17513         match what JDK 1.2 does), but don't set ACC_PUBLIC.
17515 1999-03-13  Per Bothner  <bothner@cygnus.com>
17517         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
17518         * lex.h (UNGETC):  Change misleading macro.
17520 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17522         * parse.y (java_stabilize_reference): Return NODE when patching a
17523         COMPOUND_EXPR.
17524         (java_complete_lhs): Put parenthesis around truth values.
17526 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17528         * class.c (layout_class_method): Don't make rtl for interface
17529         methods.
17530         * parse.h (GET_TYPE_NAME): New macro.
17531         * parse.y (if_then_statement:): Fixed indentation.
17532         (if_then_else_statement:): Likewise.
17533         (for_statement:): Fixed spacing.
17534         (try_statement:): Fixed indentation.
17535         (create_interface): Don't force interfaces to be abstract.
17536         (method_header): Abstract methods are OK in interfaces.
17537         (declare_local_variables): Fixed typo in comment.
17538         (java_complete_expand_method): Fixed indentation.
17539         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17540         non accessible fields.
17541         (java_stabilize_reference): New function.
17542         (java_complete_lhs): Fixed indentation. Use
17543         java_stabilize_reference in compound assignment. Insert the
17544         cast. If not processing `+' fix string constants before processing
17545         binop.
17547 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17549         * constants.c (find_class_or_string_constant): Cast variable `j'
17550         to a `jword' when comparing against one.
17552         * expr.c (java_lang_expand_expr): Remove unused variables
17553         `has_finally_p' and `op0'.
17555         * gjavah.c (print_field_info): Cast a value to jint when comparing
17556         against one.  Likewise for a jlong.
17557         (add_namelet): Likewise cast a `sizeof' to an int when comparing
17558         against a signed quantity.
17560         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17561         (print_signature): Don't needlessly dereference variable `str'
17563         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17564         `max_locals' with ATTRIBUTE_UNUSED.
17565         (jcf_parse_class): Likewise for variable `index'.
17567         * parse.h (reverse_jdep_list): Remove static prototype.
17569         * parse.y (build_jump_to_finally): Remove prototype and definition.
17570         (reverse_jdep_list): Add static prototype.
17572         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17573         `assignment' and `expr_decl'.
17575         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17577 1999-03-12  Andrew Haley  <aph@cygnus.com>
17579         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17580         we'll need a directory separator and a null character.
17582 1999-03-10  Per Bothner  <bothner@cygnus.com>
17584         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
17586 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17588         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17589         interfaces.
17591 1999-03-05  Per Bothner  <bothner@cygnus.com>
17593         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
17595         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
17597         * class.c (layout_class_method):  A static method in a base class
17598         is never overridden, so treat it like it doesn't exist.
17599         However, do complain about private non-static method overriding
17600         public static method.
17602         * parse.y:  Don't set unused INITIALIZED_P flag.
17603         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
17605         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
17606         (build_array_from_name):  Re-order &index[string] to &string[index].
17608         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
17609         error_mark (it might catch more errors, but it is more likely to lose).
17611 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17613         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17614         (parse-scan.o): Depend on toplev.h.
17616         * class.c (make_method_value): Add prototype.  Make it static.
17617         Remove unused second argument, caller changed.
17619         * expr.c (java_lang_expand_expr): Remove unused variable
17620         `return_label'.
17622         * java-tree.h: Don't prototype find_in_current_zip.
17623         Add prototypes for verify_constant_pool, start_java_method,
17624         end_java_method, give_name_to_locals, expand_byte_code,
17625         open_in_zip, set_constant_value, find_constant1, find_constant2,
17626         find_utf8_constant, find_string_constant, find_class_constant,
17627         find_fieldref_index, find_methodref_index, write_constant_pool,
17628         count_constant_pool_bytes and encode_newarray_type.
17630         * jcf-dump.c: Remove unused variable `LONG_temp'.
17632         * jcf-parse.c: Include parse.h.
17633         (jcf_parse_source): Remove unused parameter, all callers changed.
17634         (jcf_figure_file_type): Add static prototype.
17635         (find_in_current_zip): Likewise.  Also remove unused parameter,
17636         all callers changed.
17637         (read_class): Initialize variable `saved_pos'.
17639         * jcf-reader.c (jcf_parse_preamble): Mark variables
17640         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17642         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17643         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17644         (java_parse_doc_section): Initialize variable `seen_star'.
17645         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17646         (java_lex_error): Mark parameters `msg' and `forward' with
17647         ATTRIBUTE_UNUSED.
17648         (java_get_line_col): Mark parameters `filename' and `line' with
17649         ATTRIBUTE_UNUSED.
17651         * parse-scan.y: Include toplev.h.
17652         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17654         * parse.h: use `struct JCF', not plain `JCF'.
17655         (java_parser_context_save_global, java_expand_classes
17656         java_parser_context_restore_global, java_parse): Add prototypes.
17658         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17659         `node'.
17661 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
17663         *  check-init.c (check_init):  COPYN takes word count, not bit count.
17665 1999-02-26  Per Bothner  <bothner@cygnus.com>
17667         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
17668         explicit build_decl.  (Avoids crash in reload when optimizing.)
17670 1999-02-25  Per Bothner  <bothner@cygnus.com>
17672         * decl.c (complete_start_java_method):  Handle synchronized method
17673         even when compiling from bytecode.
17675 1999-02-26  Tom Tromey  <tromey@cygnus.com>
17677         * gjavah.c (add_class_decl): Only generate `#include' if outer
17678         class is not the name of the class we are processing.  Correctly
17679         append `.h' in #include.
17680         (process_file): Clean up newlines around generated `#include's.
17681         (decode_signature_piece): Correctly handle inner classes.
17682         (struct include): New structure.
17683         (all_includes): New global.
17684         (print_include): New function.
17685         (add_class_decl): Use it.
17686         (process_file): Likewise.
17687         (add_class_decl): Generate include for java-array.h if array
17688         seen.
17689         (process_file): Don't generate java-array.h include.
17691         * gjavah.c (add_namelet): Check for standard package names here.
17692         (add_class_decl): Don't check for standard package names here.
17694 1999-02-25  Tom Tromey  <tromey@cygnus.com>
17696         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17697         When reading a zip file, only use strncmp if both strings are
17698         bigger than the buffer length.  Initialize `k' when looping
17699         through zip file.
17701 1999-02-24  Tom Tromey  <tromey@cygnus.com>
17703         * gjavah.c (struct namelet): New structure.
17704         (add_namelet): New function.
17705         (print_namelet): New function.
17706         (print_class_decls): Use add_namelet and print_namelet to generate
17707         namespaces and not classes.
17708         (method_printed): New global.
17709         (HANDLE_END_METHOD): Examine method_printed.
17710         (print_method_info): Set method_printed when required.  Print
17711         error if function to be ignored is marked virtual.  Handle $finit$
17712         method.
17713         (METHOD_IS_FINAL): New macro.
17714         (print_field_info): Use it.
17715         (HANDLE_METHOD): Clear method_printed.
17716         (method_pass): New global.
17717         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17718         (process_file): Do two passes over both fields and methods.
17719         (HANDLE_METHOD): Examine method_pass.
17720         (root): New global.
17721         (add_class_decl): New function.
17722         (print_class_decls): Don't scan over entire constant pool.
17724 1999-02-23  Tom Tromey  <tromey@cygnus.com>
17726         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17727         disable linking in that case.
17729 1999-02-20  Tom Tromey  <tromey@cygnus.com>
17731         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17732         not 0x1f.
17734 1999-02-21  Per Bothner  <bothner@cygnus.com>
17736         * decl.c (build_result_decl), java-tree.h:  New method.
17737         (complete_start_java_method):  Handle synchronized methods.
17738         Don't build DECL_RESULT here.  (Ordering dependency problem.)
17739         (start_java_method):  Call build_result_decl here instead  ...
17740         * parse.y (java_complete_expand_method):  ... and here.
17741         (expand_start_java_method): Don't call complete_start_java_method here.
17742         (java_complete_expand_method):  Call it here instead.
17743         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
17744         * java-tree.h:  ... here.
17746         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
17747         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
17748         for ARRAY_REF - it doesn't work when array bounds are checked.
17749         (patch_array_ref):  Handle it here instead.
17751         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
17753 1999-02-19  Per Bothner  <bothner@cygnus.com>
17755         Force left-to-right evaluation of binary operations etc.
17756         * expr.c (force_evaluation_order), java-tree.h:  New function.
17757         * parse.y (java_complete_lhs):  Pass binary operations, procedure
17758         calls, and ARRAY_REFs to force_evaluation_order.
17759         (various):  Set TREE_SIDE_EFFECTS more carefully.
17761         Tolerate random (non-UTF8) encoding in comments without complaining.
17762         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
17763         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
17765         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
17766         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
17768         * parse.y (java_complete_lhs):  Ignore an empty statement in a
17769         COMPOUND_EXPR.  Don't complain about empty statement after return.
17771 1999-02-19  Per Bothner  <bothner@cygnus.com>
17773         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
17774         in TREE_LIST - just chain the POINTER_TYPEs together.
17775         (resolve_class):  If type already resolved, return decl.
17776         After resolving, update TREE_TYPE(class_type), and name (if array).
17777         * parse.h (do_resolve_class), parse.y:  Make non-static.
17778         * class.c (maybe_layout_super_class):  Take this_class argument.
17779         Do do_resolve_class if necessary.
17780         (layout_class, layout_class_methods): Adjust calls appropriately.
17781         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17782         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
17783         * typeck.c (build_java_array_type):  Don't call layout_class.
17785 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17787         * parse.y (check_pkg_class_access): Allow private class access
17788         within the same package.
17789         (strip_out_static_field_access_decl): New function.
17790         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17791         operator argument before testing its nature.
17793 1999-02-03  Per Bothner  <bothner@cygnus.com>
17795         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
17796         (TRY_EXPR):  Simplify - it no longer has a finally clause.
17797         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
17798         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17799         * expr.c (java_lang_expand_expr):  Likewise.
17800         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
17801         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
17802         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
17803         (build_try_statement):  Remove finally parameter and handling.
17804         (build_try_finally_statement):  New function.
17805         (patch_try_statement):   No longer need to support finally clause.
17806         (try_statement):  Update grammar action rules.
17807         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
17808         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17810 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
17812         * jcf-parse.c (get_constant): Add braces around computation of 'd'
17813         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
17815 1999-02-17  Andrew Haley  <aph@cygnus.com>
17817         * class.c (build_utf8_ref): Back out broken patch which was
17818         intended to to output signatures using '.' as a separator.
17820         * class.c (make_class_data): Output signatures using '.' as a
17821         separator, rather than '/'.
17822         (mangled_classname): Likewise.
17823         (make_field_value): Likewise.
17824         (make_method_value): Likewise.
17825         * constants.c (alloc_class_constant): Likewise.
17826         * expr.c (build_invokeinterface): Likewise.
17828 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17830         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17831         of an ancient workaround.
17833 1999-02-10  Jeffrey A Law  (law@cygnus.com)
17835         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
17836         here anymore.
17838 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17840         * lex.c (yylex): Encode \0 as UTF8.
17842 1999-02-10  Tom Tromey  <tromey@cygnus.com>
17844         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17845         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17846         (libgcj_zip): Renamed.
17847         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17848         LIBJAVA_ZIP_FILE.
17849         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17851         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17852         (GC_NAME): Renamed -lgc to -lgcjgc.
17854 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17856         * lex.c (java_lang_cloneable): Initialize.
17857         * parse.y (java_lang_cloneable): New static variable.
17858         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17859         doing one more qualification round.
17860         (valid_ref_assignconv_cast_p): Reject null source or
17861         destination. Allow an array to be cast into java.lang.Cloneable.
17862         (patch_cast): Swapped two first arguments to first call to
17863         valid_ref_assignconv_cast_p.
17865 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17867         * parse.h: DECL_P renamed JDECL_P.
17868         * parse.y: DECL_P replaced by JDECL_P.
17869         (build_array_from_name): Always use pointer's type.
17870         (patch_bc_statement): Extra code to search continue target in a
17871         for loop. Fixed comments. Continue target is current loop when
17872         unlabeled.
17874 1999-02-05  Andrew Haley  <aph@cygnus.com>
17876         * class.c (make_class_data): The superclass of an interface should
17877         be null, not class Object.
17879         * lex.c (java_lex): Sign extend hex literals.
17881 1999-02-04  Andrew Haley  <aph@cygnus.com>
17883         * class.c (build_utf8_ref): Output signatures using '.' as a
17884         separator, rather than '/'.
17885         (make_class_data): Likewise.
17887 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
17889         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17890         mkstemp.o.  Get them from libiberty now.
17892 1999-02-02  Jeffrey A Law  (law@cygnus.com)
17894         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17896 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17898         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17899         from libiberty.h
17901 1999-02-02  Per Bothner  <bothner@cygnus.com>
17903         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17904         * jcf-write.c (generate_bytecode_return):  New function.
17905         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
17907         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
17908         generate special [fd]const_[01] instructions.
17910         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
17912         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
17913         handling OPCODE_lookupswitch or OPCODE_tableswitch.
17915 1999-02-01  Per Bothner  <bothner@cygnus.com>
17917         * parse.y (patch_method_invocation):  Handle calling static methods,
17918         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17920         * parse.y (java_complete_lhs):  Don't complain about unreachable
17921         exit condition in a do-while statement.
17923 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17925         * lex.c (java_read_char): Fixed utf8 decoding.
17926         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17927         range.
17928         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17929         comments. Local variable `all_primitive' is gone. Broadened
17930         acceptance of `0' to floating point targets. `long' can now be
17931         widened to `double' or `float'.
17932         (valid_method_invocation_conversion_p): Added leading
17933         comment. Fixed tabulation.
17934         (build_string_concatenation): Optimize out left or right empty
17935         string constants.
17937 1999-01-28  Per Bothner  <bothner@cygnus.com>
17939         * jcf-write.c (localvar_alloc):  Only emit entry for
17940         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17941         (generate_bytecode_insns):  Only call put_linenumber if
17942         debug_info_level > DINFO_LEVEL_NONE.
17943         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
17944         is specified, add -g1 (for compatibility wih javac).
17946 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
17948         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17949         gjavah.o, check-init.o, jv-scan.o
17951 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17953         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17955         * gjavah.c: Include config.h and system.h.
17957         * javaop.h (inline): Don't define, its handled by system.h.
17958         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17959         from `inline' to `static inline'.
17961         * jcf.h (inline): Don't define, its handled by system.h.
17963         * lex.c (inline): Likewise.
17965 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
17967         * lang-specs.h: Map -Qn to -fno-ident.
17969 1999-01-29  Richard Henderson  <rth@cygnus.com>
17971         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17973 1999-01-29  Tom Tromey  <tromey@cygnus.com>
17975         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17976         then cast it to Object before calling `append' method.
17978 1999-01-28  Per Bothner  <bothner@cygnus.com>
17980         * check-init.c (check_bool2_init, check_bool_init, check_init):
17981         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17982         * jcf-write.c (generate_bytecode_insns):  Likewise.
17984 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17986         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17987         * parse.y (patch_cast): Allow a boolean to be cast into a
17988         boolean.
17990 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17992         * parse.y: (class_declaration:): Fixed indentation.
17993         (class_member_declaration:): Extra `;' after field declaration now
17994         accepted.
17995         (interface_declaration:): Removed debug messages in error reports.
17996         (patch_binop): Nodes created and returned inherit the orignal
17997         node's COMPOUND_ASSIGN_P flag value.
17998         (patch_cast): Fix cast from char to floating point.
18000 1999-01-25  Andrew Haley  <aph@cygnus.com>
18002         * except.c, java-except.h (expand_resume_after_catch): new
18003         function.
18004         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
18005         to branch back to main flow of control after a catch block.
18007 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18009         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
18010         $(srcdir)/../system.h.
18011         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
18012         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
18013         (jcf-write.o): Likewise.
18014         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18015         (mangle.o): Depend on $(srcdir)/../toplev.h.
18016         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18017         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18019         * class.c: Include output.h and parse.h.
18020         (mangled_classname): Add the `const' keyword to a char*.
18021         (find_named_method): Hide unused function definition.
18022         (build_utf8_ref): Change type of variable `c' to unsigned char.
18023         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
18024         (build_class_ref): Add the `const' keyword to a char*.
18025         (layout_class_method): Remove unused variable `buf'.
18027         * decl.c (find_local_variable): Remove unused variable `rtl'.
18028         (pushdecl): Likewise for variables `different_binding_level' and
18029         `oldglobal'.
18030         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
18031         (maybe_build_cleanup): Likewise for parameter `decl'.
18033         * except.c (expand_start_java_handler): Mark parameter `range'
18034         with ATTRIBUTE_UNUSED.
18036         * expr.c: Include except.h.
18037         (pop_type): Remove unused variable `i'.
18038         (pop_value): Likewise for variables `n_words' and `i'.
18039         (expand_java_arrayload): Likewise for variable `convert'.
18040         (java_lang_expand_expr): Likewise for variables `op0', `type',
18041         `mode', `unsignedp', `node' and `elements'.
18042         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
18043         `eh_ranges'.
18044         (process_jvm_instruction): Add a `const' qualifier to a char*.
18046         * gjavah.c (output_directory): Add the `const' keyword to a char*.
18047         (temp_directory): Likewise.
18048         (print_c_decl): Likewise.
18049         (print_method_info): Likewise.
18050         (decode_signature_piece): Likewise.
18051         (print_mangled_classname): Likewise.
18053         * java-except.h: Provide prototypes for maybe_start_try,
18054         maybe_end_try and add_handler.
18056         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
18057         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
18058         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
18059         init_expr_processing, push_super_field, init_class_processing,
18060         can_widen_reference_to, class_depth, verify_jvm_instructions,
18061         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
18062         set_local_type, merge_type_state, push_type, load_type_state,
18063         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
18064         emit_unicode_mangled_name): Add prototypes.
18066         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
18067         (print_signature_type): Use ISDIGIT, not isdigit.
18068         (print_signature): Remove unused variable `j'.
18070         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
18071         int when comparing against one.
18073         * jcf-parse.c: Include toplev.h.
18075         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
18076         (localvar_free): Remove unused variable `i'.
18077         (generate_bytecode_conditional): Likewise for variable `kind'.
18079         * jv-scan.c: Include config.h and system.h.  Remove redundant
18080         OS header and gansidecl.h includes.
18081         (warning): Add the `const' keyword to a char*.  Also add
18082         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
18083         __STDC__, when determining whether to use ANSI-isms.
18084         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
18085         (xmalloc): Don't redundantly prototype here.
18086         (main): Remove unused parameter `envp'.  Also fix the arguments
18087         passed to function `fatal' to match the format specifier.
18089         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
18091         * mangle.c: Include toplev.h.
18092         (emit_unicode_mangled_name): Declare parameter `len'.
18094         * parse.y (parse_warning_context): Add the `const' keyword to a
18095         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
18096         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
18097         (issue_warning_error_from_context): Add the `const' keyword to
18098         a char*.
18099         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
18100         not `__STDC__' for whether to use ANSI-isms.
18102         * typeck.c (incomplete_type_error): Mark parameters `value' and
18103         `type' with ATTRIBUTE_UNUSED.
18104         (parse_signature_type): Use ISDIGIT, not isdigit.
18106         * verify.c (check_pending_block): Add the `const' keyword to a char*.
18107         (verify_jvm_instructions): Likewise.  Remove unused variables
18108         `field_name' and `default_val'.
18110         * zextract.c: Include config.h and system.h.  Remove redundant
18111         OS header includes.
18113         * zipfile.h: Prototype `read_zip_archive'.
18115 1999-01-21  Andrew Haley  <aph@cygnus.com>
18117         * typeck.c (convert): Allow conversions to void type: some
18118         optimizations in gcc do this.
18120 1999-01-21  Andrew Haley  <aph@cygnus.com>
18122         * typeck.c (convert_ieee_real_to_integer): New function.
18123         (convert): When not using fast-math and using hardware fp, convert
18124         an IEEE NaN to zero.
18126 1999-01-18  Andrew Haley  <aph@cygnus.com>
18128         * parse.y (patch_binop): Do a type conversion from signed to
18129         unsigned and then back to signed when a ">>>" is found.
18131 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18133         * java-tree.h: (check_for_initialization): Added prototype.
18134         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
18135         * parse.y (do_resolve_class): Removed unused locals.
18136         (read_import_dir): Likewise.
18137         (resolve_qualified_expression_name): Array creation
18138         expressions are valid primary expressions.
18139         (qualify_ambiguous_name): Likewise.
18140         (patch_synchronized_statement): Removed unused local.
18142 1999-01-17  Jeffrey A Law  (law@cygnus.com)
18144         * Makefile.in (zextract.o): Add dependencies.
18146         * Makefile.in: Do not put ^Ls at the start of a line.
18148 1999-01-15  Per Bothner  <bothner@cygnus.com>
18150         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
18151         sub-type the result of the call that gets the exception value.
18153         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
18154         don't call finish_class.
18156         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
18157         clear found before continuing.
18159         * verify.c (verify_jvm_instructions):  On an array load, allow
18160         and handle top of stack to be TYPE_NULL.
18162         * gjavah.c (generate_access):  Translate Java package private or
18163         protected access to C++ public, but with a comment.
18165 1999-01-13  Andrew Haley  <aph@cygnus.com>
18167         * expr.c (generate_name): Name prefix changed to avoid clashes
18168         with assembler temp labels.
18170         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
18171         MODIFY_EXPR.  Without this, code for the assignment may not be
18172         generated at all and the synchronized statement will read an
18173         uninitialized variable.
18175 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18177         * class.c (maybe_layout_super_class): Fixed returned value.
18178         * lex.c: Added 1999 to the copyright.
18179         (java_init_lex): Initialize java_lang_imported.
18180         * lex.h: Added 1999 to the copyright.
18181         * parse.h: Added 1999 to the copyright.
18182         (REGISTER_IMPORT): Fixed typo in trailing macro.
18183         (CURRENT_OSB): New macro.
18184         (struct parser_ctxt): New fields osb_depth, osb_limit.
18185         * parse.y (java_lang_id): New global variable.
18186         (type_import_on_demand_declaration): Don't import java.lang.* twice.
18187         (array_creation_expression:): Use CURRENT_OSB.
18188         (dims:): Uses a stack to keep track of array dimensions.
18189         (cast_expression:): Use CURRENT_OSB.
18190         (find_expr_with_wfl): Return NULL if node found doesn't meet the
18191         conditions.
18192         (register_fields): Fixed typos in comment.
18193         (check_method_redefinition): Fixed comment indentation.
18194         (java_check_regular_methods): Set saved found wfl to NULL after
18195         having reinstalled it in the previously found DECL_NAME.
18197 1999-01-10  Richard Henderson  <rth@cygnus.com>
18199         * gjavah.c (java_float_finite): Use a union to do type punning.
18200         (java_double_finite): Likewise.
18202 1999-01-09  Per Bothner  <bothner@cygnus.com>
18204         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
18205         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18206         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
18207         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
18208         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18209         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
18211 1999-01-08  Per Bothner  <bothner@cygnus.com>
18213         * check-init.c (check_init):  If compiling to native, we don't
18214         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
18216 1999-01-08  Tom Tromey  <tromey@cygnus.com>
18218         * parse-scan.y (variable_declarator_id): Set or increment
18219         bracket_count.
18220         (bracket_count): New global.
18221         (formal_parameter): Handle case where bracket pairs trail variable
18222         declarator id.
18224 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
18226         * jcf-parse.c (yyparse): variable len changed from a char to an
18227         int to prevent overflow.
18229 1999-01-06  Per Bothner  <bothner@cygnus.com>
18231         * java-tree.h:  Declare read_class.
18232         * jcf-parse.c (read_class):  New function.
18233         (load_class):  Now just call read_class.
18235         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
18236         * jcf-parse.c (parse_source_file):  Declare save_error_count,
18237         which is needed by java_parse_abort_on_error macro,
18238         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
18240         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
18241         constructor, if initializing a static field.
18242         (patch_new_array_init):  Set TREE_CONSTANT if it is.
18243         * expr.c (java_lang_expand_expr):  For a static array constructor
18244         of primitive elements, allocate the array itself statically.
18245         Disabled until we can set the vtable field statically.
18247         * check-init.c:  New file.  Checks for definite assignment.
18248         * Makefile.in (JAVA_OBJS):  Add check-init.o.
18249         * parse.y (java_complete_expand_method): Call check_for_initialization.
18250         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
18252 1999-01-06  Graham <grahams@rcp.co.uk>
18254         * parse.y : include system.h instead of including
18255         standard headers directly with the exception of <dirent.h>.
18257 1999-01-06  Per Bothner  <bothner@cygnus.com>
18259         * lex.h:  Moved static function declarations to lex.c,
18260         to shut up some -Wall warnings.
18261         * lex.c:  Static function declarations moved here.
18262         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
18264 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18266         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18268 1998-12-22  Per Bothner  <bothner@cygnus.com>
18270         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
18271         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
18273         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
18274         (localvar_alloc):  Change return type to void,
18275         (emit_unop):  Remove unused variable size.
18277         * jcf-write.c (struct jcf_block):  Add new union.
18278         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
18279         (call_cleanups):  New functions.
18280         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
18281         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
18282         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18283         * lang.c (lang_init):  Call using_eh_for_cleanups.
18284         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
18285         completing operands to patch_synchronized_statement.
18286         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18287         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18288         WITH_CLEANUP_EXPR instead of TRY_EXPR.
18290 1998-12-20  John F. Carr  <jfc@mit.edu>
18292         * Make-lang.in: Comment out control-Ls; they upset some makes.
18294 1998-12-18  Tom Tromey  <tromey@cygnus.com>
18296         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18297         consistently.
18299 1998-12-17  Tom Tromey  <tromey@cygnus.com>
18301         * parse.y (DIR_SEPARATOR): New define.
18302         (check_class_interface_creation): Use it.
18304         * parse-scan.y (report_main_declaration): Recognize
18305         `java.lang.String' in argument to main.
18307 1998-12-16  Per Bothner  <bothner@cygnus.com>
18309         * parse.y (create_interface):  Remove bogus test.
18311 1998-12-16  Per Bothner  <bothner@cygnus.com>
18313         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
18314         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
18316 1998-12-16  Tom Tromey  <tromey@cygnus.com>
18318         * parse-scan.y (qualified_name): Use correct sprintf format.
18320 1998-12-15  Tom Tromey  <tromey@cygnus.com>
18322         * gjavah.c (print_field_info): Changed how most negative number is
18323         printed.
18325 1998-12-14  Per Bothner  <bothner@cygnus.com>
18327         * parse.y (fold_constant_for_init):  New function.
18328         (resolve_expression_name):  Don't replace static final
18329         constant-initialized fields by its value.
18330         (java_complete_lhs):  New.  Same as java_complete_tree, except does
18331         not replace static final constant-initialized fields by their values.
18332         (register_fields):  If there is an initializer, set DECL_INITIAL and
18333         MODIFY_EXPR_FROM_INITIALIZATION_P.
18334         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
18335         Only call patch_initialized_static_field if
18336         MODIFY_EXPR_FROM_INITIALIZATION_P.
18337         (patch_initialized_static_field):  If not valid constant, clear
18338         DECL_INITIAL.
18340         * parse.y (lookup_field_wrapper):  Fix thinko.
18342         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
18343         set and restore global lineno.
18345 1998-12-14  Tom Tromey  <tromey@cygnus.com>
18347         * gjavah.c (print_field_info): If value to print is the smallest
18348         value of its size, then print as hex to avoid later warnings from
18349         C++ compiler.
18351 1998-12-14  Tom Tromey  <tromey@cygnus.com>
18353         * gjavah.c (decompile_method): Decompile `return null'.
18354         (process_file): Generate `#pragma interface'.
18355         (method_declared): New global.
18356         (print_method_info): Set it.
18357         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18358         (print_method_info): Handle abstract methods.
18360 1998-12-13  Per Bothner  <bothner@cygnus.com>
18362         * parse.y (patch_method_invocation):  If class_decl is null
18363         (e.g. an array type), use original type.
18365         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
18366         errors about uncaught exception from clone (of array, specifically).
18368 1998-12-13  Tom Tromey  <tromey@cygnus.com>
18370         * gjavah.c (decompile_method): Handle all types of `return'
18371         opcode.  Decompile `return this' and `return'.
18372         (method_access): New global.
18373         (print_method_info): Set it.
18374         (decompile_method): Don't decompile a synchronized method.
18376 1998-12-13  Tom Tromey  <tromey@cygnus.com>
18378         * jcf-reader.c (jcf_parse_one_method): Recognize
18379         HANDLE_END_METHOD.
18380         * gjavah.c (HANDLE_END_METHOD): New macro.
18381         (HANDLE_CODE_ATTRIBUTE): New macro.
18382         (decompile_method): New function.
18383         (print_method_info): Don't print `;\n' at end of function decl.
18384         Include java-opcodes.h.
18385         (decompiled): New global.
18387 1998-12-12  Per Bothner  <bothner@cygnus.com>
18389         * class.c (build_class_ref):  Handle PRIMTYPE.class if
18390         flag_emit_class_files.
18391         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
18392         if flag_emit_class_files.
18393         * parse.y (java_complete_tree):  Pre-liminary support for
18394         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18396         * parse.y (patch_synchronized_statement):   Don't call monitorexit
18397         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
18399         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
18401         * zipfile.h (opendir_in_zip):  New declaration.
18402         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
18403         (opendir_in_zip):  New function, using code from open_in_zip.
18404         (open_in_zip):  Call opendir_in_zip.
18405         (find_class):  Remove no-longer-used do_class_file parameter,
18406         but add source_ok parameter.  Change logic so if we find a .java file,
18407         we don't look for .class in later classpath emtries.
18408         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
18409         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
18410         * gjavah.c: Update call to find_class.
18411         * jcf-dump.c:  Likewise.
18413         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
18414         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
18415         nothing if body is empty_stmt_node.
18416         Various little fixes so SP gets correctly adjusted.
18417         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18418         For CALL_EXPR, test if static first.
18419         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
18420         such as the ones we create for Object and Class.
18421         Set and restore current_function_decl.
18422         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18423         (note_possible_classname):  New function.
18424         (read_import_entry):  Removed.  Merged with read_import_dir.
18425         (read_import_dir):  Don't call find_class - that only gives us
18426         the first classpath entry having the needed package.
18427         Use the struct buffer data structure from buffer.h.
18428         (read_import_dir, find_in_imports_on_demand):  The remembered
18429         class names now use '.' (not '/') as package separator.
18431         * parse.y (java_complete_expand_methods):  Call write_classfile
18432         here, and not in java_expand_classes (which only gets first class).
18434 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18436         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
18437         (register_fields):  If a static fields has an initializer, just
18438         chain it on ctxp->static_initialized, and handle later.
18439         (java_complete_expand_methods):  Force <clinit> first.
18440         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
18441         - it's already been completed.
18442         (patch_initialized_static_field):  New function.
18443         (java_complete_field):  Call it.
18445 1998-12-12  Per Bothner  <bothner@cygnus.com>
18447         * expr.c (encode_newarray_type, build_new_array):  New functions.
18448         * java-tree.h:  Declare build_new_array.
18449         * jcf-write.c (patch_newarray):  Use build_new_array.
18451         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
18452         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
18454         * parse.y (patch_new_array_init):  Re-organize.
18455         Now is passed the actual array (pointer) type of the value.
18456         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18457         (patch_array_constructor):  Removed - merged into patch_new_array_init.
18458         (java_complete_tree):  Update patch_new_array_init.
18460         * jcf-write.c (find_constant_index):  New function.
18461         (generate_bytecode_insns):  Use find_constant_index.
18462         (generate_classfile):  Use find_constant_index for ConstantValue.
18464 1998-12-11  Tom Tromey  <tromey@cygnus.com>
18466         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18467         * decl.c (init_decl_processing): Renamed dtable -> vtable.
18468         * class.c (make_class_data): Renamed dtable -> vtable, and
18469         dtable_method_count -> vtable_method_count.
18471 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18473         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18474         global variables, initialized.
18475         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18476         Declared new global variables.
18477         * lex.c (java_lex): Return long_zero_node, float_zero_node,
18478         double_zero_node, integer_zero_node upon direct matching.
18479         * parse.y (purify_type_name): Added function prototype.
18480         (duplicate_declaration_error_p): Consider new_type as potentially
18481         being a incomplete type. Use purify_type_name on type string.
18482         (method_header): saved_type: unused variable removed. Don't figure
18483         return type if method name is invalid.
18484         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18485         processed by patch_unaryop.
18486         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18487         increment/decrement node into its original type after binary
18488         numeric promotion on its operands.
18490 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18492         * parse.y (array_initializer:): Array init operand is NULL_TREE
18493         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18494         now an error. Fixed indentation problems.
18495         (patch_string): Handle error_mark_node as an argument.
18496         (patch_new_array_init): Fixed indentation problems.
18497         (array_constructor_check_entry): Removed check on null wfl_value.
18498         Return an error if wfl_value's walk returns an error.
18500 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18502         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18503         * lex.c (java_lex): Remember column position before advancing one
18504         token. Retain location information on OCB_TK.
18505         * lex.h (typedef struct java_lc): Added new field.
18506         * parse.h (GET_SKIP_TYPE): New macro.
18507         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18508         * parse.y (build_new_array_init, patch_new_array_init,
18509         patch_array_constructor, maybe_build_array_element_wfl,
18510         array_constructor_check_entry): New function prototypes.
18511         (switch_block:): Tagged <node>.
18512         (OCB_TK): Tagged <operator>.
18513         (array_initializer:): Installed actions.
18514         (variable_initializer): Build location information on element if
18515         necessary.
18516         (switch_statement:): Fixed indentation typo.
18517         (switch_block:): Redefined default action.
18518         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18519         (patch_assignment): Removed duplicate code.
18520         (maybe_build_array_element_wfl, build_new_array_init,
18521         patch_new_array_init, patch_array_constructor,
18522         array_constructor_check_entry): New functions.
18524 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18526         * parse.y (array_initializer): Tagged <node>.
18527         (variable_initializer:): Use default rule.
18528         (array_initializer:): Defined actions.
18529         (variable_initializers:): Likewise.
18530         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18531         non-static field accesses.
18532         (patch_invoke): Fixed indentation typo.
18533         (java_complete_tree): Likewise.
18534         (build_labeled_block): Changed leading comment. Generate an error
18535         in case of duplicate loop labels.
18536         (patch_conditional_expr): Patch results of string concatenation
18537         operations.
18539 1998-12-06  Per Bothner  <bothner@cygnus.com>
18541         * constants.c (find_methodref_index):  When the class is an interface,
18542         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18544         * decl.c (finit_identifier_node):  Use "$finit$", rather than
18545         "<finit>" (which Sun's verifier rejects).
18546         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
18547         (generate_field_initialization_code):  Removed.
18548         (fix_constructors)  Don't add call to $finit$ here (wrong order).
18549         (patch_method_invocation):  Add $finit$ call here.
18551         * java-tree.h (CALL_USING_SUPER):  New macro.
18552         * parse.y (patch_invoke):  Remove im local variable.
18553         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
18554         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
18555         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
18557         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
18559         * parse.y (java_complete_tree):  Don't complain about unreachable
18560         statement if it is empty_stmt_node.
18562         * jcf-write.c (find_constant_wide):  New function.
18563         (push_long_const):  Use find_constant_wide.
18565         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
18566         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
18567         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18568         Emit invokeinterface when calling an interface method.
18569         Emit invokespecial also when calling super or private methods.
18571         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
18573 1998-12-06  Per Bothner  <bothner@cygnus.com>
18575         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
18577 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18579         * java-tree.h (java_layout_seen_class_methods): New function
18580         prototype.
18581         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18582         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18583         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18584         * parse.y (method_declarator:): Defined action.
18585         (issue_warning_error_from_context): input_filename saved, set to
18586         the appropriate value and restored after java_error is called.
18587         (build_unresolved_array_type): Fixed comment.
18588         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18589         (method_header): Deal with return type the same way type are
18590         handled for fields and method's parameters and local variables
18591         types are handled.
18592         (check_method_redefinition): Removed extra CR.
18593         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18594         (java_layout_seen_class_methods): New function.
18595         (java_layout_classes): Call java_layout_seen_class_methods.
18597 1998-12-03  Per Bothner  <bothner@cygnus.com>
18599         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
18601 1998-12-03  Per Bothner  <bothner@cygnus.com>
18603         * jcf-dump.c (main):  Fix error message.
18604         * jcf-path.c (add_entry):  Style fix.
18606 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18608         * class.c (layout_class_method): Call build_java_argument_signature
18609         on constructors too.
18610         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18611         (patch_method_invocation): Define a primary when resolving an
18612         expression name. Augmented comment on code checking illegal `this'
18613         usage. Loosened it test by accepting NEW_CLASS_EXPR.
18615 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18617         * class.c (layout_class_method): Don't report error on non-static
18618         overriding static if the method is private.
18619         * java-tree.h (finish_class): Prototype added.
18620         * lex.c (java_get_line_col): Handle col argument -2 value.
18621         * parse.h: All static method declarations moved to parse.y.
18622         * parse.y: Now contains all static method declarations previously
18623         found in parse.h.
18624         (find_expr_with_wfl, missing_return_error,
18625         unreachable_stmt_error): New functions.
18626         (java_get_real_method_name): Identify constructors bearing class
18627         names in source code compiled classes only.
18628         (java_complete_expand_methods): Call missing_return_error.
18629         (invocation_mode): Private methods invoked as static methods.
18630         (java_complete_tree): Call unreachable_stmt_error.
18632 1998-12-01  Tom Tromey  <tromey@cygnus.com>
18634         * Makefile.in (+target): Removed.
18635         (+xmake_file): Likewise.
18636         (+tmake_file): Likewise.
18637         (.NOEXPORT): Removed duplicate.
18639 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18641         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18643         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
18645         * jvgenmain.c: Remove the xmalloc prototype, we get it from
18646         libiberty.h.  Provide an xmalloc definition.
18648         * jvspec.c: Remove the xmalloc prototype.
18650         * parse-scan.y: Include config.h and system.h.  Don't include
18651         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
18652         Provide an xstrdup definition.
18654 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
18656         * jcf-path.c (add_entry): Recognize ".jar" too.
18657         * lang-specs.h: Likewise.
18659 1998-11-26  Per Bothner  <bothner@cygnus.com>
18661         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
18662         soft_monitorenter_node, soft_monitorexit_node, throw_node.
18664         * jcf-write.c (generate_bytecode_insns):
18665         Handle pre/post-increment/decrement of long.
18667         * jcf-write.c (generate_bytecode_insns):
18668         Handle missing exception handler (finally for synchronized).
18670 1998-11-25  Per Bothner  <bothner@cygnus.com>
18672         * java-tree.h (end_params_node):  Declare global.
18673         * decl.c (end_params_node):  New global.
18674         (init_decl_processing, start_java_method):  Use end_params_node for
18675         end of list of parameter types.  Follows correct gcc conventions.
18676         * expr.c (pop_argument_types, pop_arguments):  Likewise.
18677         * lang.c (put_decl_node):  Likewise.
18678         * typeck.c (various places):  Likewise.
18679         * class.y (various places):  Likewise.
18680         * parse.y (various places):  Likewise.
18682         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
18683         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
18685         * class.c:  Add #include flags.h, remove no-longer needed declaration.
18687         * class.c (layout_class_method):  Remove commented-out code, re-format.
18688         Don't add vtable entry (or index) for private methods.
18689         * expr.c (expand_invoke):  A private method is implicitly final.
18690         * class.c (make_class_data):  If inlining or optimizing,
18691         skip private methods.
18693         * class.c (finish_class):  New function.  Calls existing methods,
18694         but alls emits deferred inline functions.
18695         * jcf-parse.c (parse_class_file):  Call finish_class.
18696         * parse.y (java_complete_expand_methods):  Likewise.
18698         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
18700         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
18702 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
18704         * jcf-write.c (generate_bytecode_conditional): Fix typo.
18706 1998-11-24  Per Bothner  <bothner@cygnus.com>
18708         * (generate_classfile): Always write class access flag with
18709         ACC_SUPER set.
18711 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18713         * class.c (maybe_layout_super_class): New function.
18714         (layout_class): Reorganized. Loop on class methods dispatched into
18715         a new function. Call maybe_layout_super_class.
18716         (layout_class_methods, layout_class_method): New functions.
18717         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18718         class.
18719         (expand_invoke): Likewise.
18720         * java-tree.h (all_class_list): New global variable declared.
18721         (layout_class_methods, layout_class_method): New function
18722         prototypes.
18723         (LAYOUT_SEEN_CLASS_METHODS): New macro.
18724         * jcf-parse.c (all_class_list): New global variable.
18725         (load_class): Extended what class_or_name can be. Use parser
18726         context mechanism to save globals before calling jcf_parse.
18727         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18728         is set on the file name.
18729         (jcf_parse): Layout class methods when Object is loaded, otherwise
18730         record class in all_class_list for delayed method layout.
18731         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18732         * lang.c (put_decl_node): Decode <init> into the decl context
18733         class name.
18734         * lex.c (java_allocate_new_line): Use xmalloc.
18735         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18736         pointers, not TREE_LIST elements.
18737         (struct parser_ctxt): Fixed comment indentations, added comments
18738         and reordered some fields.
18739         (java_check_methods): Function prototype removed.
18740         * parse.y (java_push_parser_context): Use xmalloc.
18741         (java_parser_context_restore_global): Pop extra pushed ctxp only
18742         when there's nothing next.
18743         (maybe_create_class_interface_decl): Fixed comment, add new
18744         created class decl to all_class_list.
18745         (method_header): Use GET_REAL_TYPE on argument's types.
18746         (method_declarator): Use GET_REAL_TYPE, change type to the real
18747         type in TREE_LIST dependency node. Build argument list with the
18748         real type.
18749         (create_jdep_list): Use xmalloc. Removed allocation error message.
18750         (obtain_incomplete_type): Fixed leading comment. Broadened
18751         incoming argument meaning.
18752         (register_incomplete_type): Use xmalloc. Removed allocation error
18753         message.
18754         (safe_layout_class): Fixed leading comment.
18755         (jdep_resolve_class): Reversed if statement condition and switch
18756         if and else bodies.
18757         (resolve_and_layout): Fixed leading comment. Broadened incoming
18758         argument meaning.
18759         (complete_class_report_errors): New local variable name, for
18760         clarity. purify_type_name used for all error cases.
18761         (java_get_real_method_name): Stricter check on constructors.
18762         (java_check_regular_methods): Reverse methods list only if not
18763         already laid out. Layout artificial constructor.
18764         (java_check_methods): Deleted.
18765         (source_start_java_method): Obtain incomplete type for patchable
18766         method arguments.
18767         (java_layout_classes): Fixed leading comment. Use
18768         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18769         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18770         before returning. Fixed comments.
18771         (java_expand_classes): Check for errors up front.
18772         (patch_method_invocation): Class to search is resolved and laid
18773         out.
18775 1998-11-24  Per Bothner  <bothner@cygnus.com>
18777         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
18779         * javaop.h (int8):  Removed - not used.
18780         (jbyte):  Redefine portably with correct signedness.
18782         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
18784         * jcf-write.c (generate_bytecode_insns):  Fix typo
18785         OPCODE_getstatic to OPCODE_getfield.
18787         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
18788         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
18789         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18791 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18793         * jcf-parse.c (jcf_parse_source): Function returned type is
18794         void. Added prototype.
18795         (jcf_parse): Function returned type is void.
18796         (yyparse): Remove call to fclose on the last parsed file.
18798         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18800 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18802         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18803         (layout_class): Cope with methods featuring WFL in decl names.
18804         * decl.c (unqualified_object_id_node): New global variable,
18805         initialized.
18806         (build_decl_no_layout): Removed.
18807         * expr.c (build_primtype_type_ref): Handle Double.
18808         (java_lang_expand_expr): Fixed indentations.
18809         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18810         (flag_wall, flag_redundant, flag_not_overriding,
18811         flag_static_local_jdk1_1, unqualified_object_id_node): Global
18812         variable declarations.
18813         (build_decl_no_layout): Removed prototype.
18814         (java_get_real_method_name): Added prototype.
18815         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18816         (java_parse_abort_on_error): Macro now just returns.
18817         * jcf-parse.c (jcf_parse_source): Check fclose returned
18818         value. Call emit_register_classes if java_report_errors returns
18819         zero.
18820         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18821         flag_static_local_jdk1_1): New integer flags.
18822         (lang_decode_option): New flags set here.
18823         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18824         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18825         the flag_redundant variable.
18826         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18827         when parsing java.lang.Object class.
18828         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18829         NULL_TREE to build.
18830         (resolve_qualified_expression_name): Fixed indentation.
18831         (patch_array_ref): Changed prototype.
18832         (not_initialized_as_it_should_p): Prototype removed.
18833         (java_report_errors): Added function prototype.
18834         * parse.y (formal_parameter:): Changed error message for not yet
18835         supported final parameters.
18836         (class_type_list:): Set both PURPOSE and VALUE of created
18837         TREE_LIST to be class_type.
18838         (primary_no_new_array:): Handle class literals on primitive types.
18839         (parse_warning_context): Reinstalled correct force_error and
18840         do_warning flags setups.
18841         (java_report_errors): Changed prototype. Return java_error_count
18842         value.
18843         (variable_redefinition_error): Consider treating variable type as
18844         a fake pointer.
18845         (create_interface): Warn about redundant abstract modifier if
18846         flag_redundant is set. Changed error message.
18847         (lookup_field_wrapper): Save/restore globals before/after looking
18848         up field.
18849         (duplicate_declaration_error_p): Consider treating declaration
18850         type as a fake pointer.
18851         (register_fields): Extract real type from dependency node. Check
18852         for duplicate field declaration after type adjustment. Use
18853         DECL_INITIAL to store static final initialized values.
18854         (method_header): Extract real function type from dependency node.
18855         (check_abstract_method_header): Use GET_METHOD_NAME.
18856         (obtain_incomplete_type): Layout fake pointer type.
18857         (safe_layout_class): Don't try to check for methods before layout.
18858         (java_complete_class): Don't check for correct throws clause
18859         elements inheritance here.
18860         (resolve_and_layout): Broadened name parameter meaning.
18861         (reset_method_name): Use GET_METHOD_NAME.
18862         (java_get_real_method_name): New function.
18863         (java_check_regular_methods): Don't check methods in
18864         java.lang.Object.  Verify lineage of throws clause elements. Use
18865         flag_no_overriding in warning report.
18866         (check_throws_clauses): Don't check if class was from
18867         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18868         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18869         (declare_local_variables): Use flag_static_local_jdk1_1 to report
18870         warning on unsupported final local variables. Use build_decl
18871         instead of build_decl_no_layout. Get real local variable type from
18872         dependency node.
18873         (source_start_java_method): Get real parameter type from
18874         dependency node. Call build_decl instead of build_decl_no_layout.
18875         (java_layout_classes): Reverse tree and layout type and class as
18876         required. Mark class as loaded when done.
18877         (resolve_field_access): Fixed indentation. Restricted condition
18878         leading to static field access code generation. Set field_type
18879         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18880         (resolve_qualified_expression_name): Initialize type_found to
18881         null. Handle static field resolved during qualification. Fixed
18882         layout on non primitive field decl types.
18883         (not_accessible_p): Fixed typo in comment.
18884         (patch_method_invocation): Resolve and layout class to search from
18885         type.
18886         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18887         layout non primitive type, if necessary. Make method node only to
18888         report errors.
18889         (find_applicable_accessible_methods_list): Consider WFL'ed method
18890         decl names. Fixed indentation.
18891         (argument_types_convertible): Resolve and layout target type if
18892         necessary.
18893         (java_complete_tree): Fixed indentation problems. Rewrote
18894         CALL_EXPR thrown exceptions check. Re-installed further processing
18895         of the assignment in certain cases.
18896         (patch_assignment): Call maybe_build_primttype_type_ref to perform
18897         inlining on class literals.
18898         (valid_builtin_assignconv_identity_widening_p): Cope with constant
18899         0 literal.
18900         (valid_method_invocation_conversion_p): Likewise.
18901         (patch_string): Temporary disable forbidden use of `this' in
18902         explicit constructor invocations when doing string concatenation
18903         within their scope.
18904         (patch_unaryop): Added comment. Reinstalled code to disable
18905         further check on assignment operation with cast expression RHS.
18906         (patch_switch_statement): Fixed indentation.
18907         (build_try_statement): Call build_decl instead of
18908         build_decl_no_layout.
18909         (patch_synchronized_statement): Likewise.
18910         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18911         IS_UNCHECKED_EXPRESSION_P.
18912         (check_thrown_exceptions_do): Changed leading comment. Resolve and
18913         layout argument exception type.
18914         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18915         of IS_UNCHECKED_EXPRESSION_P.
18917 1998-11-18  Anthony Green  <green@cygnus.com>
18919         * jcf-parse.c (yyparse): Open class file in binary mode.
18921 1998-11-15  Per Bothner  <bothner@cygnus.com>
18923         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
18925         * jcf-write.c (perform_relocations):  Move check out one loop.
18927 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
18929         * Make-lang.in: Fix reference to srcdir.
18930         * jv-scan.c: Add missing xmalloc prototype.
18931         * jvgenmain.c: Ditto.
18933 1998-11-15  Per Bothner  <bothner@cygnus.com>
18935         * decl.c (error_mark_node), java-tree.h:  New global.
18936         * parse.y:  Use empty_stmt_node instead of size_zero_node.
18937         (build_if_else_statement):  If missing else, use empty_stmt_node.
18939         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
18940         (java_complete_expand_method):  Complain if return is missing.
18941         (java_check_regular_methods):  Comment out incorrect error check.
18942         (not_accessible_p):  Fix incorrect handling of protected methods.
18943         (patch_method_invocation):  Pass correct context to not_accessible_p.
18944         (find_applicable_accessible_methods_list):  Likewise.
18945         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
18946         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
18947         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
18948         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
18950         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
18951         (push_int_const):  Remove reundant NOTE_PUSH.
18952         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
18953         (- case SWITCH_EXPR):  Fix code generation bug.
18954         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
18955         (generate_classfile):  More robust for abstract methods.
18957 1998-11-15  Anthony Green  <green@cygnus.com>
18959         * Makefile.in: jv-scan and jvgenmain all require libiberty.
18960         * Make-lang.in: Ditto.
18962         * jv-scan.c: Remove xmalloc and xstrdup definitions.
18963         * jvgenmain: Ditto.
18965 1998-11-15  Per Bothner  <bothner@cygnus.com>
18967         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
18969         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
18971 1998-11-14  Per Bothner  <bothner@cygnus.com>
18973         Allow uses of interface types to verify.  This is not really
18974         type-safe, but it matches what Sun does, and is OK as long as
18975         there are appropriate run-time checks.
18976         * verify.c (merge_types):  If merging two interface types,
18977         just set the result to java.lang.Object.
18978         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
18980 1998-11-13  Tom Tromey  <tromey@cygnus.com>
18982         * gjavah.c (main): Handle --output-class-directory argument.
18983         * jvspec.c (lang_specific_driver): Translate `-d' into
18984         -foutput-class-dir.
18985         * jcf.h (jcf_write_base_directory): Declare.
18986         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18987         * lang-options.h: Mention -foutput-class-dir.
18988         * jcf-write.c (jcf_write_base_directory): New global.
18989         (make_class_file_name): Put generated .class file into `-d'
18990         directory, or into source directory if -d not given.  Function now
18991         static.
18992         (write_classfile): Free class file name.  Handle case where class
18993         file name is NULL.
18994         (DIR_SEPARATOR): New macro.
18995         Include <sys/stat.h>
18997         * Makefile.in (prefix): New macro.
18999 1998-11-12  Per Bothner  <bothner@cygnus.com>
19001         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
19002         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
19003         here (done in patch_invoke instead).
19004         (case_identity):  Moved here from parse.y.
19006         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
19007         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
19008         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
19009         so they can be efficiently scanned without recursion.
19010         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
19011         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
19012         in BLOCK iteratively, rather than recursively.
19014         * parse.y (do_unary_numeric_promotion):  New function.
19015         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
19017         * parse.y (patch_newarray):  Various fixes.
19019         Re-do handling of switch statements (for proper block scoping).
19020         * parse.y:  Add just a single block for the enture switch block,
19021         but don't create any "case blocks".
19022         (group_of_labels):  Rmeoved unneeded non-terminal.
19023         CASE_EXPR and DEFAULT_EXPR are added to current block.
19024         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
19025         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
19026         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
19027         * parse.y (wfl_operator, print_int_node): Make non-static.
19028         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
19029         as part of recursive scan of block.
19030         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
19031         (patch_switch_statement):  Most tests move dinto java_complete_tree.
19033         * parse.y:  Make various production be non-typed (void).
19034         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
19035         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
19036         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
19038         * jcf-write.c (struct jcf_handler):  New type.
19039         (struct jcf_switch_state):  New type.
19040         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
19041         (alloc_handler, emit_unop, emit_reloc):  New functions.
19042         (adjust_typed_op):  Add extra parameter ("max type" offset).
19043         (emit_switch_reloc, emit_case-reloc):  New function.
19044         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
19045         (generate_bytecode_insns):  Support REAL_CST, switch statements,
19046         exception handling, method calls, object/array creation, and more.
19048         * class.c:  Remove some unused variables.
19049         * constants.c (find_string_constant):  New function.
19050         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
19051         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
19052         if flag_emit_class_files.
19054 1998-11-12  Tom Tromey  <tromey@cygnus.com>
19056         * jcf-io.c (find_class): Added explanatory comment.
19058         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
19059         trailing slash to `.zip' entries.
19061         * jvspec.c (lang_specific_driver): Correctly handle case where
19062         GC_NAME not defined.
19064 1998-11-11  Tom Tromey  <tromey@cygnus.com>
19066         * jvspec.c (GC_NAME): New define.
19067         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
19068         if required.
19069         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
19071 1998-11-11  Per Bothner  <bothner@cygnus.com>
19073         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
19075 1998-11-11  Tom Tromey  <tromey@cygnus.com>
19077         * jcf-dump.c (main): Correctly recognize `--'-style long options.
19079 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19081         * class.c (is_compiled_class): Call safe_layout_class for class
19082         compiled from source.
19083         * conver.h (convert_to_integer, convert_to_real,
19084         convert_to_pointer): Added prototypes.
19085         * decl.c (init_decl_processing): Non longer push the decls of
19086         `methodtable', `constants', `Class', `Field', `dispatchTable'
19087         `jexception' and `Method'.
19088         * expr.c (build_invokeinterface): New function.
19089         (expand_invoke): static variable CLASS_IDENT now in
19090         build_invokeinterface. Use build_invokeinterface.
19091         (expand_java_field_op): Moved code to inline
19092         java.lang.PRIMTYPE.TYPE into a function.
19093         (build_primtype_type_ref): New function.
19094         * java-tree.def (INSTANCEOF_EXPR): New tree code.
19095         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
19096         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
19097         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
19098         (DECL_LOCAL_STATIC_VALUE): New macro.
19099         (build_invokeinterface, build_primtype_type_ref): New function
19100         prototypes.
19101         (java_parse_abort_on_error): Macro rewritten.
19102         * jcf-parse.c (current_method): Add comment to declaration.
19103         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
19104         Function prototypes fixed.
19105         (jcf_parse_source): push/pop parser context. save/restore global.
19106         (parse_source_file): Fixed leading comment. Now take a
19107         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
19108         classes and pop the parser context anymore.
19109         (yyparse): Push parser context, save globals, parse the source
19110         file, restore globals and pop the parser context when processing a
19111         source file.
19112         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
19113         * lex.c (java_parse_doc_section): New function.
19114         (java_lex): Call java_parse_doc_section when appropriate. Build an
19115         operator around INSTANCEOF_TK.
19116         * lex.h (java_lineterminator, java_sprint_unicode,
19117         java_unicode_2_utf8, java_lex_error, java_store_unicode):
19118         Prototypes rewritten.
19119         (java_parse_escape_sequence, java_letter_or_digit_p,
19120         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
19121         java_read_unicode, java_store_unicode, java_read_char,
19122         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
19123         Added function prototypes.
19124         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
19125         define.
19126         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
19127         New macros
19128         (struct parser_ctxt): New fields: deprecated,
19129         current_parsed_class_un, gclass_list.
19130         (fix_method_argument_names, issue_warning_error_from_context,
19131         resolve_package, lookup_package_type): New function prototypes.
19132         (resolve_expression_name): Fixed function prototype.
19133         (find_applicable_accessible_methods_list): Fixed indentation, added
19134         extra argument in prototype.
19135         (check_final_assignment, build_null_of_type, check_deprecation,
19136         check_method_redefinition, reset_method_name,
19137         java_check_regular_methods, java_check_abstract_methods,
19138         maybe_build_primttype_type_ref): New function prototype.
19139         * parse.y (conver.h): Include.
19140         (INSTANCEOF_TK): Tagged <operator>.
19141         (single_type_import_declaration): Use REGISTER_IMPORT macro.
19142         (relational_expression:): Build binop for instanceof.
19143         (java_push_parser_context): Remember ctxp->gclass_list across
19144         contexts.
19145         (java_pop_parser_context): Simply return if no context
19146         exists. Remember gclass_list across contexts.
19147         (issue_warning_error_from_context): New function.
19148         (parse_error_context): Don't setup ctxp->elc here. Call
19149         issue_warning_error_from_context instead.
19150         (parse_warning_context): Likewise.
19151         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
19152         setup. Link new class/interface to ctxp->gclass_list.
19153         (add_superinterfaces): Register interface as incomplete if not
19154         loaded.
19155         (create_class): Remember class unqualified name in
19156         ctxp->current_parsed_class_un. Check class deprecation.
19157         (register_fields): Check field deprecation. Remember static final
19158         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
19159         processing INIT.
19160         (method_header): New local variable ORIG_ARG. Use unqualified
19161         current class name for check on constructor errors. Promote return
19162         type if of record type. Argument list fix moved in
19163         fix_method_argument_names, called here. Check method deprecation.
19164         (fix_method_argument_names): New function.
19165         (method_declarator): Promote record typed arguments.
19166         (safe_layout_class): Check class methods before layout.
19167         (java_complete_class): Compute field layout when patched.
19168         (do_resolve_class): Try to load class after having it renamed
19169         after the package name.
19170         (get_printable_method_name): Use DECL_CONTEXT.
19171         (reset_method_name): New function.
19172         (check_method_redefinition): Use reset_method_name.
19173         (java_check_regular_methods): New local variable
19174         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
19175         names for error report. Check for compile-time error when method
19176         found has default (package) access.
19177         (java_check_abstract_methods): Now takes an interface DECL node as
19178         an argument. Also reinstall real name on unchecked
19179         overriding/hiding methods for error report.
19180         (java_check_methods): Fixed leading comment. Get classes to verify
19181         from ctxp->gclass_list. Use CHECK_METHODS macro and set
19182         CLASS_METHOD_CHECKED_P on class verification.
19183         (lookup_java_method2): Get real method name if necessary.
19184         (find_in_imports): Don't check package class access here.
19185         (resolve_package, lookup_package_type): New functions.
19186         (java_layout_classes): Fixed leading comment. Take classes to be
19187         laid out from ctxp->gclass_list.
19188         (java_complete_expand_methods): Don't expand native and abstract
19189         methods.
19190         (java_expand_classes): New function.
19191         (resolve_expression_name): Use additional argument ORIG.  Retrieve
19192         values of static final field of primitive types.
19193         (resolve_field_access): Handles static final field of promotive
19194         type.
19195         (resolve_qualified_expression_name): Handle STRING_CST as
19196         primaries and package name resolution. Check deprecation on found
19197         decls. Set where_found and type_found on non static field resolved
19198         during qualification. Layout non primitive field decl types.
19199         (check_deprecation): New function.
19200         (maybe_access_field): Simplified.
19201         (patch_method_invocation_stmt): Local variable CLASS_TYPE
19202         removed. Reverse method's argument when primary is a type. Don't
19203         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19204         instead. Include abstract class in the list of class searchable
19205         for constructors. Use DECL_CONTEXT of found method for access
19206         checks. Check method deprecation.
19207         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
19208         converting arguments. Handle INVOKE_INTERFACE.
19209         (lookup_method_invoke): Search constructor using existing
19210         infrastructure (don't rely on lookup_java_constructor anymore).
19211         (find_applicable_accessible_methods_list): Extra argument flag
19212         LC. Now include constructor in the search.
19213         (qualify_ambiguous_name): Conditional expression are primaries.
19214         (not_initialized_as_it_should_p): static final are always
19215         initialized.
19216         (java_complete_tree): Pass extra NULL argument to
19217         resolve_expression_name. Stricter test to carry on patching
19218         assignments. New case for INSTANCEOF_EXPR.
19219         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19220         (check_final_assignment, maybe_build_primttype_type_ref): New
19221         functions.
19222         (patch_assignment): Detect resolved static finals and carry normal
19223         assignment error check on them. Inline PRIMTYPE.TYPE read access.
19224         (try_builtin_assignconv): Access constant 0 on all primitive
19225         types.
19226         (valid_builtin_assignconv_identity_widening_p): Accept identical
19227         types. Accept all promoted type on int type.
19228         (valid_ref_assignconv_cast_p): Accept a null pointer to be
19229         assigned to a reference.
19230         (valid_method_invocation_conversion_p): Accept to check null
19231         pointers.
19232         (build_binop): Merge declaration and initialization of local
19233         variable BINOP.
19234         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
19235         numeric types. Improved validity test for qualify operators on
19236         references.
19237         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
19238         and PREINCREMENT_EXPR. Also detect resolved static finals of a
19239         primitive type and issue the appropriate error message.
19240         (resolve_type_during_patch): Mark class loaded when resolved.
19241         (patch_cast): Allow null to be cased to reference types.
19242         (build_null_of_type): New function.
19243         (patch_array_ref): Handle array on references correctly.
19244         (patch_return): Removed unused local variable MODIFY. Force
19245         boolean to be returned as integers. Allows null to be returned by
19246         a function returning a reference.
19247         * typeck.c (convert_to_integer, convert_to_real,
19248         convert_to_pointer): Prototypes moved to convert.h
19249         (lookup_argument_method): Use method real name, if necessary.
19251 1998-10-30  Tom Tromey  <tromey@cygnus.com>
19253         * class.c (build_class_ref): Changed name of primitive classes to
19254         start with `_Jv_'.
19256         * class.c (make_class_data): Renamed fields: nmethods to
19257         method_count, method_count to dtable_method_count.  Always set
19258         `state' field to 0.
19259         * decl.c (init_decl_processing): Likewise.
19261 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19263         * class.c (layout_class): Don't mangle <finit>, produce
19264         __finit<class> instead. Don't verify artificial methods.
19265         * decl.c (finit_identifier_node): New declared global.
19266         (init_decl_processing): finit_identifier_node initialized.
19267         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19268         * java-tree.h (finit_identifier_node): Declared as extern.
19269         (struct lang_decl): New field called_constructor.
19270         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19271         (CLASS_HAS_FINIT_P): New macro.
19272         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19273         explicit constructor invocation.
19274         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19275         CALL_SUPER_CONSTRUCTOR_P): New macros.
19276         (write_classfile): Added prototype.
19277         * jcf-parse.c (jcf_parse_source): Parse and remember for
19278         generation if the file was seen on the command line.
19279         (parse_source_file): Don't write the class file here.
19280         (yyparse): Loop on files rewritten. Set current_jcf.
19281         (parse_zip_file_entries): Parse class file only if it was found.
19282         * lang.c (init_parse): Don't open command line provided filename
19283         here.
19284         (lang_parse): Don't set main_jcf anymore.
19285         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19286         (JCONSTRUCTOR_CHECK): New macro.
19287         (JBSC_TYPE_P): New macro.
19288         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19289         (COMPLETE_CHECK_OP_2): New macro.
19290         (struct parse_ctxt): New field explicit_constructor_p.
19291         (check_class_interface_creation): Fixed prototype indentation.
19292         (patch_method_invocation_stmt): Prototype reflects added argument.
19293         (patch_invoke): Likewise.
19294         (complete_method_declaration, build_super_invocation,
19295         verify_constructor_circularity,
19296         build_this_super_qualified_invocation, get_printable_method_name,
19297         patch_conditional_expr, maybe_generate_finit, fix_constructors,
19298         verify_constructor_super, create_artificial_method,
19299         start_artificial_method_body, end_artificial_method_body,
19300         generate_field_initialization_code): New function prototypes.
19301         * parse.y: Fixed leading comment
19302         (constructor_header:, constructor_body:, block_end:): Rules tagged
19303         <node>.
19304         (type_declaration:): Call maybe_generate_finit.
19305         (method_declaration:): Action for method_body: placed in new
19306         function complete_method_declaration, called here.
19307         (constructor_declaration:): Defined actions. Removed leading
19308         FIXME.
19309         (constructor_header:): New rule with action.
19310         (constructor_body:): Rule rewritten using block_begin: and
19311         block_end:. Defined actions.
19312         (constructor_declarator:, explicit_constructor_invocation:):
19313         Defined actions.
19314         (block:): Use new rules block_begin: block_end:.
19315         (block_begin:, block_end:): New rules and actions.
19316         (block_statements:): Fixed error message for explicit
19317         constructors.
19318         (method_invocation:): Call build_this_super_qualified_invocation
19319         if primary is `this' or `super' was seen.
19320         (conditional_expression:): Action defined.
19321         (extra_ctxp_pushed_p): New static global flag.
19322         (java_parser_context_save_global): Create parser context if
19323         necessary. Use extra_ctxp_pushed_p to remember it.
19324         (java_parser_context_restore_global): Pop extra parser context if
19325         one exists.
19326         (build_array_from_name): Array on primitive types are marked
19327         loaded.
19328         (register_fields): Restore new name in field initializer
19329         expression if type was altered. Non static fields initialized upon
19330         declaration marked initialized.
19331         (maybe_generate_finit): New function.
19332         (maybe_generate_clinit): Use create_artificial_method,
19333         start_artificial_method_body, end_artificial_method_body. Generate
19334         debug info for enclosed initialization statements.
19335         (method_header): Fixed leading comment. Check constructor
19336         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19337         accordingly.
19338         (complete_method_declaration, constructor_circularity_msg,
19339         verify_constructor_circularity): New functions.
19340         (get_printable_method_name): New function.
19341         (check_method_redefinition): Don't rename <finit> methods. Fix
19342         declared constructor names. Error message for
19343         constructors modified.
19344         (java_check_regular_methods): Local variable seen_constructor
19345         renamed saw_constructor. Skip verification on constructors. Create
19346         default constructor with create_artificial_method.
19347         (java_check_methods): Removed unnecessary empty line.
19348         (create_artificial_method, start_artificial_method_body,
19349         end_artificial_method_body): New functions.
19350         (java_layout_classes): Changed leading comment. Reverse fields
19351         list if necessary. Always layout java.lang.Object if being
19352         defined.
19353         (java_complete_expand_methods): Verify constructor circularity.
19354         (java_complete_expand_method): Call fix_constructor on
19355         constructors.  Local variable no_ac_found removed. Restore
19356         bindings if method body expansion failed.
19357         (fix_constructors, verify_constructor_super,
19358         generate_field_initialization_code): New function.
19359         (java_expand_classes): Fixed leading comment. Write class file
19360         here.
19361         (resolve_expression_name): Check for illegal instance variable
19362         usage within the argument scope of an explicit constructor
19363         invocation.
19364         (resolve_qualified_expression_name): Pass extra from_super flag
19365         when invoking patch_method_invocation_stmt. New case for
19366         conditional expression when used as a primary. Check for error
19367         when acquiring super.
19368         (patch_method_invocation_stmt): Added extra argument super. New
19369         local variable is_static_flag. Set class_to_search according to
19370         the nature of the constructor invocation. Don't add `this'
19371         argument when expanding NEW_CLASS_EXPR. Check for illegal method
19372         invocation within the argument scope of explicit constructor
19373         invocation. Set is_static according to is_static_flag. Provide
19374         extra `super' argument to patch_invoke invocation.
19375         (patch_invoke): New argument from_super. Loop on arguments
19376         indentation fixed. Pass from_super to invocation_mode. New switch
19377         case INVOKE_SUPER. Fixed error message in switch default case.
19378         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19379         value.
19380         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19381         (lookup_method_invoke): Fixed prototypes in candidates list. Error
19382         message takes constructors into account.
19383         (find_applicable_accessible_methods_list): Fixed indentation.
19384         (qualify_ambiguous_name): Take explicit constructor invocation
19385         into account. Deal with a conditional expression as a primary to
19386         a method call.
19387         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19388         case. Added extra argument to patch_method_invocation_stmt.
19389         Register calls made to explicit constructor `this'. Don't call
19390         save_expr in ARRAY_REF case when emitting class files. Check for
19391         illegal use of this when expanding explicit constructor invocation
19392         arguments.
19393         (complete_function_arguments): Set and reset parser context
19394         explicit_constructor_p field value when appropriate.
19395         (build_super_invocation, build_this_super_qualified_invocation):
19396         New functions.
19397         (patch_assignment): Fixed typo.
19398         (patch_unaryop): Check on final fields occurs only when a decl
19399         exits.
19400         (patch_return): Take constructors into account.
19401         (patch_conditional_expr): New function.
19402         * typeck.c (build_java_signature): Removed unnecessary empty line.
19404 1998-10-28  Jeffrey A Law  (law@cygnus.com)
19406         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19408 1998-10-28  Tom Tromey  <tromey@cygnus.com>
19410         * decl.c (init_decl_processing): Renamed fields.
19411         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19412         interface_len, msize fields.
19414         * class.c (make_class_data): Removed subclass_head and
19415         subclass_next fields.
19416         * decl.c (init_decl_processing): Removed subclass_head and
19417         subclass_next fields.
19419 1998-10-28  Jeffrey A Law  (law@cygnus.com)
19421         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19422         * mangle.c (emit_unicode_mangled_name): Similarly.
19424 1998-10-26  Nick Clifton  <nickc@cygnus.com>
19426         * jcf-parse.c (get_constant): Place braces around code to compute
19427         'd' when REAL_ARITHMETIC is not defined.
19429 1998-10-25  H.J. Lu  (hjl@gnu.org)
19431         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19432         dependency.
19434 1998-10-23  Tom Tromey  <tromey@cygnus.com>
19436         * lang-specs.h: `.zip' files are input to jc1.
19438 1998-10-22  Per Bothner  <bothner@cygnus.com>
19440         * jvspecs.c:  Add (but don't enable) support for combining multiple
19441         .class and .java input filenames to a single jc1 invocation.
19442         Add support for -C flag (copile to .class files).
19443         Translate -classpath and -CLASSPATH arguments.
19444         * lang-specs.h:  Don't set %2 spec.
19446 1998-10-22  Tom Tromey  <tromey@cygnus.com>
19448         * jcf-path.c (add_entry): Don't add trailing separator if entry is
19449         a .zip file.
19450         (add_path): Don't add trailing separator to non-empty path
19451         elements.
19453         * lang.c (lang_decode_option): Check for -fclasspath and
19454         -fCLASSPATH before examining other `-f' options.
19456         * java-tree.h (finalize_identifier_node): Don't declare.
19457         * class.c (make_class_data): Don't push "final" field.
19458         * decl.c (init_decl_processing): Don't push "final" field.
19459         (finalize_identifier_node): Removed.
19460         (init_decl_processing): Don't set finalize_identifier_node.
19462         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19464 1998-10-11  Anthony Green  <green@cygnus.com>
19466         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19467         (JV_SCAN_SOURCES): New macro.
19468         (JCF_DUMP_SOURCES): Likewise.
19469         (jcf-dump$(exeext)): New target.
19470         (jv-scan$(exeext)): New target.
19472 1998-10-22  Tom Tromey  <tromey@cygnus.com>
19474         * Makefile.in (LEX): Removed.
19475         (LEXFLAGS): Likewise.
19476         (SET_BISON): New macro.
19477         (BISON): Removed.
19478         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
19479         spurious diffs in parse.c.
19480         ($(PARSE_SCAN_C)): Likewise.
19481         (PARSE_DIR): New macro.
19482         (PARSE_C): Use it.
19483         (PARSE_SCAN_C): Likewise.
19484         (PARSE_RELDIR): New macro.
19486         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19488         * jcf-io.c (find_class): Use saw_java_source to determine when to
19489         look for `.java' file.
19490         * jcf-parse.c (saw_java_source): New global.
19491         (yyparse): Set it if `.java' file seen.
19493         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19494         (GCJH_SOURCES): Likewise.
19495         * Makefile.in (datadir): New macro.
19496         (libjava_zip): Likewise.
19497         (JAVA_OBJS): Added jcf-path.o.
19498         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19499         (../gcjh$(exeext)): Likewise.
19500         (jcf-path.o): New target.
19501         * java-tree.h (fix_classpath): Removed decl.
19502         * jcf-parse.c (fix_classpath): Removed.
19503         (load_class): Don't call fix_classpath.
19504         * parse.y (read_import_dir): Don't call fix_classpath.
19505         * lex.h: Don't mention classpath.
19506         * lex.c (java_init_lex): Don't initialize classpath.
19507         * jcf-io.c (classpath): Removed global.
19508         (find_class): Use jcf_path iteration functions.  Correctly search
19509         class path for .java file.
19510         (open_in_zip): New argument `is_system'.
19511         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
19512         classpath-related options.
19513         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19514         and -I.
19515         (lang_init): Call jcf_path_init.
19516         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19517         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
19518         Correctly put braces around second string in each entry.
19519         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
19520         classpath-related options.
19521         (help): Updated for new options.
19522         * jcf.h: Declare functions from jcf-path.c.  Don't mention
19523         `classpath' global.
19524         * jcf-path.c: New file.
19526         * jcf-depend.c: Include jcf.h.
19528         * jcf-write.c (localvar_alloc): Returns `void'.
19529         (localvar_free): Removed unused variable.
19531         * lang.c (OBJECT_SUFFIX): Define if not already defined.
19532         (init_parse): Use OBJECT_SUFFIX, not ".o".
19534 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19536         * class.c (emit_register_classes): Renamed from
19537         emit_register_class.
19538         * java-tree.h (emit_register_classes): Prototype renamed from
19539         emit_register_class.
19540         * jcf-parse.c (yyparse): Call emit_register_classes once before
19541         returning.
19542         * parse.y (java_expand_classes): No longer register classes.
19544 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19546         * class.c (is_compiled_class): New local variable
19547         seen_in_zip. Identify classes found in currently compiled source
19548         file(s).
19549         * decl.c (complete_start_java_method): Fixed typo.
19550         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19551         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19552         (CLASS_P): Moved around.
19553         (java_parse_abort_on_error): Macro moved from jcf-parse.c
19554         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19555         java-tree.h
19556         (jcf_parse_source): Changed leading comment. Removed unnecessary
19557         fclose and CLASS_FROM_SOURCE_P marking.
19558         (parse_source_file): New local variables remember_for_generation
19559         and filename. Mark parsed file name identifier node. Removed block
19560         executed when parse_only was null. Set remember_for_generation.
19561         Use it as an argument to java_pop_parser_context.
19562         (yyparse): New local variables several_files, list, next node and
19563         current_file_list. Split ampersand separated file names into
19564         current_file_list. Iterate through the list and parse accordingly.
19565         * parse.h (java_pop_parser_context): New function prototype.
19566         * parse.y (ctxp_for_generation): New static global variable.
19567         (java_pop_parser_context): New argument generate. Link popped ctxp
19568         to ctxp_for_generation list accordingly.
19569         (java_complete_expand_methods): Fixed indentation.
19570         (java_expand_classes): New function.
19572 1998-10-17  Per Bothner  <bothner@cygnus.com>
19574         * Makefile.in:  Link with libiberty.a instead of memmove.o.
19576 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19578         * lex.c (setjmp.h): No longer included.
19579         * lex.h (setjmp.h): Included.
19580         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19581         (duplicate_declaration_error_p): Renamed from
19582         duplicate_declaration_error.
19583         (build_array_from_name): New function prototype.
19584         * parse.y (setjmp.h): No longer included.
19585         (variable_declarator_id): Define action.
19586         (build_array_from_name): New function.
19587         (duplicate_declaration_error_p): Renamed from
19588         duplicate_declaration_error.  Fixed leading comment.
19589         (register_fields): Main `for' loop reorganized. Uses
19590         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19591         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19592         build_array_from_name.
19593         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19594         types.
19595         (read_import_dir): Don't try to skip `.' and `..'.
19596         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19597         build_array_from_name. Main `for' loop reorganized.
19598         (resolve_qualified_expression_name): When building access to a
19599         field, use the type where the field was found, not its own type.
19600         (maybe_access_field): Use field DECL_CONTEXT if the type where the
19601         field was found is null.
19602         (qualify_ambiguous_name): Sweep through all successive array
19603         dimensions.
19605 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19607         * java-tree.h (pop_labeled_block, lang_printable_name,
19608         maybe_add_interface, set_super_info, get_access_flags_from_decl,
19609         interface_of_p, inherits_from_p, fix_classpath,
19610         complete_start_java_method, emit_handlers, init_outgoing_cpool,
19611         make_class_data, register_class, alloc_name_constant): New
19612         function prototypes.
19613         * lang.c (lang_decode_option): Set argc argument unused. Fixed
19614         indentation. Added cast to remove warning.
19615         (lang_printable_name): Set v argument unused.
19616         (lang_print_error): Added argument to lang_printable_name call.
19617         (java_dummy_print, print_lang_decl, print_lang_type,
19618         print_lang_identifier, lang_print_xnode): All argument marked
19619         unused.
19620         * lex.c (java_unget_unicode): Removed unnecessary argument.
19621         (java_allocate_new_line): Unused local variable is gone.
19622         (java_read_char): Added parenthesis in expressions to remove
19623         warnings.  Added final return statement.
19624         (java_read_unicode): Added parenthesis in expression to remove
19625         warning.
19626         (java_parse_end_comment): Fixed java_unget_unicode invocation.
19627         (java_parse_escape_sequence): Likewise.
19628         (java_lex): Unused local variables are gone. Fixed
19629         java_unget_unicode invocation.
19630         * lex.h (set_float_handler): Prototype added when JC1_LITE not
19631         defined.
19632         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19633         lang_printable_name invocation in macro.
19634         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19635         Likewise.
19636         (duplicate_declaration_error): Suppressed unused argument in
19637         prototype.
19638         (identical_subpath_p): Function declaration is gone.
19639         (patch_invoke): Suppressed unused argument in prototype.
19640         (patch_cast, build_labeled_block, check_thrown_exceptions):
19641         Likewise.
19642         * parse.y (setjmp.h): Included
19643         (toplev.h): Likewise.
19644         (field_declaration:): Suppressed unused local
19645         (label_decl:): Fixed build_labeled_block invocation.
19646         (java_pop_parser_context): Put extra parenthesis around assignment
19647         in if.
19648         (yyerror): Suppressed unused local variables.
19649         (variable_redefinition_error): Fixed lang_printable_name
19650         invocation.
19651         (create_interface): Suppressed unused local variables.
19652         (create_class): Likewise.
19653         (duplicate_declaration_error): Suppressed unused argument. Fixed
19654         lang_printable_name invocation.
19655         (register_fields): Suppressed unused local variable. Fixed
19656         duplicate_declaration_error invocation.
19657         (method_header): Suppressed unused local variable.
19658         (method_declarator, parser_check_super): Likewise.
19659         (java_complete_class): Suppressed unused local variable. Fixed
19660         fatal error message.
19661         (complete_class_report_errors): Added default: in switch.
19662         (java_check_regular_methods): Fixed lang_printable_name
19663         invocations.
19664         (check_throws_clauses): Likewise.
19665         (java_check_abstract_methods): Suppressed unused local
19666         variable. Fixed lang_printable_name invocation.
19667         (read_import_entry): Added supplemental return statement.
19668         (read_import_dir): Suppressed unused local variables.
19669         (check_pkg_class_access, declare_local_variables): Likewise.
19670         (source_start_java_method): Suppressed unused extern variable
19671         declarations
19672         (expand_start_java_method): Suppressed unused extern and local
19673         variable declarations.
19674         (java_complete_expand_methods): Likewise.
19675         (java_complete_expand_method): Suppressed unused local variables.
19676         (make_qualified_name): Likewise.
19677         (resolve_qualified_expression_name): Added default: in
19678         switch. Fixed lang_printable_name invocation.
19679         (class_instance_creation_expression): Added parenthesis around
19680         expressions.
19681         (patch_method_invocation_stmt): Fixed lang_printable_name and
19682         patch_invoke invocations.
19683         (check_for_static_method_reference): Fixed lang_printable_name
19684         invocation.
19685         (patch_invoke): Suppressed unused arguments and local variables.
19686         (lookup_method_invoke): Suppressed unused local variables.
19687         (qualify_ambiguous_name): Added default: in switch.
19688         (identical_subpath_p): Function removed.
19689         (patch_assignment): Suppressed unused local variables. Suppressed
19690         unnecessary if statement. Fixed lang_printable_name invocations.
19691         (try_builtin_assignconv): Fixed lang_printable_name invocations.
19692         (valid_ref_assignconv_cast_p): Parenthesis around
19693         expression. Suppressed unused local variables.
19694         (build_binop): Suppressed unused local variables. fixed
19695         lang_printable_name invocations.
19696         (string_constant_concatenation): Suppressed unused local
19697         variables.
19698         (patch_unaryop): Fixed lang_printable_name invocation.
19699         (patch_cast): Suppressed unnecessary argument. Fixed
19700         lang_printable_name invocation.
19701         (patch_array_ref): Fixed lang_printable_name invocation.
19702         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19703         (build_labeled_block): Suppressed unused argument.
19704         (generate_labeled_block): Fixed build_labeled_block invocation.
19705         (build_loop_body): Suppressed unused local variables.
19706         (patch_loop_statement): Likewise.
19707         (patch_exit): Fixed lang_printable_name invocation.
19708         (patch_switch_statement): Likewise.
19709         (case_identity): First argument marked unused.
19710         (patch_try_statement): Fixed lang_printable_name invocations.
19711         (patch_synchronized_statement, patch_throw_statement): Likewise.
19712         (check_thrown_exceptions): Fixed check_thrown_exceptions and
19713         lang_printable_name invocations.
19714         (check_thrown_exceptions_do): Suppressed unused argument.
19716 1998-10-14  Tom Tromey  <tromey@cygnus.com>
19718         * jcf-write.c (write_classfile): Add output class file as target.
19719         * lang-options.h: Added -MD, -MMD, -M, and -MM.
19720         * jcf.h: Added declarations for dependency-tracking functions.
19721         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19722         * lang.c (lang_decode_option): Recognize -MD and -MMD.
19723         (finish_parse): Call jcf_dependency_write.
19724         (dependency_tracking): New global.
19725         (DEPEND_SET_FILE): New define.
19726         (DEPEND_ENABLE): New define.
19727         (init_parse): Enable dependency tracking if required.
19728         Include "flags.h".
19729         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19730         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19731         (../gcjh$(exeext)): Likewise.
19732         (jcf-depend.o): New target.
19733         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19734         (GCJH_SOURCES): Likewise.
19735         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
19736         dep_name argument.
19737         (find_classfile): Added dep_name argument.
19738         (find_class): Compute name of dependency.
19739         (open_in_zip): Call jcf_dependency_add_file.
19740         * gjavah.c (output_file): No longer global.
19741         (usage): Don't mention "gjavah".
19742         (help): Likewise.
19743         (java_no_argument): Likewise.
19744         (version): Likewise.
19745         (main): Recognize and handle -M family of options.
19746         (print_mangled_classname): Return is void.
19747         (process_file): Handle case where output is suppressed.
19748         (HANDLE_END_FIELD): Likewise.
19749         (HANDLE_METHOD): Likewise.
19750         * jcf-depend.c: New file.
19752 1998-10-13  Jeffrey A Law  (law@cygnus.com)
19754         * java-tree.def: Add missing newline at EOF.
19756 1998-10-13  Tom Tromey  <tromey@cygnus.com>
19758         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19759         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
19760         function.
19761         Include <config.h> and "system.h".
19762         (disassemble_method): Undefine RET to avoid clash with
19763         config/i386/i386.h.
19765 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19767         * decl.c (runtime_exception_type_node, error_exception_type_node):
19768         New global variables.
19769         (init_decl_processing): Initialized.
19770         * expr.c (java_lang_expand_expr): Set caught exception type to
19771         null if catch handler argument doesn't exit.
19772         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19773         tree codes.
19774         * java-tree.h (runtime_exception_type_node,
19775         error_exception_type_node): Global variables declared.
19776         (DECL_FUNCTION_THROWS): New macro.
19777         (DECL_FUNCTION_BODY): Modified comment.
19778         (DECL_SPECIFIC_COUNT): Likewise.
19779         (struct lang_decl): New field throws_list.
19780         (IS_UNCHECKED_EXPRESSION_P): New macro.
19781         * lex.c (java_lex): Generate location information for THROW_TK.
19782         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19783         EXCEPTIONS_P): New macros.
19784         (enum jdep_code): New value JDEP_EXCEPTION.
19785         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19786         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19787         PATCH_METHOD_RETURN_ERROR): New macros.
19788         (patch_method_invocation_stmt): Added new argument to prototype.
19789         (patch_synchronized_statement, patch_throw_statement,
19790         check_thrown_exceptions, check_thrown_exceptions_do,
19791         purge_unchecked_exceptions, check_throws_clauses): New function
19792         prototypes.
19793         * parse.y Fixed typo in keyword section.
19794         (throw:): Rule tagged <node>.
19795         (THROW_TK): Keyword tagged <operator>.
19796         (method_header:): Last argument to call to method_header passed
19797         from throws: rule.
19798         (throws:, class_type_list:, throw_statement:,
19799         synchronized_statement:, synchronized:): Defined actions.
19800         (method_header): New local variable current. Register exceptions
19801         from throws clause.
19802         (java_complete_tree): Complete and verify exceptions from throws
19803         clause.
19804         (complete_class_report_errors): Error message on exceptions not
19805         found
19806         (java_check_regular_methods): Fixed typo. Shortcut on private
19807         overriding methods. Changed error message on method
19808         redefinition. Check for throws clause compatibility.
19809         (check_throws_clauses): New function.
19810         (java_check_abstract_methods): Use DECL_NAME for wfl or current
19811         method. Changed error message on method redefinition.
19812         (currently_caught_type_list): New static variable.
19813         (java_complete_expand_methods): Purge unchecked exceptions from
19814         throws clause list. Call PUSH_EXCEPTIONS before walk and
19815         POP_EXCEPTIONS after.
19816         (resolve_qualified_expression_name): Pass new argument as NULL to
19817         patch_method_invocation_stmt.
19818         (patch_method_invocation_stmt): New argument ref_decl. Invoke
19819         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19820         argument list when appropriate. Use new argument if non null to
19821         store selected method decl.
19822         (patch_invoke): Convert if necessary args of builtin types before
19823         forming CALL_EXPR. Argument list no longer reversed here.
19824         (invocation_mode): Treat final methods as static methods.
19825         (java_complete_tree): New cases for THROW_EXPR: and
19826         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19827         function call.
19828         (complete_function_arguments): No more RECORD_TYPE
19829         conversion. Function parameter nodes no longer saved.
19830         (valid_ref_assignconv_cast_p): Avoid handling null type.
19831         (patch_binop): Fixed null constant reference handling.
19832         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19833         BUILD_THROW macros.
19834         (patch_try_statement): Fixed comments. Record caught types in
19835         list, push the list, expand try block and pop the list.
19836         (patch_synchronized_statement, patch_throw_statement,
19837         check_thrown_exceptions, check_thrown_exceptions_do,
19838         purge_unchecked_exceptions): New functions.
19839         * typeck.c (lookup_argument_method): Allow WFL in place of method
19840         DECL_NAME during method definition check
19842 1998-10-09  Tom Tromey  <tromey@cygnus.com>
19844         * gjavah.c (decode_signature_piece): New function.
19845         (print_c_decl): Use it.  Added `name_override' argument.
19846         (print_method_info): Use name_override argument to print_c_decl.
19847         (seen_fields): Removed.
19848         (print_field_info): Don't update seen_fields.
19849         (struct method_name): New structure.
19850         (method_name_list): New global.
19851         (print_method_info): Add new method to list of methods.
19852         (name_is_method_p): New function.
19853         (print_field_info): If field name has same name as method, then
19854         change field name.
19855         (process_file): Parse methods before fields.
19856         (field_pass): New global.
19857         (HANDLE_END_FIELD): Take field_pass into account.
19859 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19861         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19862         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19864 1998-10-03  Anthony Green  <green@cygnus.com>
19866         * jvspec.c: Fix bug in jvgenmain_spec patch.
19868 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19870         * Makefile.in (lang.o:): Install dependency on java-tree.def.
19871         * decl.c (soft_exceptioninfo_call_node): New global variable.
19872         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19873         takes extra integer argument. soft_exceptioninfo_call_node
19874         initialized.
19875         * except.c (java_set_exception_lang_code): New function
19876         (method_init_exceptions): Called here.
19877         (prepare_eh_table_type): New function.
19878         (expand_end_java_handler): Called here.
19879         * expr.c (build_java_throw_out_of_bounds_exception): Now features
19880         one argument. Modified generation of call to
19881         soft_badarrayindex_node to use new argument.
19882         (build_java_arrayaccess): Pass faulty index value to
19883         build_java_throw_out_of_bounds_exception.
19884         (generate_name): New function.
19885         (java_lang_expand_expr): New local variables node, current,
19886         has_finally_p. Expand TRY_EXPR node.
19887         (process_jvm_instruction): Replace top of the stack with thrown
19888         object reference when entering exception handler.
19889         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19890         specific tree codes.
19891         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19892         global.
19893         (DECL_SPECIFIC_COUNT): New macro.
19894         (prepare_eh_table_type, java_set_exception_lang_code,
19895         generate_name): New function declarations.
19896         (match_java_method): Declaration deleted.
19897         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19898         macros.
19899         * lex.c (TRY_TK, CATCH_TK): Generate location information.
19900         * parse.h (redefinition_error, refine_accessible_methods_list,
19901         can_cast_to_p): Function declaration removed.
19902         (classitf_redefinition_error, variable_redefinition_error,
19903         parse_jdk1_1_error, find_applicable_accessible_methods_list,
19904         find_most_specific_methods_list, argument_types_convertible,
19905         enter_a_block, valid_builtin_assignconv_identity_widening_p,
19906         valid_cast_to_p, valid_method_invocation_conversion_p,
19907         try_reference_assignconv, add_stmt_to_compound,
19908         build_jump_to_finally, build_tree_list, patch_try_statement,
19909         java_get_catch_block): New function declarations.
19910         * parse.y (string_buffer_type): Global variable deleted.
19911         (group_of_labels, catches, catch_clause, catch_clause_parameter,
19912         finally): Rules tagged <node>.
19913         (TRY_TK, CATCH_TK): Token tagged <operator>.
19914         (class_body_declaration:, class_member_declaration:,
19915         formal_parameter:, explicit_constructor_invocation:,
19916         interface_member_declaration:, constant_declaration:,
19917         primary_no_new_array:, class_instance_creation_expression:,
19918         array_creation_expression:): Issue error on unsuported JDK1.1
19919         features.
19920         (try_statement:, catches:, finally:): Define actions.
19921         (catch_clause_parameter): New rule.
19922         (catch_clause:): Use new rule catch_clause_parameter.
19923         (parse_jdk1_1_error): New function.
19924         (redefinition_error): Renamed classitf_redefinition_error.
19925         (variable_redefinition_error): New function.
19926         (check_class_interface_creation): Call
19927         classitf_redefinition_error.
19928         (java_complete_tree): Added error message on JDEP_TYPE: case.
19929         (complete_class_report_errors): Fixed indentation.
19930         (declare_local_variables): Call variable_redefinition_error.
19931         (source_end_java_method): Call java_set_exception_lang_code and
19932         emit_handlers where appropriate.
19933         (java_method_add_stmt): Call add_stmt_to_block.
19934         (add_stmt_to_block): New function.
19935         (lookup_method_invoke): Fixed outside comment. new local variable
19936         candicates.  Call find_applicable_accessible_methods_list and
19937         find_most_specific_methods_list when searching for a
19938         method. Modified error report to list possible candidates when
19939         applicable.
19940         (find_applicable_accessible_methods_list,
19941         find_most_specific_methods_list, argument_types_convertible): New
19942         function.
19943         (refine_accessible_methods_list): Function deleted.
19944         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19945         expr (if applicable) before calling patch_array_ref.
19946         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19947         (enter_block): Fixed comment.
19948         (enter_a_block): New function.
19949         (patch_assignment): Reorganized. Call try_reference_assignconv for
19950         references. Call valid_cast_to_p instead of can_cast_to_p.
19951         (try_reference_assignconv,
19952         valid_builtin_assignconv_identity_widening_p): New functions.
19953         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19954         (valid_cast_to_p, valid_method_invocation_conversion_p): New
19955         functions.
19956         (build_string_concatenation): Don't resolve StringBuffer.
19957         (patch_cast): Fixed inverted arguments.
19958         (patch_array_ref): Code to save array expr deleted. Call
19959         valid_cast_to_p instead of can_cast_to_p.
19960         (generate_labeled_block): Call generate_name.
19961         (build_jump_to_finally, build_try_statement, java_get_catch_block,
19962         patch_try_statement): New functions.
19963         * typeck.c (match_java_method): Function deleted.
19965 1998-10-02  Anthony Green  <green@cygnus.com>
19967         * jvspec.c: jvgenmain_spec uses different temporary file names.
19969 1998-10-02  Anthony Green  <green@cygnus.com>
19971         * jvspec.c (lang_specific_driver): Fail if user specifies
19972         --main= when not linking.
19974 1998-09-28  Tom Tromey  <tromey@cygnus.com>
19976         * class.c (make_class_data): Push value for `thread' field.
19977         * decl.c (init_decl_processing): Added `thread' field to class.
19979         * class.c (add_field): Always make static fields externally
19980         visible.
19982 1998-09-26  Anthony Green  <green@cygnus.com>
19984         * expr.c (build_java_athrow,
19985         build_java_throw_out_of_bounds_exception, expand_invoke,
19986         build_newarray, expand_java_multianewarray, build_java_monitor):
19987         Update comments to reflect _Jv_* function names.
19989 1998-09-25  Per Bothner  <bothner@cygnus.com>
19991         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
19992         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
19993         * parse.y (expand_start_java_method):  Likewise.
19995 1998-09-24  Per Bothner  <bothner@cygnus.com>
19997         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
19999         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
20000         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
20001         * expr.c:  Remove no-longer-needed calls to promote_type.
20002         * decl.c (give_name_to_locals):  Liekwise.
20003         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
20004         * parse.y:  Add/remove promote_type calls as appropriate.
20005         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
20006         (parse_signature_string):  Likewise.
20007         (build_java_array_type):  Fix for now signature convenions.
20009         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
20011 1998-09-23  Tom Tromey  <tromey@cygnus.com>
20013         * class.c (init_class_processing): libjava function renamed to
20014         _Jv_RegisterClass.
20016 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20018         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
20019         * java-tree.def: Fixed DEFTREECODE third argument.
20020         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
20021         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
20022         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
20023         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20024         JAVA_THIS_EXPR): Now replaced by tree code definitions.
20025         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
20026         * lang.c (java_tree_code_type, java_tree_code_length,
20027         java_tree_code_name): New arrays.
20028         (lang_init): Append Java tree node definitions to Gcc ones.
20029         * lex.c (expression_obstack): Declared as extern when JC1_LITE
20030         defined.
20031         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
20032         wfl_to_string.
20033         (java_lex): Allow declaration of empty string constants. Retain
20034         location information on CASE_TK and DEFAULT_TK.
20035         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
20036         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
20037         Modified to be more robust.
20038         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
20039         (build_new_invocation, try_builtin_assignconv,
20040         patch_switch_statement, string_constant_concatenation,
20041         build_string_concatenation, patch_string_cst, patch_string,
20042         java_expand_switch): New function declarations.
20043         * parse.y: Rules related to switch and EH tagged <node>.
20044         (label_id): Set to NULL_TREE
20045         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
20046         tree nodes.
20047         (this_or_super:): Fixed indentation.
20048         (statement:, statement_nsi:, statement_without_trailing_substatement:,
20049         statement_expression:): Removed call to RULE on all sub-rules.
20050         (switch_expression:, switch_labels:): New rules.
20051         (switch_statement:, switch_block:, switch_block_statement_groups:,
20052         switch_block_statement_group:, switch_labels:, switch_label:):
20053         Defined actions.
20054         (throw_statement:, synchronized_statement:, try_statement:):
20055         Defined temporary actions.
20056         (class_instance_creation_expression:): Call
20057         build_new_invocation. Fixed indentation.
20058         (field_access): Fixed indentation.
20059         (method_invocation): Likewise.
20060         (make_qualified_primary): Use THIS_EXPR.
20061         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
20062         resolving from SUPER, set *type_found.
20063         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
20064         (java_complete_tree): Removed unused local variable `location'. Case
20065         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
20066         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
20067         on MODIFY_EXPR: and all binary operator tree code cases. Removed
20068         STRING_CST: case. default: checks for patchable strings.
20069         (complete_function_arguments): Transform string constant or
20070         crafted StringBuffer if necessary.
20071         (build_method_invocation): Fixed comments.
20072         (build_new_invocation): New function.
20073         (patch_assignment): Call try_builtin_assignconv to figure a valid
20074         assignment conversion between builtin types.
20075         (try_builtin_assignconv): New function.
20076         (build_binop): Use URSHIFT_EXPR directly to call build.
20077         (operator_string): Use UNARY_PLUS_EXPR.
20078         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
20079         operator.
20080         (do_merge_string_cste, merge_string_cste,
20081         string_constant_concatenation, build_string_concatenation,
20082         patch_string, patch_string_cst): New function.
20083         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
20084         (patch_unaryop): Likewise. New test of valid ++/-- operands.
20085         (build_newarray_node): Use NEW_ARRAY_EXPR.
20086         (build_this): Use THIS_EXPR.
20087         (build_return): Enable debug information on return statement.
20088         (build_if_else_statement): Likewise.
20089         (complete_labeled_statement): Fixed related comment.
20090         (build_loop_body): Fixed comment.
20091         (build_bc_statement): Enable debug information on break/continue
20092         statements.
20093         (patch_bc_statement): Fixed typos. Handle SWITCH statement
20094         context.
20095         (patch_switch_statement, case_identity, java_expand_switch): New
20096         functions.
20098 1998-09-21  Per Bothner  <bothner@cygnus.com>
20100         * buffer.h (BUFFER_INIT):  New macro.
20101         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
20102         Pass (struct jcf_partial *state) to most functions.
20103         (jcf_block, jcf_relocation):  New types.
20104         Support labels, branches, conditionals, loops.
20106 1998-09-21  Tom Tromey  <tromey@cygnus.com>
20108         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
20110 1998-09-21  Per Bothner  <bothner@cygnus.com>
20112         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
20113         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
20114         not integer_type_node (INT_TYPE_SIZ bits).
20116         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
20118         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
20119         * jcf-dump.c (print_exception_table):  New function.
20120         (disassemble_method):  Better handling of wide instructions.
20121         Make more robust for bad input.
20123 1998-09-30  Jeffrey A Law  (law@cygnus.com)
20125         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
20126         FreeBSD.
20128 1998-09-17  Jeffrey A Law  (law@cygnus.com)
20130         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
20132 1998-09-17  Tom Tromey  <tromey@cygnus.com>
20134         * Makefile.in ($(PARSE_H)): Removed target.
20136 1998-09-17  Jeffrey A Law  (law@cygnus.com)
20138         * Makefile.in (JAVA_OBJS): Add memmove.o
20139         (memmove.o): New target & rules.
20141 1998-09-15  Tom Tromey  <tromey@cygnus.com>
20143         * expr.c (expand_invoke): Don't generate a call to the class init
20144         code.
20146 1998-09-14  Jeffrey A Law  (law@cygnus.com)
20148         * Makefile.in: Add many missing dependencies.
20149         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
20150         as appropriate.
20151         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
20152         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
20154 1998-09-11  Per Bothner  <bothner@cygnus.com>
20156         * decl.c (complete_start_java_method):  If method is static (and
20157         not private) call _Jv_InitClass.
20158         * expr.c (expand_invoke):  Don't call build_class_init.
20160         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
20162 1998-09-10  Jeffrey A Law  (law@cygnus.com)
20164         * Make-lang.in (GCJ): Define before using.
20166 1998-09-09  Jeffrey A Law  (law@cygnus.com)
20168         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
20169         losing due to namespace pollution in GNU getopt.h
20171 1998-09-09  Tom Tromey  <tromey@cygnus.com>
20173         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
20174         (java.all.cross): Likewise.
20175         (java.rest.encap): Likewise.
20177 1998-09-08  Jeffrey A Law  (law@cygnus.com)
20179         * gjavah.c (print_class_decls): Fix thinko in arglist
20180         * jcv-io.c (find_classfile): Similarly.
20182 1998-09-07  Jeffrey A Law  (law@cygnus.com)
20184         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
20186 1998-09-05  Tom Tromey  <tromey@cygnus.com>
20188         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
20189         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
20190         * Makefile.in (PARSE_C): New macro.
20191         (PARSE_H): Likewise.
20192         (PARSE_SCAN_C): Likewise.
20193         ($(PARSE_C)): Target renamed from parse.c.
20194         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
20195         (clean): Remove parse-scan.c as well.
20196         (parse.o): Depend on $(PARSE_C).
20198 1998-09-05  Anthony Green  <green@cygnus.com>
20200         * README, license.terms: Removed.
20202         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20203         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20204         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20205         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20206         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20207         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20208         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20209         and Java trademark attribution.
20211 1998-09-04  Tom Tromey  <tromey@cygnus.com>
20213         * Makefile.in: Use gcjh, not gjavah.
20214         * config-lang.in (stagestuff): Use gcjh, not gjavah.
20215         * Make-lang.in: Changed gjavah to gcjh everywhere.
20217 1998-09-03  Per Bothner  <bothner@cygnus.com>
20219         * gjavah.c:  Support new -prepend -add -append flags.
20220         (print_method_info):  Method is not virtual if class is final.
20222 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20224         * jv-scan.c: Fixed copyright assignment.
20225         * keyword.gperf: Likewise.
20226         * keyword.h: Likewise.
20227         * lex.c: Fixed copyright assignment.
20228         (java_lex): Push unicode back when parsing '<'.
20229         * lex.h: Fixed copyright assignment.
20230         * parse-scan.y: Likewise.
20231         * parse.h: Fixed copyright assignment.
20232         (build_debugable_stmt, complete_for_loop): New function prototypes.
20233         * parse.y: Fixed copyright assignment.
20234         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
20235         size_zero_node when completing a loop with no exit condition.
20236         (for_statement_nsi:): Define action.
20237         (for_init:, for_update:): Return size_zero_node when empty.
20238         (declare_local_variables): Call build_debugable_stmt.
20239         (build_debugable_stmt): New function.
20240         (build_loop_body): Build debugable statement around loop
20241         condition part.
20242         (complete_loop_body): Take into account the debugable statement
20243         around the EXIT_EXPR.
20244         (complete_loop_body): New function.
20245         (patch_exit_expr): Fixed condition inversion.
20247 1998-09-02  Tom Tromey  <tromey@cygnus.com>
20249         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20250         name of thread define.
20251         * jvspec.c (THREAD_NAME): New macro.
20252         (GCLIB): Likewise.
20253         (THREADLIB): Likewise.
20254         (lang_specific_driver): Recognize attempt to link with thread
20255         library or gc library.  Recognize -ljava on command line so it
20256         isn't linked against more than once.
20258 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20260         * parse-scan.y (report_main_declaration): Name of the class
20261         containing `main' can be a qualified name.
20263 1998-08-31  Tom Tromey  <tromey@cygnus.com>
20265         * config-lang.in: Changed gjavac to gjc everywhere.
20266         * Make-lang.in: Changed gjavac to gjc everywhere.
20268 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20270         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20271         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20272         and install the files.
20273         * Makefile.in (JAVA_OBJS_LITE): New variable.
20274         (compiler:): Now include jv-scan as a dependency.
20275         (../jv-scan$(exeext), parse-scan.c): New targets.
20276         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20277         * config-lang.in (compilers): Removed gcj, gjavah from the list.
20278         * jcf-parse.c (parse_source_file): Call java_layout_classes and
20279         check for errors even if parse_only.
20280         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20281         defined.
20282         (yylex): New function. Uses java_lex body.
20283         (java_lex): Removed commented out statement. Remove local variable
20284         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20285         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20286         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20287         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20288         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20289         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20290         where appropriate.
20291         (java_lex_error): Empty if JC1_LITE is defined.
20292         (java_get_line_col): Return 0 if JC1_LITE is defined.
20293         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20294         SET_MODIFIER_CTX): Moved into the section containing the macros
20295         conditionally defined by JC1_LITE.
20296         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20297         argument if JC1_LITE is defined.
20298         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20299         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20300         is defined.
20301         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20302         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20303         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20304         to different values according to JC1_LITE.
20305         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20306         declared if JC1_LITE set.
20307         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20308         defined if JC1_LITE not set.
20309         (struct parser_ctx): Reorganized and skip the jc1 front end part
20310         if JC1_LITE set.
20311         (java_layout_classes): New function definition.
20312         (java_push_parser_context, java_init_lex, yyparse, yylex,
20313         yyerror): Prototype always declared. All other static function
20314         prototypes declared only if JC1_LITE is not set.
20315         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20316         declared in parse.h.
20317         (java_layout_classes): New function.
20318         (java_complete_expand_methods): No longer layout the class here.
20319         * parse-scan.y: New file.
20320         * jv-scan.c: New file.
20322 1998-08-25  Tom Tromey  <tromey@cygnus.com>
20324         * gjavah.c (main): Handle -friend option.
20325         (friend_specs): New global.
20326         (generate_access): Handle friend_specs.
20327         (process_file): Likewise.
20328         (MAX_FRIENDS): New macro.
20329         (friend_count): New global.
20330         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
20331         Changed all callers.
20333 1998-08-24  Per Bothner  <bothner@cygnus.com>
20335         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
20336         (main):  Handle processing all the entries of a named .zip archive.
20337         * jcf-io.c (jcf_trim_old_input):  New function.
20338         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
20340 1998-08-24  Per Bothner  <bothner@cygnus.com>
20342         * lang.c (flag_assume_compiled):  Make default be on.
20344 1998-08-21  Per Bothner  <bothner@cygnus.com>
20346         * jcf-dump.c:  Add bunches of flags to control output more.
20347         (process_class):  New function;  support printing more than one class.
20348         (main): Support new --print-main and --javap flags.
20349         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
20350         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
20352 1998-08-20  Per Bothner  <bothner@cygnus.com>
20354         Change mangling of dispatch table to match C++ vtable (w/thunks).
20355         * class.c (build_dtable_decl), java-tree.h:  New function.
20356         (make_class_data):  Call it.
20357         * decl.c (init_decl_processing):  Likewise.
20359 1998-08-19  Warren Levy  <warrenl@cygnus.com>
20361         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20362         soft_anewarray; adjust args passed.
20363         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20364         match _Jv_NewObjectArray.
20366 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20368         * decl.c (push_labeled_block, pop_labeled_block): New functions.
20369         * expr.c (loopup_label): Call create_label_decl.
20370         (create_label_decl): New function.
20371         (java_lang_expand_expr): Call expand_start_bindings with argument
20372         set to zero.
20373         * java-tree.h Added space after PROTO in function declarations
20374         when necessary.
20375         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20376         (create_label_decl, push_labeled_block): New function
20377         declarations.
20378         * lex.c (label_id): Initialize.
20379         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20380         switch.
20381         * parse.h Added space after PROTO in function declarations when
20382         necessary.
20383         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20384         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20385         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20386         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20387         macros.
20388         (struct parser_ctxt): New fields current_loop,
20389         current_labeled_block.
20390         (build_if_else_statement, patch_if_else_statement,
20391         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20392         generate_labeled_block, complete_labeled_statement,
20393         build_bc_statement, patch_bc_statement, patch_loop_statement,
20394         build_new_loop, build_loop_body, complete_loop_body): New function
20395         declarations.
20396         * parse.y (java_warning_count): New global variable.
20397         (label_id): New static variable.
20398         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20399         (block:): Return size_zero_node when block is empty.
20400         (empty_statement:): Return size_zero_node.
20401         (statement:): Implement supplemental action when for_statement: is
20402         reduced.
20403         (label_decl:): New rule.
20404         (labeled_statement:): Rewritten using label_decl. Actions
20405         implemented.
20406         (labeled_statement_nsi:): Likewise.
20407         (if_then_statement): Actions implemented.
20408         (while_expression): New rule.
20409         (while_statement:): Rewritten using while_expression. Actions
20410         implemented.
20411         (while_statement_nsi:): Likewise.
20412         (do_statement_begin:): New rule.
20413         (do_statement:): Rewritten using do_statement_begin. Actions
20414         implemented.
20415         (for_statement:): Rewritten using for_begin. Actions implemented.
20416         (for_statement_nsi:): Likewise.
20417         (for_header:, for_begin:): New rules.
20418         (for_init:): Actions implemented.
20419         (statement_expression_list:, break_statement:,
20420         continue_statement:): Likewise.
20421         (yyerror): Count number of issued warning(s).
20422         (java_report_errors): Report error(s) and/or warning(s).
20423         (java_complete_class): Use build_java_argument_signature to
20424         recompute completed method signature.
20425         (java_check_regular_methods): New locals method_wfl and aflags.
20426         Use method_wfl instead of lookup_cl during error reports. Fixed
20427         indentation and modified some error messages. Use
20428         lang_printable_name in method instead of the DECL_NAME. New code
20429         to issue warnings on methods not overriding corresponding methods
20430         private to a different package.
20431         (java_method_add_stmt): Call add_stmt_to_compound.
20432         (add_stmt_to_compound): New function.
20433         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20434         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20435         (build_if_else_statement, patch_if_else_statement,
20436         build_labeled_block, generate_labeled_block,
20437         complete_labeled_statement, build_new_loop, build_loop_body,
20438         complete_loop_body, patch_loop_statement, build_bc_statement,
20439         patch_bc_statement, patch_exit_expr): New functions.
20440         * typeck.c (build_java_signature): Build argument signature before
20441         enclosing it in between parenthesis.
20443 1998-08-17  Warren Levy  <warrenl@cygnus.com>
20445         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20446         (JAVA_OBJS): Added reminder comment
20448 1998-08-13  Nick Clifton  <nickc@cygnus.com>
20450         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20451         be interpreted as a long long.
20453 1998-08-13  Warren Levy  <warrenl@cygnus.com>
20455         * decl.c (init_decl_processing): Use _Jv_InitClass, not
20456         soft_initialise_class.  Use _Jv_NewMultiArray, not
20457         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
20458         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
20459         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
20460         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20462 1998-08-12  Per Bothner  <bothner@cygnus.com>
20464         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20465         length_identifier_node):  New global tree node constants.
20466         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
20467         Replace uses by super_identifier_node etc.
20468         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
20470         * parse.y (resolve_field_access):  Don't special-case ".length" if
20471         flag_emit_class_files.
20472         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
20473         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
20474         and ARRAY.length.
20476 1998-08-11  Per Bothner  <bothner@cygnus.com>
20478         * decl.c (init_decl_processing): Remove unused method_type_node fields.
20479         * class.c (make_method_value):  Remove init for removed fields.
20481         * class.c (layout_class):  Use build_java_argument_signature.
20482         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
20484         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
20485         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
20486         (build_java_signature):  Don't use push_java_argument_signature.
20488         * typeck.c (lookup_argument_method):  New function.
20489         * parse.y (java_check_regular_methods):  Use lookup_argument_method
20490         instead of lookup_java_method2 followed by lookup_java_method.
20492         * parse.y (check_method_redefinition):  Minor optimization.
20494         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
20495         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20497 1998-08-10  Tom Tromey  <tromey@cygnus.com>
20499         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20500         c-pragma.o.
20502         * gjavah.c (java_float_finite): Use K&R-style definition.
20503         (java_double_finite): Likewise.
20504         (generate_access): Now returns void.  Changed all callers.
20505         (last_access_generated): Removed.
20506         (process_file): Only make a single pass over the .class file.
20508 1998-07-29  Per Bothner  <bothner@cygnus.com>
20510         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
20511         for compatibility for G++ (with -fvtable-thunks).
20512         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
20514         * gjavah.c (process_file):  Use public inheritance for super-class.
20516 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20518         * lex.c (java_init_lex): Initialize ctxp->package.
20519         * parse.h (struct parser_ctxt): package and package_len replaced
20520         by tree package, an identifier node. Field method_decl_list is
20521         gone. Fixed comments.
20522         (lookup_field_wrapper, merge_qualified_name, not_accessible,
20523         class_in_current_package): New function prototypes.
20524         * parse.y (array_type:): Set class loaded flag on primitive type
20525         arrays.
20526         (package_declaration:): Assign ctxp->package to the
20527         identifier node.
20528         (method_invocation:): Handle invocation of method qualified by
20529         `super'.
20530         (single_type_import_declaration:): Removed ambiguity check.
20531         (java_pop_parser_context): New local variable `next'. Reset and
20532         set IMPORT_CLASSFILE_NAME flags on current and previous import
20533         list.
20534         (java_accstring_lookup): Use new local macro COPY_RETURN.
20535         (lookup_field_wrapper): New function.
20536         (parser_qualified_classname): Use merge_qualified_name.
20537         (parser_check_super_interface): Broaden error message.
20538         (do_resolve_class): Check for qualified class name in the current
20539         compilation unit if appropriate.
20540         (process_imports): Check for already defined classes.
20541         (check_pkg_class_access): Got rid of call to
20542         get_access_flags_from_decl.
20543         (java_complete_expand_methods): Call safe_layout_class based on
20544         the current class size.
20545         (make_qualified_primary): Build a WFL qualification on primary if
20546         none exists.
20547         (merge_qualified_name): New function.
20548         (make_qualified_name): Use merge_qualified_name.
20549         (resolve_expression_name): Use safe_lookup_field.
20550         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20551         (resolve_qualified_expression_name): Likewise. Check on resolved
20552         element accessibility.
20553         (not_accessible_p, class_in_current_package): New functions.
20554         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20555         (patch_method_invocation_stmt): Merged common pieces. Check
20556         accessibility of invoked method.
20557         (check_for_static_method_reference): Add returned type in error
20558         message.
20559         (invocation_mode): Get rid of bogus check on PRIVATE methods.
20560         (refine_accessible_methods_list): Merged two conditions in test.
20561         (java_complete_class): Sanity check on stabilize_ref gone.
20562         * zextract.c (read_zip_archive): Cast lseek second argument to long.
20564 1998-07-28  Per Bothner  <bothner@cygnus.com>
20566         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
20568 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20570         * gjavah.c (F_NAN): Removed.
20571         (F_NAN_MASK): New macro.
20572         (F_POSITIVE_INFINITY): Removed.
20573         (F_NEGATIVE_INFINITY): Likewise.
20574         (java_float_finite): Rewrote.
20575         (D_NAN_MASK): Renamed.
20576         (java_double_finite): Rewrote.
20577         (D_POSITIVE_INFINITY): Removed.
20578         (D_NEGATIVE_INFINITY): Likewise.
20580         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20581         If verbose, print underlying representation of value in hex.
20583 1998-07-24  Per Bothner  <bothner@cygnus.com>
20585         * buffer.h, buffer.c:  New files.
20586         * Makefile.in (JAVA_OBJS):  Add buffer.o.
20588         Support locals variables and writing their debug entries to .class.
20589         * jcf-write.c:  Simplify some by user new buffer type.
20590         (vode_buffer_grow):  Removed.
20591         (struct localvar_info):  New type.
20592         (localsvars, localvartable):  New buffers.
20593         (localvar_alloc, localvar_free):  New functions.
20594         (generate_bytecode_insns):  Handle local variables.
20595         (generate_classfile):  Write LocalVariableTable attribute.
20597 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20599         * jcf-io.c (open_in_zip): Check the zipfile magic number.
20600         * zipfile.h (ZIPMAGIC): New macro.
20602 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20604         * Makefile.in (gjavah.o): Updated dependencies.
20605         (jcf-dump.o): Likewise.
20606         (all.indirect): Use ../gjavah.
20607         (../gjavah$(exeext)): Likewise.
20608         (clean): Don't remove gjavah.
20609         (clean): Remove parse.c, not java/parse.c.
20610         * Make-lang.in (java): Added gjavah.
20611         (gjavah$(exeext)): New target.
20612         (GJAVAH_SOURCES): New macro.
20613         (java.all.build): Added gjavah.
20614         (java.all.cross): Likewise.
20615         (java.rest.encap): Likewise.
20616         * config-lang.in (compilers, stagestuff): Added gjavah.
20618 1998-07-23  Tom Tromey  <tromey@cygnus.com>
20620         * gjavah.c (java_float_finite): New function.
20621         (java_double_finite): Likewise.
20622         (F_POSITIVE_INFINITY): New macro.
20623         (F_NEGATIVE_INFINITY): Likewise.
20624         (F_NAN): Likewise.
20625         (D_POSITIVE_INFINITY): Likewise.
20626         (D_NEGATIVE_INFINITY): Likewise.
20627         (D_NAN): Likewise.
20628         (print_field_info): Use java_float_finite and java_double_finite.
20630 1998-07-23  Per Bothner  <bothner@cygnus.com>
20632         * parse.y (method_header):  Name "this" implicit argument.
20634 1998-07-22  Per Bothner  <bothner@cygnus.com>
20636         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
20637         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
20638         (put_linenumber):  New function.
20639         (generate_bytecode_insns, generate_classfile):  Write line numbers.
20641 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20643         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20644         (lookup_name, build_known_method_ref, build_class_init,
20645         build_invokevirtual, invoke_build_dtable, match_java_method,
20646         build_field_ref, pushdecl_force_head, build_java_binop,
20647         binary_numeric_promotion, build_decl_no_layout,
20648         build_java_arrayaccess, build_newarray, build_anewarray,
20649         build_java_array_length_access, build_java_arraynull_check): New
20650         extern function prototypes.
20651         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20652         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20653         java-tree.h.
20654         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20655         to NULL
20656         * jcf.h (jcf_out_of_synch): New extern function prototype.
20657         * parse.h: Static/global function implemented in parse.y
20658         prototyped and declarations moved at the end of the file.
20659         (DECL_P): Check that the argument isn't null.
20660         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20661         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20662         (QUAL_DECL_TYPE): New macro.
20663         (PARAMS): Macro definition removed.
20664         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20665         (return_statement:): Call build_return.
20666         (field_access:): Call make_qualified_primary in sub rule.
20667         (method_invocation:): Build method invocation and call
20668         make_qualified_primary when processing primaries.
20669         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20670         get_type_from_signature.
20671         (java_check_regular_method): Extra integer 0 argument when calling
20672         lookup_java_method2.
20673         (lookup_java_interface_method2): Extra method DECL argument when
20674         calling lookup_java_interface_method2.
20675         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20676         COMPOUND_EXPR node.
20677         (java_complete_expand_method): Layout current class iff not
20678         already done. Don't process interface's methods.
20679         (java_complete_expand_method): Use super class only if it
20680         exists. Use current class otherwise.
20681         (make_qualified_primary): New function.
20682         (resolve_expression_name): Process qualified expression or
20683         expression from primary the same way.
20684         (resolve_expression_name): Two last arguments to
20685         resolve_field_access are now NULL_TREEs.
20686         (resolve_field_access): New variable is_static. Local field must
20687         be DECLs. is_static computed on field DECLs only. Append code in
20688         where_found to the field access if necessary. Use QUAL_DECL_TYPE
20689         to initialize field_type.
20690         (resolve_qualified_expression_name): New local variable,
20691         previous_call_static and is_static. Handle primaries with function
20692         calls, casts, array references and `this'. `super' now handled as
20693         `(super_class)this'. Use is_static to clarify boolean expressions.
20694         Added code to handle case where a proper handle is required to
20695         access a field. Use QUAL_DECL_TYPE where applicable.
20696         (maybe_access_field): New function.
20697         (patch_method_invocation_stmt): New arguments primary, where,
20698         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20699         deleted. Use `where' as a type to search from if specified. Check
20700         for static method reference where forbidden. Append primary or
20701         current_this to the argument list if not calling constructor nor
20702         static methods.
20703         (check_for_static_method_reference): New function.
20704         (patch_invoke): Layout the class on which new is done if
20705         necessary.
20706         (lookup_method_invoke): Changed format to report errors on
20707         methods.
20708         (qualify_ambiguous_name): New local variable this_found. Now
20709         handle things from primaries. Method call are considered
20710         expression names.
20711         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20712         changed into NULLs.
20713         (not_initialized_as_it_should_p): Comply with the new DECL_P.
20714         (java_complete_tree): New case fo RETURN_EXPR. Process function
20715         call arguments in separate function.
20716         (complete_function_arguments): New function.
20717         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20718         anymore.
20719         (patch_assignment): Take the return function slot into account as
20720         a RHS. Distinguish assignment from a return.
20721         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20722         when checking methods in interfaces.
20723         (resolve_type_during_patch): NULL argument to unresolve_type_p
20724         instead of NULL_TREE.
20725         (patch_newarray): Fixed typo in comment.
20726         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20727         (build_return, patch_return): New functions.
20728         * typeck.c (lookup_java_constructor): Fixed typo in comment.
20730 1998-07-21  Per Bothner  <bothner@cygnus.com>
20732         * constants.c (find_name_and_type_constant, find_fieldref_index,
20733         find_methodref_index):  New methods.
20734         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
20735         just return given method.  Also, rename to build_known_method_ref.
20736         (expand_invoke):  Rename call to build_invoke_non_interface.
20737         * java-tree.h, parse.h:  Update prototype.
20738         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
20739         (such as expand_expr_stmt) if flag_emit_class_files.
20740         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20741         STACK_TARGET, IGNORE_TARGET):  New macros.
20742         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
20743         (generate_bytecode_insn):  New function to generate method's bytecode.
20744         (generate_classfile):  Node generate Code attribute for a method.
20745         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20746         push_long_const, field_op, adjust_typed_op, maybe_wide):
20747         New functions used by generate_bytecode_insn.
20749         * typeck.c (signature_include_return):  Remove variable.
20750         (push_java_argument_signature, build_java_argument_signature):  New.
20751         (build_java_signature):  Use push_java_argument_signature.
20752         * parse.y:  Use build_java_argument_signature instead of fiddling
20753         with signature_include_return.
20755 1998-07-17  Tom Tromey  <tromey@cygnus.com>
20757         * gjavah.c (print_c_decl): Always generate JArray<>* for array
20758         types.
20760         * Makefile.in (all.indirect): Added gjavah$(exeext).
20761         (gjavah$(exeext)): Added $(exeext).
20762         (clean): Likewise.
20764 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20766         * class.c (layout_class): Call to java_layout_parsed_class replace
20767         by safe_layout_class.
20768         * expr.c (build_java_array_length_access): Removed static storage
20769         class in the function definition.
20770         (build_java_arraynull_check): Likewise.
20771         Also fixed typos in two comments.
20772         * lex.c (java_init_lex): Initialize static global kw_length.
20773         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20774         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20775         java_lex_error.
20776         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20777         * parse.h (resolve_no_layout): New static function declaration.
20778         (get_identifier_in_static): Declaration removed.
20779         (java_layout_parsed_class): Function name declaration changed to
20780         safe_layout_class.
20781         (build_newarray_node, patch_newarray, resolve_type_during_patch,
20782         not_initialized_as_it_should_p, build_this): New static function
20783         declarations.
20784         (pushdecl_force_head, build_java_binop, int_fits_type_p,
20785         binary_numeric_promotion, stabilize_reference,
20786         build_decl_no_layout, build_java_arrayaccess): Extern function
20787         declarations moved into their own section.
20788         (build_newarray, build_anewarray, build_java_array_length_access,
20789         build_java_arraynull_check): New extern function declarations.
20790         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20791         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20792         fake tree codes.
20793         (CALL_CONSTRUCTOR_P): New macro.
20794         * parse.y (kw_length): New static global tree node.
20795         (return_statement): Tagged <node>.
20796         (RETURN_TK): Tagged <operator>.
20797         (variable_declarator_id:): Build variable declaration with an
20798         empty initialization value if a syntax error was found in the
20799         initialization part of the variable declaration.
20800         (statement_without_trailing_substatement:): return_statement: now
20801         uses the default rule.
20802         (return_statement:): Temporarily fixed to return NULL_TREE.
20803         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20804         (class_instance_creation_expression:): Class creation rules now
20805         call build_method_invocation upon reduction.
20806         (array_creation_expression:): Rules call build_newarray_node upon
20807         reduction.
20808         (dim_exprs:): Build a list of dimension expressions.
20809         (dim_expr:): Store location of the OSB_TK in the dimension
20810         expression node.
20811         (method_invocation:): Added a new error rule.
20812         (build_unresolved_array_type): WFL argument may also be an array
20813         on a primitive type. Name of the argument changed to reflect this.
20814         (method_declarator): Insert argument type at the beginning of the
20815         argument type list and later reverse the list.
20816         (unresolved_type_p): Argument 'returned' may be optionally
20817         NULL_TREE.
20818         (java_layout_class_from_source): Function renamed
20819         safe_layout_class.
20820         (resolve_and_layout): Now call resolve_no_layout and
20821         safe_layout_class.
20822         (resolve_no_layout): New function.
20823         (purify_type_name): New function.
20824         (complete_class_report_errors): Call purify_type_name during error
20825         report on a type not found.
20826         (process_imports): error_found local variable doesn't need to be
20827         initialized to zero.
20828         (declare_local_variables): New local type_wfl. Fixed typo in error
20829         message. type_wfl assigned to unresolved type and used to register
20830         incomplete type. Build a WFL around the variable initialization
20831         statement so that debug info can be generated on it.
20832         (source_start_java_method): Reverse argument list after they've
20833         been processed.
20834         (current_this): New static global variable.
20835         (java_complete_expand_methods): Set current_this when appropriate.
20836         (resolve_expression_name): Build correct static and non static
20837         field access bearing a simple name.
20838         (resolve_field_access): Resolve the length field of arrays. Handle
20839         f.m() cases.
20840         (patch_method_invocation_stmt): Set the type of the method
20841         invocation to error_mark_node. This value is later overridden by a
20842         valid type, if any. Don't handle qualified constructor invocation
20843         as qualified method invocation. Call lookup_method_invoke with its
20844         new flag. It's no longer necessary to access the selected method
20845         as the value of a tree list. Handle constructor invocation.
20846         (patch_invoke): Reverse argument list when invoking non interface
20847         methods. Insert call to new as the first argument of the
20848         constructor.
20849         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20850         defined within a final class. Return INVOKE_STATIC if the invoked
20851         method is a constructor.
20852         (lookup_method_invoke): New lc argument is a flag to indicate a
20853         constructor lookup. Now handle constructor lookup. Choose the most
20854         specific method in case several were matching the invocation
20855         requirements. Return a method decl instead of a tree list featuring
20856         one single method decl element.
20857         (refine_accessible_methods_list): New lc flag argument to
20858         indicate that a constructor is being looked up.
20859         (not_initialized_as_it_should_p): New function.
20860         (java_complete_tree): Now process fake tree codes
20861         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20862         save_expr on resolved function call arguments. Case on
20863         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20864         (patch_assignment): LHS can be a field access expression. When
20865         dealing with reference, lhs_type is the promoted type of the
20866         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20867         applicable.
20868         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20869         (patch_binop): Use not_initialized_as_it_should_p where
20870         applicable.
20871         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20872         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20873         where applicable.
20874         (resolve_type_during_patch): New function.
20875         (patch_cast): Call resolve_type_during_patch to resolve type and
20876         report error accordingly.
20877         (patch_array_ref): Use not_initialized_as_it_should_p where
20878         applicable. Array base expression is saved before being
20879         used. Promote the type of an array elements if it contains non
20880         builtin types.
20881         (build_newarray_node, patch_newarray, build_this): New functions.
20883 1998-07-16  Tom Tromey  <tromey@cygnus.com>
20885         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20886         increment it in `for' statement.
20887         (print_field_info): If number is inf or nan, don't print it.
20888         (print_method_info): If method name is `delete', just ignore it.
20889         (print_c_decl): Special-case jstringArray.
20891         * gjavah.c (help): New function.
20892         (no_argument): New function.
20893         (usage): Changed text.
20894         (main): Rewrote argument handling.  Now handles -v, --help,
20895         --version.
20896         (version): New function.
20897         (found_error): New global.
20898         (main): Return found_error.
20899         (generate_access): Set found_error.
20900         (print_c_decl): Likewise.
20902 1998-07-15  Tom Tromey  <tromey@cygnus.com>
20904         * gjavah.c (print_c_decl): Don't print "," when examining field.
20905         Skip type name when looking at "[L" types.
20906         (process_file): Now static.
20907         (generate_access): Now returns int.
20908         (last_access_generated): New global.
20909         (process_file): Clear last_access_generated; make multiple passes
20910         over the class.
20911         (print_field_info): Just return if generate_access returns true.
20912         (print_method_info): Likewise.  Also, allow <init> functions to
20913         pass through.
20914         (print_c_decl): Added is_init argument.  Print constructors
20915         properly.
20916         (print_cxx_classname): Use UTF8_GET to extract characters from
20917         string.
20918         (print_base_classname): New function.
20919         (print_class_decls): New function.
20920         (process_file): Use it.
20921         (utf8_cmp): New function.
20923 1998-07-13  Nick Clifton  <nickc@cygnus.com>
20925         * lang-options.h: Format changed to match changes in gcc/toplev.c
20926         to implement a --help option.
20928 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
20930         * decl.c (init_decl_processing): Revert change to dtable_type.
20932 1998-07-09  Per Bothner  <bothner@cygnus.com>
20934         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20936 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
20938         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20940         * lang.c (lang_init): Default flag_exceptions to 1, without
20941         checking to see if it's 2 first.
20943 1998-07-08  Jeffrey A Law  (law@cygnus.com)
20945         * constants.c: Include "system.h".
20946         * decl.c: Likewise.
20947         * lang.c (flag_new_exceptions): Get via extern now.
20948         (lang_init_options): New functions.  Turn on flag_new_exceptions.
20950 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20952         * lex.c (java_lex): Return 0 when we see an invalid character in
20953         the input.
20955         * lex.c (java_read_char): Specify extra argument when calling
20956         java_lex_error.
20957         (java_read_unicode, java_parse_end_comment,
20958         java_parse_escape_sequence): Likewise,
20959         (java_lex): Specify extra argument when calling
20960         java_lex_error. Test that IDs are beginning with a legal character
20961         for IDs. Handle invalid characters with an error message and a
20962         call to java_lex_error.
20963         (java_lex_error): Adjust column position by new argument
20964         `forward'. Issue an error even if in the middle of reporting an
20965         other error.
20967 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
20969         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20970         we don't explicitly put a null pointer when we're copying it.
20972 1998-07-07  Tom Tromey  <tromey@cygnus.com>
20974         * gjavah.c (print_cxx_classname): New function.
20975         (super_class_name): Likewise.
20976         (print_super_fields): Removed.
20977         (in_super): Removed.
20978         (print_field_info): Never generate #defines.
20979         (print_c_decl): Changed generated types to match JNI.  No longer
20980         print class name before method name.
20981         (print_method_info): Print "static" before static methods.
20982         Print "virtual" before non-final methods.
20983         (usage): Use exit(1), not exit(-1).
20984         (main): Likewise.
20985         (print_field_info): Use %.17g to print a double.
20986         (last_access): New globals.
20987         (process_file): Initialize last_access.
20988         (usage): Now static.
20989         (ACC_VISIBILITY): New define.
20990         (generate_access): New function.
20991         (print_field_info): Call it.
20992         (print_method_info): Likewise.  Also, generate information for all
20993         methods, not just native methods.  Return void.
20994         (print_c_decl): Return void.
20995         (print_field_info): Return void.
20997 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20999         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
21000         processing the jc1 grammar file. Prefix bison functions and
21001         variables with java_.
21002         (parse.c): Dependencies on parse.h and lex.h
21003         * expr.c (build_java_arrayaccess): Function now global.
21004         * java-tree.h: Comment reorganized to carry on previous
21005         classification effort.
21006         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
21007         RESOLVE_TYPE_NAME_P): New flags on WFLs.
21008         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
21009         java_parse (new prefix java_ generated by bison).
21010         (java_layout_parsed_class, java_register_parsed_class): Function
21011         call removed.
21012         (yyparse): Removed unnecessary call to init_outgoing_cpool.
21013         * lex.c (static tree wfl_op): Variable deleted.
21014         (java_init_lex): Initialize kw_super and kw_this. Initialize more
21015         ctxp fields to NULL_TREE.
21016         (java_lex): No longer create WFL for operators. Filename caching
21017         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
21018         created as STRING_CST and later expanded. Removed extra argument
21019         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
21020         and SUPER.
21021         (build_wfl_node): Removed code in comments.
21022         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
21023         store token and location data in the current bison token.
21024         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
21025         static/extern function declaration at the beginning of the file.
21026         (struct qualification): Data structure definition deleted.
21027         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
21028         (qualify_ambiguous_name): Function declaration modified. Function
21029         now returns nothing.
21030         (build_array_ref, patch_array_ref, make_qualified_name,
21031         resolve_qualified_expression_name, maybe_generate_clinit,
21032         resolve_field_access): New static function declarations.
21033         (build_java_arrayaccess): New extern function declaration.
21034         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
21035         (CALL_EXPR_PRIMARY): Macro deleted.
21036         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
21037         (struct parser_ctxt): Field initialized_final
21038         removed. non_static_initialized, static_initialized: New fields.
21039         * parse.y (static tree kw_super, static tree kw_this): New global
21040         static.
21041         (%union): tree wfl field of operator member replaced by int
21042         location. WFLs are non longer created for operators.
21043         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
21044         (qualified_name:): Now calls make_qualified_name to build the
21045         identifier.
21046         (type_declaration:): Consider generating <clinit> when class
21047         parsing completed.
21048         (variable_declarator:): Directly build an assignment node when the
21049         variable is initialized when declared.
21050         (this_or_super:): Build a WFL and set current location when THIS
21051         or SUPER are parsed.
21052         (expression_statement:): Wrap statement around a WFL.
21053         (primary_no_new_array:): Fixed typo. Changed value returned by
21054         THIS_TK because of its new type (temporary).
21055         (dim_exprs:): Temporary fix because of OSB_TK's new type.
21056         (field_access:): Build qualified name with SUPER.
21057         (method_invocation:): Fixed returned value because of SUPER's new
21058         type.
21059         (array_access:): Use OSB_TK location information.
21060         (post_increment_expression:, post_decrement_expression:,
21061         unary_expression:, pre_increment_expression:,
21062         pre_decrement_expression:, unary_expression_not_plus_minus:,
21063         cast_expression:, multiplicative_expression:,
21064         additive_expression:, shift_expression:, relational_expression:,
21065         equality_expression:, and_expression:, exclusive_or_expression:,
21066         inclusive_or_expression:, conditional_and_expression:,
21067         conditional_or_expression:, assignment:): Use new location/token
21068         information available on operators.
21069         (create_class): Set super_decl_type to NULL_TREE when processing
21070         java.lang.Object.
21071         (register_fields): Field initialization is now a MODIFY_EXPR
21072         node. Chain initialization code to the matching lists (according
21073         to the field declaration modifiers).
21074         (maybe_generate_clinit): New function.
21075         (method_header): Don't set method's DECL_NAME to a WFL when adding
21076         methods to java.lang.Object.
21077         (resolve_and_layout): Now can return NULL_TREE if the type
21078         resolution fails. Otherwise, return the class DECL instead of its
21079         TYPE.
21080         (check_method_redefinition): Don't patch method DECL_NAME if it
21081         belongs to java.lang.Object.
21082         (process_imports): Simply assign error_found to the value returned
21083         by check_pkg_class_access.
21084         (declare_local_variables): Don't use their init statements (if
21085         any) when parsing error were previously found. Reuse MODIFY_EXPR
21086         build during parsing as an init statement.
21087         (java_method_add_stmt): Now return the current method body.
21088         (java_layout_parsed_class, java_register_parsed_class): Functions
21089         removed.
21090         (java_complete_expand_methods): Initialize the constant pool on a
21091         per class basis. Layout the classes before expanding their method
21092         bodies. Don't try expand artificial constructor code if error were
21093         found. Make the classes data and register them if no error were
21094         found.
21095         (java_complete_expand_method): Retrieve an artificial constructor
21096         argument list before entering its body. Assign the top block to
21097         the artificial constructor function body and set types of declared
21098         blocks and compound statements to void. Walk method body if not an
21099         artificial constructor.
21100         (make_qualified_name, cut_identifier_in_qualified): New functions.
21101         (resolve_expression_name): Fixed comments. Save/restore the
21102         current class CLASS_LOADED_P flag value. Build non qualified
21103         static field access and handle qualified expression names.
21104         (resolve_field_access, resolve_qualified_expression_name): New
21105         functions.
21106         (patch_method_invocation_stmt): Use the new expression resolution
21107         scheme, calling resolve_field_access when the function call is
21108         resolved as an expression.
21109         (qualify_ambiguous_name): Function rewritten to work on qualified
21110         expression produced by make_qualified_name.
21111         (java_complete_tree): Promote type when function's argument are
21112         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
21113         the assignment to discover further errors if RHS is a expression
21114         name that fails to evaluate. Declare LHS initialized even though
21115         the assignment failed. Don't use the location variable and removed
21116         extra argument in patch function calls. Now handle the ARRAY_REF
21117         case and build internal string representation when STRING_CSTs are
21118         walked.
21119         (build_method_invocation): Don't wrap function call around a WFL.
21120         (build_assignment): Likewise. Use the operator location
21121         information.
21122         (patch_assignment): Handle array access LHSs. Handle error
21123         provenance, resulting in a better error report.
21124         (build_binop): Use op_location from operator as binop location
21125         information.
21126         (build_unaryop, build_incdec, build_cast): Likewise.
21127         (patch_binop): Extract location information from the node. Fixed
21128         typo in error message.
21129         (patch_unary_op): Extract location information from the node.
21130         (build_array_ref, patch_array_ref): New functions.
21132 1998-07-01  Tom Tromey  <tromey@cygnus.com>
21134         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
21135         match _Jv_IsInstanceOf.
21136         * decl.c (init_decl_processing): Use _Jv_NewArray, not
21137         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
21139 1998-06-30  Tom Tromey  <tromey@cygnus.com>
21141         * decl.c (init_decl_processing): Functions are now named
21142         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
21144 1998-06-29  Per Bothner  <bothner@cygnus.com>
21146         * java-tree.h (load_class):  Add prototype.
21147         * class.c (is_compiled_class):  Add missing arg to load_class.
21148         * expr.c (expand_java_NEW):  Call load_class.
21149         * parse.y (process_import):  Removed bogus use of void return value.
21151 1998-06-25  Per Bothner  <bothner@cygnus.com>
21153         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
21154         Function name is "_Jv_Throw" instead of "soft_athrow".
21155         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
21156         Function name is "_Jv_AllocObject" instead of "soft_new".
21157         Takes an extra parameter (object size).
21158         * expr.c:  Update calls.
21160 1998-06-24  Per Bothner  <bothner@cygnus.com>
21162         * lex.c (java_get_line_col):  Handle end-of-file.
21163         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
21165 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
21167         * lang.c (lang_init): Make -fexceptions the default.
21168         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
21169         exception handling is not turned on.
21171 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
21173         * lang.c (flag_new_exceptions): Make this this default.
21174         * decl.c (end_java_method): Call emit_handlers.
21175         * except.c (method_init_exceptions): Set language code and version.
21176         (expand_start_java_handler): Enable exception, and call
21177         expand_eh_region_start.
21178         (expand_end_java_handler): Enable exception, and set up catch blocks.
21179         (emit_handlers): New routine to generate the saved handlers.
21180         * java-except.h (emit_handlers): Add prototype.
21182 1998-06-12  Per Bothner  <bothner@cygnus.com>
21184         We used to have three different representations of the constant pool:
21185         the CPool structure, the tree_constant_pool, and the constructures
21186         used to build the Class object (which may need class and string
21187         constants) in compiled code.  None were appropriate for compiling
21188         to .class files, so I did a major overhaul.
21190         First, the tree_constant_pool array was removed.  Things were
21191         modified to the CPool structure in the JCF could be used.
21192         Second, a "capacity" field was added to the CPool, and functions
21193         written to search for a matching constant, adding one if not found.
21194         The code that generated the Class object was changed to use a CPool.
21195         The actual TREE_LISTs used to build the CONSTRUCTORs used for
21196         the static Class object are now only in build_constants_constructor.
21197         Finally, I wrote code which can generate a .class file (including its
21198         constant pool) from the RECORD_TYPE of a class.  This is a big step
21199         on the way to compiling Java source into .class files.
21201         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
21202         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
21204         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21205         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
21206         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21207         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21208         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
21209         (lang_type):  Removed constant_pool field.
21210         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
21211         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21212         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
21213         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21215         * constants.c (current_constant_pool_tags, current_constant_pool_data,
21216         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21217         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
21218         (set_constant_entry, find_constant1, find_constant2,
21219         find_class_constant, count_constant_pool_bytes, write_constant_pool,
21220         find_utf8_constant, find_class_or_string_constant):  New functions.
21222         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
21223         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
21224         (give_name_to_class, get_class_constant):  Likewise.
21225         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
21226         (get_name_and_type_constant, get_ref_constant):  Removed.
21227         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
21228         * parse.y:  Don't save/restore tree_constant_pool.
21229         * verify.c (verify_jvm_instructions):  Update for new approach.
21230         * expr.c (expand_invoke, expand_java_field_op): Likewise.
21232         * lang-options.h:  Added -femit-class-file, -femit-class-files.
21233         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
21234         (lang_f_options):  Added "emit-class-file(s)".
21236         * expr.c (build_java_arrayaccess):  Generate more efficient array
21237         bounds checking, by using unsigned compare.
21239         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
21241 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21243         * parse.h: New comment on the handling of unresolved type
21244         identifiers. JDEPs are now part of the jdep_code enum.
21245         (typedef struct jdep): Now use enum jdep_code or int, depending on
21246         availability. Both are narrowed down to an 8 bits bitfield.
21247         (CALL_EXPR_PRIMARY): Fixed comment.
21249 1998-06-10  Tom Tromey  <tromey@cygnus.com>
21251         * Make-lang.in (java): Added gjavac and jvgenmain.
21252         (java.start.encap): Depend on gjavac.
21253         (java.rest.encap): Depend on jvgenmain.
21255         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21256         (JAVA_CROSS_NAME): Likewise.
21257         (java.all.build): Depend on jvgenmain and gjavac.
21258         (java.all.cross): Depend on jvgenmain and gjavac-cross.
21259         (jvgenmain$(exeext)): New target.
21260         (java.install-common): Wrote.
21261         * config-lang.in (compilers, stagestuff): Added gjavac and
21262         jvgenmain.
21264 1998-06-10  Dave Brolley  <brolley@cygnus.com>
21266         * lang.c (lang_decode_option): New argc/argv interface.
21268 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21270         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21271         * decl.c (build_decl_no_layout): New function.
21272         * expr.c (java_lang_expand_expr): Layout declarations found in
21273         blocks before they're pushed.
21274         * jcf-parse.c (load_class): Save current line when parsing class
21275         file.
21276         (parse_source_file): Register class before expanding their
21277         methods.
21278         * lang.c (put_decl_node): Produce `null' when `void *' is
21279         processed.
21280         * lex.c (static tree wfl_op): New static global, for error report
21281         on casts.
21282         (java_init_lex): wfl_operator and wfl_op initialized
21283         here. Filename caching added for wfl_op. Return wfl_op when `(' is
21284         parsed.
21285         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21286         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21287         build_unresolved_array_type): New static function definitions.
21288         (build_decl_no_layout): New extern function declared.
21289         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21290         faulty modifier exists.
21291         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21292         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21293         (UNARY_PLUS_EXPR): New fake operator.
21294         (struct parser_ctxt): New field osb_number.
21295         * parse.y (static tree wfl_operator): New static WFL for operator
21296         bound error messages.
21297         (DECR_TK, INCR_TK): Moved.
21298         (OP_TK): Tagged <operator>.
21299         (array_type:): Now call build_unresolved_array_type.
21300         (dim_expr:): Count the number of '[' seen.
21301         (post_increment_expression, post_decrement_expression,
21302         pre_increment_expression, pre_decrement_expression,
21303         unary_expression_not_plus_minus, unary_expression:): Actions are
21304         now building the corresponding unary expressions.
21305         (cast_expression:): Actions are now building cast expressions.
21306         (build_unresolved_array_type): New function.
21307         (create_interface): Reset the number of declared interfaces.
21308         (create_class): Likewise.
21309         (method_header): Methods declared within the scope of an interface
21310         are now implicitly set public and abstract.
21311         (java_complete_class): Variable's and parameter's type are patched
21312         with a promoted type.
21313         (declare_local_variables): Resolved non builtin types are promoted
21314         before being used to build a variable decl. Removed type patch
21315         posted on variable initialization statement.
21316         (source_start_java_method): Use build_decl_no_layout to build the
21317         decl of a parameter of incomplete type.
21318         (java_register_parsed_class): Process interfaces too. Call
21319         rest_of_decl_compilation on each processed class declarations.
21320         (java_complete_expand_methods): Don't attempt to expand things in
21321         interfaces.
21322         (java_complete_tree): Process CONVERT_EXPR, even though it always
21323         has a type. Propagate error_mark_node to node's type too. Promote
21324         method's call argument type and return error_mark_node if
21325         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21326         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21327         handle unary operator nodes.
21328         (build_assignment): Added comment.
21329         (print_int_node): New function.
21330         (patch_assignment): New second argument. New error handling. Use
21331         print_int_node. Handle references. Use can_cast_to_p to issue
21332         different error message according to the context and check upon
21333         the initialization of the RHS.
21334         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21335         (operator_string): Handle more operators.
21336         (patch_binop): No longer use a function static
21337         wfl_operator. Improved error message on shift distance.
21338         (build_unaryop, build_incdec, build_cast, patch_unaryop,
21339         patch_cast): New functions.
21341 1998-06-05  Per Bothner  <bothner@cygnus.com>
21343         * jvspec.c:  New file.
21344         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
21346         * java-tree.h (identifier_subst):  Add declaration.
21348 1998-06-04  Tom Tromey  <tromey@cygnus.com>
21350         * jvgenmain.c (main): Generate call to JvRunMain.
21352         * class.c (make_class_data): Push value for "sync_info" field.
21353         * decl.c (init_decl_processing): Push "sync_info" field.
21355 1998-06-03  Per Bothner  <bothner@cygnus.com>
21357         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
21358         Java (source) name, not signature.
21359         Set TYPE_ALIGN to (at least) that of element_type.
21361 1998-06-02  Per Bothner  <bothner@cygnus.com>
21363         * class.c:  Moved classname-mangling-rekated code to ...
21364         * mangle.c:  ... this new file.
21365         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
21366         * Makefile.in:  Update for above changes.
21368 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21370         * expr.c (truthvalue_conversion): Convert integer and floating
21371         point value to their truth value.
21372         * lex.c (java_lex): Handle the `null' literal.
21373         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21374         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21375         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21376         New macros.
21378         * parse.y: Reorganization/documentation on token declaration.
21379         (binop_lookup[]): New added new tree codes.
21380         (relational_expression): Build corresponding binary operators.
21381         (equality_expression, conditional_and_expression,
21382         conditional_or_expression): Likewise.
21383         (java_complete_class): Fix crash in debug message.
21384         (java_complete_tree): Check initialization of method call
21385         arguments. Further bogus node evaluation to detect more error
21386         during assignments. Handles more binary operators.
21387         (patch_assignment): Use DECL_P.
21388         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21389         code.
21390         (operator_string): Handle more case. Compacted source.
21391         (patch_binop): Changed function comment. Checking for
21392         uninitialized first operand takes the compound assignment into
21393         account and uses DECL_P. Checking for uninitialized second operand
21394         delayed to routine's end. Use macros to issue type bound error
21395         messages and issue messages on both operands if their types are
21396         different. Force fixed type into node. Handle all binary
21397         operators.
21399 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21401         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21402         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21403         build operator node and return tokens.
21404         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21405         * parse.h (java_complete_tree): Changed returned type in prototype.
21406         (build_method_invocation, build_assignment, patch_assignment,
21407         patch_binop): New static function declarations.
21408         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21409         BUILD_EXPR_WFL): New macros.
21410         * parse.y (enum tree_code binop_lookup[]): New static for token to
21411         TREE_CODE lookup.
21412         (%union): Parser union has new sub-structure `operator'.
21413         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21414         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21415         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21416         ASSIGN_ANY_TK): Tokens tagged `operator'.
21417         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21418         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21419         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21420         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21421         (assignment_operator:): Rule tagged `operator'.
21422         (expression_statement:): Re-installed default rule.
21423         (method_invocation:): Sub rules call build_method_invocation.
21424         (postfix_expression:): Don't attempt to resolve name here. Just
21425         return an ID.
21426         (multiplicative_expression:): Sub-rules build corresponding binop
21427         expression node.
21428         (additive_expression:, shift_expression:, and_expression:,
21429         exclusive_or_expression:, inclusive_or_expression:): Likewise.
21430         (assignment:): Sub rule invoke build_assignment.
21431         (assignment_operator:): Default rules on sub rules.
21432         (force_error): Added documentation on this variable.
21433         (declare_local_variables): Build initialization calling
21434         build_assignment.
21435         (expand_start_java_method): Removed unused rtx declaration. Mark
21436         arguments as already initialized.
21437         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21438         (java_complete_expand_methods): Don't process next method if
21439         completion of the previous one triggered errors.
21440         (java_complete_expand_method): Call source_end_java_method if no
21441         error were found during completion.
21442         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21443         locals declaratilon. Handle names found within a class. Return
21444         error_mark_node when things aren't found.
21445         (patch_method_invocation_stmt): Return error_mark_node on failures.
21446         (patch_invoke): Removed unused local. Return the correct node.
21447         (java_complete_tree): Now returns a value. The BLOCK section binds
21448         local identifiers and the type of a BLOCK is now void. Assign the
21449         result of operand completion on COMPOUND_EXPR. Assign the
21450         encapsulated node of a WFL to the result of its completion, except
21451         when the node is an identifier. Now handle MODIFY_EXPR and several
21452         binary operators. Return error_mark_node on errors.
21453         (build_method_invocation, build_assignment, patch_assignment,
21454         build_binop, operator_string, patch_binop): New functions.
21455         * typeck.c (binary_numeric_promotion): New function.
21457 1998-05-21  Per Bothner  <bothner@cygnus.com>
21459         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
21460         Replace most uses of ident_subst by identifier_subst.
21462         * class.c (push_class_static_dummy_field):  Removed function.
21463         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
21464         instead of looking got "class" static field.  Create that decl here.
21465         (class_identifier_node):  Removed;  no longer needed.
21466         (init_class_processing):  Don't init class_identifier_node.
21467         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
21468         Do nreverse 0 times (instead of twice) for Object and Class.
21469         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21471 1998-05-20  Per Bothner  <bothner@cygnus.com>
21473         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
21474         while initializing linenumber_count and linenumber_table.
21475         Do it before init_function_start (which calls emit_line_note).
21476         * expr.c (expand_byte_code):  Don't need to clear lineno here.
21478 1998-05-18  Tom Tromey  <tromey@cygnus.com>
21480         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21481         then mangle number as _N_.
21483         * class.c (mangle_class_field): New function.
21484         (build_class_ref): Set assembler name of class reference using
21485         mangle_class_field.
21486         (push_class_static_dummy_field): Likewise.
21488 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
21490         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21491         of assigning to TREE_CODE.  The latter method exploits a feature
21492         of GCC that is not ANSI compliant.
21494 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21496         * decl.c (pushdecl_force_head): New function.
21497         (pushlevel): Removed conditional printf.
21498         (complete_start_java_method): Don't enter local variable scope if
21499         function is compiled from source code.
21500         * expr.c: parse.h now included
21501         (java_lang_expand_expr): New function.
21502         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21503         printf. Terminate buffer when doing directories.
21504         * jcf-parse.c (parse_source_file): Call lang_init_source before
21505         parsing and before code generation.
21506         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21507         use printf if the macro is defined.
21508         * lang.c (lang_init): Install lang_expand_expr hook on
21509         java_lang_expand_expr.
21510         (java_dummy_print): New function.
21511         (lang_init_source): New function.
21512         * lex.c (java_lex): Remember location of an opening brace at the
21513         second nesting level.
21514         (java_is_eol): Unget character seen after a CR if it is EOF.
21515         * parse.h: Now includes lex.h
21516         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21517         printf if the macro is defined.
21518         (expand_start_java_method, build_expr_block, enter_block,
21519         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21520         New static function declarations.
21521         (pushdecl_force_head): New extern function declaration.
21522         (INCOMPLETE_TYPE_P): New macro.
21523         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21524         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21525         BLOCK_EXPR_ORIGIN): New macros.
21526         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21527         DECL_SOURCE_LINE_LAST): New macros.
21528         (struct parser_ctxt): Removed field current_method_decl, redundant
21529         with the field current_function_decl. Added fields
21530         first_ccb_indent1 and pending_block.
21531         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21532         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21533         tagged <node>
21534         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21535         (compilation_unit:): Cosmetic on sub rule.
21536         (type_declaration:): Cosmetic on sub rules. Added an error rule.
21537         (variable_initializer:): Installed default rule on expression:.
21538         (method_declaration:): method_header: starts a new
21539         method. method_body: installs the function body, absorbs blocks
21540         emitted for temporary variable scopings, pops function's body block
21541         and merges function's last statement lineno in DECL_SOURCE_LINE.
21542         (method_body:): Installed default rules.
21543         (block:): Call enter_block when an opening brace is seen.  Absorb
21544         scoping blocks and call exit_block when a closing brace is seen.
21545         (block_statement:): Cosmetic changes.
21546         (method_invocation:): Create WFL around CALL_EXPR node.
21547         (patch_stage): Added comment around definition.
21548         (method_header): Try to use first_ccb_indent1 as the first line of
21549         the method, so BP debug info are emitted at the first opening
21550         brace of the function. If the function has no body, use the
21551         location of the function's name. Override currently defined method
21552         name with the matching WFL so we can point redefinition errors
21553         using the location where the function's name was declared.
21554         (check_abstract_method_header): Interprets DECL_NAME as an
21555         identifier or as a WFL, accordingly.
21556         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21557         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21558         location and name information out of it and reinstall DECL_NAME to
21559         its original identifier node value.
21560         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21561         function's source code).
21562         (read_import_dir): Test the value returned by find_class and issue
21563         a fatal accordingly.
21564         (declare_local_variables): Push a new block for the scope of the
21565         new variable(s) if code has been already generated at that nesting
21566         level. Pinpoint redefinition errors using the variable id
21567         WFLs. Generate initialization code if necessary. If the variable
21568         type is incomplete, register a patch on its decl.
21569         (source_start_java_method): Rewritten. Define a new block for the
21570         function's parameters. Build parameter decl out of function's
21571         arguments and register them for a patch if their types are
21572         incomplete.
21573         (expand_start_java_method): Includes the part of
21574         source_start_java_method that was pushing the parameter decls and
21575         completing the method start code.
21576         (source_end_java_method): Removed call the expand_end_bindings and
21577         poplevel (already taken care of). Reinstall function's arguments
21578         and get function's last line of code before calling
21579         expand_function_end.
21580         (java_method_add_stmt): New comment before the function's
21581         code. Complement the second operand of the current COMPOUND_EXPR
21582         if necessary.
21583         (java_complete_expand_methods): Don't generate debug info on line
21584         zero when expanding a generated constructor.
21585         (java_complete_expand_method): Set start and end line numbers for
21586         a artificially generated constructor to one and manually call
21587         enter_block and exit_block when defining it. For all methods:
21588         expand function's start calling the new expand_start_java_method
21589         and invoke java_complete_tree on the effective method's body, if
21590         any.
21591         (resolve_expression_name): Now use lookup_name_in_blocks to search
21592         local variable decls and print out an error when variables are
21593         undefined.
21594         (patch_method_invocation_stmt): Inserted comment before the
21595         function's code.
21596         (lookup_method_invoke): Chain method's arguments using chainon
21597         with the current arg list as a second argument. Inserted missing
21598         IDENTIFIER_POINTER when reporting an error on methods not found.
21599         (refine_accessible_methods_list): Don't retain constructors.
21600         (patch_arguments): Function removed.
21601         (java_complete_tree): Inserted comment before the function's
21602         code. New case for BLOCKs. Moved the WFL case a bit
21603         further. Complete function's arguments.
21604         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21605         maybe_absorb_scoping_blocks): New functions.
21607 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21609         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21610         previously set.
21611         * jcf-parse.c (parse_source_file, java_error_count): New forward
21612         and extern declarations.
21613         (java_parse_abort_on_error): Macro moved.
21614         (jcf_parse_source): fatal called if fopen fails. Now calls
21615         parse_source_file.
21616         (parse_source_file): New parse_only parameter. Reflects the
21617         elimination of the second pass.
21618         (yyparse): parse_source_file called with argument set to 0.
21619         * jcf.h (JCF_ZERO): Sets java_source to zero.
21620         * lex.c (java_init_lex): pass argument is gone. Function modified
21621         to be called once during the analysis of a file.
21622         (java_unget_unicode): Fixed typo in fatal message.
21623         (java_get_line_col): Likewise.
21624         (java_lval): Likewise. String literals no longer built during
21625         second pass.
21626         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21627         account.
21628         * parse.h (MODIFIER_WFL): New macro.
21629         (parse_check_super, parser_check_super_interface): Now return int.
21630         (parser_chain_incomplete_item, not_builtin_p,
21631         complete_method_decl): Declarations removed.
21632         (build_method_invocation_stmt, build_invoke): Renamed using the
21633         `patch' instead of `build'
21634         (register-incomplete_type, obtain_incomplete_type,
21635         java_complete_tree, java_complete_expand_method,
21636         unresolved_type_p, create_jdep_list): New function declarations.
21637         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21638         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21639         (jdep): New typedef on new struct _jdep.
21640         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21641         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21642         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21643         JDEP_RESOLVED_P): New macros.
21644         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21645         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21646         JDEP_VARIABLE): New enum values and jdep kinds.
21647         (jdeplist): New typedef on struct _jdeplist.
21648         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21649         macros.
21650         (CALL_EXPR_PRIMARY): New macro.
21651         (struct parser_ctxt): Fields java_pass, current_method_decl,
21652         method_decl_list deleted. New field jdeplist.
21653         (INCOMPLETE_P): Macro deleted.
21654         * parse.y (single_type_import_declaration:): Removed pass switch.
21655         (type_import_on_demand_declaration): Likewise.
21656         (field_declaration:): Removed pass switch on all sub rules.
21657         (class_declaration:): Call the complete_class_decl removed on
21658         class_body rules.
21659         (method_declaration:): Removed second pass switch. No longer chain
21660         methods decl when method_header reduced.
21661         (method_header:): Sub rules no longer depend on pass switch.
21662         (method_declarator:): Likewise.
21663         (method_body:): Likewise.
21664         (abstract_method_declaration:): Likewise.
21665         (block_statement:): Likewise.
21666         (local_variable_declaration:): Likewise.
21667         (argument_list:): Likewise.
21668         (method_invocation:): Likewise. Call to build_method_invocation_stmt
21669         removed. Partial CLASS_EXPR tree node built instead.
21670         (postfix_expression:): Removed pass switch on all sub rules.
21671         (java_pop_parser_context): Free classd_list content.
21672         (yyerror): Call obstrack_grow0 to finalize error message.
21673         (check_class_interface_creation): Comment modified to reflect new
21674         returned value meaning. Removed second pass switch. Return 1 if an
21675         error was found, 0 otherwise. Adjust pointer on filename if a
21676         leading path separator was found.
21677         (maybe_create_class_interface_decl): Removed first pass switch
21678         when linking the class decl to the class_list. Install a new
21679         jdep_list for the class.
21680         (add_superinterfaces): List of unresolved interfaces is
21681         gone. Unresolved interfaces are directly added to the current
21682         dependencies list.
21683         (create_interface): Second pass shortcut removed.
21684         ctpx->modifier_ctx access through MODIFIER_WFL.
21685         (create_class): Second pass shortcut removed. Call to
21686         register_incomplete_type replaces the call to
21687         parser_chain_incomplete_item.
21688         (complete_class_decl): Function removed.
21689         (duplicate_declaration_error): New way of retrieving redeclared
21690         item type.
21691         (register_fields): Call to lookup_modifier_cl replaced by
21692         MODIFIER_WFL. New way of handling unresolved type, using
21693         unresolved_type_p and obtain_incomplete_type.
21694         register_incomplete_type replaces call to parser_chain_incomplete_item.
21695         (patch_stage): New static global variable.
21696         (method_header): New way of handling unresolved type, using
21697         unresolved_type_p and obtain_incomplete_type. patch_stage used to
21698         indicates that the method decl needs to be patched.
21699         (check_abstract_method_header): Call to lookup_modifier_cl
21700         replaced by MODIFIER_WFL.
21701         (method_declarator): Incomplete argument type are registered
21702         calling register_incomplete_type. Patch on the declared method is
21703         issued in that case.
21704         (unresolved_type_p): New function.
21705         (parser_check_super_interface): New comment to reflect function's
21706         modified returned type (int). Function and has a new argument
21707         this_wfl. Call to parse_error_context uses this_wfl instead of
21708         relying on lookup_cl.
21709         (parser_check_super): Comment reflects function's new returned
21710         type (int). Function returns nonzero value on error.
21711         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21712         register_incomplete_type, jdep_resolve_class): New functions to
21713         handle incomplete types in declarations.
21714         (java_complete_class): Rewritten to work with the new incomplete
21715         type handling scheme.
21716         (complete_class_report_errors): Likewise.
21717         (complete_method_decl): Removed: it jobs is now handled by
21718         java_complete_class.
21719         (do_resolve_class): Class loaded in not already loaded and not
21720         found in Java source code.
21721         (java_check_regular_methods, java_check_abstract_methods): Don't
21722         call complete_method_decl anymore.
21723         (lookup_modifier_cl, not_builtin_p): Functions deleted.
21724         (read_import_dir): Got rid of the pass number dependency.
21725         (declare_local_variables): New handling of unresolved types (patch
21726         issued).
21727         (source_start_java_method): New parameter level. Function called
21728         with level set to 1 when argument types are potentially
21729         unresolved.  Called to complete the job with level set to 2 once
21730         types are complete.
21731         (source_end_java_method): Call to permanent_allocation
21732         removed. Waiting to be replaced by a more suitable obstack
21733         management.
21734         (java_complete_expand_methods, java_complete_expand_method,
21735         java_expand_finals): New functions.
21736         (build_method_invocation_stmt): Renamed
21737         patch_method_invocation_stmt. Extracts function call expression
21738         (wfl) and arguments (args) from CALL_EXPR tree operands.
21739         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21740         call. Patch the function and argument operand of the CALL_EXPR
21741         tree argument.
21742         (patch_argument, java_complete_tree): New functions.
21744 1998-04-20  Per Bothner  <bothner@cygnus.com>
21746         Recover from missing fields and methods (i.e. error instead of fatal).
21747         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
21748         * expr.c (expand_invoke):  Recover from missing method.
21749         (expand_java_field_op):  Recover from missing field.
21750         Inline references to java.lang.{Integer,Char,...}.TYPE.
21751         * typeck.c (get_type_from_signature), java-tree.h:  New function.
21752         * class.c (add_method):  Use get_type_from_signature.
21753         (build_class_ref):  Handle a class that was not found.
21754         * typeck.c (convert):  Handle conversion to pointers (for convenience).
21755         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
21756         instead of lookup_field to handle missing fields.
21758         * jcf-parse.c (process_zip_dir):  Set java_source.
21760 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
21762         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21764 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21766         * jcf-parse.c (load_class): Don't change input_filename before
21767         calling jcf_parse_source (but still do it before calling
21768         jcf_parse).
21769         (jcf_parse_source): Assign input_filename after having saved the
21770         parser context.
21771         * lex.c (java_init_lex): Chain a WFL node to the import on demand
21772         list. ctxp->modifier_ctx zeroed according to its new
21773         definition. ctxp->filename initialized. Removed
21774         JAVA_MODIFIER_CTX_UNMARK.
21775         (java_unget_unicode): Update the character based column position.
21776         (java_allocate_new_line): ref_count not used anymore. Always free
21777         ctxp->p_line. Initialize c_line->char_col to 0.
21778         (java_get_unicode): Update the character based column position.
21779         (java_lex): Use ctxp->elc to store current position in source
21780         file, at the beginning of the parsed token. Set modifier_ctx entry
21781         corresponding to the parse modifier to a WFL node. Return a WFL
21782         node when an identifier is parsed.
21783         (java_lex_error): Now uses ctxp->elc to store current position in
21784         source.
21785         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21786         * lex.h (build_wfl_node): New function definitions.
21787         (struct java_line): ref_count and next fields are gone. New field
21788         char_col.
21789         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21790         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21791         (JAVA_COLUMN_DELTA): New macro.
21792         (java_lc): New typedef on new struct _java_lc.
21793         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21794         (parse_error_context, parse_warning_context): Changed prototypes.
21795         (java_get_line_col): Added as an available global function.
21796         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21797         (IC_DECL): Replaced by macro IC_TYPE
21798         (DEPEND_WFL): New macro.
21799         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21800         wrong modifier.
21801         (exit_java_complete_class): Removed a commented out statement.
21802         (struct parser_ctxt): Added comments on fields. modifier_ctx is
21803         now an array of tree nodes. Deleted fields line_list and
21804         e_line. New field elc, to replace e_line.
21805         * parse.y (array_type:): Build WFL node.
21806         (qualified_name:): Build a single WFL node out of two. Retain
21807         the location information of the first node in the resulting node.
21808         (package_declaration:): Use package name as a WFL node
21809         (single_type_import_declaration:): Use imported name as a WFL node.
21810         (type_import_on_demand_declaration:): Use root of the imported
21811         packages as a WFL node.
21812         (field_declaration:): Removed unused local variable cl.
21813         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21814         (yyerror): New static elc. Removed static error_line, error_pos.
21815         New local code_from_source. Save ctxp->elc into elc at the first
21816         pass. Call java_get_line_col to get a string of the line where
21817         the error occurred.
21818         (debug_line): Removed static function.
21819         (parse_error_context, parse_warning_context): Parameter cl is now
21820         a WFL node. Use its value to initialize ctxp->elc.
21821         (redefinition_error): Parameter cl is now a WFL node.
21822         (parse_add_interface): New parameter wfl. No longer call
21823         lookup_cl, use wfl instead.
21824         (check_class_interface_creation): Parameter cl is now a WFL node.
21825         (maybe_create_class_interface_decl): Likewise.
21826         (add_superinterfaces): New function.
21827         (create_interface): Removed local cl, node, super_decl,
21828         super_decl_type.  Function now uses id as a WFL node. Better
21829         warning/error report on obsolete or forbidden mix of
21830         modifiers. Now calls add_superinterfaces to register interfaces.
21831         (create_class): Removed local cl, node. Local variable id is used
21832         as a WFL node. Better error report on forbidden modifier
21833         mix. Uses add_superinterfaces to register interfaces.
21834         (find_field): Argument cl is now a WFL node. Now store the WFL
21835         node of a fields that needs to be checked for their
21836         initialization.
21837         (method_header): Local variable node non longer used. Local
21838         variable id replaces cl.
21839         (check_modifiers_consistency): Local variable cl is now a WFL
21840         node.
21841         (method_declarator): Local variable cl replaced by parameter id.
21842         (parser_qualified_name): Now uses parameter name as a WFL node.
21843         (parser_check_super_interface): New parameter wfl, for achieve
21844         greater accuracy during error reports.
21845         (parser_chain_incomplete_item): New parameter named location. Used,
21846         along the decl, to construct the incomplete item node.
21847         (java_complete_class): resolve_class now uses WFL node extracted
21848         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21849         where appropriate.
21850         (complete_method_decl): Unresolved function's argument types are WFL.
21851         (resolve_class): Parameter cl is now a WFL node.
21852         (resolve_and_layout): Likewise.
21853         (do_resolve_class): Likewise. Try first to use cl and then do the
21854         lookup on the decl when calling check_pkg_class_access.
21855         (complete_class_report_errors): Use IC_TYPE in place of
21856         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21857         instead of doing a lookup over the decl.
21858         (java_check_final): Use WFL info from field tree list.
21859         (lookup_cl): Rewritten and returns a statically defined WFL node.
21860         (lookup_modifier_cl): Now uses information from WFL nodes.
21861         (process_imports): Likewise.
21862         (read_import_dir): name and cl arguments replaced by a single WFL
21863         node. Function modified accordingly.
21864         (find_in_imports_on_demand): Now uses WFL node.
21865         (check_pkg_class_access): cl argument is now a WFL node.
21866         (declare_local_variables): Fixed to use WFL nodes.
21867         (resolve_expression_name): Likewise.
21868         (build_method_invocation_stmt): name_combo argument renamed
21869         wfl. Function modified to use WFL nodes.
21870         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21871         (lookup_method_invoke): cl is now a WFL node. Added missing
21872         IDENTIFIER_POINTER to class type decl name.
21874 1998-04-14  Dave Brolley  <brolley@cygnus.com>
21876         * lang.c (init_parse): Now returns char* containing the filename.
21878 1998-04-10  Per Bothner  <bothner@cygnus.com>
21880         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
21882         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
21883         * class.c (make_class_data):  If flag_assume_compiled, initial class
21884         state is CSTATE_PREPARED; make superclass and interfaces direct
21885         references, rather than constant pool indexes.
21887 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21889         * parser.y: Include flags.h. Removed debug variable pl.
21890         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21891         (block:): Likewise.
21892         (labeled_statement_nsi:): Generate debug info when reducing
21893         expression_statement:.
21894         (check_pkg_class_access): get_access_flags_from_decl invocation
21895         fixed for new CLASS_* flags location.
21896         (source_end_java_method): Save/restore parser context when
21897         entering/leaving this routine. Restore lineno to its right value
21898         before calling expand_end_bindings.
21899         (build_method_invocation_stmt): build_invoke called with the
21900         current line information.
21901         (build_invoke): New argument cl. Wrap the function call around a
21902         wfl node.
21903         (refine_accessible_methods_list): Changed comment, removed
21904         unnecessary code.
21905         * parse.h: Fixed typo in comments.
21906         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21907         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21908         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21909         parser_ccb_indent.
21910         * lex.c (java_lex): Record the last closing curly bracket of a
21911         function.
21912         * jcf-parse.c (jcf_parse_source): Now calls
21913         java_check_methods. Clarified comment, fixed typo.
21915 1998-04-09  Dave Brolley  <brolley@cygnus.com>
21917         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21918         (finish_parse): Expose for non USE_CPPLIB builds.
21920 1998-04-08  Jeffrey A Law  (law@cygnus.com)
21922         * lang.c (lang_print_xnode): New function.
21924 1998-04-03  Per Bothner  <bothner@cygnus.com>
21926         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
21927         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
21928         used to build a class's dispatch table.
21929         (make_class_data):  Generate dispatch table if flag_assume_compiled.
21930         Set dtable of class object to address of class_dtable_decl.
21932         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
21933         be volatile and have side effects - generates better code.
21935         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
21936         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21938         * expr.c (expand_invoke):  If class is final, method is
21939         effectively final, so can call it directly.
21941         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
21943         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
21945 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21947         * parse.y (build_method_invocation_stmt): Removed extra argument
21948         to build_invoke.
21950 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21952         * expr.c (dtable_indent): Now static global.
21953         (expand_invoke): Now call invoke_build_dtable and
21954         build_invokevirtual.
21955         (invoke_build_dtable, build_invokevirtual): New functions.
21956         * jcf-io.c (find_class): Defer issuing a warning by setting
21957         jcf->outofsynch to 1.
21958         * jcf-parse.c (jcf_out_of_synch): New function.
21959         (load_class): Test this_jcf.outofsynch flag and call
21960         jcf_out_of_synch accordingly.
21961         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21962         comment indentation.
21963         * lex.c (java_get_unicode): Fixed code indentation.
21964         (java_lex): Create string literal. Fixed typo. Removed several
21965         premature obstack_free.
21966         * parse.h: New enums for name resolution and invocation mode.
21967         (struct qualification): New data structure.
21968         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21969         (do_resolve_class, build_method_invocation_stmt,
21970         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21971         debug_line, identical_subpath_p, invocation_mode,
21972         refine_accessible_methods_list, build_invoke,
21973         lookup_method_invoke): New functions declared.
21974         (build_invokevirtual, invoke_build_dtable, match_java_method,
21975         build_field_ref, jcf_out_of_synch): New references to external
21976         functions.
21977         (struct parse_ctxt): Removed artificial_constructor field.
21978         * parse.y: (array_type:): Type defined for this rule.
21979         (class_type:): Installed default rule for interface_type:.
21980         (array_type:): Now build Java array type.
21981         (qualified_name:): Now use obstack_grow0.
21982         (method_declaration:): Skip the artificial constructor added to
21983         the list, if any.
21984         (abstract_method_declaration:): Execute the code only during pass 1.
21985         (block:): Installed default rule in block_statements:.
21986         (block_statement:): Add the statement to the method during pass 2.
21987         (statement_expression): Installed default rule for
21988         method_invocation:.
21989         (argument_list:): Added code to build the argument list.
21990         (method_invocation:): Added call to create the method invocation
21991         node.
21992         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21993         (debug_line): New function for debug.
21994         (complete_class_decl): No longer do something during pass 1.
21995         (method_header): Use BUILD_PTR_FROM_NAME.
21996         (parser_qualified_classname): Use obstack_grow0. Removed bogus
21997         obstack_free.
21998         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21999         function's main comment.
22000         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
22001         classes.
22002         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
22003         (resolve_class): Now works with arrays.
22004         (do_resolve_class, resolve_and_layout): New functions.
22005         (java_check_regular_methods): Reverse method list before and after
22006         having processed it. No longer set ctxp->artificial_constructor.
22007         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
22008         accordingly. Fixed typo in issued error message. Now use
22009         obstack_grow0.
22010         (find_in_imports_on_demand): Now use obstack_grow0.
22011         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
22012         (source_end_java_method): Call expand_expr_stmt instead of
22013         expand_expr. Calls it before calling expand_function_end.
22014         (java_method_add_stmt): Do nothing if errors were found during
22015         parsing.
22016         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
22017         (build_method_invocation_stmt, build_invoke, invocation_mode,
22018         lookup_method_invoke, refine_accessible_methods_list,
22019         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
22020         New functions.
22021         * typeck.c (build_java_signature): Properly end method signature
22022         if return type skipped.
22023         (match_java_method): New function.
22025 1998-03-16  Per Bothner  <bothner@cygnus.com>
22027         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
22029 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22031         * expr.c (build_invoke_non_interface): New function.
22032         (methods_ident, ncode_ident): Now static globals.
22033         (expand_invoke): Use build_invoke_non_interface.
22034         * java-tree.h (struct lang_decl): New field function_decl_body.
22035         (DECL_FUNCTION_BODY): New macro.
22036         * jcf-parse.c (jcf_parse_source): Deeper check before setting
22037         CLASS_FROM_SOURCE_P.
22038         (parse_source_file): Fixed typos. Call java_layout_parsed_class
22039         before starting pass 2. Call to java_generate_parsed_class replaced
22040         by java_register_parsed_class.
22041         * lex.c: Fixed typo in header. Some line width related formating.
22042         * lex.h: Some line width related formating.
22043         * parse.h (source_end_java_method, resolve_expression_name,
22044         complete_class_decl, maybe_create_class_interface_decl,
22045         check_class_interface_creation): New static function declarations.
22046         (java_layout_parsed_class, java_method_add_stmt): New function
22047         declarations.
22048         (struct parser_ctxt): Field mark_class_generate removed. New
22049         fields class_list and artificial_constructor.
22050         * parse.y: Fixed typo in header.
22051         (class_declaration:): Call complete_class_decl when class body
22052         parsed.
22053         (method_declaration:): Call source_end_java_method in pass 2 when
22054         the method body is defined.
22055         (postfix_expression:): Do expression name resolution on sub-rule
22056         name during pass 2.
22057         (create_class, create_interface): Merged common pieces.
22058         (check_class_interface_creation, maybe_create_class_interface_decl):
22059         New functions.
22060         (complete_class_decl): New function.
22061         (register_fields): Fixed line width related typo.
22062         (method_header): Correctly skip first argument when fixing
22063         argument line. Changed the loop.
22064         (java_check_circular_reference): Now use ctxp->class_list.
22065         (java_complete_class): Removed start/stop marking.
22066         (java_check_regular_methods): Now takes a class decl as an
22067         argument.  Add default constructor if none were encountered.
22068         (java_check_methods): Now use ctxp->class_list. Changed call to
22069         java_check_regular_methods.
22070         (source_start_java_method): Set DECL_ARG_TYPE for each function
22071         arguments.
22072         (source_end_java_method, java_method_add_stmt): New functions.
22073         (java_generate_parsed_class): No longer exists.
22074         (java_layout_parsed_class, java_register_parsed_class): New functions.
22075         (resolve_expression_name): New function.
22077 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22079         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
22080         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
22081         until pass initializations are done. Call read_import_dir with
22082         pass set to 0.
22083         * parse.h: (lookup_modifier_cl): New function declared.
22084         (INTERFACE_FIELD_MODIFIERS): New macro.
22085         (OBSOLETE_MODIFIER_WARNING): New macro.
22086         * parse.y: (register_fields): Class type and current field name in
22087         local variables. Check modifier(s) if adding field(s) to an interface.
22088         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
22089         and report errors using the faulty modifier line context.
22090         (lookup_modifier_cl): New function.
22091         (read_import_dir): Detect and report default import processing
22092         failure.
22094 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
22096         Add a pair of -fassume-compiled/-fno-assume-compiled options.
22097         * class.c (is_compiled_class): Return 1 after making sure it
22098         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
22099         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
22100         * java-tree.h (flag_assume_compiled): Add decl.
22101         * lang.c (lang_f_options): Add the flag.
22102         (flag_assume_compiled): Add decl, default to 0.
22104 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22106         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
22107         (is_compiled_class): Likewise.
22108         (layout_class): Likewise.
22109         (layout_class): Detect and lay out classes defined in source code.
22110         (interface_of_p, add_interface_do, may_add_interface): New
22111         function.
22112         (add_interface): Now use add_interface_do.
22113         (add_method_1): New function.
22114         (add_method): Now use add_method_1.
22115         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
22116         (complete_start_java_method): New function.
22117         (start_java_mehod): Now call complete_start_java_method.
22118         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
22119         (expand_invoke): Likewise and fixed typo.
22120         *gjava.c: (print_super_field): Use new argument to find_class
22121         DO_CLASS_FILE.
22122         (main): Likewise.
22123         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
22124         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
22125         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
22126         IDENTIFIER_NODE.
22127         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
22128         (add_method_1, push_class): New prototypes.
22129         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
22130         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
22131         directory where the class was found.
22132         (find_class): New argument DO_CLASS_FILE. Function find_class
22133         modified accordingly.
22134         *jcf-parse.c: (fix_class_path): New function.
22135         (load_class): Use new VERBOSE argument. load_class now finds and
22136         loads/parses .class/.java files. Save read_state of current_jcf
22137         if necessary.
22138         (java_parser_abort_on_error): New macro.
22139         (jcf_parse_source, parse_source_file): New function.
22140         (jcf_parse): Fixed typo.
22141         (yyparse): Call parse_source_file () only.
22142         (process_zip_dir): Fixed typo, fix zdir->filename_length when
22143         writing the real class name back in the zip directory entry.
22144         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
22145         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
22146         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
22147         (find_class): Prototype fixed.
22148         *lex.c: Added 1998 time stamp.
22149         Removed all static global variables, moved into the parser
22150         context data structure.. Now include unistd.h if SEEK_SET not
22151         defined.
22152         (java_init_lex): Rewritten.
22153         (java_sneak_unicode): Modified current unicode access in current line.
22154         (java_unget_unicode): Likewise.
22155         (java_allocate_new_line): New allocation management.
22156         (java_read_char): Modified access and storage of unget_utf8_value.
22157         New way of processing current unicode.
22158         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
22159         (java_get_unicode): Now use the parser context.
22160         (java_lineterminator): Likewise.
22161         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
22162         of the reentrant parser implementation. Function now use the
22163         parser context data structure and java_lval. Fixed production of
22164         the float and double constant "out of range" error message. Fixed
22165         obstack use. Return integer value when hitting a modifier. Now
22166         return type for TRUE, FALSE and other predefined types. Return
22167         identifier as a TREE_LIST list containing the current line context
22168         as the TREE_VALUE sub-node.
22169         (java_unicode_2_utf8): Fixed typo in declaration.
22170         (java_lex_error): Now use the parser context data structure.
22171         *lex.h: Added 1998 time stamp.
22172         (struct java_line): New fields ref_count and next.
22173         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
22174         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
22175         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
22176         *parse.h: Added 1998 time stamp.
22177         (java_parse_source_file): Renamed from parse_source_file.
22178         (YYERROR_NOW, YYNOT_TWICE): Fixed.
22179         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
22180         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
22181         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
22182         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
22183         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
22184         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
22185         (struct parser_ctxt): New data structure to keep the parser context.
22186         *parse.y: Added 1998 time stamp, got rid of static global variables.
22187         (java_error_count, ctxp): New global variables.
22188         (%union): New value field.
22189         (numeric_type, integral_type): Rules removed.
22190         (primitive_type): Rule defined to handle integral, float, double and
22191         boolean types.
22192         (qualified_name, package_declaration,
22193         single_type_import_declaration, type_import_on_demand_declaration,
22194         modifiers, class_declaration, super, interfaces,
22195         interface_type_list, class_body, field_declaration,
22196         field_declaration, variable_declarators, variable_declarator,
22197         variable_declarator_id, method_declaration, method_header,
22198         formal_parameter_list, formal_parameter, method_body, block,
22199         static, interface_declaration, extends_interfaces,
22200         abstract_method_declaration, local_variable_declarators): Rules now
22201         define actions.
22202         (force_error, do_warning): New global statics.
22203         (push_parser_context, parser_context_save_global,
22204         parser_context_restore_global, pop_parser_context): New functions.
22205         (yyerror): Now uses the global parser context. Fixed use of obstack.
22206         (parse_error, parse_error_context, parse_warning_context,
22207         java_accstring_lookup, redefinition_error, check_modifiers,
22208         parser_add_interface, create_interface, create_class, find_field,
22209         duplicate_declaration_error, register_fields, method_header,
22210         check_modifiers_consistency, check_abstract_method_header,
22211         method_declarator, parser_qualified_classname,
22212         parser_check_super_interface, parser_check_super,
22213         parser_chain_incomplete_item, java_check_circular_reference,
22214         layout_class_from_source, java_complete_class,
22215         complete_method_decl, resolve_class, complete_class_report_errors,
22216         java_check_final, check_method_redefinition,
22217         java_check_regular_methods, java_check_abstract_methods,
22218         java_check_methods, lookup_java_interface_method2,
22219         lookup_java_method2, lookup_cl, find_name_in_single_imports,
22220         process_imports, find_in_imports, read_import_entry,
22221         read_import_dir, find_in_imports_on_demand,
22222         check_pkg_class_access, not_builtin_p, declare_local_variables,
22223         source_start_java_method, java_generate_parsed_class): New
22224         functions.
22225         *typeck.c: (signature_include_return): New global variable.
22226         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
22227         to add the function returned type in the signature.
22229 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
22231         * jcf-io.c (open_in_zip): Use strncmp and LEN.
22233 1998-01-29  Dave Brolley  <brolley@cygnus.com>
22235         * Make-lang.in (java.info): Added.
22236         (java.install-info): Added
22238 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
22240         * Makefile.in (clean): Also remove java/parse.c.
22242 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
22244         Add a pair of -fbounds-check/-fno-bounds-check options.
22245         * lang.c (lang_decode_option): Add code to grok arguments.
22246         (flag_bounds_check): Add decl.
22247         (lang_f_options): New array w/ the option in it.
22248         * java-tree.h (flag_bounds_check): Add decl.
22249         * lang-options.h: New file.
22250         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22251         of a static macro value.
22252         (JAVA_ARRAY_EXCEPTION): Delete macro.
22254 1998-01-23  Per Bothner  <bothner@cygnus.com>
22256         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
22257         * expr.c (build_anewarray):  Add missing promote_type.
22259 1998-01-22  Per Bothner  <bothner@cygnus.com>
22261         Add array types with known length to optimize bounds checking.
22262         * typeck.c (build_java_array_type):  Take length parameter.
22263         (java_array_type_length, build_prim_array_type):  New functions.
22264         * java-tree.h:  Update for new functions.
22265         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22266         * class.c:  Use build_prim_array_type.
22267         * expr.c (can_widen_reference_to):  Handle known-length array types.
22268         (verify_jvm_instructions):  Keep track of integer push instructions
22269         followed by newarray/anewarray, so we can build known-length arrays.
22270         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
22271         (java_array_data_offset):  New function.
22272         (build_java_array_length_access):  New function.  Optimize if constant.
22273         (build_java_arrayaccess):  Constant fold bounds check.
22274         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
22275         (build_newarray, build_anewarray):  New functions.
22276         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
22277         * verify.c (merge_types):  Handle known-lengh array types.
22279 1998-01-19  Per Bothner  <bothner@cygnus.com>
22281         * expr.c (expand_byte_code):  Fix performace bug, which caused
22282         searching linenumber_table to be linear rather than constant.
22284 1997-12-12  Per Bothner  <bothner@cygnus.com>
22286         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
22288         * decl.c, java-tree.h (soft_fmod_node):  New global.
22289         * decl.c (init_decl_processing):  Define __builtin_fmod.
22290         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
22291         using __builtin_fmod.
22293 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22295         * keyword.h: New file, output of keyword.gperf as processed by
22296         gperf.
22297         * lex.c (java_lex_init): Initialize java_error_flag.
22298         * parse.c (YYERROR_NOW): Uses java_error_flag.
22299         * parse.y: New static java_error_flag. Useless definition of
22300         buffer_error gone.
22301         * parse.y (java_error): Portable error recovery using
22302         java_error_flag (not yet completely tuned).
22304 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
22306         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22308 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22310         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22311         (parse.c, lex.c, keyword.h): New rules for Java source code
22312         front-end.
22313         * parse.c: Renamed into jcf-parse.c.
22314         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22315         * keyword.gperf: New file, Java keywords.
22316         * parse.y: New file, Java language grammar.
22317         * parse.h: New file, Java language grammar definitions.
22318         * lex.c: New file, Java language lexer.
22319         * lex.h: New file, Java language lexer definitions.
22321 1997-12-03  Per Bothner  <bothner@cygnus.com>
22323         * decl.c (clinit_identifier_node), java-tree.h:  New global.
22324         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
22325         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
22326         * expr.c (expand_java_field_op):  Check for invalid assignment
22327         to final field.
22329         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
22331 1997-10-27  Per Bothner  <bothner@cygnus.com>
22333         * verify.c (verify_jvm_instructions):  When processing a handler,
22334         attempt to set the current_subr to the right value.
22335         (More complicated code combines Sep 17 and Oct 22 versions.)
22337 1997-10-24  Per Bothner  <bothner@cygnus.com>
22339         * class.c (push_class):  Figure out (guess) name of source file.
22340         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
22341         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
22342         (parse_class_file):  Change return type from int to void.
22343         Call debug_start_source_file/debug_end_source_file.
22345         * expr.c (build_java_binop):  Fix masking 2nd operand.
22346         * decl.c (init_decl_processing):  Set sizetype first.
22348 1997-10-22  Per Bothner  <bothner@cygnus.com>
22350         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
22351         (Revert Sep 17 change.)
22353 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22355         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22356         .class extension in their name and fix thing so we don't process
22357         them parse_zip_file_entries().
22358         (parse_zip_file_entries): Cleaned unused local variables.
22360 1997-10-20  Per Bothner  <bothner@cygnus.com>
22362         * expr.c (can_widen_reference_to):  Allows equal array element types.
22363         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
22364         * jcf-dump.c (RET):  Get (and print) index.
22366         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22367         Promote element type to POINTER_TYPE.
22369 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22371         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22372         find_in_current_zip, jcf_figure_file_type): Moved from
22373         jcf-reader.c to parse.c.
22374         * zextract.c: (read_zip_archive): takes file_comment_length possible
22375         field into account.
22377 1997-10-20  Per Bothner  <bothner@cygnus.com>
22379         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
22381         * verify.c (merge_types):  Handle array types even better ...
22383 1997-10-17  Per Bothner  <bothner@cygnus.com>
22385         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
22387         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
22388         * class.c (make_class_data):  Don't build fields_decl if no fields.
22389         When building fields_decl, skip if DECL_ARTIFICIAL.
22391         * expr.c (java_stack_swap):  Update stack_type_map.
22392         * verify.c (merge_types):  Handle array types better.
22394 1997-10-15  Per Bothner  <bothner@cygnus.com>
22396         * class.c (add_field):  Don't promote short integral fields to
22397         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22398         * expr.c (push_value):  Promote and convert short integral values.
22400         * decl.c, java-tree.h (integer_two_node):  New constant node.
22401         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
22403 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22405         * class.c (append_gpp_mangled_type): Use function argument
22406         unpromoted type to generate mangled name.
22408 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22410         * constants.c (build_constant_data_ref): Now uses current_class
22411         instead of main_class.
22412         (build_constants_constructor): Now uses current_class instead of
22413         main_class.
22414         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22415         of the global variable SeepZipFiles done here.
22416         * zextract.c (read_zip_archive): extra_field optional field taken
22417         into account while computing the position of the class file in the
22418         archive.
22419         * verify.c (verify_jvm_instructions): Use current_jcf to search
22420         the constant pool.
22421         * parse.c (load_class): First search for the class to load in the
22422         current zip file. Saves current_jcf (restored before returning
22423         from that function). Don't call JCF_FINISH in the class was found
22424         in the current ZIP file.
22425         (jcf_parse): If the class was found in the current ZIP file, save
22426         its tree_constant_pool (for later reuse).
22427         (parse_class_file): New function. Process each method defined in
22428         the current class and record the class as to be later registered.
22429         (yyparse): Rewritten. Figure the type of the current file and switch
22430         accordingly.
22431         * lang.c: New global variable current_jcf.
22432         (lang_init): Removed compiling_from_source test (done later, in
22433         yyparse). Removed call the jcf_parse ().
22434         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22435         (typedef struct JCF): New fields seen_in_zip (to mark a class found
22436         in the current ZIP file) and zip_offset (offset to the class data in
22437         the current zip file).
22438         * jcf-reader.c: zipfile.h included.
22439         localToFile: New ZipFileCache static global variable
22440         (parse_zip_file_entries): New function. Browse the current ZIP
22441         file directory and process each class found.
22442         (process_zip_dir): New function. Register each class found in the
22443         ZIP file directory. The class aren't parsed but a valid JCF is
22444         link to each of them.
22445         (find_in_current_zip): New function. Search for a class in the
22446         current ZIP file directory. If found, prepare the class so that it
22447         can be loaded.
22448         (jcf_figure_file_type): New function. Examine the file structure
22449         to figure a class file, a ZIP file. If none of these categories are
22450         matched, a source file is assumed.
22451         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22452         SeenZipFile: New global variable.
22453         (open_in_zip): Use zipmember's length to accelerate the search for
22454         a member. If zipmember was NULL and zip file successfully read,
22455         return 0.
22456         * java-tree.h: New global variable current_jcf declared.  Added
22457         declaration for current_constant_pool_tags, current_constant_pool_data,
22458         current_constant_pool_length, current_constant_pool_data_ref.
22459         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22460         store the JCF of classes seen in a zip file) and tree *constant_pool
22461         (to save a loaded class constant pool). current_class declared here.
22462         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22463         retrieve method_ref_constant.
22464         (PUSHC): java_push_constant_from_pool now uses current_jcf.
22465         (OBJECT): get_class_constant now uses current_jcf.
22466         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22467         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22468         (expand_invoke): Now uses current_class instead of main_class
22469         (build_class_init): Now uses current_class instead of main_class
22470         * class.c: New static global variable registered_class.
22471         (register_class): New function.
22472         (emit_register_class): Modified to use registered_class instead of
22473         main_class
22474         (is_compiled_class): Now take into account class seen in the archive.
22476 1997-10-06  Per Bothner  <bothner@cygnus.com>
22478         * except.h:  Renamed to: java-except.h.
22479         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
22480         * except.c:  Add semi-working (commented out) implementation.
22482         * expr.c (expand_iinc):  Add needed flush_quick_stack.
22483         * parse.c (set_source_filename):  New function.
22484         (give_name_to_class):  Set input_filename from package.classname.java.
22486         * jcf-io.c (find_class):  Don't look first in ".".
22488 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22490         * zextract.c (read_zip_archive): Now takes into account the
22491         extra_field field.
22492         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22494 1997-09-20  Per Bothner  <bothner@cygnus.com>
22496         * constants.c, java-tree.h (build_internal_class_name):  New function.
22497         (alloc_class_constant):  Re-implement using build_internal_class_name.
22498         * class.c (make_class_data):  Likewise.
22499         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
22501 1997-09-17  Per Bothner  <bothner@cygnus.com>
22503         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
22504         to NULL before pushing an exception handler target.
22506         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
22507         (java_stack_swap, java_stack_dup):  Re-write to be safe from
22508         clobbering registers.
22509         (build_class_init):  New function.
22511 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22513         * typeck.c (build_java_array_type): Temporary use
22514         permanent_obstack to create the array 'length' field.
22515         * expr.c (lookup_label): Temporay use permanent_obstack to create
22516         label if not found.
22517         * class.c (push_super_field): Tempory use permanent_obstack.
22519 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22521         * typeck.c (type_for_mode): Now handles double_type_node and
22522         float_type_node.
22523         * verify.c (verify_jvm_instructions): The instruction following
22524         the wide bytecode is checked. OPCODE_ret added to the list of
22525         wide.
22527 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22529         * class.c (make_class): Temporary use permanent_obstack. Set the
22530         class CLASS_P field to 1.
22531         (push_class): Temporary use permanent_obstack.
22532         (set_super_info): Temporary use permanent_obstack.
22533         (add_method): Temporary use permanent_obstack, set
22534         METHOD_TRANSIENT().
22535         (add_field): Temporary use permanent_obstack. Sets
22536         FIELD_VOLATILE() and FIELD_TRANSIENT().
22537         (build_class_ref): Temporary use permanent_obstack if the class
22538         isn't compiled.
22539         (build_static_field_ref): Temporary use permanent_obstack when
22540         creating field's rtl.
22541         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22542         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22543         and fields. Function finalized, as far as flag handling.
22544         (push_class_static_dummy_field): Temporary use permanent_obstack.
22545         (emit_register_class): Force generation of class registration at
22546         -O3 or deeper.
22547         * decl.c (end_java_method): Call permanent_allocation() before
22548         returning.
22549         * expr.c (can_widen_reference_to): Added comment to interface
22550         handling, fixed typo.
22551         (lookup_field): Now uses CLASS_P() to correct FIXME
22552         (expand_invoke): Verification on public && !static &&
22553         !abstract moved into soft_lookupinterfacemethod (kaffe).
22554         Use Object class dtable if objectref is an array when expanding
22555         invokeinterface.
22556         (java_push_constant_from_pool): Temporary use permanent_obstack
22557         for CONSTANT_string
22558         * parse.c (get_ref_constant): Temporary use permanent_obstack to
22559         create constant references.
22560         (get_constant): Temporary use permanent_obstack to create constant.
22561         (load_class): Temporary use permanent_obstack to load class.
22562         (jcf_parse): Temporary use permanent_obstack to perform class
22563         layout.
22564         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22565         (build_java_signature): Temporary use permanent_obstack.
22566         * verify.c: (verify_jvm_instruction): removed unnecessary verification
22567         on ACC_SUPER flag.
22568         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22569         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22570         (CLASS_P): Defined
22572 1997-09-11  Per Bothner  <bothner@cygnus.com>
22574         * class.c (append_gpp_mangled_type):  Fix typo.
22575         (emit_register_class):  Use main_class to get class object, rather
22576         than looking for no-longer-existing static decl starting with _CL.
22577         * typeck.c (parse_signature_type):  Promote array element type
22578         if it is a RECORD_TYPE.
22580 1997-09-10  Per Bothner  <bothner@cygnus.com>
22582         * class.c (push_class_static_dummy_field):  New function.
22583         (mangle_static_field):  New. Do G++-style mangling of static fields.
22584         (layout_class):  Mandle static fields here, not in add_field.
22585         (build_class_ref):  The class object is now a dummy static field.
22586         * decl.c (find_local_variable):  Look for best, instead of first match.
22587         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
22588         (build_java_athrow):  Don't check here if exception is Throwable.
22589         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
22590         (TYPE_USED):  Removed.  No longer used ...
22591         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
22592         * verify.c (push_pending_label):  New function.
22593         (push_pending_block):  Renamed to check_pending_block.
22594         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
22595         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
22596         re-checking possible handlers) after a store (less wasted work).
22597         Check for null handler (finally) before calling add_handler.
22598         Various changes to (finally?) correctly handle try/finally.
22600 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
22602         * class.c: Include stdio.h.
22604 1997-09-04  Per Bothner  <bothner@cygnus.com>
22606         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22607         to make sure class is initialized before static/special invoke.
22609         * verify.c (verify_jvm_instructions):  On a store instruction,
22610         call find_local_variable to force pre-allocation of decl and rtx.
22611         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
22613 1997-09-03  Per Bothner  <bothner@cygnus.com>
22615         * class.c (build_class_ref):   Strip off "promoted_" if need be.
22616         (make_field_value): Call build_java_signature when needed.
22617         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
22618         * expr.c (build_java_athrow):  Don't push_value of exception.
22619         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22620         match specification of [fd]cmp[lg] for NaNs.
22621         (expand_byte_code):  Add support for exception handler ranges.
22622         * except.c:  Add skeleton for EH code-generation.
22623         * verify.c (merge_types):  Treat all promoted integral types as equal.
22624         * constants.c (build_constants_constructor):  To force creation of
22625         current_constant_pool_data_ref, call build_constant_data_ref.
22627         * javaop.def (lload):  Fix typo.
22628         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
22630 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
22632         * parse.c: Don't include function.h.
22634 1997-08-27  Per Bothner  <bothner@cygnus.com>
22636         * except.[ch]:  New files.
22637         * Makefile.in (JAVA_OBJS):  Add except.o
22638         * expr.c:  Temporary warning about unimplemented exceptions.
22639         * verify.c:  Verify exception handlers.
22641         * jcf-dump.c (disassemble_method):  Print exception table.
22643 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22645         * expr.c (verify_jvm_instructions): Started a thorough
22646         verification of invoke* bytecodes.
22647         (expand_byte_code): flush quick stack if PC is the target of a
22648         branch.  and undef RET (conflicting with config/i386/i386.h).
22649         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22650         used.
22651         (expand_invoke): Now handles invokeinterface and do more
22652         verification according to the bytecode.
22653         (lookup_field): Don't try to load the class if processing
22654         dtable_type.
22655         (can_widen_reference_to): Now handles interfaces.
22656         * decl.c (init_decl_processing): New global variable
22657         soft_lookupinterfacemethod_node, declared in java-tree.h.
22658         Call set_super_info on string_type_node.
22659         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22660         defined.
22661         * class.c (set_super_info): Fills the CLASS_* flags according to
22662         access_flags.
22663         (get_access_flags_from_decl): Handles all class flags.
22665 1997-08-26  Per Bothner  <bothner@cygnus.com>
22667         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
22668         * parse.c (yyparse):  Check for abstract method, and missing code.
22669         * expr.c (expand_byte_code):  Change interface.
22670         * lang.c (put_decl_node):  Print promoted types prettier.
22671         * verify.c (verify_jvm_instruction):  Change interface.
22672         Partial support for scanning exception table.
22673         For load instructions, handle promoted integral types.
22675 1997-08-21  Per Bothner  <bothner@cygnus.com>
22677         * verify.c:  New file, with contents moved from expr.c.
22678         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
22679         * typeck.c (is_array_type_p):  Moved here from expr.c.
22680         * java-tree.h:  Add some now-needed function declarations.
22681         * Makefile.in (JAVA_OBJS): Added verify.o.
22683 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22685         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22686         METHOD_ABSTRACT flag.
22688         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22689         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22690         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22692         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22693         variables.
22694         (start_java_method): Hook for SYNCHRONIZED methods.
22696         * expr.c (build_java_jsr, build_java_ret): New functions
22697         (JSR,PRE): New macros
22698         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22699         (verify_jvm_instructions): tableswitch, lookupswitch,
22700         monitorenter, monitorexit, goto_w: verified.
22701         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22702         (build_java_monitor): New function.
22703         (MONITOR_OPERATION): Modified to call build_java_monitor()
22704         (verify_jvm_instructions): Started a thorough verification of
22705         invoke* bytecodes.
22707 1997-08-19  Per Bothner  <bothner@cygnus.com>
22709         Support verification of jsr/ret subroutines (used for try/finally).
22710         * decl.c (return_address_type_node):  New type node.
22711         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22712         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22713         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
22714         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22715         TYPE_USED):  New macros for special types in type_map.
22717         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
22718         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
22719         BCODE_JUMP_TARGET.
22720         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
22722         * expr.c (can_widen_reference_to):  New function.
22723         (pop_type):  Use it.
22724         (merge_type_state):  Support handling start of subroutine.
22725         (push_pending_block):  Return char* error message, instead of calling
22726         fatal on an error.  Also handle subroutines.
22727         (verify_jvm_instructions):  Handle errors from push_poending_block.
22728         Support jsr and ret instructions.
22730 1997-08-19  Per Bothner  <bothner@cygnus.com>
22732         * jcf-io.c (find_classfile):  Fix thinko.
22733         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
22735 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
22737         * Makefile.in (BISON): Remove.
22739 1997-08-07  Per Bothner  <bothner@cygnus.com>
22741         * Makefile.in:  Convert to autoconf.
22742         * config-lang.in (outputs):  Added java/Makefile.
22744         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22745         Rename cc1java to jc1.
22747         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
22748         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
22750         * class.c (class_depth):  Do load_class if needed.
22752         Mostly better verification.
22753         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
22754         (init_decl_processing):  Change return type of soft_checkcast.
22755         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
22756         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22757         lang_print_error):  New functions.
22758         (lang_init):  Set global hook print_error_function to lang_print_error.
22759         * expr.c:  In the type_map ptr_type_node is only used for null now.
22760         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
22761         (merge_types):  Dererence pointer to record types before comparing.
22762         (decode_newarray_type, merge_types):  On error just return NULL.
22763         (build_java_binop):  Add preliminary implementation (with warning)
22764         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22765         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
22766         (expand_compare, expand_java_goto, expand_java_call):  Don't
22767         push_pending_block, since that only makes sense when verifying.
22768         (merge_type_state):  Different return codes.
22769         (push_pending_block):  A block may need to be verified more than once.
22770         (expand_byte_code):  Warn about unused code at code generation time.
22771         (verify_jvm_instruction):  Changed logic, since code may need to be
22772         re-verified if type-state has changed.  Also, better error handling.
22773         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22774         Improve newarray, anewarray, ?aload, athrow,
22775         * java-tree.h (LABEL_CHANGED):  New macro.
22777 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22779         * decl.c (soft_athrow_node): New global variable initialized.
22780         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22781         * typeck.c (convert): Added support for REAL_TYPE.
22782         (convert_to_char): New function.
22783         (convert): Handle CHAR_TYPE.
22784         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22785         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22786         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22787         promoted type.
22788         (verify_jvm_instructions): Added break a the end of bogus unop: label.
22789         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22790         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22791         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22792         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22793         to Use The Right Things.
22794         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22795         compatible with INT. BOOLEAN is made equivalent to BYTE.
22796         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22797         OPCODE_ifnonnull): Now supported.
22798         (build_java_athrow): New function.
22800 1997-08-04  Per Bothner  <bothner@cygnus.com>
22802         Rename method name <init> to match G++ (and fix mangling).
22803         * class.c (layout_class):  Replace method name of <init> by class name.
22804         (make_method_value):  Do inverse renaming of constructor from <init>.
22805         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
22806         * typeck.c (lookup_java_constructor):  New function.
22807         * expr.c (expand_invoke):  If method_name is <init>, call
22808         lookup_java_constructor to find constructor.
22810         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
22812 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22814         * parse.c (get_class_constant): Modified to handle array "classes"
22815         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22816         wide type.
22817         (convert): Modified to handle real type.
22818         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22819         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22820         variables declared.
22821         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22822         soft_multianewarray, soft_newarray_node, soft_throw_node): New
22823         global variables initialized.
22824         (find_local_variable): Handles the case of a pointer
22825         (end_java_method): Restore the use of one more scope
22826         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22827         build_java_array_length_access, expand_java_arrayload,
22828         expand_java_arraystore, expand_java_array_length,
22829         expand_java_multianewarray, expand_java_anewarray,
22830         build_java_check_indexed_type, is_array_type_p,
22831         build_java_throw_out_of_bound_exception): New functions.
22832         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22833         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22834         OPCODE_<t>aload): Implemented code for verification.
22835         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22836         ARRAY_NEW_MULTI): Macro defined.
22837         (CONVERT): Modified to invoke convert().
22838         (case OPCODE_aload2): Fixed index typo from 2 to 1.
22840 1997-07-31  Per Bothner  <bothner@cygnus.com>
22842         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
22843         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
22844         (make_class_data):  Field name needs '/' as package prefix.
22845         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
22847 1997-07-25  Per Bothner  <bothner@cygnus.com>
22849         Implement debug information for local variables.
22850         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22851         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22852         DECL_LOCAL_SLOT_CHAIN):  New macros.
22853         (struct lang_decl_var):  New type.
22854         * parse.c (give_name_to_locals):  Move to decl.c.
22855         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
22856         (start_java_method):  Re-write parameter handling.
22857         (pending_local_decls):  New global variable.
22858         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
22859         (find_local_variable):  Accept pc so we can skips decls not in range.
22860         (struct binding_level):  Add end_pc field.
22861         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22862         (various):  Change so current pc gets passed to find_local_variable.
22864         * decl.c (init_decl_processing):  Re-arrange fields in
22865         class_type_node and and method_type_node to match kaffe 0.9.1.
22866         * class.c (make_method_value, make_class_data):  Update
22867         initializations to match.
22869 1997-07-16  Per Bothner  <bothner@cygnus.com>
22871         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22872         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
22873         (push_super_field):  New function.
22874         (make_class_data):  Handle inheritance of class static initializer.
22875         (layout_class):  New name mangling.
22876         * constants.c (build_constant_data_ref):  Init type of data array
22877         to a one-element array.
22878         (build_constants_constructor):  Set DECL_SIZE from complete array type.
22879         * decl.c:  Rename class_type, object_type etc to class_type_node,
22880         object_type_node etc.  Make former inherit from latter.
22881         * expr.c (expand_invoke):  Add cast of function address.
22882         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
22883         * parse.c (yyparse):  Don't call layout_class here.
22884         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
22886 1997-06-14  Per Bothner  <bothner@cygnus.com>
22888         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
22889         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
22890         (alloc_class_constant):  New.
22891         * expr.c (expand_invoke):  Make sure method's class is initialized.
22892         * class.c (interits_from_p, emit_register_class):  New functions.
22893         * parse.c (yyparse):  Call emit_register_class.
22895 1997-06-09  Per Bothner  <bothner@cygnus.com>
22897         * constants.c:  New file, to handle constant pool.
22898         * Makefile.in (JAVA_OBJS):  Add constants.o.
22899         * decl.c (init_decl_processing):  Update, fix, finish various structs.
22900         (pushdecl_top_level):  New.
22901         * parse.c (layout_class):  Moved to class.c.
22902         * expr.c (java_push_constant_from_pool):  New function.
22903         * class.c (build_class_ref):  Make work fully
22904         (make_class_data):  Emit super-class, constant pool, interface vector.
22906 1997-06-03  Per Bothner  <bothner@cygnus.com>
22908         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
22909         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
22910         * class.c (class_depth):  New function.
22911         (lookup_named_class):  Replaced by new function lookup_class.
22912         * decl.c (object_type_node, string_type_node):  New.
22913         Remove various types that we no longer need.
22914         * expr.c (verify_jvm_instructions):  New separate verifier pass.
22915         (push_type, pop_type):  New functions for verifier.
22916         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
22917         (expand_byte_code):  Simplify, since we assume already verified.
22918         (expand_invoke):  Now mostly works.
22919         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22920         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
22921         * parse.c:  Wait to allocate class object until we know its name.
22922         (layout_class):  Calculate DECL_VINDEX for each virtual method.
22923         * typeck.c (get_array_type):  Rename to ...
22924         (build_java_array_type):  ... and provide working implementation.
22925         (build_java_signature):  New function - build Java signature of type.
22926         (set_java_signature):  New function - cache signature with type.
22927         (lookup_java_method):  New function.
22929 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
22931         * class.c (ident_subst):  Take extra SUFFIX parameter.
22932         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
22933         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
22934         (build_class_ref):  Actually implement.
22935         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
22936         * decl.c (builtin_function):  New.
22937         (init_decl_processing):  Update for current Kaffe.  Declare some
22938         builtin Kaffe functions.
22939         * expr.c (build_address_of):  New.
22940         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22941         Renamed (from expand_java_new etc), and added working implementations.
22942         (build_field_ref):  Now also handle static fields.
22943         (expand_invoke):  Implement invokestatic, and start implement rest.
22944         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
22945         * javaop.def:  Rename invokevirt -> invokevirtual.
22946         * lang.c (use_handles):  Removed.
22947         * parse.c:  Add support for ConstantValue attribute.
22948         Handle nested loading of a class.  (JPOOL_UTF):  New.
22950 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
22952         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
22954 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
22956         * Make-lang.in (java.install-man):  New empty rule.
22957         * typeck.c (set_local_type):  New function.
22958         * expr.c (STORE_INTERNAL):  Call find_local_variable,
22959         not find_stack_slot.  Call set_local_type.
22961 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
22963         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
22964         and building RECORD_TYPE CONSTRUCTORs.
22965         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22967         * lang.c (use_handles):  Change the default to 0.
22968         * decl.c:  Define and build class_type, field_type, utf8const_type.
22969         * class.c (make_class_data, make_field_value,
22970         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22971         hashUtf8String, strLengthUtf8, mangled_classname:
22972         Functions to build reflective data structures.
22973         * parse.c (yyparse):  Call make_class_data.
22975         * jcf-io.c (open_class, find_classfile):  New functions.
22976         * jcf-dump.c:  Support reading classfile from explicitly-named
22977         class file (without CLASSPATH searching).
22979 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22981         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
22982         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22983         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22984         (get_constant):  Now trivial for CONSTANT_Utf8.
22986         * jcf.h:  Make NEW_CPOOL the default.
22987         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
22989 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22991         New directory.
22994 Copyright (C) 1996-2014 Free Software Foundation, Inc.
22996 Copying and distribution of this file, with or without modification,
22997 are permitted in any medium without royalty provided the copyright
22998 notice and this notice are preserved.