* gcc.dg/guality/guality.exp: Skip on AIX.
[official-gcc.git] / gcc / java / ChangeLog
blob9cc34c51a5a4a3f31cb11658323e73099d4f6d4e
1 2013-06-05  Jan Hubicka  <jh@suse.cz>
3         * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
4         instead of mark_decl_referenced.
6 2013-05-29  Jan Hubicka  <jh@suse.cz>
8         * decl.c (java_mark_decl_local): Update for new symtab flags.
10 2013-05-22  Matthias Klose  <doko@ubuntu.com>
12         * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
14 2013-05-16  Jason Merrill  <jason@redhat.com>
16         * Make-lang.in (jc1$(exeext)): Use link mutex.
18 2013-05-06  Jakub Jelinek  <jakub@redhat.com>
20         PR libgcj/57074
21         * class.c (emit_symbol_table): Use array type of the
22         right size for the_syms_decl and its DECL_INITIAL, instead
23         of symbols_array_type.  Set TREE_TYPE (the_syms_decl) to it.
24         (emit_assertion_table): Use array type of the right size
25         for table_decl and its DECL_INITIAL.
27 2013-04-15  Gerald Pfeifer  <gerald@pfeifer.com>
29         * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
30         (Resources): Adjust reference to Mauve.
31         Remove link to java.sun.com.
32         Refer to GCC, not gcc.
34 2013-04-09  Richard Biener  <rguenther@suse.de>
36         * expr.c (build_java_binop): Pass a type to build_int_cst.
38 2013-03-22  Kai Tietz  <ktietz@redhat.com>
40         * lang.c (put_decl_node): Don't iterate over end_params_node.
42 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
44         * jcf-dump.c (version): Update copyright notice dates.
46 2012-11-16  Diego Novillo  <dnovillo@google.com>
48         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
50         * boehm.c: Use new vec API in vec.h.
51         * class.c: Likewise.
52         * constants.c: Likewise.
53         * decl.c: Likewise.
54         * expr.c: Likewise.
55         * java-tree.h: Likewise.
56         * jcf-parse.c: Likewise.
57         * resource.c: Likewise.
58         * verify-glue.c: Likewise.
60 2012-11-15  Jan Hubicka  <jh@suse.cz>
62         * builtins.c (define_builtin): Accept ECF flags and
63         use set_call_expr_flags.
64         (initialize_builtins): Update.
66 2012-10-01  Lawrence Crowl  <crowl@google.com>
68         * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
69         (JCFDUMP_OBJS): Add dependence on hash-table.o.
70         (jcf-io.o): Add dependence on hash-table.h.
71         * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
73 2012-09-24  Lawrence Crowl  <crowl@google.com>
75         * decl.c (java_init_decl_processing): Change to new double_int API.
76         * jcf-parse.c (get_constant): Likewise.
77         * boehm.c (mark_reference_fields): Likewise.
78         (get_boehm_type_descriptor): Likewise.
80 2012-07-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
82         * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
83         (bootstrap_method): Likewise for the bootstrap_arguments field.
85 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
87         * java-gimplify.c Include dumpfile.h instead of tree-dump.h
88         * Make-lang.in: Fix dependencies.
90 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
92         * java-tree.h (force_evaluation_order): Remove prototype.
93         * expr.c (force_evaluation_order): Remove unused function.
95 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
97         * decl.c: Do not include libfuncs.h.
98         * class.c: Do not include defaults.h.
99         * jvgenmain.c: Likewise.
100         * magnle.c: Likewise.
101         * Make-lang.in (decl.o): Fix dependencies.
103 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
105         * verify.h: Do not include system.h and coretypes.h here.
106         * verify-impl.c: Include them here instead.
108 2012-07-05  Uros Bizjak  <ubizjak@gmail.com>
110         * jcf-io.c (read_zip_member): Initialize d_stream.
112 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
114         * resource.c: Do not include output.h.
116 2012-05-21  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
118         PR java/52815
119         * class.c (emit_register_classes_in_jcr_section): Revise placement
120         of #ifdef JCR_SECTION_NAME.
122 2012-04-22  Jan Hubicka  <jh@suse.cz>
124         * class.c (build_utf8_ref): Do not mark varpool node as needed.
126 2012-04-20  Jan Hubicka  <jh@suse.cz>
128         * class.c (make_local_function_alias): Do not mark symbol referenced.
130 2012-04-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
132         * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
133         results to long to match formats.
135 2012-04-11  Andrew Haley  <aph@redhat.com>
137         * jcf-reader.c (jcf_parse_bootstrap_methods): Add
138         ATTRIBUTE_UNUSED.
140 2012-04-11  Andrew Haley  <aph@redhat.com>
142         * jcf.h (bootstrap_method): New.
143         (BootstrapMethods): New.
144         (JCF): Add BootstrapMethods.
145         (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
146         * jcf-reader.c (jcf_parse_bootstrap_methods): New.
147         (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
148         and InvokeDynamic.
149         (jcf_parse_bootstrap_methods): New.
150         * javaop.def (invokedynamic): New opcode.
151         * jcf-parse.c (get_constant): An unknown constant type should not
152         be an internal error, but a fatal one.  Make it so.
153         * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
154         (HANDLE_END_BOOTSTRAP_METHODS): New.
155         (print_constant): Handlers for MethodHandle, MethodType, and
156         InvokeDynamic.
158 2012-04-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
160         * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
161         Clear TREE_READONLY.
163 2012-03-29  Steven Bosscher  <steven@gcc.gnu.org>
165         PR java/52730
166         * class.c (emit_register_classes_in_jcr_section): New function.
167         (emit_Jv_RegisterClass_calls): New function, split out from ...
168         (emit_register_classes): ... here. Reorganize.  Do not call
169         output_constant.
171 2012-01-23  Andreas Schwab  <schwab@linux-m68k.org>
173         * lang.c (java_init_options_struct): Set
174         frontend_set_flag_trapping_math.
176 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
178         * jcf-dump.c (version): Update copyright notice dates.
180 2011-12-03  Matthias Klose  <doko@ubuntu.com>
182         * expr.c (SPECIAL_WIDE): Fix typo in message.
184 2011-11-23  Jeffrey A Law  (law@cygnus.com)
186         * lang.c (java_init_options_struct): Disable optimizations
187         which assume a NULL pointer dereference will cause a fault.
189 2011-11-07  Richard Henderson  <rth@redhat.com>
191         * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
192         (compareAndSwapLong_builtin): Likewise.
193         (compareAndSwapObject_builtin): Likewise.
194         (VMSupportsCS8_builtin): Likewise.
196 2011-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
198         * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
200 2011-10-15  Tom Tromey  <tromey@redhat.com>
201             Dodji Seketeli  <dodji@redhat.com>
203         * jcf-parse.c (set_source_filename): Adjust to the new map API.
205 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
207         * class.c (build_static_field_ref): Delete old interface with two
208         parallel arrays to hold standard builtin declarations, and replace
209         it with a function based interface that can support creating
210         builtins on the fly in the future.  Change all uses, and poison
211         the old names.  Make sure 0 is not a legitimate builtin index.
212         * decl.c (java_init_decl_processing): Ditto.
213         * except.c (compareAndSwapLong_builtin): Ditto.
214         (compareAndSwapObject_builtin): Ditto.
215         (putVolatile_builtin): Ditto.
216         (define_builtin): Ditto.
217         (check_for_builtin): Ditto.
218         * expr.c (rewrite_arglist_getcaller): Ditto.
219         (expand_java_field_op): Ditto.
221 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
223         * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
224         New.
225         (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
226         rules.
228 2011-08-18  Peter Collingbourne  <peter@pcc.me.uk>
230         * expr.c (expand_invoke) Use the type of the method rewrite
231         target.
233 2011-08-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
235         * jcf-dump.c (print_constant): Cast first frexp arg.
237 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
239         * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
241 2011-07-19  Richard Guenther  <rguenther@suse.de>
243         * builtins.c (static): Use fold_build_pointer_plus.
244         * class.c (make_class_data): Likewise.
245         (build_symbol_entry): Likewise.
246         * except.c (build_exception_object_ref): Likewise.
247         * expr.c (build_java_arrayaccess): Likewise.
248         (build_field_ref): Likewise.
249         (build_known_method_ref): Likewise.
250         (build_invokevirtual): Likewise.
252 2011-07-06  Richard Guenther  <rguenther@suse.de>
254         * decl.c (java_init_decl_processing):
255         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
257 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
259         * builtins.c: Add sync_ or SYNC__ to builtin names.
260         * expr.c: Add sync_ or SYNC__ to builtin names.
262 2011-06-07  Richard Guenther  <rguenther@suse.de>
264         * decl.c (java_init_decl_processing): Call build_common_nodes,
265         build_common_nodes_2 at the beginning.  Remove then duplicate
266         initializations.
268 2011-06-07  Richard Guenther  <rguenther@suse.de>
270         * decl.c (java_init_decl_processing): Properly initialize
271         size_type_node.
273 2011-05-30  Joern Rennecke  <joern.rennecke@embecosm.com>
275         PR middle-end/46500
276         * expr.c: Include "tm.h" .
278 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
280         * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
281         * expr.c (build_jni_stub): Likewise.
283 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
285         * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
286         of prefix.o.
288 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
290         * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
291         version.o.
292         (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
293         (JVGENMAIN_OBJS): Remove errors.o and intl.o.
294         (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
295         * jcf-dump.c: Include diagnostic.h.
296         (main): Initialize diagnostics.
297         * jvgenmain.c: Include diagnostic.h.
298         (main): Initialize diagnostics.
300 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
302         * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
304 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
306         * java-tree.h (global_bindings_p): Adjust prototype.
307         * decl.c (global_bindings_p): Return bool.
309 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
311         * expr.c (expand_java_switch): Call build_case_label.
312         (expand_java_add_case): Likewise.
314 2011-04-29  Richard Guenther  <rguenther@suse.de>
316         PR middle-end/48819
317         * constants.c (build_constants_constructor): Use ptr_type_node for
318         temp.
320 2011-04-20  Jim Meyering  <meyering@redhat.com>
322         * jcf-parse.c (java_parse_file): Remove useless if-before-free.
324 2011-04-18  Jim Meyering  <meyering@redhat.com>
326         * jcf-parse.c: Fix typo in comment.
328 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
330         * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
332 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
334         * java-tree.h (union lang_tree_node): Check for TS_COMMON before
335         calling TREE_CHAIN.
337 2011-04-11  Martin Jambor  <mjambor@suse.cz>
339         * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
340         cgraph_node and handle returned NULL.
342 2011-03-25  Kai Tietz  <ktietz@redhat.com>
344         * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
345         instead of strcmp.
346         (set_source_filename): Likewise.
347         * win32-host.c (jcf_open_exact_case): Likewise.
349 2011-03-21  Kai Tietz  <ktietz@redhat.com>
351         PR target/12171
352         * lang.c (java_attribute_table): Adjust table.
354 2011-02-13  Joseph Myers  <joseph@codesourcery.com>
356         * jvspec.c (jvgenmain_spec): Remove %{a*}.
358 2011-01-21  Kai Tietz  <kai.tietz@onevision.com>
360         PR bootstrap/47215
361         * decl.c (java_init_decl_processing): Remove
362         va_list_type_node related type initializations.
364 2011-01-11  Kai Tietz  <kai.tietz@onevision.com>
366         PR bootstrap/47215
367         * decl.c (java_init_decl_processing): Initialize
368         long_integer_type_node.
370 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
372         PR bootstrap/47215
373         * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
375 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
377         * decl.c (java_init_decl_processing): Setup va_list_type_node.
379 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
381         * jcf-dump.c (version): Update copyright notice dates.
383 2010-12-15  Dave Korn  <dave.korn.cygwin@gmail.com>
385         * decl.c (java_init_decl_processing): Initialise integer_three_node.
386         * lang.c (put_decl_node): Handle nested function decls.
388 2010-12-07  Joseph Myers  <joseph@codesourcery.com>
390         * jcf-parse.c: Don't include assert.h.
391         (java_parse_file): Use gcc_assert.
393 2010-12-03  Joseph Myers  <joseph@codesourcery.com>
395         * lang.opt (static-libgcj): New option.
397 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
399         * jcf-parse.c: Don't include toplev.h.
400         * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
402 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
404         * boehm.c: Don't include toplev.h.
405         * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
407 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
409         * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
410         verify-glue.c: Don't include toplev.h.
411         * Make-lang.in: Dependencies for above files changed to remove
412         toplev.h.
414 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
416         * boehm.c: Include "config.h" instead of <config.h>.
417         * builtins.c: Don't include <stdarg.h>.
418         * class.c: Don't include "stdio.h".
419         (O_BINARY): Don't define here.
420         * jcf-depend.c: Don't include <assert.h>.
421         (jcf_dependency_set_dep_file, jcf_dependency_init,
422         jcf_dependency_write): Use gcc_assert.
423         * jcf-io.c (O_BINARY): Don't define here.
424         * jcf-path.c: Don't include "tm.h".
425         (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
426         * resource.c: Don't include "stdio.h".
427         (O_BINARY): Don't define here.
428         * verify-impl.c: Don't include <stdio.h>.
430 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
432         * jcf-parse.c (java_parse_file): Take no arguments.
433         * java-tree.h (java_parse_file): Update prototype.
435 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
436             Andrew Haley  <aph@redhat.com>
438         PR java/46386
439         * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
441 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
443         * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
444         * lang.c (java_handle_option): Take location_t parameter.
446 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
448         * expr.c (expand_java_field_op): Use %' in diagnostic.
449         * jcf-parse.c (java_parse_file): Use %' in diagnostics.
450         * jvspec.c (lang_specific_driver): Use %' in diagnostic.
451         * lang.c (java_post_options): Use %' in diagnostics.
453 2010-11-06  Joern Rennecke  <amylaar@spamcop.net>
455         PR middle-end/46314
456         * class.c: Include target.h.
457         (make_local_function_alias):
458         Use targetm.asm_out.generate_internal_label.
459         * expr.c (lookup_label, generate_name): Likewise.
461 2010-11-03  Joern Rennecke  <joern.rennecke@embecosm.com>
463         PR bootstrap/44335
464         * jfc-parse.c (target.h): Include.
465         (handle_constant): Use targetm.words_big_endian and
466         targetm.float_words_big_endian.
467         (get_constant): Use targetm.float_words_big_endian.
469 2010-10-13  Richard Henderson  <rth@redhat.com>
471         * lang.c (java_eh_personality): Update call to
472         build_personality_function.
474 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
476         * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
477         options.h.
479 2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
481         * decl.c (java_init_decl_processing): Use build_function_type_list
482         instead of build_function_type.
483         * jcf-parse.c (java_emit_static_constructor): Likewise.
484         * builtins.c (initialize_builtins): Likewise.
486 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
488         * lang.c (java_init_options_struct): New.  Split out from
489         java_init_options.
490         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
492 2010-10-04  Andi Kleen <ak@linux.intel.com>
494         * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
495         Add + to build rule.
497 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
499         * lang.opt: Don't use VarExists.
501 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
503         * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
504         flag_force_classes_archive_check, flag_redundant, flag_newer,
505         flag_use_divide_subroutine, flag_use_atomic_builtins,
506         flag_use_boehm_gc, flag_hash_synchronization,
507         flag_check_references, flag_optimize_sci, flag_indirect_classes,
508         flag_indirect_dispatch, flag_store_check,
509         flag_reduced_reflection): Remove.
510         * jcf-dump.c (flag_newer): Remove.
511         * jcf.h (quiet_flag): Remove.
512         * parse.h (quiet_flag): Remove.
514 2010-09-28  Richard Henderson  <rth@redhat.com>
516         * lang.c: Include "target.h".
517         (java_eh_personality): Use targetm.except_unwind_info.
518         * Make-lang.in (lang.o): Update deps.
520 2010-09-27  Andrew Haley  <aph@redhat.com>
522         PR java/45773
523         * jvgenmain.c (main): Fix arg processing.
525 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
527         * jvspec.c (lang_specific_driver): Handle OPT__help instead of
528         OPT_fhelp.
529         * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
530         -dependencies, -encoding, -extdirs, -include-directory,
531         -include-directory=, -output-class-directory,
532         -output-class-directory=, -resource, -resource=,
533         -user-dependencies): New.
535 2010-09-16  Richard Guenther  <rguenther@suse.de>
537         * jcf-parse.c (current_file_list): Remove.
538         (java_parse_file): Use build_translation_unit_decl.  Adjust.
540 2010-09-03  Joseph Myers  <joseph@codesourcery.com>
542         * lang.opt (d): New.
544 2010-09-03  H.J. Lu  <hongjiu.lu@intel.com>
546         PR java/45504
547         * jvgenmain.c (main): Check "-D XXX=YYY".
549 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
551         * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
553 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
555         * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
556         fCLASSPATH=): Mark as Java options and as aliases.
557         * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
558         (lang_specific_driver): Don't handle options marked as aliases.
559         * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
561 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
563         * Make-lang.in (jvspec.o): Update dependencies.
564         * jvspec.c: Include opts.h.
565         (PARAM_ARG): Remove.
566         (find_spec_file): Do not add leading -specs=.
567         (lang_specific_driver): Use cl_decoded_option structures.
568         * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
569         extdirs, fmain=, s-bc-abi): New options.
571 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
573         * class.c: Use FOR_EACH_VEC_ELT.
574         * expr.c: Likewise.
575         * jcf-parse.c: Likewise.
576         * resource.c: Likewise.
578 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
580         * lang.opt (MD_, MMD_, version): Mark RejectDriver.
582 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
584         * class.c (build_utf8_ref): Fix code formatting from previous commit.
586 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
588         * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
590 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
592         * lang.c (java_handle_option): Update prototype and return value
593         type.
595 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
597         * lang.c (java_option_lang_mask): New.
598         (java_init_options): Update prototype.
599         (LANG_HOOKS_OPTION_LANG_MASK): Define.
601 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
603         * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
604         * boehm.c: Likewise.
605         * class.c: Likewise.
606         * decl.c: Likewise.
607         * expr.c: Likewise.
608         * jcf-parse.c: Likewise.
609         * typeck.c: Likewise.
610         * verify-glue.c: Likewise.
612 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
614         * boehm.c: Include diagnostic-core.h in every file that includes
615         toplev.h.
616         * class.c: Likewise.
617         * constants.c: Likewise.
618         * decl.c: Likewise.
619         * except.c: Likewise.
620         * expr.c: Likewise.
621         * jcf-parse.c: Likewise.
622         * mangle.c: Likewise.
623         * mangle_name.c: Likewise.
624         * resource.c: Likewise.
625         * typeck.c: Likewise.
626         * verify-glue.c: Likewise.
628 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
630         PR bootstrap/44825
631         * class.c (make_class_data): Cast result of VEC_length calls to int.
633 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
635         * constants.c (build_constants_constructor): Use build_constructor
636         instead of build_constructor_from_list.
637         * class.c (make_method_value): Likewise.
638         (get_dispatch_table): Likewise.
639         (make_class_data): Likewise.
640         (emit_indirect_register_classes): Likewise.
641         (emit_symbol_table): Likewise.
642         (add_assertion_table_entry): Likewise.
643         (emit_assertion_table): Likewise.
644         (make_field_value): Use build_constructor_single instead of
645         build_constructor_from_list.
647 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
649         * java-tree.h (struct lang_type) [catch_classes]: Change type to a
650         VEC.
651         * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
652         instead of tree_cons.
653         * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
654         (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
656 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
658         * lang.c: Do not include except.h
659         * except.c: Likewise.
660         (doing_eh): New, moved from except.c (in gcc/) but removed the
661         do_warning flag.
662         (maybe_start_try): Update doing_eh call.
663         * Make-lang.in: Update dependencies.
665 2010-06-23  Anatoly Sokolov  <aesok@post.ru>
667         * decl.c (java_init_decl_processing): Use double_int_to_tree instead
668         of build_int_cst_wide.
669         * boehm.c (set_bit): Remove.
670         (mark_reference_fields): Use double_int type for 'mask' argument.
671         Use double_int_setbit instead of set_bit.
672         (get_boehm_type_descriptor): Use double_int_setbit instead of
673         set_bit. Use double_int_to_tree instead of build_int_cst_wide.
675 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
677         * gcj.texi: Move to GFDL version 1.3.  Fix copyright years.
679 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
681         * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
683         * jcf-parse.c (java_parse_file): Likewise.
684         (process_zip_dir): Likewise.
686         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
687         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
689         * expr.c (add_type_assertion): Likewise.
691         * decl.c (make_binding_level): Likewise.
692         (java_dup_lang_specific_decl): Likewise.
694         * constants.c (set_constant_entry): Likewise.
695         (cpool_for_class): Likewise.
697         * class.c (add_method_1): Likewise.
698         (java_treetreehash_new): Likewise.
700         * java-tree.h (struct lang_type): Add variable_size GTY option.
701         (struct lang_decl): Likewise.
703         * jch.h (struct cpool_entry): Likewise.
705         * java-tree.h (java_treetreehash_create): Remove parameter ggc.
707         * except.c (prepare_eh_table_type): Update
708         java_treetreehash_create call.
710         * class.c (add_method_1): Update java_treetreehash_create call.
711         (java_treetreehash_create): Remove parameter gc.  Use
712         htab_create_ggc.
714 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
716         * jvspec.c (lang_specific_driver): Use GCC-specific formats in
717         diagnostics.
719 2010-05-30  Steven Bosscher  <steven@gcc.gnu.org>
721         * except.c: Include tm.h.
723 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
725         * jvspec.c (lang_specific_driver): Use fatal_error instead of
726         fatal.  Use warning instead of error for warnings.
728 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
730         * expr.c (get_symbol_table_index): Add spaces in expression.
732 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
734         * java-tree.h (method_entry): Declare.  Declare VECs containing it.
735         (struct lang_type): Change type of otable_methods, atable_methods, and
736         itable_methods to VECs.  Fix comment for atable_methods.
737         (emit_symbol_table): Take a VEC instead of a tree.
738         (get_symbol_table_index): Take a VEC * instead of a tree *.
739         * class.c (add_table_and_syms): Take a VEC instead of a tree.
740         (emit_symbol_table): Update for changed parameter type.
741         * expr.c (get_symbol_table_index): Likewise.
743 2010-05-27  Steven Bosscher  <steven@gcc.gnu.org>
745         * buildings.c: Pretend to be a backend file by undefining
746         IN_GCC_FRONTEND (still need rtl.h here).
748 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
750         * java-tree.h (struct lang_decl_func): Change type of throws_list
751         field to a VEC.
752         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
753         of DECL_FUNCTION_THROWS.
754         * class.c (make_method_value): Likewise.
756 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
758         * class.c (utf8_decl_list): Delete.
759         (build_utf8_ref): Remove references to it.
760         * java-tree.h (all_class_list): Delete.
761         (predef_filenames): Delete.
762         (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
763         Delete.
764         * jcf-parse.c (parse_roots): Decrease size to 2.
765         (current_file_list): Convert to a VEC.
766         (all_class_list): Declare.
767         (jcf_parse): Adjust for new type of all_class_list.
768         (java_layout_seen_class_methods): Likewise.
769         (predefined_filenames): Declare.
770         (add_predefined_file): Use it.
771         (predefined_filename_p): Likewise.
772         (java_parse_file): Adjust for new type of current_file_list.
774 2010-05-25  Jakub Jelinek  <jakub@redhat.com>
776         * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
777         for interfaces.
779         PR debug/43260
780         * java-tree.h (pending_static_fields): New extern declaration.
781         (java_write_globals): New prototype.
782         * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
783         * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
784         of a static field push it into pending_static_fields vector.
785         * class.c (pending_static_fields): New variable.
786         (add_field): If static field is not DECL_EXTERNAL, push it into
787         pending_static_fields vector.
788         (java_write_globals): New function.
790 2010-05-24  Nathan Froyd  <froydnj@codesourcery.com>
792         * expr.c (quick_stack): Change type to a VEC.  Update comment.
793         (tree_list_free_list): Delete.
794         (flush_quick_stack): Update for quick_stack type change.
795         (push_value): Likewise.
796         (pop_value): Likewise.
798 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
800         * java-gimplify.c: Do not include tm.h, toplev.h.
801         * typeck.c: Do not include tm.h.
802         * mangle_name.c: Do not include tm.h.
803         * jcf-dump.c: Do not include tm.h, ggc.h.
804         * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
805         * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
806         and timevar.h.
807         * jcf-parse.c: Do not include tm.h and tm_p.h.
808         * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
809         target.h, and expr.h.
810         * except.c: Do not include tm.h, rtl.h, function.h.
811         * builtins.c: Do not include convert.h.  Explain why RTL headers
812         have to be included here.
813         * verify-glue.c: Do not include tm.h.
814         * jcf-depend.c: Do not include tm.h.
815         * jcf-reader.c: Include ggc.h.
816         * jcf-io.c: Do not include tm.h, toplev.h.
817         * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
818         gimple.h.
819         * lang.c: Do not include rtl.h, expr.h.
820         * Make-lang.in: Update dependencies.
822 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
824         * jcf-parse.c: Include bitmap.h.
825         * Make-lang.in: Update dependencies.
827 2010-05-20  Jakub Jelinek  <jakub@redhat.com>
829         PR debug/43521
830         * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
831         PARM_DECL.
833 2010-05-19  Anatoly Sokolov  <aesok@post.ru>
835         * jcf-parse.c (get_constant): Use double_int_to_tree instead of
836         build_int_cst_wide_type.
838 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
840         * expr.c (pop_arguments): Fix use of undeclared variable.
842 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
844         * expr.c (expand_java_multianewarray): Use build_call_vec instead of
845         build_call_list.
846         (pop_arguments): Return a VEC instead of a tree.  Take a method type
847         rather than a list of argument types.
848         (rewrite_rule): Change signature. of rewrite_arglist member.
849         (rewrite_arglist_getcaller): Update signature.
850         (rewrite_arglist_getclass): Likewise.
851         (maybe_rewrite_invocation): Update for rewrite_arglist change.
852         (build_known_method_ref): Take a VEC instead of a tree.
853         (invoke_build_dtable): Likewise.
854         (expand_invoke): Update calls to pop_arguments.  Use build_call_vec
855         instead of build_call_list.
856         (build_jni_stub): Use build_call_vec instead of build_call_list.
857         * java-tree.h (maybe_rewrite_invocation): Update declaration.
858         (build_known_method_ref): Likewise.
859         (invoke_build_dtable): Likewise.
861 2010-05-14  Nathan Froyd  <froydnj@codesourcery.com>
863         PR 44103
864         * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
865         vector.  Move call to build_constructor...
866         (FINISH_RECORD_CONSTRUCTOR): ...here.  Add necessary arguments.  Clear
867         TREE_CONSTANT on the constructor.
868         (PUSH_SUPER_VALUE): Change first argument to a vector.
869         (PUSH_FIELD_VALUE): Likewise.
870         * resource.c (compile_resource_data): Update calls to above macros.
871         * constants.c (build_constants_constructor): Likewise.
872         * class.c (build_utf8_ref): Likewise.
873         (make_field_value): Likewise.
874         (make_method_value): Likewise.
875         (add_table_and_syms): New function.
876         (make_class_data): Call it.  Update calls to above macros.
877         (build_symbol_table_entry): New function.
878         (build_symbol_entry): Call it.  Update calls to above macros.
879         (emit_symbol_table): Likewise.
880         (make_catch_class_record): Update calls to above macros.
881         (build_assertion_table_entry): New function.
882         (add_assertion_table_entry): Call it.
883         (emit_assertion_table): Likewise.
885 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
887         PR 40989
888         * lang.c (java_handle_option): Add argument kind.
890 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
892         * decl.c (java_init_decl_processing): Remove argument in call to
893         initialize_sizetypes
895 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
897         * exception.cc (_Jv_Throw): Avoid set but not used warning.
898         * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
899         sizeof to avoid set but not used warnings.
901 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
903         * lang.c (java_post_options): Constify variable "dot".
905         * jcf-parse.c (set_source_filename): Constify variable "dot".
906         (load_class): Constify variable "separator".
907         Use get_identifier_with_length.
909         * jvspec.c (lang_specific_driver): Constify two variables named "p".
911 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
913         * jcf-dump.c (version): Update copyright notice dates.
915 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
917         * jvspec.c (lang_specific_driver): Remove unused
918         saw_verbose_flag variable.
919         * jcf-dump.c (main): Remove unused general_purpose_bits
920         variable.
921         * builtins.c (initialize_builtins): Remove unused float_ftype_float
922         variable.
923         * expr.c (java_stack_pop): Remove unused val variable.
924         (build_jni_stub): Remove unused res_type variable.
925         * verify-impl.c (check_field_constant): Remove unused len variable.
927 2009-10-20  Joel Dice <dicej@mailsnare.net>
929         PR java/28474
930         * mangle_name.c (append_unicode_mangled_name): Fix mangling
931         of names with multiple underscores and "U".
932         (unicode_mangling_length): Likewise.
934 2009-10-03  Simon Baldwin  <simonb@google.com>
936         * config-lang.in (lang_dirs): Remove zlib.
938 2009-09-28  Richard Henderson  <rth@redhat.com>
940         * builtins.c (initialize_builtins): Update call to
941         build_common_builtin_nodes.
942         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
944 2009-09-14  Richard Henderson  <rth@redhat.com>
946         * builtins.c (initialize_builtins): Update call to
947         build_common_builtin_nodes.
948         * decl.c (java_init_decl_processing): Don't call
949         default_init_unwind_resume_libfunc.
950         * except.c: Include tree-iterator.h.
951         (build_exception_object_var): New.
952         (build_exception_object_ref): Use it.
953         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
954         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
955         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
957 2009-09-13  Richard Guenther  <rguenther@suse.de>
958         Rafael Avila de Espindola  <espindola@google.com>
960         * decl.c (do_nothing): Remove.
961         (java_init_decl_processing): Do not set lang_eh_runtime_type.
962         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
963         * lang.c (java_eh_personality): New.
964         (java_eh_personality_decl): Likewise.
965         (LANG_HOOKS_EH_PERSONALITY): Define.
967 2009-09-03  Diego Novillo  <dnovillo@google.com>
969         * lang.c (lang_hooks): Remove const qualifier.
971 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
973         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
974         type.
976 2009-09-01  Richard Guenther  <rguenther@suse.de>
978         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
979         * java-tree.h (java_mark_addressable): Likewise.
980         * typeck.c (java_mark_addressable): Likewise.
982 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
984         * Make-lang.in (java.install-pdf): Install gcj.pdf in
985         $(pdfdir)/gcc, alongside the other manuals.
987 2009-08-12  Andrew Haley  <aph@redhat.com>
989         * builtins.c (compareAndSwapInt_builtin): Use
990         flag_use_atomic_builtins.
991         (compareAndSwapLong_builtin): Likewise.
992         (compareAndSwapObject_builtin): Likewise.
993         * jvspec.c: Add flag_use_atomic_builtins.
994         * gcj.texi: Likewise.
995         * java-tree.h: Likewise.
996         * lang.opt: Likewise.
998 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
1000         PR debug/40990
1001         * lang.c (put_decl_node): Outputs different level of information
1002         depending on the verbosity level.
1004 2009-07-31  Andrew Haley  <aph@redhat.com>
1006         PR java/40867
1007         * decl.c (java_replace_references): Set EXPR_LOCATION on all
1008         generated expressions.
1009         (binding_level.loc): new field.
1010         (clear_binding_level): Initialize loc.
1011         (set_input_location): New function.
1012         (pushlevel): Set new binding_level.loc.
1013         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1014         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1015         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1017 2009-07-17  Richard Guenther  <rguenther@suse.de>
1019         PR c/40401
1020         * java-gimplify.c (java_genericize): Do not gimplify here.
1021         But replace all local references.
1022         (java_gimplify_expr): Do not replace local references here.
1023         (java_gimplify_modify_expr): Likewise.
1024         * jcf-parse.c (java_parse_file): Do not finalize the CU or
1025         optimize the cgraph here.
1026         * decl.c (java_replace_reference): Make static.
1027         (java_replace_references): New function.
1028         (end_java_method): Clear base_decl_map.
1029         * java-tree.h (java_replace_references): Declare.
1030         (java_replace_reference): Remove.
1032 2009-07-14  Taras Glek  <tglek@mozilla.com>
1033             Rafael Espindola  <espindola@google.com>
1035         * Make-lang.in (java.install-plugin): New target for
1036         installing plugin headers.
1038 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1040         * class.c: Replace %J by an explicit location. Update all calls.
1042 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1044         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1046 2009-06-29  Andrew Haley  <aph@redhat.com>
1048         PR java/40590
1049         * java-tree.h (cxx_keyword_p): New declaration.
1050         * mangle_name.c (utf8_cmp): Move here from mangle.c.
1051         (cxx_keywords): Likewise.
1052         (cxx_keyword_p): Likewise.
1053         (MANGLE_CXX_KEYWORDS): New macro.
1054         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1055         (append_gpp_mangled_name): Likewise.
1056         * mangle.c: Move code to mangle_name.c.
1057         (mangle_member_name): Don't call cxx_keyword_p.
1059 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
1061         * java-gimplify.c (java_gimplify_block): New argument to
1062         build_empty_stmt.
1063         * expr.c (force_evaluation_order): Same.
1064         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1065         * class.c: Same.
1066         * decl.c: Same.
1067         * jcf-parse.c: Same.
1068         * constants.c: Same.
1069         * resource.c: Same.
1070         * except.c: Same.
1071         * builtins.c: Same.
1072         * expr.c: Same.
1073         * java-tree.h (PUSH_FIELD): Add location field.
1075 2009-06-09  Ian Lance Taylor  <iant@google.com>
1077         * verify.h: Remove extern "C".
1079 2009-06-07  Ian Lance Taylor  <iant@google.com>
1081         * jcf-parse.c (handle_constant): Change local variable 'kind' to
1082         unsigned int.
1084 2009-06-01  Ian Lance Taylor  <iant@google.com>
1086         * jcf-io.c (find_class): Use CONST_CAST.
1088 2009-05-27  Ian Lance Taylor  <iant@google.com>
1090         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1091         $(LINKER).
1092         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1094 2009-05-26  Ian Lance Taylor  <iant@google.com>
1096         * Make-lang.in (jvspec.o): Use $(COMPILER).
1097         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1098         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1100 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
1102         * Make-lang.in (GCJ): Renamed to...
1103         (XGCJ): ... this.
1105 2009-04-27  Ian Lance Taylor  <iant@google.com>
1107         * builtins.c (java_builtins): Add casts to enum type.
1108         * verify-impl.c (check_class_constant): Add cast to enum type.
1109         (check_constant, check_wide_constant): Likewise.
1111 2009-04-27  Richard Guenther  <rguenther@suse.de>
1113         PR java/38374
1114         * constants.c (build_constants_constructor): Retain the old
1115         pointer type as valid TYPE_POINTER_TO after patching the
1116         type of the constant pool decl.
1118 2009-04-24  Ian Lance Taylor  <iant@google.com>
1120         * jcf-parse.c (handle_constant): Add cast to enum type.
1122 2009-04-21  Taras Glek <tglek@mozilla.com>
1124         * builtins.c: Update GTY annotations to new syntax
1125         * decl.c: Likewise
1126         * java-tree.h: Likewise
1127         * jcf.h: Likewise
1128         * lang.c: Likewise
1130 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
1132         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1133         license notices.
1135 2009-04-18  Ian Lance Taylor  <iant@google.com>
1137         * verify-impl.c (verify_instructions_0): Add cast to enum type.
1139 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
1141         * builtins.c (compareAndSwapLong_builtin,
1142         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1143         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1145 2009-03-31  Richard Guenther  <rguenther@suse.de>
1147         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1148         the first operand of binary and comaprison expressions.
1150 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
1152         PR rtl-optimization/323
1153         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1154         Give an error for -fexcess-precision=standard for processors where
1155         the option is significant.
1157 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1159         * lang.opt: Unify help text for -Wdeprecated.
1161 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
1163         * jcf-dump.c (version): Update copyright notice dates.
1165 2009-01-16  Richard Guenther  <rguenther@suse.de>
1167         PR tree-optimization/38835
1168         PR middle-end/36227
1169         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1171 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
1173         PR bootstrap/38262
1174         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1176 2008-11-04  Andrew Haley  <aph@redhat.com>
1178         PR java/37068
1179         * jcf-parse.c (java_emit_static_constructor): Don't call
1180         cgraph_build_static_cdtor.  Rewrite.
1182 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
1184         * Make-lang.in (check-java-subtargets): New target.
1186 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
1188         PR target/35483
1189         * Make-lang.in (class.o): Depend on $(TM_P_H).
1190         (expr.o): Same.
1191         * class.c: Include tm_p.h.
1192         * expr.c: Include tm_p.h.
1194 2008-10-14  Andrew Haley  <aph@redhat.com>
1196         * constants.c (build_constant_data_ref): Make sure we only build
1197         one copy of the decl for the constant pool.
1199 2008-09-22  Andrew Haley  <aph@redhat.com>
1201         * expr.c (rules): Add new rule for
1202         gnu.java.lang.VMCPStringBuilder.toString.
1203         (rewrite_rule.new_classname): New field.
1204         (maybe_rewrite_invocation): Use new_classname field instead of
1205         DECL_CONTEXT (*method_p).
1206         Allow rewrite_arglist to be NULL.
1208 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1210         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1211         (java_get_callee_fndecl): Kill.
1213 2008-09-17  Jan Hubicka  <jh@suse.cz>
1215         PR c++/18071
1216         * class.c (add_method_1): Do not initialize DECL_INLINE.
1217         (make_local_function_alias): Likewise.
1218         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1219         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1221 2008-09-09  Richard Guenther  <rguenther@suse.de>
1223         * decl.c (build_result_decl): Remove no longer applicable
1224         promotion.
1226 2008-09-05  David Daney  <ddaney@avtrex.com>
1228         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1230 2008-08-21  David Daney  <ddaney@avtrex.com>
1232         * class.c (make_class_data): Don't add field_index when
1233         flag_reduced_reflection set.
1235 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
1237         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1239 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1241         PR 28875
1242         * lang.c (java_handle_option): Replace set_Wunused with
1243         warn_unused.
1245 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1247         * gcj.texi: Update copyright years.  Do not list GPL as
1248         Invariant Section.
1250 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
1252         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1253         from ctype's sizes.
1255         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1256         alignment.
1258 2008-07-29  Jan Hubicka  <jh@suse.cz>
1260         * lang.c (java_post_options): Remove handling of flag_no_inline.
1262 2008-07-28  Richard Guenther  <rguenther@suse.de>
1264         Merge from gimple-tuples-branch.
1266         2008-07-18  Richard Guenther  <rguenther@suse.de>
1268         * expr.c: Include tree-iterator.h.
1269         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1271         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
1273         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1274         * expr.c: Same.
1276         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
1278         * java-gimplify.c (java_gimplify_expr): Same.
1279         (java_gimplify_modify_expr): Same.
1280         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1282         2008-05-02  Diego Novillo  <dnovillo@google.com>
1284         * expr.c (build_java_throw_out_of_bounds_exception): Fix
1285         mixed declarations and code.
1287         2008-05-02  Doug Kwan  <dougkwan@google.com>
1289         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1290         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1292         2008-02-19  Diego Novillo  <dnovillo@google.com>
1294         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1296         * java-gimplify.c (java_gimplify_self_mod_expr): Change
1297         gimple_seq arguments to gimple_seq *.  Update all users.
1299         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
1301         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1302         sequences.
1303         (java_gimplify_self_mod_expr): Same.
1304         * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1305         sequences.
1307 2008-07-24  Jan Hubicka  <jh@suse.cz>
1309         * java/decl.c: Include cgraph.h
1310         (end_java_method): Remove non-unit-at-a-time code.
1311         (java_mark_decl_local): Likewise; sanity check that we don't touch
1312         finalized nodes.
1314 2008-07-15  Jan Hubicka  <jh@suse.cz>
1316         * lang.c (java_init_options): Enable unit-at-a-time by default.
1318 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1320         * Make-lang.in (jvspec.o): Fix dependencies.
1322 2008-07-06  Tom Tromey  <tromey@redhat.com>
1324         * Make-lang.in (java/parse.o-warn): Remove.
1325         (java/jcf-io.o-warn): Remove.
1327 2008-07-05  Tom Tromey  <tromey@redhat.com>
1329         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
1330         (compare_path): Remove.
1331         (java_or_class_file): Likewise.
1332         (memoized_dirlist_entry): Likewise.
1333         (memoized_dirlist_hash): Likewise.
1334         (memoized_dirlist_lookup_eq): Likewise.
1335         (memoized_dirlists): Likewise.
1336         (caching_stat): Likewise.
1337         (find_class): Use stat.
1338         * jcf.h (JCF_USE_SCANDIR): Remove.
1340 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
1342         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1343         doc/rebuild-gcj-db.1
1344         (java.uninstall): Likewise.
1345         (java.maintainer-clean): Likewise.
1346         (aot-compile.pod): New rule.
1347         (rebuild-gcj-db.pod): New rule.
1348         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1349         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1351 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1353         * Make-lang.in (java/jcf-io.o-warn): New.
1355 2008-06-24  Tom Tromey  <tromey@redhat.com>
1357         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1358         * expr.c (add_type_assertion): Rename argument.
1359         (build_java_arrayaccess): Don't name variable 'throw'.
1360         (ARRAY_NEW_MULTI): Don't name variable 'class'.
1361         * jcf-io.c (find_class): Don't name variable 'class'.
1362         * mangle.c (compression_table_add): Don't name variable 'new'.
1363         * constants.c (cpool_for_class): Rename argument.
1364         (alloc_constant_fieldref): Likewise.
1365         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1366         'class'.
1367         (read_class): Likewise.
1368         (parse_zip_file_entries): Likewise.
1369         (process_zip_dir): Likewise.
1370         * decl.c (java_mark_class_local): Rename argument.
1371         * class.c (GEN_TABLE): Use type_name, not typename.
1372         (gen_indirect_dispatch_tables): Likewise.
1373         (add_field): Rename argument.
1374         (is_compiled_class): Likewise.
1375         (safe_layout_class): Likewise.
1376         (emit_assertion_table): Likewise.
1377         * typeck.c (has_method): Rename argument.
1379 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1381         * class.c (ident_subst, mangled_classname, unmangle_classname,
1382         gen_indirect_dispatch_tables, add_method_1,
1383         build_fieldref_cache_entry, make_local_function_alias,
1384         layout_class, java_treetreehash_find, java_treetreehash_new,
1385         split_qualified_name): Fix for -Wc++-compat.
1386         * constants.c (set_constant_entry, cpool_for_class): Likewise.
1387         * decl.c (make_binding_level, java_dup_lang_specific_decl,
1388         start_java_method): Likewise.
1389         * except.c (prepare_eh_table_type): Likewise.
1390         * expr.c (type_assertion_hash, note_instructions): Likewise.
1391         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1392         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1393         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1394         Likewise.
1395         * jcf-parse.c (reverse, java_read_sourcefilenames,
1396         annotation_grow, rewrite_reflection_indexes, java_parse_file,
1397         process_zip_dir): Likewise.
1398         * jcf-path.c (add_entry, add_path, jcf_path_init,
1399         jcf_path_extdirs_arg): Likewise.
1400         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1401         * jvgenmain.c (do_mangle_classname): Likewise.
1402         * lang.c (put_decl_string): Likewise.
1403         * verify-impl.c (make_state_copy, make_state, add_new_state):
1404         Likewise.
1406 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1408         * gcj.texi: Expand TABs, remove whitespace from blank lines.
1410 2008-06-14  Tom Tromey  <tromey@redhat.com>
1412         PR java/36247:
1413         * class.c (build_class_ref): Initialize this_classdollar when
1414         needed.
1416 2008-05-23  Andrew Haley  <aph@redhat.com>
1418         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1419         pathname of source file.
1421 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
1423         * jcf-dump.c (print_constant): Use
1424         HOST_LONG_LONG_FORMAT.
1426 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
1428         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1429         DECL_PURE_P.
1431 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1433         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1434         (build_classdollar_field): Don't set TREE_INVARIANT.
1435         (get_dispatch_table): Don't set TREE_INVARIANT.
1436         (make_class_data): Don't set TREE_INVARIANT.
1437         (build_symbol_entry): Don't set TREE_INVARIANT.
1438         (emit_symbol_table): Don't set TREE_INVARIANT.
1439         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1440         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1441         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1442         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1444 2008-04-03  Tom Tromey  <tromey@redhat.com>
1446         * Make-lang.in (java_OBJS): New variable.
1448 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
1450         * java-tree.h (insert_block): Kill.
1451         * decl.c (insert_block): Kill.
1453 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
1455         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1456         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1457         gpl.texi.
1459 2008-03-27  Tom Tromey  <tromey@redhat.com>
1461         * Make-lang.in: Revert automatic dependency patch.
1463 2008-03-25  Tom Tromey  <tromey@redhat.com>
1465         * Make-lang.in: Removed most explicit .o targets.
1466         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
1467         ($(GCJ)$(exeext)): Update.
1468         (JAVA_OBJS): New variable.
1469         (JCFDUMP_OBJS): Reformat.
1470         (java_OBJS): New variable.
1471         (java/jvspec.o-warn): Update.
1472         (java/parse.o-warn): Remove.
1473         (JAVA_TREE_H): Remove.
1474         (java/jcf-io.o): Reduce to variable setting.
1475         (ALL_CPPFLAGS): Likewise.
1477 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
1479         * mangle.c (java_mangle_decl): Remove dead check.
1481 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
1483         * jcf-parse.c (java_parse_file): Assert binding levels are
1484         left in order.
1485         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1486         Delete.
1488 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
1490         * jcf-dump.c (version): Update copyright notice dates.
1492 2008-02-29  Tom Tromey  <tromey@redhat.com>
1494         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1495         method.
1496         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1498 2008-02-26  Tom Tromey  <tromey@redhat.com>
1500         * lang.c (java_post_options): Remove conditional.
1501         * expr.c (expand_byte_code): Remove old location code.
1502         * jcf-parse.c (set_source_filename): Remove old location code.
1503         (give_name_to_class): Likewise.
1504         (jcf_parse): Likewise.
1505         (duplicate_class_warning): Likewise.
1506         (parse_class_file): Likewise.
1507         (java_parse_file): Likewise.
1508         * decl.c (finish_method): Remove old location code.
1509         * class.c (push_class): Remove old location code.
1511 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1513         PR other/35107
1514         * Make-lang.in (jc1): Add $(GMPLIBS).
1516 2008-01-23  David Daney  <ddaney@avtrex.com>
1518         * class.c (hide)  Rename to...
1519         (java_hide_decl) ... this throughout, and make public.
1520         * resource.c (Jr_count): Remove.
1521         (compile_resource_data): Call java_mangle_resource_name to generate
1522         decl name.  Make resource decl public and hidden.
1523         * mangle.c (java_mangle_resource_name): New function.
1524         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1525         functions.
1527 2008-01-04  Andrew Haley  <aph@redhat.com>
1529         PR java/17779
1530         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1531         C90.
1533 2008-01-03  Andrew Haley  <aph@redhat.com>
1535         PR java/17779
1536         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1537         we're about to re-layout the type.
1539 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
1541         * lang.c (java_classify_record): Don't return
1542         RECORD_IS_INTERFACE for now.
1544 2007-12-18  Andrew Haley  <aph@redhat.com>
1546         PR java/27643
1547         * jcf-parse.c (java_parse_file): Remove call to
1548         java_mark_class_local.
1549         (parse_class_file): Reinstate call to java_mark_class_local here.
1550         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1551         already set, call java_mangle_decl() and make_decl_rtl() to
1552         rewrite its name as a hidden alias.
1554 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1556         PR debug/7081
1557         * lang.c (java_classify_record): New.
1558         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1560 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1562         PR 34081/C++
1563         * decl.c (finish_method): Pass 'false' for the new
1564         allocate_struct_function parameter.
1566 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1568         * expr.c (build_jni_stub): Use the computed jni func type for
1569         variable meth.
1571 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1573         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1575 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1577         * expr.c (type_assertion_hash): Hash type uids rather than
1578         tree pointers.
1580 2007-11-17  David Daney  <ddaney@avtrex.com>
1581             Andrew Haley  <aph@redhat.com>
1583         * constants.c (build_constants_constructor):  Use POINTER_SIZE
1584         insead of BITS_PER_WORD in big-endian work around.
1586 2007-11-07  Tom Tromey  <tromey@redhat.com>
1588         PR java/34019:
1589         * gcj.texi (Input Options): Add missing noun.
1591 2007-11-02  Tom Tromey  <tromey@redhat.com>
1593         PR java/33765:
1594         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1595         * zipfile.h (ZIPEMPTYMAGIC): New define.
1597 2007-11-01  Tom Tromey  <tromey@redhat.com>
1599         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1600         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1601         (java/jcf-io.o): Depend on zipfile.h.
1603 2007-10-17  Richard Guenther  <rguenther@suse.de>
1605         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1606         dependencies.
1608 2007-10-03  Andrew Haley  <aph@redhat.com>
1610         PR java/33639
1611         * class.c (mangled_classname): Detect and replace illegal
1612         characters in assembly language symbols.
1613         (gen_indirect_dispatch_tables): Call mangled_classname() on
1614         the type.
1616 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1618         * lang.c (java_print_error_function): Add third argument.
1620 2007-09-15  Tom Tromey  <tromey@redhat.com>
1622         * java-tree.h (struct lang_decl_func) <function_decl_body>:
1623         Remove.
1624         <init_final>: Likewise.
1625         * lang.c (java_dump_tree): Update.
1626         * java-tree.h (DECL_FUNCTION_BODY): Remove.
1628 2007-09-11  Jan Hubicka <jh@suse.cz>
1630         * decl.c (java_expand_body): Kill.
1631         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1633 2007-09-06  Tom Tromey  <tromey@redhat.com>
1635         * jcf-parse.c (parse_class_file): Re-enter the current file.
1637 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
1639         * boehm.c (mark_reference_fields): Move misaligned pointer check
1640         after JREFERENCE_TYPE_P test
1642 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
1644         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1645         if pointer is misaligned.
1647 2007-09-06  Tom Tromey  <tromey@redhat.com>
1649         * lang.c (java_post_options): Update.
1650         * jcf-parse.c (set_source_filename): Update.
1651         (give_name_to_class): Update.
1652         (jcf_parse): Update.
1653         (duplicate_class_warning): Update.
1654         (parse_class_file): Update.
1655         (java_parse_file): Update.
1656         * expr.c (expand_byte_code): Update.
1658 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1660         * decl.c (finish_method): Use set_cfun.
1662 2007-09-04  Andrew Haley  <aph@redhat.com>
1664         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1665         when using the ARM EABI.
1667 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1669         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1671 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1673         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1674         CONST_CAST.
1675         * jcf.h (JCF_FINISH): Likewise.
1677 2007-08-28  Tom Tromey  <tromey@redhat.com>
1679         * Make-lang.in (java.tags): Don't tag '*.y' files.
1681 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1683         * lang.c (java_decl_ok_for_sibcall): Likewise.
1685 2007-08-21  Paul Brook  <paul@codesourcery.com>
1686             Nathan Sidwell  <nathan@codesourcery.com>
1687             Mark Mitchell  <mark@codesourcery.com>
1688             Joseph Myers  <joseph@codesourcery.com>
1690         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
1691         date.
1693 2007-08-20  Richard Guenther  <rguenther@suse.de>
1695         * lang.c (java_tree_inlining_walk_subtrees): Remove.
1696         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1698 2007-08-17  Tom Tromey  <tromey@redhat.com>
1700         * typeck.c (find_method_in_interfaces): Update.
1701         * jcf-parse.c (load_class): Update.
1702         * java-gimplify.c (java_gimplify_component_ref): Removed.
1703         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
1704         arguments.
1705         (java_gimplify_expr): Update.
1706         * decl.c (java_init_decl_processing): Update.
1707         * class.c (set_constant_value): Update.
1708         (make_class_data): Update.
1709         (finish_class): Update.
1710         (build_static_field_ref): Update.
1711         (is_compiled_class): Update.
1712         (maybe_layout_super_class): Update.
1713         (layout_class): Update.
1714         (layout_class_method): Update.
1715         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1716         (lang_decl_var) <am, final_iud, cif>: Removed fields.
1717         (lang_decl_func) <init_calls_this>: Removed field.
1718         (lang_type) <dot_class, verify_method>: Removed fields.
1719         (FIELD_NESTED_ACCESS): Removed.
1720         (FIELD_NESTED_ACCESS_P): Removed.
1721         (DECL_FIELD_FINAL_IUD): Removed.
1722         (DECL_LOCAL_FINAL_IUD): Removed
1723         (LOCAL_FINAL_P): Removed.
1724         (FINAL_VARIABLE_P): Removed.
1725         (CLASS_FINAL_VARIABLE_P): Removed.
1726         (DECL_BIT_INDEX): Removed.
1727         (DECL_INIT_CALLS_THIS): Removed.
1728         (FIELD_LOCAL_ALIAS): Removed.
1729         (FIELD_LOCAL_ALIAS_USED): Removed.
1730         (FIELD_THISN): Removed.
1731         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1732         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1733         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1734         (TYPE_DOT_CLASS): Removed.
1735         (TYPE_VERIFY_METHOD): Removed.
1736         (ID_CLASSDOLLAR_P): Removed.
1737         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1738         Removed.
1739         (classdollar_identifier_node): Removed.
1740         (TYPE_UNKNOWN): Removed.
1741         (CLASS_FROM_SOURCE_P): Removed.
1742         * expr.c (build_jni_stub): Update.
1743         (force_evaluation_order): Update.
1744         (build_java_empty_stmt): Update.
1745         (build_class_init): Update.
1746         (java_stack_swap): Update.
1747         (build_jni_stub): Update.
1749 2007-08-17  Tom Tromey  <tromey@redhat.com>
1751         * java-tree.h (LABEL_TYPE_STATE): Removed.
1752         (load_type_state): Removed.
1753         (LABEL_PC): Removed.
1754         (LABEL_VERIFIED): Removed.
1755         (type_states): Declare.
1756         * expr.c (type_states): New global.
1757         (load_type_state): Now static.  Use type_states.  Changed
1758         argument.
1759         (lookup_label): Don't set LABEL_PC.
1760         (expand_byte_code): Don't use LABEL_VERIFIED.
1761         (note_instructions): Initialize type_states.
1762         * verify-glue.c (vfy_note_stack_depth): Rewrote.
1763         (vfy_note_stack_type): Use type_states.
1764         (vfy_note_local_type): Likewise.
1766 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1768         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1769         * jcf.h (JCF_FINISH): Likewise.
1771 2007-07-31  Nick Clifton  <nickc@redhat.com>
1773         * java-gimplify.c: Change copyright header to refer to version 3
1774         of the GNU General Public License and to point readers at the
1775         COPYING3 file and the FSF's license web page.
1776         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1777         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1778         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1779         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1780         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1781         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1782         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1784 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1786         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1788 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1790         * lang.c (java_get_callee_fndecl): Constify.
1792 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1794         * mangle.c (set_type_package_list): Constify.
1795         * verify-glue.c (vfy_make_string): Delete.
1796         * verify.h (vfy_make_string): Likewise.
1798 2007-07-26  Tom Tromey  <tromey@redhat.com>
1800         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1801         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1802         EXIT_BLOCK_LABELED_BLOCK): Likewise.
1803         * lang.c (java_tree_inlining_walk_subtrees): Update.
1804         (java_dump_tree): Likewise.
1805         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1806         Remove.
1807         * decl.c (push_labeled_block, pop_labeled_block): Remove.
1808         * java-gimplify.c (java_gimplify_labeled_block_expr,
1809         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1810         (java_gimplify_expr): Update.
1812 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1814         * class.c (java_treetreehash_hash, java_treetreehash_compare):
1815         Constify.
1816         * expr.c (type_assertion_eq): Likewise.
1817         * jcf-io.c (compare_path): Likewise.
1818         * jcf-parse.c (cmpstringp): Likewise.
1819         * verify-impl.c (get_one_type, compute_argument_types,
1820         compute_return_type): Likewise.
1822 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1824         PR target/32462
1825         PR libgcj/32465
1826         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1828 2007-07-12  Richard Guenther  <rguenther@suse.de>
1830         * expr.c (expand_java_return): RETURN_EXPR has void type.
1831         (build_jni_stub): Likewise.  Use a comparison against zero
1832         for null-pointer test in COND_EXPR.
1833         (build_field_ref): Build POINTER_PLUS_EXPR with correct
1834         type.  Convert result instead.
1835         (build_invokevirtual): Likewise.
1837 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
1839         PR 32617
1840         * lang.c (java_init): Remove setting of force_align_functions_log.
1841         * class.c (add_method_1): Set DECL_ALIGN of non-static method
1842         to cope with ptrmemfunc_vbit_in_pfn.
1844 2007-07-03  David Daney  <ddaney@avtrex.com>
1846         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
1847         include path.
1848         (doc/gcj.dvi): Same.
1849         (doc/gcj.pdf): Same.
1850         (java/index.html): Same.
1852 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
1854         * class.c (make_class_data): Build the index in sizetype.
1855         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1856         adding to a pointer type.
1857         (build_symbol_entry): Likewise.
1858         * expr.c (build_java_arrayaccess): Likewise.
1859         (build_field_ref): Likewise.
1860         (build_known_method_ref): Likewise.
1861         (build_invokevirtual): Likewise.
1862         * except.c (build_exception_object_ref): Do a
1863         NEGATIVE and then a POINTER_PLUS_EXPR instead
1864         of a MINUS_EXPR.
1866 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
1868         * typeck.c (java_signed_type): Remove.
1869         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1870         * java-tree.h (java_signed_type): Remove.
1872 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1874         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1875         (print_constant): Likewise.
1877 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
1879         * expr.c (build_java_binop): Use unsigned_type_for instead of
1880         java_unsigned_type.
1881         * java-tree.h (java_unsigned_type): Remove.
1882         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1883         * typeck.c (java_unsigned_type): Remove.
1885 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1887         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1888         instead of checking GIMPLE_STMT_P in chain_next.
1890 2007-04-06  Colin Walters  <walters@redhat.com>
1892         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1893         * jcf-io.c (open_class): Copy 'filename'.
1895 2007-04-03  Andrew Haley  <aph@redhat.com>
1897         * jvgenmain.c (main): Change main to use class$, not class$$.
1898         (do_mangle_classname): Likewise.
1899         * class.c (hide): New function.
1900         (add_field): Hide everything that shouldn't be visible outside a
1901         DSO.
1902         (build_static_class_ref): Likewise.
1903         (build_classdollar_field): Likewise.
1904         (make_class_data): Likewise.
1905         (layout_class_method): Likewise.
1906         * expr.c (special_method_p): New function.
1908         * class.c (push_class): Don't bogusly guess the source filename.
1909         * jcf-parse.c (give_name_to_class): Don't set input_location from
1910         DECL_ARTIFICIAL decls.
1912 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
1914         * typeck.c (java_signed_or_unsigned_type): Removed.
1915         (java_signed_type): use get_signed_or_unsigned_type instead of
1916         java_signed_or_unsigned_type.
1917         (java_unsigned_type): Ditto.
1918         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1919         * java-tree.h (java_signed_or_unsigned_type): Removed.
1921 2007-03-26  Tom Tromey  <tromey@redhat.com>
1923         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1924         (java.maintainer-clean): Likewise.
1925         (java.install-man): Likewise.
1926         (.INTERMEDIATE): Removed grmiregistry.pod.
1927         (grmiregistry.pod): Removed.
1928         * gcj.texi (Invoking gcjh): Removed.
1929         (Invoking gjnih): Likewise.
1930         (Invoking grmiregistry): Likewise.
1931         (direntry): Updated.
1932         (Top): Likewise.
1933         (which-gcj): Removed.
1935 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1937         * Make-lang.in: Add install-pdf target as copied from
1938         automake v1.10 rules.
1940 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
1942         * gcj.texi: Standardize title page.
1944 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1946         * class.c: Fix a comment typo.
1948 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1949             Brooks Moses  <brooks.moses@codesourcery.com>
1950             Lee Millward  <lee.millward@codesourcery.com>
1952         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1953         of build3.
1954         (BUILD_MONITOR_EXIT): Likewise.
1956         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1957         (java_gimplify_modify_expr): Likewise.
1959         * class.c (cache_this_class_ref): Use build_call_expr.
1960         (build_static_field_ref): Likewise.
1961         (emit_indirect_register_classes): Likewise.
1962         (emit_register_classes): Likewise.
1964         * resource.c (write_resource_constructor): Use build_call_expr.
1966         * builtins.c (builtin_creator_function): Change interpretation of
1967         the second parameter to be the whole CALL_EXPR instead of the arglist.
1968         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
1969         (min_builtin): Likewise.
1970         (abs_builtin): Likewise.
1971         (java_build_function_call_expr): Likewise.
1972         (convert_real): Likewise.
1973         (UNMARSHAL3): Likewise.
1974         (UNMARSHAL4): Likewise.
1975         (UNMARSHAL5): Likewise.
1976         (build_arglist_for_builtin): Delete.  Fix callers to use
1977         build_call_expr instead.
1978         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
1979         accessors.
1980         (compareAndSwapInt_builtin): Likewise.
1981         (compareAndSwapLong_builtin): Likewise.
1982         (compareAndSwapObject_builtin): Likewise.
1983         (putVolatile_builtin): Likewise.
1984         (getVolatile_builtin): Likewise.
1985         (VMSupportsCS8_builtin): Likewise.
1986         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1987         instead of arglist.
1989         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1990         (build_java_throw_out_of_bounds_exception): Likewise.
1991         (java_check_reference): Likewise.
1992         (build_java_arraystore_check): Likewise.
1993         (build_newarray): Likewise.
1994         (build_anewarray): Likewise.
1995         (expand_java_multinewarray): Use build_call_list instead of build3.
1996         (build_java_monitor): Use build_call_nary instead of build3.
1997         (java_create_object): Likewise.
1998         (expand_java_NEW): Likewise.
1999         (build_instanceof): Likewise.
2000         (expand_java_CHECKCAST): Likewise.
2001         (build_java_soft_divmod): Likewise.
2002         (build_java_binop): Likewise.
2003         (build_field_ref): Likewise.
2004         (build_class_init): Likewise.
2005         (rewrite_arglist_getcaller): Use build_call_expr.
2006         (build_invokeinterface):  Use build_call_nary instead of build3.
2007         (expand_invoke): Use build_call_list instead of build3.
2008         (build_jni_stub): Use build_call_nary, build_call_list, or
2009         build_call_expr instead of build3.
2010         (expand_java_field_op): Use build_call_expr instead of build3.
2011         (force_evaluation_order): Use new CALL_EXPR accessors.
2013         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2015 2007-02-15  David Daney  <ddaney@avtrex.com>
2017         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2018         (java.maintainer-clean):Add gc-analyze.1.
2019         (.INTERMEDIATE): Add gc-analyze.pod.
2020         (gc-analyze.pod): New rule.
2021         (java.install-man): Install gc-analyze.1
2022         * gcj.texi: Add new section for the gc-analyze program.
2024 2007-02-07  Andrew Haley  <aph@redhat.com>
2026         * class.c (uncache_this_class_ref): New.
2027         * expr.c (build_jni_stub): Initialize the class.
2028         (expand_byte_code): Call uncache_this_class_ref after generating
2029         code.
2031 2007-02-06  Tom Tromey  <tromey@redhat.com>
2033         PR java/30714:
2034         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2036 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
2038         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2040 2007-02-02  Andrew Haley  <aph@redhat.com>
2042         * expr.c (expand_byte_code): Call cache_this_class_ref() and
2043         cache_cpool_data_ref().
2044         Set TYPE_CPOOL_DATA_REF.
2045         (cache_cpool_data_ref): New function.
2046         * constants.c (build_ref_from_constant_pool): Remove special-case
2047         code for flag_indirect_classes.
2048         (build_constant_data_ref): Move special-case code for
2049         flag_indirect_classes here from build_ref_from_constant_pool.
2050         * decl.c (finish_method): Move class initialization from here to
2051         cache_this_class_ref.
2052         * class.c (cache_this_class_ref): New function.
2053         (build_class_ref): Use this_classdollar for the ouput class.
2055 2007-02-02  David Daney  <ddaney@avtrex.com>
2057         * class.c (is_compiled_class): Move check to avoid reloading
2058         current class.
2059         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2060         already set.
2062 2007-02-01  Andrew Haley  <aph@redhat.com>
2064         PR java/30641
2065         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2067 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
2069         * class.c, jcf-parse.c: Fix comment typos.
2071 2007-01-30  Tom Tromey  <tromey@redhat.com>
2073         * gcj.texi (Strings): Fix documentation for JvNewString.
2075 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2077         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2078         typos.
2080 2007-01-30  Ben Elliston  <bje@au.ibm.com>
2082         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2084 2007-01-29  Tom Tromey  <tromey@redhat.com>
2086         PR java/30607:
2087         * jvspec.c (lang_specific_driver): Handle separate -I argument.
2088         * lang.opt (-I): Add 'Separate'.
2090 2007-01-29  Andrew Haley  <aph@redhat.com>
2092         * class.c (add_method_1): Mark fndecl as external unless we are
2093         compiling it into this object file.
2095 2007-01-24  Andrew Haley  <aph@redhat.com>
2097         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2098         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2100 2007-01-22  Andrew Haley  <aph@redhat.com>
2102         * builtins.c (VMSupportsCS8_builtin): New function.
2104 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
2106         PR java/30454
2107         * jcf-io.c (opendir_in_zip): Close the file
2108         and free zipf before returning after an error.
2110 2007-01-16  Tom Tromey  <tromey@redhat.com>
2112         * java-tree.def: Added copyright header.
2114 2007-01-15  Tom Tromey  <tromey@redhat.com>
2116         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2117         case.
2118         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2119         Removed case.
2120         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2121         (EXPR_WFL_NODE): Likewise.
2122         (EXPR_WFL_LINECOL): Likewise.
2123         (EXPR_WFL_FILENAME): Likewise.
2124         (EXPR_WFL_LINENO): Likewise.
2125         (build_expr_wfl, expr_add_location): Don't declare.
2126         (build_unknown_wfl): Removed.
2127         (EXPR_WFL_FILENAME_NODE): Removed.
2128         (EXPR_WFL_COLNO): Removed.
2129         (EXPR_WFL_SET_LINECOL): Removed.
2130         (DECL_FUNCTION_WFL): Removed.
2131         (DECL_FIELD_FINAL_WFL): Removed.
2132         (struct lang_decl_func) <wfl>: Removed field.
2133         <called_constructor>: Likewise.
2134         <inner_access>: Likewise.
2135         (struct lang_decl_var) <wfl>: Removed field.
2136         (DECL_CONSTRUCTOR_CALLS): Removed.
2137         (DECL_FUNCTION_ACCESS_DECL): Likewise.
2138         (DECL_FUNCTION_INNER_ACCESS): Likewise.
2139         (DECL_SPECIFIC_COUNT): Likewise.
2140         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2141         * expr.c (build_expr_wfl): Removed.
2142         (expr_add_location): Likewise.
2144 2007-01-12  Tom Tromey  <tromey@redhat.com>
2146         * jcf-dump.c (main): Updated call to find_class.
2147         * lang.c (java_init): Removed dead code.
2148         * jcf-parse.c (read_class): Don't use java_source field.  Removed
2149         dead code.
2150         (parse_zip_file_entries): Don't use java_source field.
2151         (process_zip_dir): Likewise.
2152         (jcf_parse): Removed dead code.
2153         (java_parse_file): Likewise.
2154         (read_class): Updated call to find_class.
2155         * jcf-io.c (find_class): Don't use java_source field.  Removed
2156         'source_ok' argument, .java logic.
2157         * jcf.h (JCF) <java_source>: Removed field.
2158         (JCF_ZERO): Updated.    (find_class): Updated.
2159         * decl.c: Removed dead code.
2160         * class.c: Removed dead code.
2162 2007-01-11  Tom Tromey  <tromey@redhat.com>
2164         * typeck.c (convert): Don't use flag_emit_class_files.
2165         * lang.c (java_post_options): Don't use flag_emit_class_files.
2166         (java_handle_option): Don't use flag_extraneous_semicolon or
2167         flag_redundant.
2168         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2169         flag_emit_class_files.
2170         (load_class): Likewise.
2171         * java-tree.h (flag_emit_class_files): Don't declare.
2172         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2173         (flag_extraneous_semicolon): Don't declare.
2174         (flag_not_overriding): Likewise.
2175         (flag_static_local_jdk1_1): Likewise.
2176         (flag_redundant): Likewise.
2177         * expr.c (build_newarray): Don't use flag_emit_class_files.
2178         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2179         flag_emit_class_files.
2180         (build_class_ref): Likewise.
2181         * builtins.c (check_for_builtin): Don't use
2182         flag_emit_class_files.
2184 2007-01-10  Tom Tromey  <tromey@redhat.com>
2186         * lang.c (java_can_use_bit_fields_p): Removed.
2187         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2189 2007-01-09  Andrew Haley  <aph@redhat.com>
2191         * expr.c (build_java_arrayaccess): Rewrite to generate array
2192         access in canonical form.
2193         (expand_java_arraystore): Use build_fold_addr_expr() on address of
2194         array access.
2196 2007-01-03  Andrew Haley  <aph@redhat.com>
2198         PR java/28754
2199         * expr.c (expand_java_field_op): If we're initializing a field's
2200         declaring interface we should not also initialize the class
2201         context in which it was referenced.
2203 2007-01-02  Tom Tromey  <tromey@redhat.com>
2205         * java-tree.h (compiling_from_source, current_encoding,
2206         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2207         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2208         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2209         JTI_WFL_OPERATOR): Removed
2210         (finit_identifier_node, instinit_identifier_node,
2211         length_identifier_node, super_identifier_node,
2212         continue_identifier_node, access0_identifier_node, wfl_operator):
2213         Removed.
2214         (cyclic_inheritance_report,
2215         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2216         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2217         DECL_FIXED_CONSTRUCTOR_P): Removed.
2218         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2219         Removed.
2220         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2221         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2222         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2223         import_list, import_demand_list>: Removed.
2224         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2225         cxx_keyword_p): Removed.
2226         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2227         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2228         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2229         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2230         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2231         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2232         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2233         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2234         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2235         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2236         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2237         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2238         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2239         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2240         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2241         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2242         java_parse_abort_on_error, extract_field_decl): Removed.
2243         (finput): Declare.
2244         * lang.c: (compiling_from_source, current_encoding): Removed.
2245         (java_handle_option): Ignore -fencoding.
2246         * parse.h: Don't include lex.h.
2247         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2248         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2249         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2250         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2251         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2252         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2253         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2254         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2255         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2256         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2257         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2258         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2259         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2260         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2261         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2262         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2263         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2264         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2265         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2266         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2267         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2268         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2269         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2270         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2271         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2272         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2273         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2274         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2275         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2276         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2277         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2278         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2279         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2280         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2281         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2282         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2283         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2284         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2285         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2286         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2287         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2288         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2289         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2290         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2291         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2292         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2293         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2294         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2295         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2296         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2297         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2298         SET_CPC_STATIC_INITIALIZER_STMT,
2299         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2300         java_complete_class, java_check_circular_reference,
2301         java_fix_constructors, java_layout_classes, java_reorder_fields,
2302         java_method_add_stmt, java_get_line_col, reset_report,
2303         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2304         java_finish_classes, ctxp, ctxp_for_generation,
2305         ctxp_for_generation_last): Removed.
2306         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2307         * mangle.c (utf8_cmp): New function.
2308         (cxx_keywords): New global.
2309         (cxx_keyword_p): New function.
2310         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2311         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2312         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2313         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2314         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2315         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2316         * Make-lang.in (java.srcextra): Do nothing.
2317         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2318         (JAVA_OBJS): Don't mention deleted files.
2319         (java.mostlyclean): Likewise.
2320         (java.clean): Likewise.
2321         (JAVA_LEX_C): Removed.
2322         (buffer.o, check-init.o, parse.o): Remove unused targets.
2323         (typeck.o): Updated.
2324         * jcf-parse.c (read_class): Comment out unused code.
2325         (java_layout_seen_class_methods): New function.
2326         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2327         Removed.
2328         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
2329         (init_jcf_parse): Removed.
2330         * config-lang.in (gtfiles): Remove deleted files.
2331         * decl.c (java_init_decl_processing): Don't initialize
2332         finit_identifier_node, instinit_identifier_node,
2333         length_identifier_node, super_identifier_node,
2334         continue_identifier_node, access0_identifier_node.  Don't call
2335         init_jcf_parse.
2336         * class.c (cyclic_inheritance_report): New global.
2337         (add_method_1): Don't use
2338         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2339         (maybe_layout_super_class): Comment out code.
2340         (safe_layout_class): New function.
2341         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2342         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2343         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2344         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2345         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2346         (java_gimplify_case_expr): Removed.
2347         (java_gimplify_default_expr): Likewise.
2348         (java_gimplify_new_array_init): Likewise.
2349         * parse.y: Removed.
2350         * keyword.gperf, keyword.h: Removed.
2351         * chartables.h: Removed.
2352         * check-init.c: Removed.
2353         * buffer.c, buffer.h: Removed.
2354         * convert.h: Removed.
2355         * gen-table.pl: Removed.
2356         * lex.c, lex.h: Removed.
2358 2007-01-02  Andrew Haley  <aph@redhat.com>
2360         * expr.c (expand_java_arraystore): Make sure we perform a bounds
2361         check at runtime before we perform a type check.
2363 2006-12-19  Andrew Haley  <aph@redhat.com>
2365         * decl.c: Bump minor BC ABI version.
2367 2006-12-13  Gary Benson  <gbenson@redhat.com>
2369         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2371 2006-12-12  Tom Tromey  <tromey@redhat.com>
2373         * lang-specs.h: Pass -M options to jc1.
2374         * jcf-depend.c (jcf_dependency_add_file): Don't emit
2375         dependencies.
2377 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
2379         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2381 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
2383         * lang-specs.h: Pass '%U'-based options as separate arguments.
2385 2006-12-05  Tom Tromey  <tromey@redhat.com>
2387         PR java/29495:
2388         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2389         classes as well.
2390         * class.c (add_field): Handle ACC_SYNTHETIC.
2391         (add_method_1): Likewise.  Handle bridge and varargs.
2392         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2393         annotation.
2394         (set_class_decl_access_flags): Handle synthetic and annotation.
2395         * java-tree.h (METHOD_BRIDGE): New macro.
2396         (METHOD_VARARGS): Likewise.
2397         (TYPE_SYNTHETIC): Likewise.
2398         (TYPE_ANNOTATION): Likewise.
2399         (lang_type): New fields 'synthetic' and 'annotation'.
2400         (lang_decl_func): New fields 'varargs' and 'bridge'.
2402 2006-12-04  Andrew Haley  <aph@redhat.com>
2404         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2405         there's no map.
2407 2006-11-29  Gary Benson  <gbenson@redhat.com>
2409         * expr.c (rewrite_arglist_getcaller): Reorder.
2411 2006-11-29  Andrew Haley  <aph@redhat.com>
2413         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2414         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2416 2006-11-23  Andrew Haley  <aph@redhat.com>
2418         * expr.c (rewrite_arglist_getcaller): New.
2419         (rewrite_arglist_getclass): Fix indentation.
2420         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2421         gnu.classpath.VMStackWalker.getCallingClassLoader().
2422         * builtins.c (initialize_builtins): Remove duplicate def'n of
2423         __sync_synchronize.
2424         Add __builtin_return_address.
2426 2006-11-22  Andrew Haley  <aph@redhat.com>
2428         * jcf-reader.c (get_attribute): Mark attr_type unused.
2430         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2432 2007-01-08  Richard Guenther  <rguenther@suse.de>
2434         * lex.c (do_java_lex): Use build_int_cst_wide_type.
2435         * jcf-parse.c (get_constant): Likewise.
2437 2006-11-12  Jan Hubicka  <jh@suse.cz>
2439         * resource.c (compile_resource_data): Update for new varpool names.
2440         * java/class.c (build_utf8_ref): Likewise.
2442 2006-11-12  David Daney  <ddaney@avtrex.com>
2444         PR java/29805
2445         * typeck.c (build_java_array_type): Increase buffer sizes.
2447 2006-11-11  Richard Guenther  <rguenther@suse.de>
2449         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2450         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2452 2006-11-06  Andrew Haley  <aph@redhat.com>
2454         * java-tree.h (CONSTANT_LazyFlag): New.
2455         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2456         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2457         reflection_data.
2458         (handle_constant): Return 0 for dummy cpool entries.
2459         Handle constants of kind Class.
2460         Handle constants of kind NameAndType.
2461         (handle_enclosingmethod_attribute): New.
2462         (handle_signature_attribute): New.
2463         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2464         (HANDLE_SIGNATURE_ATTRIBUTE): New.
2465         (handle_constant): Use unmangle_classname()rather than calling
2466         identifier_subst() directly.
2468 2006-11-02  Andrew Haley  <aph@redhat.com>
2470         * java-tree.h (FIELD_ENUM): New.
2471         (lang_decl_var.field_enum): New.
2472         (lang_type.enum_class): New.
2473         (CLASS_ENUM): New.
2474         * class.c (set_class_decl_access_flags): Handle enum types.
2475         (add_field): Handle enum fields.
2476         (get_access_flags_from_decl): Likewise.
2478         * class.c (make_class_data): Put reflection_data into rodata.
2480 2006-11-01  Andrew Haley  <aph@redhat.com>
2482         * jcf-parse.c (field_offsets, bit_obstack): New variables.
2483         (jcf_parse): Write end marker to annotation_data.
2484         (java_parse_file): Create field_offsets bitmap.  Destroy it.
2485         (annotation_grow, annotation_rewrite_byte)
2486         (annotation_rewrite_short, annotation_rewrite_int)
2487         (annotation_read_short, annotation_write_byte)
2488         (annotation_write_short, annotation_write_int)
2489         (handle_long_constant, handle_constant, handle_element_value)
2490         (handle_annotation, handle_annotations)
2491         (handle_annotation_attribute, rewrite_reflection_indexes)
2492         (handle_member_annotations, handle_parameter_annotations)
2493         (handle_default_annotation): New functions.
2494         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2495         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2496         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2497         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2498         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2499         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2500         (TYPE_REFLECTION_DATA): New.
2501         (TYPE_REFLECTION_DATASIZE): New.
2502         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2503         an enum.
2504         * jcf-reader.c (get_attribute): Pass field/method index and
2505         attribute type to get_attribute().
2506         * constants.c (find_class_or_string_constant): Make nonstatic.
2507         (cpool_for_class): Likewise.
2508         (build_constants_constructor): Separate string and scalar types.
2509         * class.c (make_class_data): Generate field_indexes permutation.
2510         Pass it to rewrite_reflection_indexes().
2511         (make_class_data): Generate constructor for reflection_data field.
2513 2006-10-20  Tom Tromey  <tromey@redhat.com>
2515         * gcj.texi (Top): Don't mention jv-scan.
2516         (Invoking gcj): Likewise.
2517         (Invoking gcjh): Likewise.
2518         (Invoking gjnih): Likewise.
2519         (Invoking gij): Likewise.
2520         (Invoking gcj-dbtool): Likewise.
2521         (Invoking jv-scan): Removed.
2522         * parse-scan.y: Removed.
2523         * jv-scan.c: Removed.
2524         * config-lang.in (stagestuff): Don't mention jv-scan.
2525         * Make-lang.in (java): Removed jv-scan.
2526         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2527         (JVSCAN_OBJS): Removed.
2528         (jv-scan$(exeext)): Likewise.
2529         (JAVA_MANFILES): Removed jv-scan.1.
2530         (java.uninstall): Don't mention jv-scan.
2531         (java.mostlyclean): Likewise.
2532         (java.maintainer-clean): Likewise.
2533         (.INTERMEDIATE): Likewise.
2534         (java/jv-scan.o): Removed.
2535         (jv-scan.pod): Likewise.
2536         (java.srcextra): Don't mention parse-scan.c.
2537         (java.mostlyclean): Likewise.
2538         (java/parse-scan.c): Removed.
2539         (java/parse-scan.o-warn): Removed.
2540         (java/parse-scan.o): Removed.
2542 2006-10-20  Tom Tromey  <tromey@redhat.com>
2544         * lang.c (java_handle_option): Don't use
2545         jcf_write_base_directory.
2546         * jcf.h (jcf_write_base_directory): Removed.
2547         * parse.y (java_expand_classes): Don't call write_classfile.
2548         * config-lang.in (gtfiles): Removed jcf-write.c.
2549         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2550         (java/jcf-write.o): Removed.
2551         * jcf-parse.c (parse_class_file): Don't call write_classfile.
2552         * java-tree.h (write_classfile): Removed declaration.
2553         * jcf-write.c: Removed.
2555 2006-10-20  Tom Tromey  <tromey@redhat.com>
2557         * Make-lang.in (java): Removed gjnih, gcjh.
2558         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2559         (GCJH_OBJS): Removed.
2560         (GJNIH_OBJS): Likewise.
2561         (gjnih$(exeext)): Likewise.
2562         (gcjh$(exeext)): Likewise.
2563         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2564         (java.install-common): Don't special case gcjh.
2565         (java.uninstall): Don't mention gcjh, gjnih.
2566         (java.mostlyclean): Likewise.
2567         (java.maintainer-clean): Likewise.
2568         (.INTERMEDIATE): Likewise.
2569         (gcjh.pod): Removed.
2570         (gjnih.pod): Likewise.
2571         (GCJH_TARGET_INSTALL_NAME): Removed.
2572         (java/gjavah-jni.o): Removed.
2573         (java/gjavah.o): Likewise.
2574         * config-lang.in (stagestuff): Removed gjnih, gcjh.
2575         * gjavah.c: Removed.
2577 2006-10-17  Tom Tromey  <tromey@redhat.com>
2579         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2580         "string" case.
2582 2006-10-17  Tom Tromey  <tromey@redhat.com>
2584         * jvgenmain.c (main): Handle -findirect-dispatch.
2585         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2586         jvgenmain.
2588 2006-10-06  Andrew Haley  <aph@redhat.com>
2590         * builtins.c (compareAndSwapInt_builtin): Check that we really do
2591         have a compare_and_swap builtin.
2592         (compareAndSwapLong_builtin): Likewise.
2593         (compareAndSwapObject_builtin): Likewise.
2595 2006-10-04  Andrew Haley  <aph@redhat.com>
2597         * builtins.c (java_builtins): Add compareAndSwapInt,
2598         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2599         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2600         putObjectVolatile, getObjectVolatile, getIntVolatile,
2601         getLongVolatile, getLong.
2602         (UNMARSHAL3): New macro.
2603         (UNMARSHAL4): Likewise.
2604         (UNMARSHAL5): Likewise.
2605         (build_arglist_for_builtin): New function.
2606         (build_addr_sum, build_check_this): New functions.
2607         (putObject_builtin. compareAndSwapInt_builtin,
2608         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2609         putVolatile_builtin, getVolatile_builtin): New builtins.
2611 2006-06-08  Andrew Haley  <aph@redhat.com>
2613         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2614         get_symbol_table_index().
2615         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2616         private method.
2617         (build_known_method_ref): New arg: special.  Pass it to
2618         get_symbol_table_index.
2619         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2620         the method list.
2621         (build_invokevirtual): New arg: special.  Pass it to
2622         get_symbol_table_index.
2623         (expand_invoke): New variable: special.
2624         Pass it to maybe_rewrite_invocation().
2625         Pass it to build_known_method_ref().
2626         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2627         build the symbol table conbstructor.
2628         (emit_symbol_table): Extract SPECIAL from the method list and pass
2629         it to build_symbol_entry().
2630         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2631         special accordingly.
2633 2006-09-08  Andrew Haley  <aph@redhat.com>
2635         * class.c (layout_class_method): Use build_java_signature, not
2636         build_java_argument_signature.  Use lookup_java_method, not
2637         lookup_argument_method.
2639 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2640             Bryce McKinlay  <bryce@mckinlay.net.nz>
2642         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2644 2006-07-18  Tom Tromey  <tromey@redhat.com>
2646         * lang.opt: Added missing -W options.
2648 2006-07-12  Tom Tromey  <tromey@redhat.com>
2650         PR java/28329:
2651         * lang-specs.h: Pass '%U'-based options as separate arguments.
2652         Use -faux-classpath.
2653         * lang.c (java_handle_option): Handle OPT_faux_classpath.
2654         * lang.opt (faux-classpath): New option.
2656 2006-07-07  Tom Tromey  <tromey@redhat.com>
2658         * class.c (make_class_data): Set value for reflection_data field.
2659         * decl.c (java_init_decl_processing): Add reflection_data field.
2661 2006-07-07  Tom Tromey  <tromey@redhat.com>
2663         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2664         earlier.
2665         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2667 2006-07-07  Andrew Haley  <aph@redhat.com>
2669         * jcf-parse.c (set_source_filename): Don't check for
2670         CLASS_FROM_CURRENTLY_COMPILED_P.
2671         Remove // comments.
2673 2006-07-07  Andrew Haley  <aph@redhat.com>
2675         * java-tree.h (java_read_sourcefilenames): Declare.
2676         * lang.c (java_handle_option): Call java_read_sourcefilenames().
2677         * lang.opt (fsource-filename): New opt.
2678         * lang-specs.h: Add -fsource-filename.
2679         * jcf-parse.c (num_files, filenames): New variables.
2680         (reverse, cmpstringp, java_read_sourcefilenames,
2681         find_sourcefile): New.
2682         (set_source_filename): Call find_sourcefile to find the real name
2683         of a source file.
2685 2006-06-27  Tom Tromey  <tromey@redhat.com>
2687         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2688         Signature, LocalVariableTypeTable, annotation attributes.
2689         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2690         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2691         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2692         (HANDLE_METHOD): Likewise.
2693         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2694         (print_annotation): New function.
2695         (print_element_value): Likewise.
2696         (indent): Likewise.
2697         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2698         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2699         (print_parameter_annotations): New function.
2700         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2701         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2702         Likewise.
2703         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2704         (print_annotations): New function.
2706 2006-06-23  Tom Tromey  <tromey@redhat.com>
2708         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
2709         emitting class files, always use 1.5.
2710         * gcj.texi (Input Options): Document -fsource.
2711         (Code Generation): Document -ftarget.
2713 2006-06-21  Tom Tromey  <tromey@redhat.com>
2715         PR java/28089:
2716         * expr.c (expand_java_field_op): Initialize field's declaring
2717         class.
2719 2006-06-20  Tom Tromey  <tromey@redhat.com>
2721         * expr.c (push_value): Always flush quick stack.
2723 2006-06-19  Tom Tromey  <tromey@redhat.com>
2725         * expr.c (push_value): Also flush quick stack if value is a
2726         component_ref.
2728 2006-06-19  Tom Tromey  <tromey@redhat.com>
2730         * expr.c (push_value): Flush quick stack if value has side
2731         effects.
2733 2006-06-13  Tom Tromey  <tromey@redhat.com>
2735         * class.c (is_compiled_class): Explicitly check for current
2736         class.
2738 2006-06-09  Tom Tromey  <tromey@redhat.com>
2740         * gjavah.c (decompile_method): Don't decompile a static field
2741         accessor method.
2743 2006-06-06  Tom Tromey  <tromey@redhat.com>
2745         * lang-specs.h <jc1>: Add .jar file to command line if
2746         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
2748 2006-06-05  Tom Tromey  <tromey@redhat.com>
2750         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2751         synthetic, enum, annotation.
2752         * jcf.h (ACC_BRIDGE): New macro.
2753         (ACC_VARARGS): Likewise.
2754         (ACC_SYNTHETIC): Likewise.
2755         (ACC_ENUM): Likewise.
2756         (ACC_ANNOTATION): Likewise.
2758 2006-06-04  Tom Tromey  <tromey@redhat.com>
2760         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2761         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2762         and -ftarget.
2763         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
2764         when needed.  Handle classpath-setting.
2765         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2766         * lang-specs.h: Rewrote.
2768 2006-06-04  Tom Tromey  <tromey@redhat.com>
2770         * jcf-io.c (find_class): Set source_ok to 0.
2771         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2772         (parse_class_file): Don't call java_mark_class_local.
2773         (java_parse_file): Skip .java files.  Call java_mark_class_local
2774         before lowering any code.
2775         (parse_zip_file_entries): Don't call duplicate_class_warning
2776         here.
2777         (process_zip_dir): ... call it here.
2778         * class.c (add_field): Don't mark field external if it is being
2779         compiled into this object.
2780         (make_class_data): Handle situation where class_dtable_decl is
2781         created before Class is compiled.
2782         (is_compiled_class): Don't assume files in zip are compiled into
2783         this object.
2784         (layout_class_method): Don't mark method external if it is being
2785         compiled into this object.
2787 2006-06-04  Tom Tromey  <tromey@redhat.com>
2789         * jcf-path.c (jcf_path_compute): New function.
2790         * jcf.h (jcf_path_compute): Declare.
2792 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2794         * decl.c: Include langhooks.h.
2795         (builtin_function): Remove.
2796         (java_init_decl_processing): Replace calls to builtin_function
2797         with add_builtin_function.
2798         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2799         (java/decl.o): Depend on langhooks.h.
2800         * java-tree.h (builtin_function): Remove.
2802 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2804         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2806 2006-09-12  Tom Tromey  <tromey@redhat.com>
2808         * expr.c (push_value): Always flush quick stack.
2810 2006-09-12  Tom Tromey  <tromey@redhat.com>
2812         PR java/29013:
2813         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2814         the push of the called method's return result.
2816 2006-09-12  Tom Tromey  <tromey@redhat.com>
2818         * jvspec.c (lang_specific_driver): Read spec file even if
2819         -fsyntax-only.
2821 2006-09-12  Tom Tromey  <tromey@redhat.com>
2823         PR java/28754:
2824         * expr.c (expand_java_field_op): Initialize field's declaring
2825         interface if necessary.
2827 2006-09-12  Tom Tromey  <tromey@redhat.com>
2829         PR java/28892:
2830         * expr.c (expand_java_field_op): No error for assignments not in
2831         class initializer or constructor.
2833 2006-08-22  Andrew Haley  <aph@redhat.com>
2835         * decl.c (java_add_stmt): Give the statement list a type.
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-08-10  Simon Martin  <simartin@users.sourceforge.net>
2844         PR java/8923
2845         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2846         or '--' is used with a constant operand.
2847         (java_complete_lhs): When processing a '++' or '--' expression,
2848         don't call java_complete_tree but java_complete_lhs, so that a
2849         static final variable operand is never replaced by its value. This
2850         avoids an ICE later on.
2851         (patch_unaryop): Fixed typo in comment.
2853 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2855         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2857 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2859         * builtins.c (check_for_builtin): If a builtin could result in a
2860         direct call being generated, don't use it if flag_indirect_dispatch
2861         is set.
2863 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2865         * gcj.texi (Invocation): Corrections for Invocation API example.
2867 2006-07-04  Andrew Haley  <aph@redhat.com>
2869         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2870         entry.
2872 2006-06-21  Andrew Haley  <aph@redhat.com>
2874         * java-tree.h (update_aliases): Remove
2875         * expr.c (expand_iinc): Remove call to update_aliases().
2876         (STORE_INTERNAL): Likewise.
2877         * decl.c (update_aliases, initialize_local_variable)
2878         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2880 2006-06-19  Andrew Haley  <aph@redhat.com>
2882         PR java/1305
2883         PR java/27908
2884         * expr.c (java_modify_addr_for_volatile): New function.
2885         (expand_java_field_op): Handle volatile fields.
2886         * java-gimplify.c (java_gimplify_component_ref): Call
2887         java_modify_addr_for_volatile to give the field_ref the correct
2888         volatile type.
2889         (java_gimplify_modify_expr): Likewise.
2890         * java-tree.h (java_modify_addr_for_volatile): New decl.
2892 2006-06-17  Karl Berry  <karl@gnu.org>
2894         * gcj.texi (@dircategory): Use "Software development" instead
2895         of "Programming", following the Free Software Directory.
2897 2006-06-16  Andrew Haley  <aph@redhat.com>
2899         * class.c (make_class_data): When using flag_indirect_classes,
2900         don't initialize the vtable of Class instances.
2902 2006-06-09  Andrew Haley  <aph@redhat.com>
2904         PR java/1305
2905         PR java/27908
2906         * builtins.c (initialize_builtins): Add __sync_synchronize().
2907         * class.c (add_field): Mark volatile fields.
2908         * java-gimplify.c (java_gimplify_expr): Call new functions to
2909         handle self-modifying exprs and COMPONENT_REFs.
2910         (java_gimplify_component_ref): New.
2911         (java_gimplify_modify_expr): Add handling for volatiles.
2913 2006-06-08  Tom Tromey  <tromey@redhat.com>
2915         * gcj.texi (libgcj Runtime Properties): Document
2916         gnu.gcj.user.realname.
2918 2006-06-08  Andrew Haley  <aph@redhat.com>
2920         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2921         get_symbol_table_index().
2922         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2923         private method.
2924         (build_known_method_ref): New arg: special.  Pass it to
2925         get_symbol_table_index.
2926         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2927         the method list.
2928         (build_invokevirtual): New arg: special.  Pass it to
2929         get_symbol_table_index.
2930         (expand_invoke): New variable: special.
2931         Pass it to maybe_rewrite_invocation().
2932         Pass it to build_known_method_ref().
2933         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2934         build the symbol table conbstructor.
2935         (emit_symbol_table): Extract SPECIAL from the method list and pass
2936         it to build_symbol_entry().
2937         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2938         special accordingly.
2940 2006-06-06  David Daney  <ddaney@avtrex.com>
2942         * gcj.texi (libgcj Runtime Properties): Document
2943         gnu.gcj.runtime.NameFinder.show_raw and
2944         gnu.gcj.runtime.NameFinder.remove_unknown.
2946 2006-06-06  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-06  Mike Stump  <mrs@apple.com>
2958         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2959         installing during build.
2961 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
2963         * gcj.texi (Extensions): Document the new gcj-dbtool-based
2964         classname-to-library resolution mechanism.
2965         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2966         mechanism deprecated.
2967         (libgcj Runtime Properties): Document
2968         gnu.gcj.runtime.VMClassLoader.library_control's new default.
2970 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
2972         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2973         bit wide type.
2974         (jword): Define to uint64 on 64-bit arches.
2975         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2977 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
2979         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2980         typos.
2982 2006-05-26  Tom Tromey  <tromey@redhat.com>
2984         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2985         * verify-glue.c (vfy_class_type): New function.
2986         * verify-impl.c (check_constant): Allow 'ldc class'.
2987         * verify.h (vfy_class_type): Declare.
2989 2006-05-25  Andrew Haley  <aph@redhat.com>
2991         PR java/27756
2992         * decl.c (maybe_pushlevels): When variable ranges are non-nested
2993         update all lifetimes, not just the first one.
2995 2006-05-24  Tom Tromey  <tromey@redhat.com>
2997         * java-tree.h: Fixed flag documentation.
2999 2006-05-24  Tom Tromey  <tromey@redhat.com>
3001         PR libgcj/27729:
3002         * jcf.h (ACC_INVISIBLE): Changed value.
3004 2006-05-24  Andrew Haley  <aph@redhat.com>
3006         PR java/27754
3007         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3008         COMPOUND_EXPR.
3010 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
3012         * lang.opt (femit-class-file): Remove VarExists.
3014 2006-05-16  Tom Tromey  <tromey@redhat.com>
3016         * verify-impl.c (verify_instructions_0) <op_return>: Special case
3017         for Object.<init>.
3019 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
3021         PR driver/26885
3022         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3023         $(GCC_OBJS).
3025 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
3027         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3028         (java/expr.o): Replace target.h with $(TARGET_H).
3029         (java/parse.o): Likewise.
3031 2006-05-10  Andrew Haley  <aph@redhat.com>
3033         * class.c (emit_indirect_register_classes): Fix comment.
3035 2006-05-04  Tom Tromey  <tromey@redhat.com>
3037         * java-tree.h (uses_jv_markobj_p): Declare.
3038         * class.c (uses_jv_markobj_p): Removed.
3039         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3040         (get_boehm_type_descriptor): Use it.
3041         (uses_jv_markobj_p): Moved from class.c.  Return bool.
3043 2006-05-04  Tom Tromey  <tromey@redhat.com>
3045         * java-tree.def (THIS_EXPR): Now a tcc_expression.
3047 2006-05-04  Andrew Haley  <aph@redhat.com>
3049         * class.c (make_field_value): Always build_address_of fdecl if
3050         there is an initializer.
3052 2006-05-03  Andrew Haley  <aph@redhat.com>
3054         PR libgcj/27352
3055         * expr.c (maybe_rewrite_invocation): New function.
3056         (rewrite_arglist_getclass): Likewise.
3057         (rules): New.
3058         (expand_invoke): Call maybe_rewrite_invocation.
3059         * parse.y (patch_invoke): Likewise.
3060         * java-tree.h: (maybe_rewrite_invocation): New function.
3062 2006-04-21  Andrew Haley  <aph@redhat.com>
3064         * lang.c (java_init): Handle flag_indirect_classes.
3065         * jvgenmain.c: Use "class$$" instead of "class$".
3066         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3067         DECLs.
3068         (mangle_class_field): Special case "class$$" as well as "class$".
3069         * constants.c (build_ref_from_constant_pool): If
3070         flag_indirect_classes, generate a ref into the heap.
3071         * decl.c (constants_field_decl_node,
3072         constants_data_field_decl_node): New.
3073         * class.c (build_static_class_ref): New.
3074         (build_classdollar_field): Factor out from build_class_ref().
3075         (make_field_value): Handle static fields in heap.
3076         (make_class_data): Make sure we get a static ref to class.
3077         Make class initializer const if flag_indirect_classes.
3078         (register_class): Build a class_ref for initialization if
3079         flag_indirect_classes.
3080         (emit_indirect_register_classes): New.
3082 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
3084         * expr.c, gjavah.c: Fix comment typos.
3086 2006-04-03  Andrew Haley  <aph@redhat.com>
3088         PR java/26858
3089         * expr.c (build_field_ref): Don't check the field offset if
3090         flag_syntax_only.
3092 2006-03-30  Andrew Haley  <aph@redhat.com>
3094         PR java/26858
3095         * lang.c (java_attribute_table): New.
3096         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3097         * expr.c (build_field_ref): Add a null pointer check for all
3098         fields of offset > 4k.  Don't do so for accesses via the this
3099         pointer, which we know can never be null.
3100         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3101         methods nonnull.
3103 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
3105         * Make-lang.in: Rename docdir to gcc_docdir.
3107 2006-03-30  Tom Tromey  <tromey@redhat.com>
3109         PR java/26042:
3110         * parse.y (java_reorder_fields): Reset superclass field's size as
3111         well.
3113 2006-03-28  Tom Tromey  <tromey@redhat.com>
3115         PR java/26390:
3116         * parse.y (find_most_specific_methods_list): Added 'class'
3117         argument.
3118         (lookup_method_invoke): Updated.
3120 2006-03-15  Tom Tromey  <tromey@redhat.com>
3122         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3123         non-static method calls.
3125 2006-03-15  David Daney  <ddaney@avtrex.com>
3127         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3128         declaration.
3130 2006-03-15  David Daney  <ddaney@avtrex.com>
3132         * lang.opt (-freduced-reflection): New option.
3133         * lang.c (java_post_options): Generate an error if
3134         -freduced-reflection used with -fjni or -findirect-dispatch.
3135         * java-tree.h (flag_reduced_reflection): Declare new variable.
3136         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3137         if bitmap overflows and flag_reduced_reflection set.
3138         * class.c (uses_jv_markobj_p): New function.
3139         (make_class_data): Moved generation of vtable to before
3140         reflection data, generate less reflection data if
3141         flag_reduced_reflection set.
3142         * gcj.texi: Document -freduced-reflection.
3144 2006-03-15  Tom Tromey  <tromey@redhat.com>
3146         PR java/26638:
3147         * class.c (get_interface_method_index): Don't put <clinit> into
3148         interface table.
3150 2006-03-15  Tom Tromey  <tromey@redhat.com>
3152         * parse.y (analyze_clinit_body): Ignore empty statements.
3154 2006-03-08  David Daney  <ddaney@avtrex.com>
3156         * gcj.texi: Document -static-libgcj option.
3158 2006-02-20  Andrew Haley  <aph@redhat.com>
3160         * jcf-parse.c (parse_class_file): Set input_location from
3161         current_class.
3163 2006-02-15  Andrew Haley  <aph@redhat.com>
3165         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3166         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3167         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3169 2006-02-09  Andrew Haley  <aph@redhat.com>
3171         PR java/26192
3172         * expr.c (expand_invoke): Allow methods in arrays to be resolved
3173         in their superclass.
3175         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3176         array types.
3178 2006-02-08  Tom Tromey  <tromey@redhat.com>
3180         PR java/22578:
3181         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3182         * builtins.c (convert_real): New function.
3183         (java_builtins): Handle Float.intBitsToFloat,
3184         Float.floatToRawIntBits, Double.longBitsToDouble,
3185         Double.doubleToRawLongBits.
3187 2006-02-07  Andrew Haley  <aph@redhat.com>
3189         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
3190         class other than the one in which we expected to find it, ignore
3191         the result.
3193         PR java/25535
3194         * constants.c (build_constants_constructor): move initializer into
3195         first halfword on a 64-bit big-endian machine.
3197 2006-02-04  Tom Tromey  <tromey@redhat.com>
3199         PR java/25676:
3200         * builtins.c (max_builtin): Skip floating point 'max'.
3201         (min_builtin): Skip floating point 'min'.
3202         (check_for_builtin): Never return NULL_TREE.
3204 2006-02-04  Tom Tromey  <tromey@redhat.com>
3206         PR java/26097:
3207         * expr.c (push_type): Avoid side effect in gcc_assert.
3209 2006-02-04  Roger Sayle  <roger@eyesopen.com>
3211         * decl.c (java_init_decl_processing): Create char_type_node as a
3212         regular INTEGER_TYPE node.
3213         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3214         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3215         test for char_type_node and promoted_char_type_node as special
3216         instances of INTEGER_TYPE tree codes.
3217         (promote_type,build_java_signature): Likewise.
3218         * jcf-write.c (adjust_typed_op): Likewise.
3219         * mangle.c (mangle_type): Likewise.
3220         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3221         * parse.h (JINTEGRAL_TYPE_P): Likewise.
3223 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
3225         * expr.c (java_stack_swap): Revert gcc_assert patch.
3227 2006-02-03  Ben Elliston  <bje@au.ibm.com>
3229         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3230         * typeck.c: Likewise.
3231         * verify-impl.c: Likewise.
3232         * class.c: Likewise.
3233         * decl.c: Likewise.
3234         * jcf-parse.c: Likewise.
3235         * constants.c: Likewise.
3236         * check-init.c: Likewise.
3237         * jcf-write.c: Likewise.
3238         * verify-glue.c: Likewise.
3239         * mangle.c: Likewise.
3240         * expr.c: Likewise.
3241         * lang.c: Likewise.
3242         * boehm.c: Likewise.
3244 2006-02-01  Jan Hubicka  <jh@suse.cz>
3246         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3247         * lang.c (java_init_options): Set no_unit_at_a_time_default.
3249 2006-01-30  Andrew Haley  <aph@redhat.com>
3251         PR java/21428
3252         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3254 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
3256         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3257         Update copyright notice dates.
3259 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3261         * jvspec.c (lang_specific_spec_functions): Remove.
3263 2006-01-06  Tom Tromey  <tromey@redhat.com>
3265         * gcj.texi (Arrays): Added more documentation for
3266         JvNewObjectArray.
3267         (Primitive types): Correct information about primitive classes.
3268         (Reference types): New node.
3269         (Index): New node.
3271 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
3273         * jcf-parse.c (set_source_filename): Set the decl source location
3274         even when returning early.
3276 2005-12-15  Tom Tromey  <tromey@redhat.com>
3277             Andrew Haley  <aph@redhat.com>
3279         PR java/25429
3280         * parse.y (resolve_expression_name): Don't generate accessor
3281         methods for constant fields.
3283 2005-12-13  Andrew Haley  <aph@redhat.com>
3285         PR java/25366
3286         PR java/25368
3287         * class.c (maybe_layout_super_class): Update current_class before
3288         calling do_resolve_class.
3290 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
3292         PR java/25330
3293         * jcf-write.c (write_classfile): Use PID in temporary class
3294         file. Save/restore errno when reporting error.
3296 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
3298         PR java/9861
3299         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3300         to bare_function_type and including the return type
3301         * builtins.c (initialize_builtins) : Change builtin mangled name
3302         constants to conform to new mangling scheme
3304 2005-12-08  Andrew Haley  <aph@redhat.com>
3306         PR libgcj/25265
3307         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3308         (soft_abstractmethod_node): New.
3309         * expr.c (build_field_ref): Add in-line check for missing field.
3310         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3312 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3314         * Make-lang.in (java.all.build, java.install-normal): Remove.
3316 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3318         * Make-lang.in: Remove all dependencies on s-gtype, except for
3319         gt-java-parse.h.
3321 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
3323         * class.c (build_utf8_ref, emit_register_classes): Use
3324         switch_to_section and get_section.
3326 2005-12-06  Tom Tromey  <tromey@redhat.com>
3328         PR java/25283:
3329         * parse.y (patch_new_array_init): Revert previous patch.
3330         (lookup_method_invoke): Use size-less array type when creating an
3331         anonymous constructor.
3333 2005-12-05  Tom Tromey  <tromey@redhat.com>
3335         * parse.y (patch_new_array_init): Don't set length on array.
3337 2005-12-02  Richard Guenther  <rguenther@suse.de>
3339         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3340         buildN instead of build.
3341         * class.c (finish_class): Likewise.
3342         * expr.c (java_create_object): Likewise.
3344 2005-11-28  Tom Tromey  <tromey@redhat.com>
3346         PR java/18278:
3347         * expr.c (build_jni_stub): Unwrap the return value.
3348         * java-tree.h (soft_unwrapjni_node): New define.
3349         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3350         * decl.c (java_init_decl_processing): Initialize
3351         soft_unwrapjni_node.
3353 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
3355         * gcj.texi (gij options): Add -Xss documentation.
3357 2005-11-08  Wil Mahan  <wmahan@gmail.com>
3359         PR java/23617
3360         * zextract.c (read_zip_archive): Fix out of memory error when
3361         reading jar files with zip-style comments.
3363 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
3365         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3366         formats.
3367         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3369 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3370             Wil Mahan <wmahan@gmail.com>
3372         PR java/23620
3373         * class.c (make_class): Create empty binfo here.
3374         (set_super_info): Only create binfo if we have superclasses.
3376 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
3378         PR java/24127
3379         * parse.y (method_header): Make the result of the rule a NULL_TREE
3380         when a parsing error occurs.
3382 2005-09-29  Tom Tromey  <tromey@redhat.com>
3384         PR java/24120:
3385         * jcf-io.c (memoized_dirlist_hash): New function.
3386         (caching_stat): Use it.
3388 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
3390         PR java/21418
3391         * class.c (inherits_from_p): Try to lay out super class
3392         if it is not already laid out.
3393         (maybe_layout_super_class): Handle the case where SUPER_CLASS
3394         is a NULL_TREE.
3396 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
3398         * builtins.c (max_builtin, min_builtin, abs_builtin,
3399         java_build_function_call_expr): Use fold_buildN.
3400         * class.c (layout_class_method): Likewise.
3401         * expr.c (java_truthvalue_conversion, build_java_jsr,
3402         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3403         build_java_binop, build_field_ref, expand_compare,
3404         build_known_method_ref, build_invokevirtual,
3405         process_jvm_instruction): Likewise.
3406         * parse.y (patch_binop, patch_exit_expr): Likewise.
3407         * typeck.c (convert_ieee_real_to_integer): Likewise.
3408         (convert): Don't call fold after convert_ieee_real_to_integer.
3410 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
3412         PR java/23891
3413         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3414         the newly created type. Set import lists here, not in create_class.
3415         (jdep_resolve_class): Set current_class.
3416         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3417         the current package context, not ctxp->package.
3418         (cicp_cache): Removed.
3419         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3420         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3421         * java-tree.h (TYPE_PACKAGE): New macro.
3422         (struct lang_type): New member 'package'.
3424 2005-09-09  Andrew Haley  <aph@redhat.com>
3426         PR libgcj/23182
3427         * expr.c (pop_type_0): If the expected type is object or ptr
3428         (i.e. void*), return the type of the object we just popped from
3429         the stack.
3431 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
3433         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3434         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3436 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3438         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3439         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3440         typos.  Follow spelling conventions.
3442 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
3444         PR java/23431
3445         * typeck.c (lookup_do): Look up interfaces for the original class,
3446         not the base class.
3447         * parse.y (java_check_regular_methods): Fix diagnostic message for
3448         more restrictive overriding of a method from an interface.
3450 2005-08-16  Tom Tromey  <tromey@redhat.com>
3452         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3453         class' initial state.
3455 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3457         PR java/22113
3458         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3459         `literal_token' for large numeric input tokens.
3461 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3463         PR java/19870
3464         * parse.y (nested_field_access_p): Rename to nested_member_access_p
3465         and expand to handle method accesses across nested classes.
3466         (build_outer_method_access_method): Rename to
3467         build_nested_method_access_method.  Minor adjustments to comments.
3468         (resolve_expression_name): Use the newly-renamed
3469         nested_member_access_p method.
3470         (resolve_qualified_expression_name): Likewise.
3471         (patch_method_invocation): Also consider static methods for access
3472         method generation.  Minor adjustments to comments.
3473         (maybe_use_access_method): Use the more general
3474         nested_memeber_access_p to determine access across nested class
3475         boundaries.  Allow THIS_ARG to be NULL (for static methods).
3477 2005-08-15  Tom Tromey  <tromey@redhat.com>
3479         PR java/23300.
3480         * expr.c (build_field_ref): Don't generate otable reference when
3481         DECL_FIELD_OFFSET is 0.
3482         * class.c (maybe_layout_super_class): Pass outer class to
3483         do_resolve_class.
3485 2005-08-15  Tom Tromey  <tromey@redhat.com>
3487         * java-tree.h (LABEL_IN_SUBR): Removed.
3488         (LABEL_IN_SUBR): Likewise.
3489         (LABEL_IS_SUBR_START): Likewise.
3490         (LABEL_SUBR_START): Likewise.
3491         (LABEL_SUBR_CONTEXT): Likewise.
3492         (LABEL_CHANGED): Likewise.
3493         (LABEL_RETURN_LABEL): Likewise.
3494         (LABEL_RETURN_TYPE_STATE): Likewise.
3495         (LABEL_RETURN_LABELS): Likewise.
3496         (RETURN_MAP_ADJUSTED): Likewise.
3497         (LABEL_PENDING_CHAIN): Likewise.
3499 2005-08-15  Tom Tromey  <tromey@redhat.com>
3501         * Make-lang.in (JAVA_OBJS): Removed verify.o
3502         (java/verify.o): Removed.
3503         * verify.c: Removed.
3504         * lang.c (flag_new_verifier): Removed.
3505         (java_post_options): Updated.
3506         * java-tree.h (flag_new_verifier): Removed.
3507         (verify_jvm_instructions): Removed.
3508         * expr.c (pop_type_0): Assume flag_new_verifier is true.
3509         (build_java_check_indexed_type): Likewise.
3510         (expand_java_arraystore): Likewise.
3511         (expand_java_arrayload): Likewise.
3512         (pop_arguments): Likewise.
3513         (expand_byte_code): Likewise.
3514         (process_jvm_instruction): Likewise.
3516 2005-08-10  Andrew Haley  <aph@redhat.com>
3518         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3519         type mismatches to make legal GIMPLE.
3521 2005-08-10  Robin Green <greenrd@greenrd.org>
3523         PR java/23230:
3524         * parse.y (maybe_use_access_method): Generalize check from
3525         java.lang.Object to any superclass of current_class
3527 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3529         * class.c (build_class_ref): Wrap the primary class type in a
3530         NOP_EXPR.
3531         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3532         primary class type from the NOP_EXPR in which it was placed.
3534 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
3536         * expr.c (expand_load_internal): Fix missing parens in
3537         predicate.
3539 2005-07-28  Andrew Haley  <aph@redhat.com>
3541         * expr.c (expand_load_internal): Convert to destination type.
3543 2005-07-22  Manfred Hollstein  <mh@suse.com>
3545         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3546         (check_constant): Likewise.
3547         (check_wide_constant): Likewise.
3549 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
3551         Make CONSTRUCTOR use VEC to store initializers.
3552         * check-init.c (check_init): Update to cope with VEC in
3553         CONSTRUCTOR_ELTS.
3554         * class.c (make_field_value, make_method_value, get_dispatch_table,
3555         make_class_data, emit_symbol_table, emit_catch_table,
3556         emit_assertion_table): Use build_constructor_from_list instead of
3557         build_constructor.
3558         * constants.c (build_constants_constructor): Likewise.
3559         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3560         VEC in CONSTRUCTOR_ELTS.
3561         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3562         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3563         of a TREE_LIST.
3564         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3565         CONSTRUCTOR_ELTS.
3566         * parse.y (build_new_array_init): Use build_constructor_from_list
3567         instead of build_constructor.
3568         (patch_new_array_init): Update to cope with VEC in
3569         CONSTRUCTOR_ELTS.
3570         (array_constructor_check_entry): Likewise.
3572 2005-07-12  Tom Tromey  <tromey@redhat.com>
3574         * jvspec.c (lang_specific_driver): Put filelist_filename first on
3575         command line.
3577 2005-07-12  Tom Tromey  <tromey@redhat.com>
3579         PR java/19674:
3580         * parse-scan.y (interface_member_declaration): Added
3581         empty_statement.
3583 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
3585         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3586         (LABEL_PENDING_CHAIN): Ditto.
3587         (LABEL_PC): Ditto.
3588         (DECL_BIT_INDEX): Ditto.
3590 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3592         PR java/18119
3593         * parse.y (inner_class_accessible): New function. Logic moved from
3594         check_inner_class_access.
3595         (check_inner_class_access): Use inner_class_accessible.
3596         (resolve_inner_class): Simplify arguments. Create circularity hash
3597         here. Keep looking for classes if we found one that was inaccessible.
3598         Return the inaccessible class only if there is no other match.
3599         (do_resolve_class): Update for new resolve_inner_class arguments.
3600         Don't create circularity_hash here.
3602 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3604         PR java/21045
3605         * parse.y (add_exception_to_throws): New function.
3606         (purge_unchecked_exceptions): Removed.
3607         (get_constructor_super): Renamed from verify_constructor_super. Now
3608         returns the super constructor after verification.
3609         (java_complete_expand_method): Don't use purge_unchecked_exceptions
3610         or save/restore the exception list.
3611         (check_thrown_exceptions): Add uncaught exceptions in anonymous
3612         class initializers and constructors to the throws clause of the method.
3614 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
3616         PR java/19674
3617         * parse.y (interface_member_declaration): Allow empty statements in
3618         interface declarations.
3620 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
3622         * Makefile.in (parse.o): Adjust dependencies.
3623         * parse.y: Include tree-dump.h.
3625 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
3627         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
3628         flag for quoting.
3630 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
3632         * parse.y (issue_warning_error_from_context): Call
3633         pp_output_formatted_text to be able to get the buffer.
3635 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
3637         * parse.y (issue_warning_error_from_context): Update for the
3638         renaming of pp_format_text to pp_format.
3640 2005-06-28  Paul Brook  <paul@codesourcery.com>
3642         * decl.c (java_init_decl_processing): Call
3643         default_init_unwind_resume_libfunc.
3645 2005-06-27  Tom Tromey  <tromey@redhat.com>
3647         PR java/21540, PR java/13788:
3648         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3649         fold_constant_for_init.
3650         (patch_binop): Added 'folding' argument.  Updated all callers.
3651         (patch_unaryop) <NOP_EXPR>: New case.
3652         (fold_constant_for_init) <NOP_EXPR>: Likewise.
3653         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3655 2005-06-25  Jan Hubicka  <jh@suse.cz>
3657         * builtins.c (define_builtin): Accept new flags parameter.
3658         (initialize_builtins): Mark the builtins const and nothrow accordingly.
3660 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
3662         * all files: Update FSF address in copyright headers.
3664 2005-06-24  Tom Tromey  <tromey@redhat.com>
3666         * verify-impl.c (verify_instructions_0): Correctly handle
3667         situation where PC falls off end.
3669 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3671         PR java/20697
3672         * parse.y (find_most_specific_methods_list): Remove special case for
3673         inner classes.
3675 2005-06-15  Tom Tromey  <tromey@redhat.com>
3677         PR libgcj/21906:
3678         * class.c (make_method_value): Use soft_abstractmethod_node for
3679         abstract method.
3680         * java-tree.h (soft_abstractmethod_node): New define.
3681         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3682         * decl.c (java_init_decl_processing): Initialize
3683         soft_abstractmethod_node.
3685 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3687         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3689 2005-06-13  Per Bothner  <per@bothner.com>
3691         * expr.c (int highest_label_pc_this_method,
3692         start_label_pc_this_method): New globals.
3693         (lookup_label): Add start_label_pc_this_method to pc for label, and
3694         update highest_label_pc_this_method.  This prevents conflicts between
3695         labels from different methods.
3696         * java-tree.h: Declare new globals.
3697         * jcf-parse.c (parse_class_file): If needed bump
3698         start_label_pc_this_method and reset highest_label_pc_this_method.
3700 2005-06-13  Tom Tromey  <tromey@redhat.com>
3702         PR java/21844:
3703         * parse.y (nested_field_access_p): Handle case where outer field
3704         is inherited by enclosing class.
3706 2005-06-12  Per Bothner  <per@bothner.com>
3708         * class.c (inherits_from_p): Do load_class if needed.
3710 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3712         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3713         * java-tree.h (parse_error_context): Move...
3714         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3715         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3716         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3718 2005-06-08  Roger Sayle  <roger@eyesopen.com>
3720         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3722 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
3724         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3725         msgid for argument name.
3726         * gjavah.c (error): Likewise.
3727         * java-tree.h (parse_error_context): Likewise.
3728         * parse.y (parse_error_context, parse_warning_context,
3729         issue_warning_error_from_context): Likewise.
3731 2005-06-01  Tom Tromey  <tromey@redhat.com>
3733         PR java/21722:
3734         * class.c (build_static_field_ref): Don't fold constant fields if
3735         current class is from a .class file and we're using indirect
3736         dispatch.
3738 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3740         * java/verify-glue.c: Don't include errors.h and include toplev.h.
3741         * java/Make-lang.in: Updates dependencies.
3743 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
3745         PR java/19870.
3746         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3747         NESTED_FIELD_ACCESS_IDENTIFIER_P.
3748         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3749         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3750         * jcf-write.c (generate_classfile): Use
3751         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3752         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3753         * parse.y (build_outer_field_access): Rename to
3754         build_nested_field_access. Support static fields and outer-to-inner
3755         class accesses.
3756         (outer_field_access_p): Rename to nested_field_access_p. Support
3757         static fields and generalise to outer-to-inner class and sibling
3758         inner class accesses.
3759         (outer_field_expanded_access_p): Rename to
3760         nested_field_expanded_access_p and support static fields.
3761         (outer_field_access_fix): Rename to nested_field_access_fix and
3762         support static fields.
3763         (build_outer_field_access_expr): Rename to
3764         build_nested_field_access_expr and support static fields.
3765         (build_outer_field_access_methods): Rename to
3766         build_nested_field_access_methods and support static fields. For
3767         static fields, generate accessors without class instance parameters.
3768         (build_outer_field_access_method): Rename to
3769         build_nested_field_access_method and support static fields.
3770         (build_outer_method_access_method): Use
3771         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3772         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3773         (resolve_expression_name): Consider static field accesses across
3774         nested classes.
3775         (resolve_qualified_expression_name): Likewise.
3776         (java_complete_lhs): Use nested_field_access_fix instead of
3777         outer_field_access_fix.
3778         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3779         Use nested_field_expanded_access_p instead of
3780         outer_field_expanded_access_p. Use nested_field_access_fix instead
3781         of outer_field_access_fix.
3782         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3783         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3785 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3787         * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3788         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3789         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3790         MINOR_BINARYCOMPAT_ABI_VERSION): New.
3791         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3792         (parse_version): Calculate version ID using new method. Use bit-flags
3793         for flag_indirect_dispatch and flag_bootstrap_classes.
3795 2005-05-25  Richard Henderson  <rth@redhat.com>
3797         PR libgcj/21692
3798         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3799         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3800         DECL_CONTEXT; avoid pushdecl_top_level.
3801         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3802         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3803         (layout_class_method): Likewise.
3804         * decl.c (java_mark_cni_decl_local): New.
3805         (java_mark_class_local): Use it.
3806         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3807         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3808         (struct lang_decl_func): Add local_cni;
3809         (struct lang_decl_var): Add class_field, vtable.
3810         (java_mangle_decl): Declare.
3811         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3812         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3813         (mangle_obstack_1): New.
3814         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
3815         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
3816         lhd_set_decl_assembler_name for things that don't need mangling.
3817         (mangle_class_field): Rename from java_mangle_class_field, make
3818         static, don't call init_mangling or finish_mangling.
3819         (mangle_vtable): Similarly.
3820         (mangle_local_cni_method_decl): New.
3821         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
3822         gcc_assert, and MANGLE_RAW_STRING.
3823         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3825 2005-05-25  DJ Delorie  <dj@redhat.com>
3827         * class.c (set_constant_value): Move warning control from if() to
3828         warning(OPT_*).
3830 2005-05-24  Richard Henderson  <rth@redhat.com>
3832         * builtins.c (define_builtin): Don't call make_decl_rtl.
3833         * constants.c (build_constant_data_ref): Likewise.
3834         * class.c (build_utf8_ref): Likewise.
3835         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3836         (get_dispatch_table, layout_class_method): Likewise.
3837         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3838         by hand.
3839         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3840         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3841         to determine if we need a non-zero address.
3842         * decl.c (builtin_function): Don't call make_decl_rtl.
3843         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3844         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3845         * resource.c (compile_resource_data): Likewise.
3846         * parse.y (resolve_field_access): Re-word comment to avoid
3847         building DECL_RTL.
3849 2005-05-24  Richard Henderson  <rth@redhat.com>
3851         * class.c (registered_class): Take it out of class_roots; turn into
3852         a vec of trees.
3853         (register_class): Make static.  Don't duplicate decl node.  Use
3854         VEC_safe_push.
3855         (emit_register_classes): Use VEC_iterate.  Use output_constant
3856         instead of assemble_integer.  Don't call mark_decl_referenced
3857         directly.
3858         * java-tree.h (register_class): Remove decl.
3860 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
3862         PR java/17845
3864         * parse.y (register_package, package_list): Remove.
3865         (package_declaration): Do not call register_package.
3866         (do_resolve_class): Do not use package_list.
3868 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
3870         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3871         unused variable.
3873 2005-05-15  Tom Tromey  <tromey@redhat.com>
3875         PR java/21519:
3876         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3877         NOTE_PUSH.
3879 2005-05-12  Aaron Luchko <aluchko@redhat.com>
3881         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3883 2005-05-11  Tom Tromey  <tromey@redhat.com>
3885         * gcj.texi (Code Generation): Document -fbootstrap-classes.
3886         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3887         (parse_version): Use it.
3888         * lang.opt (-fbootstrap-classes): New option.
3890 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
3892         PR java/21436
3893         * class.c (maybe_layout_super_class): Look for imports in this_class.
3894         * parse.h (ctxp_for_generation_last): New.
3895         (do_resolve_class): Add a parameter.
3896         * parse.y (ctxp_for_generation_last): New.
3897         (java_pop_parser_context): Add at end of list.
3898         (find_in_imports, find_in_imports_on_demand): Look in ctxp
3899         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3900         the given type are NULL.
3901         (do_resolve_class): Look into the imports of the new second parameter.
3902         Adjust recursive calls.
3903         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3904         calls to do_resolve_class.
3905         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3906         (java_complete_class): Do not do that here.
3908 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
3910         PR java/20309
3911         * Make-lang.in (java): Add gjnih.
3912         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3913         (GJNIH_OBJS): New variable.
3914         (gjnih$(exeext)): New target.
3915         (JAVA_MANFILES): Add gjnih.1.
3916         (java.uninstall): Add gjnih.1.
3917         (java.mostlyclean): Add gjnih.
3918         (java.maintainer-clean): Add gjnih.1.
3919         (java/gjavah-jni.o): New target.
3920         (.INTERMEDIATE): Add gjnih.pod.
3921         (gjnih.pod): New target.
3922         * config-lang.in (stagestuff): Add gjnih.
3923         * gcj.texi (Top): Add gjnih node.
3924         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3925         -bootclasspath options.
3926         (Invoking gjnih): New node.
3927         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3928         (TOOLNAME): New macro.
3929         (error): Replace hard-coded gcjh with TOOLNAME.
3930         (process_file): Likewise.
3931         (usage): Likewise.
3932         (version): Likewise.
3933         (help): Likewise.  Add help output for -force, -old, -trace and -J
3934         options.
3935         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3936         (options): Add force, old, trace and J fields.
3937         (main): Handle -force, -old, -trace and -J options.
3939 2005-05-03  Tom Tromey  <tromey@redhat.com>
3941         PR java/21245:
3942         * gjavah.c (main): Unlink output file on error.
3944 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
3946         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3947         copyright.
3949 2005-04-29  Tom Tromey  <tromey@redhat.com>
3951         * expr.c (build_jni_stub): Updated for change to build_block.
3953 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
3955         * expr.c (force_evaluation_order): Declare 'saved' earlier.
3957 2005-04-28  Andrew Haley  <aph@redhat.com>
3959         PR java/19285
3960         * java-tree.h (soft_resolvepoolentry_node): New.
3961         (alloc_constant_fieldref): Declare.
3962         * expr.c (expand_java_field_op): Don't call class_init for
3963         accesses to static fields with indirect dispatch.
3964         * builtins.c (initialize_builtins): Add "__builtin_expect".
3965         * decl.c (soft_resolvepoolentry_node): New variable.
3966         (java_init_decl_processing): Create a decl for
3967         "_Jv_ResolvePoolEntry".
3968         * class.c (build_fieldref_cache_entry): New function.
3969         (build_static_field_ref): Rewrite for indirect dispatch.
3970         * constants.c (find_name_and_type_constant_tree): New function.
3971         (alloc_constant_fieldref): Likewise.
3972         (build_constants_constructor): Handle CONSTANT_Fieldref and
3973         CONSTANT_NameAndType.
3975         PR java/21115
3976         * expr.c (force_evaluation_order): Convert outgoing args smaller
3977         than integer.
3979 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
3981         * gcj.texi (libgcj Runtime Properties): Remove obsolete
3982         gnu.gcj.runtime.NameFinder.* system properties. Update documentation
3983         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3985 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3987         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3988         to `unlock_stream' with `unlock_std_streams'.
3990 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
3992         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3993         instead of just expr.h.
3995 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3997         * gjavah.c (main): Unlock the stdio streams.
3998         * jcf-dump.c (main): Likewise.
3999         * jv-scan.c (main): Likewise.
4000         * jvgenmain.c (main): Likewise.
4002 2005-04-23  DJ Delorie  <dj@redhat.com>
4004         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4005         parse.y: Adjust warning() callers.
4007 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
4009         * gcj.texi (Object fields): Change "Integer" to "Int" in example
4010         contructor.
4012 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4014         * gcj.texi: Fix typos and bogus example.
4016 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
4018         * except.c: Fix a comment typo.
4020 2005-04-19  Julian Brown  <julian@codesourcery.com>
4022         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4023         indirect dispatch with PIC.
4025 2005-04-18  Andrew Haley  <aph@redhat.com>
4027         * java-except.h (struct eh_range.handler): Remove unused field.
4028         (handle_nested_ranges): Remove function declaration.
4029         (sanity_check_exception_range): Add function declaration.
4030         * verify.c (verify_jvm_instructions): Remove call to
4031         handle_nested_ranges.
4032         * verify-glue.c (verify_jvm_instructions_new): Call
4033         sanity_check_exception_range.
4034         * except.c (link_handler, eh_range_freelist, link_handler,
4035         handle_nested_ranges): Remove.
4036         (add_handler): Rewrite.
4037         (sanity_check_exception_range): New function.
4038         (print_ranges): New function.
4040 2005-04-13  Julian Brown  <julian@codesourcery.com>
4042         * decl.c (finish_method): Give methods once-only linkage.
4044 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
4046         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4048 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4050         * java-tree.h: Don't use PARAMS().
4052 2005-04-07  Per Bothner  <per@bothner.com>
4054         * class.c (push_class): By default, suppress debug output.
4055         (finish_class): Enable debug output for classes we're emitting.
4057 2005-04-07  Andrew Haley  <aph@redhat.com>
4059         * gcj.texi: Correct gcj-dbtool instructions.
4061 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
4063         * gcj.texi: Fix a typo.
4064         * lang.c: Fix a comment typo.
4066 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
4068         * gcj.texi (Invoking gij): Add descriptions of new -X options.
4069         Mention recognized-and-ignored compatibility options.
4070         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4071         JvFree.
4072         (About CNI): Add Memory allocation section.
4074 2005-04-01  Tom Tromey  <tromey@redhat.com>
4076         * decl.c (java_init_decl_processing): Fix types of
4077         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4078         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4079         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4081 2005-03-31  Jan Hubicka  <jh@suse.cz>
4083         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4084         * class.c: Include cgraph.h
4085         (make_local_functoin_alias): Mark aslias as needed.
4086         * resource.c: Include cgraph.h
4087         (compile_resource_data): Go via cgraph interface.
4089 2005-03-30  Ian Lance Taylor  <ian@airs.com>
4091         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4093 2005-03-30  Tom Tromey  <tromey@redhat.com>
4095         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4096         inner_class_info_index==0 or outer_class_info_index==0.
4098 2005-03-29  Tom Tromey  <tromey@redhat.com>
4100         * gcj.texi (libgcj Runtime Properties): Document
4101         gnu.gcj.runtime.endorsed.dirs.
4103 2005-03-24  Anthony Green  <green@redhat.com>
4105         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4106         'gcj-dbtool -p'.
4108 2005-03-23  Tom Tromey  <tromey@redhat.com>
4110         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4111         (parse_version): Use it.
4113 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
4115         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4117 2005-03-18  Andrew Haley  <aph@redhat.com>
4119         PR java/20522
4120         * decl.c (update_aliases): Don't update variables that are about
4121         to die.
4122         (maybe_poplevels): Add comment.
4124 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
4126         PR java/20502
4127         * jcf-parse.c (duplicate_class_warning): New function.
4128         (java_parse_file): Call duplicate_class_warning if
4129         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4130         (parse_zip_file_entries): Likewise. Also set
4131         CLASS_FROM_CURRENTLY_COMPILED_P.
4133 2005-03-16  Andrew Haley  <aph@redhat.com>
4135         * expr.c (expand_java_arrayload): Don't generate a
4136         NullPointerException based on the type of the node.
4137         (build_java_array_length_access): Likewise.
4139 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
4141         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4143 2005-03-11  Tom Tromey  <tromey@redhat.com>
4145         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4146         (libgcj Runtime Properties): Document the default .db.
4148 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
4150         PR java/20312
4151         * parse.y (checks_throws_clauses): Check exceptions list even when
4152         the base class does not come from a source file being compiled.
4153         (java_complete_lhs): Remove unused variable 'wfl'.
4155 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
4157         PR java/20338
4158         * decl.c (finish_method): Emit _Jv_InitClass for private static
4159         methods inside inner classes as well.
4161 2005-03-08  Julian Brown  <julian@codesourcery.com>
4162         * Revert patch from 2005-03-08 for causing bootstrap failure on
4163         ppc-darwin.
4165 2005-03-08  Julian Brown  <julian@codesourcery.com>
4167         * decl.c (finish_method): Give methods once-only linkage.
4169 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
4171         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4173 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
4175         * verify-glue.c (vfy_is_assignable_from): Perform static check using
4176         can_widen_reference_to if the C++ ABI is in use.
4177         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4178         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4179         type_isresolved, init_state, set_pc, state_get_pc,
4180         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4181         (verify_fail): Report the current PC from the verifier context.
4182         (free_state): Remove #if 0 block to enable this function.
4183         (free_verifier_context): Call free_state on state_list iterator
4184         values before freeing them.
4185         * expr.c (pop_type_0): Pop correct type for error message when stack
4186         contains a multi-word type.
4188 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
4190         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4191         for known NULL array length access.
4193 2005-03-07  Tom Tromey  <tromey@redhat.com>
4195         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4197 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
4199         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4200         typeck.c: Update copyright.
4202 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
4204         Remove xref code.
4205         * xref.c, xref.h: Remove file.
4206         * Make-lang.in (java/xref.o): Remove.
4207         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4208         * lang.c (flag_emit_xref): Remove definition.
4209         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4210         * typeck.c (convert): Remove use of do_not_fold.
4211         * parse.y (do_not_fold): Remove definition.
4212         (parser grammar): Remove xref code.
4213         (maybe_create_class_interface_decl, create_class): Likewise.
4214         (register_fields, method_header, finish_method_declaration): Likewise.
4215         (declare_local_variables, source_end_java_method): Likewise.
4216         (java_complete_expand_classes): Do not set do_not_fold.
4217         (java_complete_expand_method): Remove xref code.
4218         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4219         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4220         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4221         (patch_synchronized_statement, patch_throw_statement): Likewise.
4222         (maybe_build_class_init_for_field): Likewise.
4224 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
4226         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4227         instead of IS_NON_TYPE_CODE_CLASS.
4229 2005-03-04  Andrew Haley  <aph@redhat.com>
4231         PR java/18362
4232         * class.c (set_method_index): Don't set method_index if it is
4233         NULL_TREE.
4234         (layout_class_method): Don't complain about "non-static method foo
4235         overrides static method" in the case of indirect dispatch.
4237 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4239         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4240         warning.
4241         * Make-lang.in: Don't elide warnings in jcf-io.c.
4243 2005-03-01  Per Bothner  <per@bothner.com>
4245         PR java/8608
4246         * check-init.c (wfl): Remove static.
4247         (final_assign_error, check_init): Replace calls to parse_error_context
4248         by plain error.
4249         (check_init): Save, set, and restore input_location for each exp.
4251 2005-03-01  Per Bothner  <per@bothner.com>
4253         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4254         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4255         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4257 2005-03-01  Per Bothner  <per@bothner.com>
4259         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4261 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4263         PR libgcj/16923
4264         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4265         JvVMOption.
4267 2005-02-22  Tom Tromey  <tromey@redhat.com>
4269         PR java/20056:
4270         * verify-impl.c (EITHER): New define.
4271         (types_compatible): Handle it.
4272         (check_field_constant): Use it.
4274 2005-02-18  Tom Tromey  <tromey@redhat.com>
4276         PR java/20056:
4277         * verify-impl.c (types_equal): Fixed test.
4279         PR java/20056:
4280         * verify-glue.c (vfy_class_has_field): New function.
4281         * verify.h (vfy_class_has_field): Declare.
4282         * verify-impl.c (check_field_constant): Added 'putfield'
4283         argument.
4284         (verify_instructions_0): Updated.
4285         (types_equal): New function.
4287 2005-02-14  Tom Tromey  <tromey@redhat.com>
4289         PR java/19921:
4290         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4291         stack effect of multianewarray.
4293 2005-02-14  Andrew Haley  <aph@redhat.com>
4295         PR java/19907
4296         * expr.c (expand_byte_code): Call promote_arguments().
4297         (promote_arguments): New function.
4298         * decl.c (check_local_unnamed_variable): Remove special case for
4299         new verifier.
4300         (find_local_variable): Promote all boolean types to int
4301         when searching for local variable decls.
4303 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
4305         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4306         parse-scan.y: Update copyright.
4308 2005-02-11  Per Bothner  <per@bothner.com>
4310         PR java/15543
4311         * parse-scan.y (input_location): Remove variable.
4312         (main_input_filename): New - replaces input_filename, which isn't
4313         settable if USE_MAPPED_LOCATION.
4314         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4315         so we don't reference input_location or wfl_operator in that case.
4316         * jv-scan.c (expand_location): Remove - no longer used.
4317         (main): Set main_input_filename rather than input_filename.
4319 2005-02-09  Richard Henderson  <rth@redhat.com>
4321         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4322         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4324 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
4326         * expr.c (add_type_assertion): Use the proper enumeration type,
4327         since this is what htab_find_slot() is expecting.
4329 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
4331         * gcj.texi: Update copyright dates.
4333 2005-02-02  Tom Tromey  <tromey@redhat.com>
4335         * gcj.texi (libgcj Runtime Properties): Default library_control
4336         to 'cache'.
4338 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
4340         PR java/15543
4341         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4342         (modifiers) when square brackets are present in a declaration for
4343         a final paramter.
4344         * jv-scan.c (main): Set input_filename and input_line.
4346 2005-02-01  Tom Tromey  <tromey@redhat.com>
4348         PR java/19742:
4349         * gjavah.c (get_field_name): Don't override name for JNI header.
4351 2005-02-01  Roger Sayle  <roger@eyesopen.com>
4353         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4354         of unsigned types using iushr and lushr JVM bytecodes.
4356 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4358         PR java/19738
4359         * gjavah.c (jni_print_float): Do not emit floating-point
4360         initialiser for a static final field.
4361         (jni_print_double): Likewise.
4363 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
4365         Revert:
4366         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4367         * gjavah.c (print_field_info): Mark static data members of
4368         floating-point type with "__extension__".
4370 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4372         * gjavah.c (print_field_info): Mark static data members of
4373         floating-point type with "__extension__".
4375 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4377         PR java/9157
4378         * parse.y (build_string_concatenation): Remove redundant if.
4379         (patch_conditional_expr): Attempt to patch_string() the condition
4380         of a ?: as well, in addition to its other operands.
4382 2005-01-25  Tom Tromey  <tromey@redhat.com>
4384         * Make-lang.in (java/java-tree-inline.o): Removed.
4386 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
4388         PR java/19070
4389         * parse.y (patch_binop): Allow comparisons against NULL only
4390         if the other operand is of a reference type.
4392 2005-01-24  Tom Tromey  <tromey@redhat.com>
4394         * java-tree.h (gcj_abi_version): Declare.
4395         * class.c (make_class_data): Push gcj_abi_version into "next"
4396         field.  Renamed field.
4397         * decl.c (gcj_abi_version): New global.
4398         (parse_version): New function.
4399         (java_init_decl_processing): Call it.  Renamed 'next' field.
4400         Include version.h.
4401         (GCJ_BINARYCOMPAT_ADDITION): New define.
4403 2005-01-24  Roger Sayle  <roger@eyesopen.com>
4405         PR java/19295
4406         * jcf-write.c (generate_bytecode_insns): Conversions between
4407         integer types of the same precision shouldn't generate widening
4408         or narrowing conversion bytecodes.
4410 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
4412         * java-except.h, java-tree.h: Remove unused prototypes.
4414 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
4416         PR java/18091:
4417         * jcf-write.c (perform_relocations): Don't call memcpy if source
4418         and destination are the same.
4420 2005-01-17  Tom Tromey  <tromey@redhat.com>
4422         * verify-impl.c (get_short): Sign extend.
4423         (get_int): Likewise.
4425 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
4427         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4428         with TYPE_SIZE.
4430 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4432         * verify.c: Revert to the version before the BC-ABI merge.
4434 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4436         PR java/19277
4437         * check-init.c (check_init): Take care of references that do not
4438         have an explicit final variable declaration (e.g. array length
4439         access) for pre/post in/de-crement operators.
4441 2005-01-08  Mark Wielaard  <mark@klomp.org>
4443         * parse.y (process_imports): Allocate (and free) original_name only
4444         when not already defined.
4445         * jcf-parse.c (read_class): Free results of find_class() and
4446         lrealpath().
4447         (java_parse_file): Keep pointer to head of file_list and free when
4448         done. Free result of lrealpath().
4450 2005-01-05  Tom Tromey  <tromey@redhat.com>
4452         * gcj.texi (Standard Properties): java.ext.dirs is now used.
4454 2004-12-20  Andrew Haley  <aph@redhat.com>
4456         * typeck.c: Use fold_convert for ints and booleans.
4458 2004-12-17  Andrew Haley  <aph@redhat.com>
4460         PR java/18931
4461         * typeck.c (convert): Use a CONVERT_EXPR when converting to
4462         BOOLEAN_TYPE or CHAR_TYPE.
4463         (convert_to_boolean, convert_to_char) : Remove.
4464         * convert.h (convert_to_boolean, convert_to_char) : Remove.
4465         * expr.c (expand_load_internal): Do type conversion if type is not
4466         as required.
4468 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
4470         PR target/18459
4471         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4472         Update comment.
4474 2004-12-07  Andrew Haley  <aph@redhat.com>
4476         PR java/18811:
4477         * jcf-parse.c (load_class): Remove sanity test for missing inner
4478         class file.
4480 2004-12-06  Tom Tromey  <tromey@redhat.com>
4482         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4483         (java.uninstall): Likewise.
4484         (java.maintainer-clean): Likewise.
4485         (.INTERMEDIATE): Likewise.
4486         (java.install-man): Likewise.
4487         (gcj-dbtool.pod): New target.
4488         * gcj.texi (Code Generation): Document -findirect-dispatch.
4489         (libgcj Runtime Properties): Document
4490         gnu.gcj.precompiled.db.path.
4491         (Top): Link to "Invoking gcj-dbtool".
4493 2004-12-06  Tom Tromey  <tromey@redhat.com>
4495         PR java/14853:
4496         * java-tree.h (extract_field_decl): Declare.
4497         * parse.y (extract_field_decl): Renamed from
4498         strip_out_static_field_access_decl.  No longer static.
4499         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4501 2004-12-03  Tom Tromey  <tromey@redhat.com>
4503         * lang.c (flag_new_verifier): Define.
4504         (java_post_options): Set flag_new_verifier if indirect dispatch
4505         is being used.
4506         * lang.opt (fnew-verifier): Removed.
4508 2004-12-03  Tom Tromey  <tromey@redhat.com>
4510         PR bootstrap/14614:
4511         * Make-lang.in (java.install-common): Only install transformed
4512         gcjh if gcj-cross exists.
4514 2004-12-03  Andrew Haley  <aph@redhat.com>
4516         PR java/18812
4517         * except.c (link_handler): Patch 'outer' field of siblings of the
4518         range we're demoting.
4520 2004-12-03  Andrew Haley  <aph@redhat.com>
4522         PR java/18697
4523         * class.c (layout_class_method): Don't fail to override a method
4524         simply because it has DECL_ARTIFICIAL set.
4526 2004-12-02  Tom Tromey  <tromey@redhat.com>
4528         PR java/16675:
4529         * parse.y (craft_constructor): Special case null_pointer_node.
4531 2004-12-02  Tom Tromey  <tromey@redhat.com>
4533         PR java/18741:
4534         * java-gimplify.c (java_gimplify_expr): Don't call
4535         SET_EXPR_LOCATION unless wrapped tree is an expression.
4537 2004-11-27  Per Bothner  <per@bothner.com>
4539         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
4540         Fix fencepost error in 'i', which got executed one too many times.
4541         Also, fold memcpy into explicit loop, as originally intended.
4542         Also, free temporary 'buf' which otherwise leaks.
4544 2004-11-27  Per Bothner  <per@bothner.com>
4546         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4547         local static variables if not USE_MAPPED_LOCATION.
4549 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
4551         * class.c, decl.c, expr.c: Fix comment typos.
4553 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
4555         PR java/18305
4556         * decl.c (end_java_method): Call
4557         attach_init_test_initialization_flags on all the init_decls.
4558         * parse.y (attach_init_test_initialization_flags): Move to ...
4559         * expr.c (attach_init_test_initialization_flags): here and
4560         support BIND_EXPR also.
4561         * java-tree.h (attach_init_test_initialization_flags): Prototype.
4562         * jcf-parse.c (parse_class_file): Don't disable class init
4563         optimization.
4565 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
4567         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4568         in diagnostics.
4570 2004-11-24  Richard Henderson  <rth@redhat.com>
4572         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4573         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4575 2004-11-24  Tom Tromey  <tromey@redhat.com>
4577         * verify.c (defer_merging): Don't use C++-style comment.
4578         * verify.h (java_opcode): Added java_opcode_end.
4579         * class.c (build_class_ref): Remove C++ comment and old FIXME.
4581         * verify-impl.c (vfy_push_type): Removed bogus "return".
4582         (initialize_stack): Use vfy_alloc and vfy_free.
4583         (verify_instructions_0): Likewise.
4585         * Merged gcj-abi-2-dev-branch to trunk.
4587 2004-11-24  Andrew Haley  <aph@redhat.com>
4589         * jcf-parse.c (parse_class_file): Set file_start_location.
4591 2004-11-10  Tom Tromey  <tromey@redhat.com>
4593         * class.c (make_field_value): Don't call build_static_field_ref.
4594         (build_static_field_ref): Don't emit direct references when using
4595         indirect dispatch.
4597         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
4598         -verbose:class into man page synopsis.
4600 2004-11-09  Tom Tromey  <tromey@redhat.com>
4602         * expr.c (build_java_arraystore_check): Still generate check if
4603         element type is itself an array.
4605 2004-11-08  Tom Tromey  <tromey@redhat.com>
4607         * java-tree.h (soft_check_assignment_node): Removed.
4608         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4609         * decl.c (java_init_decl_processing): Don't initialize
4610         soft_check_assignment_node.
4612 2004-11-05  Tom Tromey  <tromey@redhat.com>
4614         * class.c (layout_class_methods): Don't add Miranda methods when
4615         using indirect dispatch.
4617 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
4619         * class.c (make_class_data): Call emit_assertion_table to set the
4620         'assertion_table' field.
4621         (build_signature_for_libgcj): Move here from expr.c.
4622         (add_assertion_table_entry): New function. Callback for assertion
4623         hashtable traversal.
4624         (emit_assertion_table): New. Take class argument, and generate
4625         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4626         * decl.c (init_decl_processing): Define assertion_entry_type record.
4627         Push 'assertion_table' class field instead of 'verify'.
4628         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4629         (type_assertion_hash): Include 'assertion_code' in hash.
4630         (add_type_assertion): Rewritten. Take class and assertion_code
4631         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4632         (can_widen_reference_to): Use new add_type_assertion() arguments.
4633         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4634         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4635         (verify_identifier_node): Removed.
4636         (assertion_entry_type, assertion_table_type): New.
4637         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4638         assertion code definitions.
4639         (struct type_assertion): Add assertion_code. Rename 'source_type' and
4640         'target_type' to 'op1' and 'op2'.
4641         (add_type_assertion): Declare.
4642         (lang_printable_name_wls): Remove unused definition.
4643         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4644         to emit runtime assertion.
4645         (vfy_note_stack_type): Clean up non-C90 declarations.
4646         (vfy_note_local_type): Likewise.
4647         * verify.h (vfy_is_assignable_from): Declare.
4648         * verify-impl.c (is_assignable_from_slow): Remove unused function.
4649         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4650         instead of is_assignable_from_slow().
4651         (types_compatible): Reinstate ref_compatible() call.
4653 2004-11-04  Tom Tromey  <tromey@redhat.com>
4655         * class.c (build_static_field_ref): Reverted previous patch.
4657         * class.c (build_static_field_ref): Don't emit direct references
4658         when using indirect dispatch.
4660 2004-11-03  Tom Tromey  <tromey@redhat.com>
4662         * expr.c (expand_java_arrayload): Set lhs_type_node.
4663         (expand_java_arraystore): Set rhs_type_node.
4665 2004-11-02  Tom Tromey  <tromey@redhat.com>
4667         * jcf-parse.c (compute_class_name): Use filename length from zip
4668         directory, not strlen.
4670         * expr.c (expand_invoke): Mark new interface methods as abstract.
4672 2004-11-01  Tom Tromey  <tromey@redhat.com>
4674         * verify-impl.c (push_jump): Removed check for uninitialized
4675         objects.
4676         (push_exception_jump): Likewise.
4677         (handle_ret_insn): Likewise.
4678         (handle_jsr_insn): Likewise.
4679         (state_check_no_uninitialized_objects): Removed.
4681         * decl.c (check_local_unnamed_variable): Recognize
4682         promoted-to-int parameters when using the new verifier.
4683         * expr.c (expand_java_arraystore): Explicitly request array type
4684         when using new verifier.
4685         (expand_java_arrayload): Likewise.
4686         (invoke_build_dtable): Don't pass object_type_node as
4687         expression argument to build_java_indirect_ref.
4688         (build_java_check_indexed_type): Do nothing.
4689         (build_java_arraystore_check): Handle case where array doesn't
4690         have array type.
4691         (build_java_array_length_access): Likewise.
4692         (expand_invoke): Handle case where interface overrides a method
4693         from Object.
4694         (pop_type_0): Always succeed for reference types.
4695         (process_jvm_instruction): Don't pop a value in a dead
4696         exception handler.
4697         (pop_arguments): Convert arguments to correct types.
4699 2004-10-29  Andrew Haley  <aph@redhat.com>
4701         * jcf-parse.c (give_name_to_class): Remove line that was
4702         incorrectly merged.
4704 2004-10-29  Andrew Haley  <aph@redhat.com>
4706         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4708 2004-10-20  Andrew Haley  <aph@redhat.com>
4710         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4712 2004-10-26  Tom Tromey  <tromey@redhat.com>
4714         * verify.h (vfy_notify_verified): Removed.
4715         * verify-glue.c (vfy_notify_verified): Removed.
4717 2004-10-26  Tom Tromey  <tromey@redhat.com>
4719         * verify-impl.c (debug_print_state): Declare `i' before code.
4720         (merge_types): Modify `t' when it is null_type.
4722 2004-10-26  Tom Tromey  <tromey@redhat.com>
4724         * verify-impl.c (type_print): Renamed from print.  Now static and
4725         takes an argument.
4726         (debug_print_state): Use type_print.
4728 2004-10-25  Tom Tromey  <tromey@redhat.com>
4730         * expr.c (build_invokeinterface): Compute correct offset for
4731         index into interface methods.
4733 2004-10-20  Tom Tromey  <tromey@redhat.com>
4735         * java-tree.h (verify_jvm_instructions_new): Declare.
4737         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4738         command line.
4740         * verify-impl.c (verify_instructions): Correctly handle wide
4741         types on the stack.
4742         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4743         (vfy_get_component_type): Strip pointer types.
4744         (vfy_find_class): Use get_type_from_signature.  Strip pointer
4745         types.
4746         Include java-except.h.
4748 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
4750         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4751         vfy_push_type_t, set_variable, add_new_state, merge_into,
4752         handle_jsr_insn, branch_prepass, check_class_constant,
4753         check_wide_constant, get_one_type, compute_static_types,
4754         verify_instructions_0): Clean up C99 declarations after statements.
4756 2004-10-20  Tom Tromey  <tromey@redhat.com>
4758         * verify-impl.c (merge_refs): Compare reference against iterator,
4759         not ref2.
4761         * verify-glue.c (vfy_tag): Mask off resolved flag.
4763 2004-10-19  Tom Tromey  <tromey@redhat.com>
4765         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4766         (init_state_with_stack): Initialize `this_type' in state.
4767         (verify_method): Use debug_print.
4768         * verify-glue.c (vfy_is_primitive): Removed debugging print.
4769         (vfy_note_stack_depth): Reverted last patch.
4770         (vfy_note_stack_type): Note pointer to Object, not Object.
4771         (vfy_note_local_type): Likewise.
4773         * verify.h (vfy_note_instruction_seen): Declare.
4774         * verify-glue.c (verify_jvm_instructions_new): Set
4775         BCODE_EXCEPTION_TARGET on target instruction.
4776         (vfy_note_instruction_seen): New function.
4777         * verify-impl.c (FLAG_INSN_SEEN): New define.
4778         (verify_instructions_0): Set flag on instruction.  Save state for
4779         PC=0 later.
4780         (verify_instructions): Call vfy_note_instruction_seen.
4782         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4783         (verify_jvm_instructions_new): Call method_init_exceptions,
4784         add_handler, and handle_nested_ranges.
4785         * verify-impl.c (verify_method): Return 1 on success.
4786         (verify_instructions_0): Save the state at PC=0.
4788         * verify-impl.c (init_type_from_class): Set is_resolved and
4789         ref_next on new ref_intersection.
4790         (init_type_from_string): Likewise.
4792 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
4794         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4795         if flag_new_verifier is set.
4796         * java-tree.h (flag_new_verifier): Declare.
4797         * lang.opt (fnew-verifier): New option.
4798         * verify-impl.c: Work around namespace pollution by undef'ing
4799         'current_class'.
4800         (struct verifier_context): Make 'bytecode' const.
4801         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4802         (types_compatible): For the BC-ABI, always consider reference types
4803         compatible.
4804         (check_class_constant): Use vfr->current_class.
4805         (check_constant): Likewise.
4806         (check_wide_constant): Likewise.
4807         (check_field_constant): Check for 'L' at start of type name.
4808         (get_one_type): Return pointer instead of type. Set type result in
4809         caller via passed type pointer.
4810         (compute_argument_types): Update to use new get_one_type arguments.
4811         (compute_return_type): Likewise.
4812         (make_verifier_context): New. Allocate and initialize 'vfr'.
4813         (free_verifier_context): New. Free 'vfr' and its contents.
4814         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4815         and free_verifier_context.
4817 2004-10-15  Tom Tromey  <tromey@redhat.com>
4819         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4820         * verify.h (vfy_fail): Fixed formatting.
4822         * verify-impl.c (vfr): Fixed comment formatting.
4823         (collapse_type): New function.
4824         (verify_instructions): Notify compiler about type map.
4825         * verify.h (vfy_note_stack_depth): Updated.
4826         (vfy_note_stack_type): Likewise.
4827         (vfy_note_local_type): Likewise.
4828         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4829         Declare.
4830         * verify-glue.c (vfy_note_stack_depth): Correctly size type
4831         state.  Added `method' argument.
4832         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
4833         argument.
4834         (vfy_note_local_type): New function.
4835         (vfy_unsuitable_type): Likewise.
4836         (vfy_return_address_type): Likewise.
4837         (vfy_null_type): Likewise.
4839         * verify.h (VFY_IN_GCC): Removed.
4840         (VFY_WANT_TYPEMAP): Removed.
4841         * verify-impl.c (verify_instructions_0): Removed useless "\".
4842         (struct state) <next>: Uncomment.
4844 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
4846         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4847         C-style.
4849 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4851         * Make-lang.in (verify.o): Re-enabled this target.
4852         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4853         (vfy_get_interface): Likewise.
4854         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4855         * verify.h (verify_jvm_instructions_new): Declare.
4856         * verify-impl.c (free_state): Temporarily comment out unused
4857         function.
4859 2004-10-06  Tom Tromey  <tromey@redhat.com>
4861         * java-tree.h (JV_STATE_READ): New enum value.
4863 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4865         * verify.h: New file.
4867 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
4869         * verify-impl.c, verify-glue.c, verify.h: New files.
4870         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4872 2004-09-24  Andrew Haley  <aph@redhat.com>
4874         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4875         for a slot if it's of pointer type.
4877 2004-09-14  Tom Tromey  <tromey@redhat.com>
4879         * class.c (make_class_data): Correctly initialize "state" field.
4880         Initialize "engine" field.
4881         * decl.c (java_init_decl_processing): Add "engine" field.
4883 2004-09-10  Andrew Haley  <aph@redhat.com>
4885         PR java/12760
4886         * expr.c (build_invokeinterface): Use fast method for interface
4887         dispatch.
4888         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4889         JTI_ITABLE_PTR_TYPE.
4890         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
4891         (emit_symbol_table): Add new arg, element_size.
4892         * decl.c (java_init_decl_processing): Initialize Class.itable.
4893         * class.c (GEN_TABLE): New macro.
4894         (gen_indirect_dispatch_tables): Use it.  Add itable.
4895         (make_class_data): Add new arg for emit_symbol_table().
4896         Emit itable.
4897         (add_miranda_methods): Make sure search_class has been parsed.
4898         (emit_symbol_table): Add new arg, element_size.
4900 2004-09-06  Andrew Haley  <aph@redhat.com>
4902         * verify.c (merge_types): Return Object for all merges of
4903         interfaces.
4904         * expr.c (add_type_assertion): Don't generate assertions when
4905         source type is array of Object.
4907 2004-09-03  Andrew Haley  <aph@redhat.com>
4909         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4911         * lang.c (java_post_options): Force flag_verify_invocations if
4912         we're not using indirect dispatch.
4914         * expr.c (pop_type_0): Move test for interfaces before call to
4915         can_widen_reference_to().
4916         (build_signature_for_libgcj): Remove generation of canonical array
4917         type.
4918         (add_type_assertion): Canonicalize both arrays.
4919         Don't assert that type X can be assigned to Object.
4920         Don't assert that type X an be assigned to type X.
4921         Don't assert that Object can be assigned to type X.
4922         (can_widen_reference_to): Warn whenever we generate an assertion.
4923         (process_jvm_instruction): Use throwable_type_node for the type of
4924         an exception class.
4926 2004-09-01  Andrew Haley  <aph@redhat.com>
4928         * decl.c (java_init_decl_processing): Change
4929         verify_identifier_node to "__verify".
4930         * expr.c (add_type_assertion): Use verify_identifier_node for name.
4931         * java-tree.h (verify_identifier_node): Change to "__verify".
4933         * expr.c (build_signature_for_libgcj): New function.
4934         (add_type_assertion): Use it to construct signatures for
4935         source_type and target_type.
4937 2004-08-27  Andrew Haley  <aph@redhat.com>
4939         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4940         (verify_identifier_node): New.
4941         (TYPE_VERIFY_METHOD): New.
4942         (struct type_assertion): New type.
4943         * expr.c (type_assertion_eq): New function.
4944         (type_assertion_hash): New function.
4945         (add_type_assertion): New function.
4946         (can_widen_reference_to): Call add_type_assertion().
4947         * decl.c (java_init_decl_processing): Add verify_identifier_node.
4948         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4949         (finish_class): Output TYPE_VERIFY_METHOD (type).
4951         * decl.c (end_java_method): Nullify unused fields.
4953 2004-08-17  Andrew Haley  <aph@redhat.com>
4955         * verify.c (defer_merging): Quieten.
4956         * jcf-parse.c (load_class): Only try to open a class file if it's
4957         java.lang.Object or if it's part of the current compilation.
4958         Check that the class we just tried to load is the class we just
4959         loaded.  Quieten.
4960         (java_parse_file): Set flag_verify_invocations off if we're
4961         compiling from .class.
4962         (parse_zip_file_entries): Abort if we try to read a dummy class.
4963         * expr.c (can_widen_reference_to): Quieten.
4964         (build_invokevirtual): Abort if we try to invokevirtual an
4965         interface.
4966         (expand_invoke): Don't build a non-interface call to an interface.
4967         (build_instanceof): Don't do premature optimization if
4968         flag_verify_invocations is not set.
4969         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4970         from superclass.
4971         (build_static_field_ref): Add correct type conversion for
4972         field_address.
4973         (add_miranda_methods): Disable generation of Miranda methods for
4974         dummy classes.
4975         (layout_class_method): Don't complain about non-static method
4976         overrides static method with dummy classes.
4978 2004-08-13  Tom Tromey  <tromey@redhat.com>
4980         * class.c (build_static_field_ref): Re-enable atable lookups for
4981         static fields.
4983         * parse.y (strip_out_static_field_access_decl): Indentation fix.
4985 2004-08-11  Tom Tromey  <tromey@redhat.com>
4987         * gcj.texi (libgcj Runtime Properties): Document new properties.
4989 2004-08-06  Andrew Haley  <aph@redhat.com>
4991         * jcf-parse.c (load_class): Check that we really have loaded the
4992         class we're looking for.
4994 2004-07-19  Andrew Haley  <aph@redhat.com>
4996         * verify.c (verify_jvm_instructions): Comment change only.
4998         * typeck.c (build_java_array_type): Add size field to array name.
5000         * java-tree.h (LOCAL_SLOT_P): New.
5001         (update_aliases): Add PC argument.
5002         (pushdecl_function_level): New function.
5004         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5005         MODIFY_EXPR, and SAVE_EXPR.
5006         (java_gimplify_modify_expr): New function.
5008         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5009         (expand_iinc): Pass PC to update_aliases().
5010         (STORE_INTERNAL): Likewise.
5011         (process_jvm_instruction): Likewise.
5013         * decl.c (base_decl_map): New variable.
5014         (uniq): New variable.
5015         (update_aliases): Rewrite with more thorough checking.
5016         (debug_variable_p): New function.
5017         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
5018         (check_local_named_variable): Delete whole function.
5019         (initialize_local_variable): New function.
5020         (check_local_unnamed_variable): Add checks and comments.
5021         (find_local_variable): Rewrite.
5022         (java_replace_reference): New function.
5023         (function_binding_level): New variable.
5024         (pushdecl_function_level): New function.
5025         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5026         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5027         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5028         function_binding_level.
5029         (end_java_method): Null unused fields to save memory.
5031 2004-06-29  Andrew Haley  <aph@redhat.com>
5033         * except.c (expand_start_java_handler): Push a new binding level.
5034         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5035         register_exception_range() to register where we'll do it.
5036         (expand_end_java_handler): Remove old bogus code.  Replace with
5037         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5038         the top of the expression we're curently building.
5039         (maybe_end_try): Delete.
5040         * decl.c (binding_level.exception_range): New field.
5041         (clear_binding_level): Add field exception_range.  Reformat.
5042         (poplevel): Call expand_end_java_handler().
5043         (poplevel): Call java_add_stmt only if functionbody is false.
5044         (maybe_poplevels): Don't call maybe_end_try() from here.
5045         (end_java_method): Clear no longer used trees in function decl.
5046         (register_exception_range): New function.
5047         * java-tree.h (register_exception_range, struct eh_range): Declare.
5049 2004-06-22  Andrew Haley  <aph@redhat.com>
5051         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5052         the otable.
5053         * check-init.c (get_variable_decl): Teach check-init about
5054         FIELD_DECLs addressed via the otable.
5055         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5056         CLASS_PARSED_P.
5058 2004-05-28  Andrew Haley  <aph@redhat.com>
5060         * jcf-parse.c (load_class): Don't try to read a class that we've
5061         already read.
5063         * expr.c (build_invokeinterface): Use the old-fashioned way of
5064         doing indirect dispatch: look up interfaces by name.
5065         * java-tree.h (enum java_tree_index): Add
5066         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5067         * decl.c (java_init_decl_processing): Add
5068         soft_lookupinterfacemethodbyname_node.
5070         * gjavah.c (print_method_info): Final methods have vtable entries,
5071         so gjavah needs to output them.
5072         * class.c (layout_class_method): Generate vtable entries for final
5073         methods.
5074         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5075         dispatch, even if a method is final.
5077 2004-05-25  Andrew Haley  <aph@redhat.com>
5079         * class.c (build_symbol_entry): Convert the names of constructors
5080         to init_identifier_node when generating an entry for the indirect
5081         dispatch table.
5083         * expr.c (build_known_method_ref): Generate indirect calls for
5084         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5086 2004-05-24  Andrew Haley  <aph@redhat.com>
5088         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5089         atable element is of the right type.
5091         * class.c (build_static_field_ref): Cast pointer to correct type
5092         for field.
5094 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
5096         * Merged with HEAD as of 20040514. Diff against
5097         gcj-abi-2-merge-20040514.
5099 2004-04-16  Andrew Haley  <aph@redhat.com>
5101         * verify.c (check_pending_block): Disable subroutine checks.
5102         (defer_merging): New function.
5103         (merge_types): If types are dummy, use defer_merging to combine them.
5104         (verify_jvm_instructions): If invocation is invokeinterface and
5105         target is dummy, assume target really is an interface.
5107         * parse.y (patch_invoke): Break out call to java_create_object.
5109         * lang.c (flag_verify_invocations): New.
5111         * jcf-parse.c (load_class): If we've already failed to load a
5112         class, don't try again.
5113         (load_class): If we can't find a .class file, don't fail, but emit
5114         a warning.
5115         (parse_class_file): Don't act on dummy methods.
5117         * java-tree.h (flag_verify_invocations): New.
5118         (TYPE_DUMMY): New.
5119         (lang_type.dummy_class): New field.
5120         (java_create_object): New function.
5121         (METHOD_DUMMY): New.
5123         * expr.c (build_field_ref): Widen field offset.
5124         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5125         that each of its elements is compatible with the one we're
5126         popping.
5127         (pop_type_0): Issue a warning to say that we need to generate a
5128         runtime check.
5129         (java_create_object): New function.
5130         (build_field_ref): Only generate hard refs if we're not using
5131         indirect dispatch.
5132         (expand_java_field_op): If we're using !verify_invocations and we
5133         see a missing field, generate a decl for it.
5135         (expand_invoke): If a class doesn't have the method we seek and
5136         we're using !flag_verify_invocations, generate a decl for the
5137         method now.
5139         (build_known_method_ref): Always use indirect dispatch via the
5140         atable for static methods.
5142         (expand_java_NEW): Break out object creation into new function,
5143         java_create_object.
5145         (can_widen_reference_to): Issue a warning to say that we need to
5146         generate a runtime check.
5148         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5149         (make_method_value): Also use index for interfaces.
5150         (make_class_data): Skip dummy field for inherited data.
5151         Don't build method array for dummy methods.
5152         Set size_in_byte to -1 when using inirect dispatch
5153         Don't build a hard class ref if we don't have a hard ref to our
5154         superclass, or if we're using inirect dispatch.
5155         Null out dispatch tables.
5157         (layout_class_method): Don't complain about non-static method
5158         overrides static method is method is artificial.
5160         (build_static_field_ref): Disable atable references to static
5161         fields for the time being.
5163         (layout_class_methods): Check for CLASS_INTERFACE as
5164         well as CLASS_ABSTRACT.
5166 2004-11-24  Steven Bosscher  <stevenb@suse.de>
5168         * class.c (make_class_data): Don't check flag_inline_functions.
5169         * lang.c (flag_really_inline): Remove unused flag.
5170         (java_handle_option): Don't set it here.  Remove special handling
5171         of flag_inline_functions for Java.
5172         (java_init): Don't set flag_inline_trees here.  Already done...
5173         (java_post_options): ...here.  Don't clear flag_inline_functions.
5175 2004-11-24  Steven Bosscher  <stevenb@suse.de>
5177         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5178         (java_gimplify_exit_block_expr): New function.
5179         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5180         LABELED_BLOCK_EXPR.
5181         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5182         (EXIT_BLOCK_EXPR): Likewise.
5183         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5184         (LABELED_BLOCK_BODY): Likewise.
5185         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5186         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5187         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
5188         TREE_OPERAND.
5189         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5190         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5191         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
5192         second operand of EXIT_BLOCK_EXPR.
5193         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5194         TREE_OPERAND.
5195         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5197 2004-11-23  Ben Elliston  <bje@au.ibm.com>
5199         * xref.h (xref_flag_value): Remove.
5200         (xref_set_data, xref_get_data): Likewise.
5201         (xref_set_current_fp): Likewise.
5202         (XREF_NONE): Likewise.
5203         (XREF_GET_DATA): Likewise.
5204         * xref.c (xref_flag_value): Remove.
5205         (xref_set_data, xref_get_data): Likewise.
5206         (xref_set_current_fp): Likewise.
5208 2004-11-23  Ben Elliston  <bje@au.ibm.com>
5210         * gjavah.c (output_directory): Make static.
5211         (temp_directory): Likewise.
5213 2004-11-15  Tom Tromey  <tromey@redhat.com>
5215         * decl.c (instn_ptr_type_node): Removed.
5216         (lineNumbers_ptr_type_node): Removed.
5217         (jint_type): Removed.
5218         (jint_ptr_type): Removed.
5220 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
5222         PR java/15576
5223         * check-init.c (check_init): Ignore DECL_EXPR.
5224         * expr.c (always_initialize_class_p): Reenable.
5225         (build_class_init): Use a variable to store the decl.  Also use
5226         boolean_false_node instead of integer_zero_node.
5227         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5228         to the block.
5230 2004-11-08  Tom Tromey  <tromey@redhat.com>
5232         PR java/16843:
5233         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5234         generating a JNI header.
5235         (print_field_info): Handle JNI headers.
5236         (jni_print_float): Likewise.
5237         (jni_print_double): Likewise.
5239 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
5241         * decl.c (end_java_method): Remove duplicated code.
5243 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
5244             Gerald Pfeifer  <gerald@pfeifer.com>
5246         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5247         as well.
5249 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
5251         PR java/17265
5252         * class.c: Reinstate 2004-08-18 patch.
5253         (make_local_function_alias): Don't create an alias for extern (native)
5254         functions.
5256 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
5258         PR java/17265
5259         * class.c (make_local_function_alias): Revert 2004-08-18 change.
5260         (make_method_value): Likewise.
5262 2004-10-21  Andrew Haley  <aph@redhat.com>
5264         PR java/18091:
5265         * jcf-parse.c (set_source_filename): Add code to build new sfname.
5267 2004-10-20  Andrew Haley  <aph@redhat.com>
5269         * decl.c (end_java_method): Don't expand if flag_syntax_only.
5270         Remove duplicated code block.
5272 2004-10-18  Steven Bosscher  <stevenb@suse.de>
5274         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5275         New rules to work around old Bison warnings.
5277 2004-10-17  Steven Bosscher  <stevenb@suse.de>
5279         * class.c (ident_subst): Always alloca buffer.
5280         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5281         opcode after including javaop.def.
5282         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5283         conditional expression that exits, to avoid warnings.
5284         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5285         a user of an extension.
5286         * win32-host.c: Move check down to have non-empty file when
5287         WIN32 is not defined.
5289         * Make-lang.in (java-warn): Add STRICT_WARN.
5290         (java/jcf-io.o-warn): Don't have Werror for this file.
5291         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5293 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
5295         * expr.c (expr_add_location): Move declaration to before all
5296         statements.
5297         * parse.y (java_expand_classes): Ditto.
5298         * lex.c (java_peek_unicode): Ditto.
5300 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
5302         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5303         if possible, else convert `foo' to 'foo'.
5304         * class.c: Likewise.
5305         * decl.c: Likewise.
5306         * expr.c: Likewise.
5307         * jcf-io.c: Likewise.
5308         * jcf-parse.c: Likewise.
5309         * lang.c: Likewise.
5310         * lex.c: Likewise.
5311         * parse.h: Likewise.
5313 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
5315         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5316         rename parameter 'msg' to 'msgid' in function declaration.
5317         (issue_warning_error_from_context): Likewise.
5318         (yyerror): Rename parameter 'msg' to 'msgid'.
5319         (all over): Use new quoting style for diagnostics.
5321 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
5323         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5324         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5325         Update copyright.
5327 2004-10-14  Matt Austern  <austern@apple.com>
5329         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5330         pointer_set_t* now.
5332 2004-10-13  Tom Tromey  <tromey@redhat.com>
5334         PR java/15578:
5335         * lang.opt (--extdirs): Document.
5336         * jvspec.c (lang_specific_driver): Recognize -encoding and
5337         -extdirs.
5339 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
5341         * parse.y (issue_warning_error_from_context): Use va_list *
5342         instead of va_list parameter.
5343         (parse_error_context): Update call.
5344         (parse_warning_context): Likewise.
5346 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
5348         * parse.y, parse-scan.y: Add list of diagnostic messages to
5349         insulate translation template from version of yacc/bison used
5350         to compile the grammar.
5352 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
5354         Prepare for %q, %< and %> in diagnostic message strings.
5355         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5356         Name second parameter 'msgid'.
5357         * parse.y: Additionally include pretty-print.h and diagnostic.h.
5358         (issue_warning_error_from_context): Use pretty-printer functions
5359         instead of vsprintf for constructing formatted messages. Rename
5360         parameter 'msg' to 'msgid'.
5361         (parse_error_context): Rename parameter 'msg' to 'msgid'.
5362         (parse_warning_context): Likewise.
5364 2004-10-05  Andrew Haley  <aph@redhat.com>
5366         PR java/17779
5367         * jcf-parse.c (parse_zip_file_entries): If a class has a
5368         superclass and a TYPE_SIZE of zero, lay it out.
5370 2004-09-30  Andrew Haley  <aph@redhat.com>
5372         PR java/17733
5373         * jcf-parse.c (compute_class_name): Rewrite.
5375 2004-10-01  Jan Hubicka  <jh@suse.cz>
5377         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5379 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5381         * lex.c: Fix a comment typo.
5383 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5385         * java-tree.h: Fix a comment typo.
5387 2004-09-30  Per Bothner  <per@bothner.com>
5389         Simplify lexer.  Implement --enable-mapped-location support.
5390         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
5391         (parse_source_file_1): Pass filename as extra parameter, so we can call
5392         linemap_add and set input_location here, rather than in both callers.
5393         (read_class): Pass copied filename to parse_source_file_1.
5394         Don't initialize wfl_operator - only needed for source compilation.
5395         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
5396         * lex.h:  Remove a bunch of debugging macros.
5397         * lex.h (struct_java_line, struct java_error):  Remove types.
5398         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
5399         (struct java_lc_s):  Remove prev_col field.
5400         (struct java_lexer):  New fields next_unicode, next_columns, and
5401         avail_unicode.  New position field, and maybe token_start field.
5402         Don't need hit_eof field - use next_unicode == -1 instead.
5403         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
5404         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
5405         * parse.h:  Various changes for USE_MAPPED_LOCATION.
5406         (EXPR_WFL_EMIT_LINE_NOTE): XXX
5407         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5408         (struct parser_ctxt):  New file_start_location field.
5409         Remove p_line, c_line fields since we no longer save lines.
5410         Remove elc, lineno, and current_jcf fields - no longer used.
5411         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
5412         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5413         source_location and is probably not needed anymore anyway.
5414         Use new expr_add_Location function.
5415         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
5416         (java_pop_parser_context):  Minor cleanup.
5417         (java_parser_context_save_global, java_parser_context_restore_global,
5418         java_pop_parser_context):  Save/restore input_location as a unit.
5419         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
5420         a source_location instead of a wfl context node.
5421         (check_class_interface_creation):  input_filename is not addressable.
5422         (create_artificial_method):  Calling java_parser_context_save_global
5423         and java_parser_context_restore_global is overkill.  Instead,
5424         temporarily set input_location from class decl.
5425         (java_layout_seen_class_methods): Set input_location from method decl.
5426         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5427         (finish_loop_body):  Likewise.
5428         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
5429         (java_sprint_unicode):  Take a character, not index in line.
5430         (java_sneak_uncode):  Replaced by java_peek_unicode.
5431         (java_unget_unicode):  No longer used.
5432         (java_allocate_new_line. java_store_unicode):  Removed, since we
5433         no longer remember "lines".
5434         (java_new_lexer):  Update for new data structures.
5435         (java_read_char):  Move unget_value checking to java_read_unicode.
5436         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5437         efficient functions that are used directly when lexing.
5438         (java_read_unicode_collapsing_terminators):  No longer needed.
5439         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5440         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5441         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
5442         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
5443         combine switch branches, and test for common token kinds earlier.
5444         (java_lex_error):  Rewrite.
5445         * jv-scan.c (expand_location): New function, copied from tree.c.
5446         (main): Set ctxp->filename instead of setting input_filename directly.
5448 2004-09-30  Per Bothner  <per@bothner.com>
5450         More cleanup for --enable-mapped-location.
5451         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
5452         input_location here.  Instead do it in give_name_to_class.
5453         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5454         * expr.c (expand_byte_code): Call linemap_line_start.
5455         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
5456         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
5457         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
5458         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
5459         to USE_MAPPED_LOCATION case.
5461         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
5462         * jcf-parse.c (java_parse_file): Don't set input_filename.
5463         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5464         Create a list of TRANSLATION_UNIT_DECL.
5465         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
5466         reason is so we can set a DECL_SOURCE_LOCATION for each file.
5467         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5468         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5469         (file_start_location):  New static.
5470         (set_source_filename):  Avoid extra access to input_filename macro.
5471         Concatenate new name with class's package prefix.
5472         (set_source_filename, give_name_to_class): Update.
5473         (give_name_to_class):  Set class's "line 0" input_location here.
5474         (parse_class_file):  Set input_location as a unit.
5476         * jcf-parse.c (load_class): Sanity test if missing inner class file.
5478 2004-09-29  Per Bothner  <per@bothner.com>
5480         * java-tree.h:  Redefine some macros and add some declaration
5481         to handle the USE_MAPPED_LOCATION case.
5482         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
5483         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
5484         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5485         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5487         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5488         * decl.c (finish_method, java_add_stmt): Likewise.
5489         * java-gimplify.c (java-gimplify.c):  Likewise.
5490         * jcf-write.c (generate_bytecode_insns):  Likewise.
5491         * lang.c (java_post_options): Likewise - call linemap_add.
5493 2004-09-29  Andrew Haley  <aph@redhat.com>
5495         PR java/17007
5496         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5497         result of TRUNC_MOD_EXPR.
5498         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5499         * decl.c (java_init_decl_processing): Mark
5500         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5502 2004-09-28  Tom Tromey  <tromey@redhat.com>
5504         PR java/15710:
5505         * class.c (add_miranda_methods): Load superinterface if not
5506         already loaded.
5508 2004-09-28  Andrew Haley  <aph@redhat.com>
5510         PR java/17586
5511         * jcf-parse.c (load_class): Don't try to read a class that we've
5512         already read.
5514 2004-09-28  Andrew Haley  <aph@redhat.com>
5516         * jcf-parse.c (load_class): Back out previous broken patch.
5518 2004-09-28  Andrew Haley  <aph@redhat.com>
5520         PR java/17586
5521         * jcf-parse.c (load_class): Don't try to read a class that we've
5522         already read.
5523         Check that we really did read the right class.
5525 2004-09-25  Tom Tromey  <tromey@redhat.com>
5527         PR java/17500:
5528         * parse.y (create_artificial_method): Use add_method_1.
5530 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
5532         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5533         comment typos.
5534         * gcj.texi: Fix typos.
5536 2004-09-24  Tom Tromey  <tromey@redhat.com>
5538         PR java/15656:
5539         * parse.y (class_instance_creation_expression): Set `$$' to NULL
5540         in error parts of rule.
5541         (unary_expression): Don't call error_if_numeric_overflow when $1
5542         is NULL.
5544 2004-09-24  Tom Tromey  <tromey@redhat.com>
5546         PR java/16789:
5547         * parse.y (resolve_qualified_expression_name): Set
5548         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5549         * expr.c (force_evaluation_order): Check for empty argument list
5550         after stripping COMPOUND_EXPR.
5552 2004-09-23  Andrew Haley  <aph@redhat.com>
5554         PR java/16927:
5555         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5556         COND_EXPRs.
5558 2004-09-23  Tom Tromey  <tromey@redhat.com>
5560         PR java/17329:
5561         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5562         where operand is null.
5564 2004-09-23  Tom Tromey  <tromey@redhat.com>
5566         PR java/17380:
5567         * parse.y (not_accessible_p): Allow access to protected members
5568         even when class is not static.
5570 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
5572         * Make-lang.in: Revert the gcc-none.o change.
5574 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
5576         * parse.y (patch_anonymous_class): VEC_space returns true if there
5577         is space.
5579 2004-09-21  Matt Austern  <austern@apple.com>
5581         Fix bootstrap.
5582         * gjavah.c (free_method_name_list): Fix function definition so
5583         it's a proper C prototype.
5585 2004-09-21  Tom Tromey  <tromey@redhat.com>
5587         PR java/17575:
5588         * gjavah.c (free_method_name_list): New method.
5589         (main): Call it.
5591 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
5592             Zack Weinberg  <zack@codesourcery.com>
5594         * java-tree.def: Use tree_code_class enumeration constants
5595         instead of code letters.
5596         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5597         new tree-class enumeration constants.
5599 2004-09-13  Tom Tromey  <tromey@redhat.com>
5601         PR java/17216:
5602         * class.c (layout_class_method): Put synthetic methods into the
5603         vtable.
5605 2004-09-11  Andrew Pinski  <apinski@apple.com>
5607         * Make-lang.in (java/ggc-none.c): Change dependency
5608         for ggc.h into $(GGC_H).
5610 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5612         * Make-lang.in (java/win32-host.o): Add dependency on
5613         coretypes.h.
5614         * win32-host.c: Add includes for coretypes.h, jcf.h
5616 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5618         * Make-lang.in (GCJH_OBJS): Change dependency from
5619         ggc-none.o to java/ggc-none.o
5620         (JCFDUMP_OBJS): Likewise.
5621         (java/ggc-none.o): New target.
5623 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
5625         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
5626         * class.c (build_utf8_ref, build_static_field_ref,
5627         make_field_value, make_method_value, get_dispatch_table,
5628         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5629         * constants.c (get_tag_node, build_ref_from_constant_pool,
5630         build_constants_constructor): Likewise.
5631         * decl.c (java_init_decl_processing): Likewise.
5632         * expr.c (build_java_array_length_access, build_newarray,
5633         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5634         build_java_binop, build_field_ref, expand_java_add_case,
5635         expand_java_call, build_known_method_ref, build_invokevirtual,
5636         build_invokeinterface, build_jni_stub): Likewise.
5637         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5638         * jcf-parse.c (get_constant): Likewise.
5639         * lex.c (do_java_lex): Likewise.
5640         * parse.y (patch_binop, patch_unaryop, patch_cast,
5641         build_newarray_node, patch_newarray): Likewise.
5642         * resource.c (compile_resource_data): Likewise.
5643         * typeck.c (build_prim_array_type): Likewise.
5645 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
5647         * decl.c (java_init_decl_processing): Adjust
5648         initialize_sizetypes call.
5650 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
5652         * jv-scan.c (fancy_abort): Add.
5654 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
5656         * expr.c (build_java_arrayaccess): Use convert to change
5657         len's type.
5659 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
5661         * class.c (make_local_function_alias): Allocate extra space for 'L'
5662         in name buffer. Reported by Thomas Neumann.
5664 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
5666         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5667         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
5668         * lex.c (do_java_lex): Adjust.
5669         (error_if_numeric_overflow): Likewise.
5671 2004-08-18  Andrew Pinski  <apinski@apple.com>
5673         * class.c (make_local_function_alias): Only make a new decl if we
5674         support alias attribute on all decls.
5676 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
5678         * class.c (make_local_function_alias): New function. Create local
5679         alias for public method DECL.
5680         (make_method_value): Use make_local_function_alias.
5681         * parse.y (craft_constructor): Don't special-case anonymous classes.
5682         Always set ctor_name to init_identifier_node.
5683         (lookup_method_invoke): Call layout_class_method when creating
5684         anonymous class constructor.
5686 2004-08-18  Richard Henderson  <rth@redhat.com>
5688         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5689         default case.  Treat '<' similarly.  Update for
5690         is_gimple_formal_tmp_var name change.
5692 2004-08-17  Andrew Haley  <aph@redhat.com>
5694         * lang.c (lang_printable_name): Obey verbose flag.
5695         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5696         lang_printable_name().
5697         (verify_constructor_circularity, get_printable_method_name,
5698         check_abstract_method_definitions, java_check_regular_methods,
5699         java_check_abstract_methods, check_inner_class_access,
5700         fix_constructors, patch_method_invocation, patch_return):
5701         Likewise.
5702         * expr.c (pop_type_0): Likewise.
5704         * java-tree.h (lang_printable_name_wls): Delete.
5706 2004-08-16  Tom Tromey  <tromey@redhat.com>
5708         PR java/8473:
5709         * parse.y (primary): Changed for initialized and uninitialized
5710         array creations.
5711         (array_access): Handle array_creation_initialized.
5712         (array_creation_expression): Split into
5713         array_creation_initialized and array_creation_uninitialized.
5715 2004-08-16  Andrew Haley  <aph@redhat.com>
5717         * jcf-write.c (find_constant_index): Canonicalize NaNs when
5718         generating bytecode.
5720 2004-08-16  Elliot Lee <sopwith@redhat.com>
5722         PR java/9677
5723         * jcf-parse.c (java_parse_file): Handle filenames with embedded
5724         spaces, and quoted filelists.
5726 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5728         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5729         * class.c (build_utf8_ref, build_static_field_ref,
5730         make_field_value, make_method_value, get_dispatch_table,
5731         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5732         * constants.c (get_tag_node,  build_ref_from_constant_pool,
5733         build_constants_constructor): Likewise.
5734         * decl.c (java_init_decl_processing): Likewise.
5735         * expr.c (build_java_array_length_access, build_newarray,
5736         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5737         build_java_binop, build_field_ref, expand_java_add_case,
5738         expand_java_call, build_known_method_ref, build_invokevirtual,
5739         build_invokeinterface, build_jni_stub): Likewise.
5740         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5741         * jcf-parse.c (get_constant): Likewise.
5742         * lex.c (do_java_lex): Likewise.
5743         * parse.y (patch_binop, patch_unaryop, patch_cast,
5744         build_null_of_type, patch_newarray): Likewise.
5745         * resource.c (compile_resource_data): Likewise.
5746         * typeck.c (build_prim_array_type): Likewise.
5748 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
5750         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5751         Don't create BLOCK here or call java_gimplify_block.
5753 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5755         * java-tree.h (flag_deprecated): Removed.
5756         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5757         * parse.y (check_deprecation): Check warn_deprecated instead of
5758         flag_deprecated.
5760 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
5762         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5763         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5764         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5765         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5766         flag_force_classes_archive_check, flag_optimize_sci,
5767         flag_indirect_dispatch): Remove explicit declarations.
5768         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
5769         final comment.
5771 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
5773         PR bootstrap/14893
5774         * Make-lang.in (java.install-man): Install from either build
5775         tree or source tree, whichever has the file first.
5777 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
5779         * jcf-parse.c (get_constant): Adjust force_fit_type call.
5780         * lex.h (SET_LVAL_NODE_TYPE): Remove.
5781         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5782         (do_java_lex): Likewise. Adjust force_fit_type call.
5784 2004-08-04  Roger Sayle  <roger@eyesopen.com>
5785             Andrew Haley  <aph@redhat.com>
5787         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5788         checking trees as they're being built.
5789         (convert): Call convert_ieee_real_to_integer if we're
5790         converting a constant, even if we're writing a class file.
5792 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
5794         PR java/16701
5795         * parse.y (fold_constant_for_init): Call resolve_field_access with
5796         correct current_class context.
5798 2004-08-01  Roger Sayle  <roger@eyesopen.com>
5800         * decl.c (update_aliases, initialize_local_variable): Replace calls
5801         to build with calls to buildN.
5802         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5803         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5804         * parse.h (BUILD_THROW): Likewise.
5805         * parse.y (switch_expression, synchronized_statement,
5806         catch_clause_parameter, array_creation_expression,
5807         conditional_expression, make_qualified_name,
5808         resolve_qualified_expression_name, patch_method_invocation,
5809         patch_invoke, build_method_invocation, build_new_invocation,
5810         build_assignment, patch_assignment, build_binop, patch_binop,
5811         build_string_concatenation, build_incdec, patch_unaryop,
5812         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5813         patch_return, build_if_else_statement, build_labeled_block,
5814         build_new_loop, build_loop_body, build_bc_statement,
5815         build_assertion, encapsulate_with_try_catch, build_try_statement,
5816         build_try_finally_statement, patch_synchronized_statement,
5817         emit_test_initialization): Likewise, replace build with buildN.
5819 2004-07-28  Eric Christopher  <echristo@redhat.com>
5821         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5822         (java_unsafe_for_reeval): Ditto.
5824 2004-07-26    <hp@bitrange.com>
5826         * parse.y (build_super_invocation): Adjust declaration order to
5827         avoid declaration after statement.
5829 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
5831         * decl.c: Rename all identifiers named `class' to `cl'.
5833 2004-07-25  Richard Henderson  <rth@redhat.com>
5835         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5837 2004-07-23  Mike Stump  <mrs@apple.com>
5839         * boehm.c (set_bit): Improve type safety wrt unsignedness.
5840         * gjavah.c (throwable_p, decode_signature_piece,
5841         print_full_cxx_name, print_include, add_namelet, add_class_decl,
5842         process_file): Likewise.
5843         * jcf-dump.c (main): Likewise.
5844         * jcf-io.c (read_zip_member): Likewise.
5845         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5846         give_name_to_class, get_class_constant): Likewise.
5847         * jcf-write.c (find_constant_wide, push_long_const,
5848         generate_classfile): Likewise.
5849         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5850         * parse.y (read_import_dir): Likewise.
5851         * typeck.c (parse_signature_type): Likewise.
5852         * verify.c (verify_jvm_instructions): Likewise.
5853         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5855 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
5857         * Make-lang.in: Replace rmic and rmiregistry references with
5858         grmic and grmiregistry.
5859         * gcj.texi: Likewise.
5861 2004-07-20  Andrew Haley  <aph@redhat.com>
5863         PR java/16431.
5864         * verify.c (verify_jvm_instructions): Comment change only.
5866         * typeck.c (build_java_array_type): Add size field to array name.
5868         * java-tree.h (LOCAL_SLOT_P): New.
5869         (update_aliases): Add PC argument.
5870         (pushdecl_function_level): New function.
5872         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5873         MODIFY_EXPR, and SAVE_EXPR.
5874         (java_gimplify_modify_expr): New function.
5876         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5877         (expand_iinc): Pass PC to update_aliases().
5878         (STORE_INTERNAL): Likewise.
5879         (process_jvm_instruction): Likewise.
5881         * decl.c (base_decl_map): New variable.
5882         (uniq): New variable.
5883         (update_aliases): Rewrite with more thorough checking.
5884         (debug_variable_p): New function.
5885         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
5886         (check_local_named_variable): Delete whole function.
5887         (initialize_local_variable): New function.
5888         (check_local_unnamed_variable): Add checks and comments.
5889         (find_local_variable): Rewrite.
5890         (java_replace_reference): New function.
5891         (function_binding_level): New variable.
5892         (pushdecl_function_level): New function.
5893         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5894         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5895         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5896         function_binding_level.
5897         (end_java_method): Null unused fields to save memory.
5899 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5901         * class.c (add_interface_do): Remove.
5902         (set_super_info, interface_of_p, maybe_add_interface,
5903         add_interface, make_class_data, layout_class,
5904         add_miranda_methods): Adjust BINFO accessors and addition.
5905         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5906         accessors.
5907         * jcf-write.c (generate_classfile): Likewise.
5908         * parse.y (patch_anonymous_class, check_inner_circular_reference,
5909         check_circular_reference, java_complete_class,
5910         check_abstract_method_definitions,
5911         java_check_abstract_method_definitions,
5912         check_interface_throws_clauses, java_check_abstract_methods,
5913         lookup_java_interface_method2,
5914         find_applicable_accessible_methods_list): Adjust BINFO accessors
5915         and addition.
5916         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5918 2004-07-18  Roger Sayle  <roger@eyesopen.com>
5920         * builtins.c (max_builtin, min_builtin,
5921         java_build_function_call_expr): Replace calls to build with buildN.
5922         * class.c (build_class_ref, build_static_field_ref,
5923         get_dispatch_table, make_class_data, layout_class_method): Likewise.
5924         * constants.c (build_ref_from_constant_pool): Likewise.
5925         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5926         add_stmt_to_compound): Likewise.
5927         * except.c (build_exception_object_ref, expand_end_java_handler):
5928         Likewise.
5929         * java-gimplify.c (java_gimplify_case_expr,
5930         java_gimplify_default_expr, java_gimplify_block,
5931         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5932         * jcf-write.c (generate_bytecode_insns): Likewise.
5933         * typeck.c (convert_ieee_real_to_integer): Likewise.
5935 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5937         * java-tree.h (builtin_function): Declare.
5939 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5941         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5942         abuse restore_line_number_status.
5944 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
5946         g++/15861
5947         * jcf-parse.c (java_emit_static_constructor): Specify default
5948         priority.
5950 2004-07-13  Per Bothner  <per@bothner.com>
5952         * java-tree.h (all_class_filename):  Remove useless macro.
5953         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
5954         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
5955         * parse.y (java_parser_context_restore_global):  Replace
5956         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5957         * jcf-parse.c (read_class, java_parse_file):  Likewise.
5959 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
5961         PR java/16474
5962         gjavah.c (print_field_info): Emit constant only if field is static.
5964 2004-07-11  Roger Sayle  <roger@eyesopen.com>
5966         * expr.c (java_truthvalue_conversion, flush_quick_stack,
5967         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5968         build_java_ret, build_java_throw_out_of_bounds_exception,
5969         build_java_array_length_access, java_check_reference,
5970         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5971         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5972         expand_java_arrayload, build_java_monitor, expand_java_return,
5973         expand_load_internal, expand_java_NEW, build_get_class,
5974         build_instanceof, expand_java_CHECKCAST, expand_iinc,
5975         build_java_soft_divmod, build_java_binop, build_field_ref,
5976         expand_compare, expand_java_goto, expand_java_switch,
5977         expand_java_add_case, build_class_init, build_known_method_ref,
5978         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5979         expand_invoke, build_jni_stub, expand_java_field_op,
5980         java_expand_expr, expand_byte_code, STORE_INTERNAL,
5981         force_evaluation_order, emit_init_test_initialization): Convert
5982         calls to "build" into calls to the prefered "buildN" functions.
5984 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5986         * java-tree.h (set_block): Remove.
5987         * lang.c (java_clear_binding_stack): New.
5988         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5989         * decl.c (struct binding_level): Remove this_block.
5990         (clear_binding_level): Likewise.
5991         (poplevel): Don't handle this_block.
5992         (set_block): Remove.
5994 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
5996         * class.c (common_enclosing_context_p): Remove statement with no
5997         side-effects.
5999 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
6001         PR java/8618
6002         * parse.y (create_anonymous_class): Remove 'location' argument. Use
6003         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6004         (craft_constructor): Inherit access flags for implicit constructor
6005         from the enclosing class.
6006         (create_class): Fix comment typo.
6007         (resolve_qualified_expression_name): Pass type of qualifier to
6008         not_accessible_p, not the type in which target field was found.
6009         (not_accessible_p): Handle inner classes. Expand protected
6010         qualifier-subtype check to enclosing instances, but don't apply this
6011         check to static members. Allow protected access to inner classes
6012         of a subtype. Allow private access within common enclosing context.
6013         (build_super_invocation): Get WFL line number info from current
6014         class decl.
6015         (build_incomplete_class_ref): Update for new create_anonymous_class
6016         signature.
6017         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6018         common_enclosing_instance_p.
6019         * class.c (common_enclosing_context_p): New. Determine if types
6020         share a common enclosing context, even across static contexts.
6021         (common_enclosing_instance_p): Renamed from
6022         common_enclosing_context_p. Determines if types share a common
6023         non-static enclosing instance.
6024         * java-tree.h (common_enclosing_instance_p): Declare.
6025         * jcf-write.c (get_method_access_flags): New. Surpress private flag
6026         for inner class constructors.
6027         (generate_classfile): Use get_method_access_flags.
6029 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
6031         * class.c (interface_of_p): Check for null TYPE_BINFO.
6033 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
6035         * class.c (make_class): Do not create binfo here.
6036         (set_super_info): Create it here.
6037         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6039 2004-07-08  Richard Henderson  <rth@redhat.com>
6041         * expr.c (case_identity, get_primitive_array_vtable,
6042         java_expand_expr, emit_init_test_initialization): Remove.
6043         * java-tree.h (java_expand_expr): Remove.
6044         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6046 2004-07-07  Per Bothner  <per@bothner.com>
6048         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
6049         get internal error due to mismatched types.
6051         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
6053         * gcj.texi (Linking):   New node.  Document -lgij usage.
6055 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
6057         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6058         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6059         * java/class.c (set_super_info, class_depth, interface_of_p,
6060         maybe_add_interface, add_interface, make_class_data,
6061         layout_class, add_miranda_methods): Adjust BINFO macros.
6062         * expr.c (can_widen_reference_to, lookup_field): Likewise.
6063         * jcf-write.c (generate_classfile): Likewise.
6064         * parse.y (patch_anonymous_class,
6065         check_inner_circular_reference, check_circular_reference,
6066         java_complete_class, check_abstract_method_definitions,
6067         java_check_abstract_method_definitions,
6068         check_interface_throws_clauses, java_check_abstract_methods,
6069         lookup_java_interface_method2,
6070         find_applicable_accessible_methods_list): Likewise.
6071         * typeck.c (find_method_in_interface): Likewise.
6072         * verify.c (merge_types): Likewise.
6074 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
6076         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6077         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6079 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
6081         * class.c (make_class): Use make_tree_binfo.
6082         (set_super_info, add_interface_do): Likewise.
6083         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6085 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
6087         * verify.c: Correct array element access formatting thinko.
6089 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
6091         * verify.c: Insert a short blurb at the start referring to the JVMS.
6092         (merge_type_state): Remove redundant nested if statement.
6093         (verify_jvm_instructions): Ensure current_subr is initialised to
6094         NULL_TREE.
6095         Minor formatting fixes all over the place.
6097 2004-07-02  Richard Henderson  <rth@redhat.com>
6099         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6101 2004-07-01  Richard Henderson  <rth@redhat.com>
6103         * class.c (registerClass_libfunc): Remove.
6104         (init_class_processing): Don't set it.
6105         (emit_register_classes): Take list_p parameter.  Fill it in
6106         with _Jv_RegisterClass calls.
6107         * decl.c (java_init_decl_processing): Don't call
6108         init_resource_processing.
6109         * jcf-parse.c (java_emit_static_constructor): New.
6110         (java_parse_file): Call it.
6111         * resource.c (registerResource_libfunc): Remove.
6112         (init_resource_processing): Remove.
6113         (write_resource_constructor): Take list_p parameter.  Fill it in
6114         with _Jv_RegisterResource calls.
6115         * java-tree.h: Update prototypes.
6117 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
6119         PR java/1262
6120         * class.c (layout_class_method): Do not override package-private
6121         method if its in a different package.
6122         (split_qualified_name): Move here from parse.y. Rename from
6123         breakdown_qualified. Add comment.
6124         (in_same_package): Move here from parse.y. Add comment.
6125         * java-tree.h (break_down_qualified, in_same_package): Declare.
6126         (in_same_package): Likewise.
6127         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6128         Callers updated.
6130 2004-06-29  Andrew Haley  <aph@redhat.com>
6132         * except.c (expand_start_java_handler): Push a new binding level.
6133         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
6134         register_exception_range() to register where we'll do it.
6135         (expand_end_java_handler): Remove old bogus code.  Replace with
6136         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6137         the top of the expression we're curently building.
6138         (maybe_end_try): Delete.
6139         * decl.c (binding_level.exception_range): New field.
6140         (clear_binding_level): Add field exception_range.  Reformat.
6141         (poplevel): Call expand_end_java_handler().
6142         (poplevel): Call java_add_stmt only if functionbody is false.
6143         (maybe_poplevels): Don't call maybe_end_try() from here.
6144         (end_java_method): Clear no longer used trees in function decl.
6145         (register_exception_range): New function.
6146         * java-tree.h (register_exception_range, struct eh_range): Declare.
6148 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
6150         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6152 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
6154         Formatting fixes.
6155         * expr.c (class_has_finalize_method): Fix method name indentation.
6156         (expand_java_call): Remove K&R style parameter declaration.
6157         (expand_invoke): Fix statement indentation.
6158         (expand_java_field_op): Likewise.
6159         * parse-scan.y: Fix typo.
6160         (reset_report): Fix method name indentation.
6161         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6162         line. Fix typos.
6163         * verify.c (verify_jvm_instructions): Document parameters, insert
6164         page break.
6165         * lang.c (lang_init_source): Fix method name indentation.
6166         * class.c (common_enclosing_context_p): Likewise.
6167         (emit_symbol_table): Fix parameter list indentation.
6168         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6169         parameter declaration.
6170         * constants.c: Fix copyright notice indentation.
6171         * typeck.c (find_method_in_superclasses): Fix parameter list
6172         indentation.
6173         (find_method_in_interfaces): Likewise.
6174         * zextract.c (makelong): Fix method name indentation.
6176 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6178         PR java/15715.
6179         * parse.y (create_interface): Set correct access modifiers for
6180         interfaces.
6181         * jcf-write.c (get_classfile_modifiers): New function.
6182         (generate_classfile): Use get_classfile_modifiers, not
6183         get_access_flags.
6185 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6187         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6188         dependency to current parser context, not NULL_TREE, for top-level
6189         classes.
6190         (jdep_resolve_class): Enable member access check for all inner
6191         class dependencies.
6193 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6195         * parse.y (qualify_and_find): Pass type decl, not identifier, to
6196         load_class.
6198 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6200         PR java/15734
6201         * expr.c (expand_java_field_op): Ensure that target class for static
6202         field access has been loaded.
6204 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6205             Ranjit Mathew  <rmathew@hotmail.com>
6207         PR java/1207, java/16178
6208         * jcf-parse.c (load_class): Return immediately if passed a type decl
6209         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6210         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6211         before calling load_class.
6212         (qualify_and_find): Likewise.
6213         (find_in_imports_on_demand): Likewise.
6214         (find_applicable_accessible_methods_list): Likewise.
6216 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
6218         * parse.y (java_layout_seen_class_methods): Don't call load_class
6219         on class defined by source parser.
6221 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
6223         * parse.y (set_nested_class_simple_name_value): Removed.
6224         (java_complete_expand_class): Remove calls to
6225         set_nested_class_simple_name_value.
6227 2004-06-22  Andrew Haley  <aph@redhat.com>
6228             Ranjit Mathew  <rmathew@hotmail.com>
6230         Fixes PR java/16113.
6231         * decl.c (force_poplevels): Remove call to expand_end_bindings.
6233 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
6235         * parse.y (create_class): Correct diagnostic message about
6236         java.lang.Object extending anything else.
6238 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6240         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6241         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6242         * constants.c (build_ref_from_constant_pool): Likewise.
6243         * expr.c (build_java_array_length_access): Likewise.
6244         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6245         (invoke_build_dtable, build_invokevirtual): Likewise.
6246         (build_invokeinterface, java_expand_expr): Likewise.
6247         (emit_init_test_initialization): Likewise.
6248         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6249         * parse.y (make_qualifed_name, build_array_ref): Likewise.
6251 2004-06-21  Andrew Haley  <aph@redhat.com>
6253         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6254         block.
6256 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
6258         * jcf.h (struct JCF): Change java_source, right_zip and finished
6259         to unsigned int.
6260         * lex.h (struct java_lexer): Change hit_eof, read_anything,
6261         byte_swap and use_fallback to unsigned int.
6262         * parse.h (struct _jdep): Change flag0 to unsigned int.
6264 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
6266         Fixes PR java/13948
6267         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6268         before trying to lay out its methods.
6269         * jcf-parse.c (read_class): Track parsed files using canonical paths
6270         obtained via lrealpath from libiberty.
6271         (java_parse_file): Likewise.
6272         (parse_source_file_1): Rename formal parameter to reflect its
6273         modified purpose. Minor formatting fix.
6275 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6277         * class.c (emit_register_classes): Make the function uninlinable,
6278         do not set current_function_cannot_inline.
6279         * resource.c (write_resource_constructor): Do not reset
6280         flag_inline_functions around rest_of_compilation.
6282 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
6284         PR java/15769
6285         * expr.c (java_truthvalue_conversion): Handle
6286         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6287         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6288         i.e. return the expression.
6290 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
6292         * gjavah.c: Include version.h
6294 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
6296         * jcf-write.c (generate_bytecode_conditional): Correct handling
6297         of unordered conditionals. Add comment.
6299 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
6300             Per Bothner  <per@bothner.com>
6302         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6303         local variable was initialised upon declaration.
6304         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6305         variable was final and initialised upon declaration.
6306         * check-init.c (check_final_reassigned): Give error only if a blank
6307         final is not definitely unassigned or if an initialised final is
6308         reassigned.
6309         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6310         assignment expressions. Remove case MODIFY_EXPR, label do_default.
6311         (check_init): Perform initialised-variable-removing-optimisation
6312         only on non-final local variables.
6314 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6316         * jcf-write.c (generate_bytecode_conditional): Handle binops
6317         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6318         and LTGT_EXPR.
6319         (generate_bytecode_insns): Likewise.
6321 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6323         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6324         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6326 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6328         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6329         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6331 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6333         * decl.c (struct binding_level): Add GTY marker. Compile
6334         binding_depth unconditionally.
6335         (current_binding_level, free_binding_level, global_binding_level):
6336         Likewise.
6337         (clear_binding_level): Unconditionally set binding_depth.
6338         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6340 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6342         * lex.c (java_new_lexer): Set 'encoding'.
6343         (java_read_char): Improve error message for unrecognized characters.
6344         * lex.h (struct java_lexer): New field 'encoding'.
6346 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6348         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6350 2004-05-21  Mark Wielaard  <mark@klomp.org>
6352         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6353         extern.
6355 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
6357         * typeck.c: Remove non-printable character 160.
6359 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
6361         * check-init.c: Correct minor typos.
6363 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6365         * Make-lang.in, expr.c, java-gimplify.c: Rename
6366         tree-simple.[ch] to tree-gimple.[ch].
6368 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
6370         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6372 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6374         Merge from tree-ssa-20020619-branch.  See
6375         ChangeLog.tree-ssa for details.
6377         * Make-lang.in, builtins.c, check-init.c, class.c,
6378         constants.c, decl.c, except.c, expr.c, java-except.h,
6379         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6380         lang.c, lang.opt, parse.y, resource.c: Merged.
6381         * java-gimplify.c: New file.
6383 2004-05-10  Andrew Haley  <aph@redhat.com>
6385         * parse.y (create_class): Set TYPE_VFIELD.
6386         * decl.c (java_init_decl_processing): Likewise.
6388         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6389         * class.c (make_method_value): Replace DECL_VINDEX with call to
6390         get_method_index().
6391         (get_dispatch_vector): Likewise.
6392         (layout_class_method): Likewise.
6393         Replace set of DECL_VINDEX with call to set_method_index().
6394         (set_method_index): New function.
6395         (get_method_index): New function.
6396         * java-tree.h (set_method_index): New function decl.
6397         (get_method_index): New function decl.
6399 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
6401         * parse.y (check_pkg_class_access): Add new argument
6402         and use it when cl is NULL to call lookup_cl on it.
6403         (parser_check_super_interface): Do not call lookup_cl.
6404         Pass this_decl to check_pkg_class_access and NULL
6405         instead of lookup_cl.
6406         (parser_check_super): Update for change in
6407         check_pkg_class_access.
6408         (do_resolve_class): Likewise.
6409         (process_imports): Likewise.
6410         (find_in_imports_on_demand): Likewise.
6411         (resolve_qualified_expression_name): Likewise.
6413 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
6415         Fixes PR java/9685, PR java/15073
6416         * parse.y (accessibility_string): New method.
6417         (not_accessible_field_error): Use accessibility_string()
6418         instead of java_accstring_lookup().
6419         (resolve_qualified_expression_name): Check with
6420         check_pkg_class_access() before allowing access using
6421         qualified names.
6422         Fix comment typo.
6423         Use check_pkg_class_access() instead of not_accessible_p()
6424         for unqualified types.
6425         (not_accessible_p): Use DECL_CONTEXT (member) instead of
6426         REFERENCE for package-private access checking.
6427         (patch_method_invocation): Use accessibility_string() instead
6428         of java_accstring_lookup().
6430 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
6432         Fixes PR java/15133
6433         * gjavah.c (struct method_name): Add member is_native.
6434         (overloaded_jni_method_exists_p): Match candidate method only if
6435         it is native.
6436         (print_method_info): Initialise is_native flag from the method's
6437         access flags.
6439 2004-04-30  Roger Sayle  <roger@eyesopen.com>
6441         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6442         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6444 2004-04-22  Roger Sayle  <roger@eyesopen.com>
6446         * resource.c (write_resource_constructor): Guard call to possibly
6447         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6449 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
6451         * class.c (make_class_data): Add new field aux_info.
6452         * decl.c (java_init_decl_processing): Push type and decl for
6453         `aux_info'.
6455 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6457         * expr.c (expand_java_NEW): Don't use size argument for
6458         _Jv_AllocObject calls.
6459         * parse.y (patch_invoke): Likewise.
6461 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6463         * expr.c (build_invokeinterface): Remove unused variables to
6464         fix warnings.
6466 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6468         * class.c (get_interface_method_index): New function. Return dispatch
6469         index for interface method.
6470         (make_method_value): For interface methods, set index field to
6471         iface dispatch index, not DECL_VINDEX.
6472         * expr.c (build_invokeinterface): Use get_interface_method_index.
6474 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6476         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6478 2004-03-31  Andrew Haley  <aph@redhat.com>
6480         PR java/14104
6481         * jcf-io.c (opendir_in_zip): Tidy up error handling.
6483 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6485         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6486         form of GTY markers.
6488 2004-03-25  Marcus Meissner  <meissner@suse.de>
6490         PR java/14689:
6491         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6493 2004-03-23  Tom Tromey  <tromey@redhat.com>
6495         PR java/14315:
6496         * jcf-write.c (make_class_file_name): Don't report if mkdir
6497         failed with EEXIST.
6499 2004-03-23  Tom Tromey  <tromey@redhat.com>
6501         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6503 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
6505         * class.c, gjavah.c, lang.c: Fix comment typos.
6506         * gcj.texi: Fix typos.
6508 2004-03-19  Per Bothner  <per@bothner.com>
6510         * gcj.texi (Code Generation):  Document new flags and assert defaults.
6512         * class.c (assume_compiled_node_struct):  Rename type to
6513         class_flag_node_struct, as it is now also used for enable_assertions.
6514         Rename assume_compiled_node typedef.  Rename excludep field to value.
6515         (find_assume_compiled_node):  Rename function to find_class_flag_node.
6516         Minor optimization - avoid needless strlen.
6517         (add_assume_compiled):  Some tweaking and optimization.
6518         Rename and generalize to add_class_flag takem an extra parameter.
6519         (add_assume_compled):  New just calls add_class_flag.
6520         (add_enable_assert, enable_assertions):  New functions.
6521         (enable_assert_tree):  New static.
6522         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6523         * lang.opt (fenable-assertions, fenable-assertions=,
6524         fdisable-assertions, fdisable-assertions=):  New options.
6525         * lang.c (java_handle_option):  Handle new options.
6526         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
6527         class in an interface - create helper class nested in outer interface.
6528         (build_assertion):  Short-circuit if enable_assertions is false.
6530 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6532         * java-tree.h: Changes throughout to add checking to macros
6533         and numerous whitespace changes.
6534         (VAR_OR_FIELD_CHECK): New macro.
6535         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6536         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6538 2004-03-16  Per Bothner  <per@bothner.com>
6540         * jcf-jump.c (options):  New --print-constants option.
6541         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
6543         * jcf-dump.c (flag_print_constant_pool):  Default to off.
6544         (print_constant_terse_with_index):  New helper function.
6545         (various places):  Check flag_print_constant_pool where missing.
6546         (main):  If verbose set flag_print_constant_pool.
6547         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
6549 2004-03-15  Andrew Haley  <aph@redhat.com>
6551         PR java/14581
6552         * parse.y (java_complete_lhs): Check that final variable has an
6553         initializer.
6555 2004-03-12  Andrew Haley  <aph@redhat.com>
6557         PR java/14551
6558         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6559         conversion.
6561 2004-02-29  Roger Sayle  <roger@eyesopen.com>
6563         * jcf-parse.c (java_parse_file): Handle the case that input_filename
6564         is NULL.
6566 2004-02-27  Per Bothner  <per@bothner.com>
6568         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
6569         suggestion:  Use build_incomplete_class_ref.
6570         This fixes PR java/13508, java/11714.
6572 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
6574         * java/parse.h: Update copyright.
6576 2004-02-26  Andrew Haley  <aph@redhat.com>
6578         PR java/14231:
6579         * parse.y (check_interface_throws_clauses): Check for
6580         !METHOD_INVISIBLE (iface_method).
6581         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6582         well as CLASS_ABSTRACT.
6584 2004-02-25  Per Bothner  <per@bothner.com>
6586         * parse.y (build_assertion):  If we're in an inner class, create the
6587         class$ helper routine in the outer class.
6589 2004-02-19  Richard Henderson  <rth@redhat.com>
6591         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6593 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
6595         * Make-lang.in (java.install-man): Add extra dependencies.
6597 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
6599         * Make-lang.in: Install man pages under the same names
6600         (possibly transformed) as the program they document.
6602 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
6604         * gjavah.c: Include "intl.h".
6605         (error): New function.
6606         (main): Call gcc_init_libintl.
6607         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6608         print_stub_or_jni, process_file, main): Use error rather than
6609         fprintf.
6610         (print_method_info, usage, help, version, main): Mark strings for
6611         translation with _.  Avoid splitting up sentences.  Send
6612         information messages to stdout.
6613         * jcf-dump.c: Include "intl.h".
6614         (main): Call gcc_init_libintl.
6615         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6616         Mark error, usage and version messages for translation with _.
6617         Avoid splitting up sentences.
6618         * jv-scan.c: Include "intl.h".
6619         (fatal_error, warning): Change parameter s to msgid.  Translate
6620         messages.
6621         (main): Call gcc_init_libintl.
6622         (usage, help, version): Mark error, usage and version messages for
6623         translation with _.  Avoid splitting up sentences.
6624         * jvgenmain.c: Include "intl.h".
6625         (main): Call gcc_init_libintl.
6626         (usage, main): Mark error messages for translation with _.
6627         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6628         JVGENMAIN_OBJS): Add intl.o.
6629         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6630         java/jvgenmain.o): Update dependencies.
6632 2004-02-08  Per Bothner  <per@bothner.com>
6634         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
6635         class don't use not_accessible_field_error, which can get confused.
6637 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6639         Make-lang.in (po-generated):  Delete.
6641 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6643         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6644         Depend on target.h.
6645         * decl.c: Include target.h.
6646         (start_java_method): Replace PROMOTE_PROTOTYPES with
6647         targetm.calls.promote_prototypes.
6648         * expr.c: Include target.h.
6649         (pop_arguments): Replace PROMOTE_PROTOTYPES with
6650         targetm.calls.promote_prototypes.
6651         * parse.y: Include target.h.
6652         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6653         with targetm.calls.promote_prototypes.
6655 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6657         * typeck.c: Update copyright.
6659 2004-02-02  Tom Tromey  <tromey@redhat.com>
6661         * decl.c (java_init_decl_processing): Remove duplicate
6662         gnu/gcj/RawData.
6664 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
6666         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6668 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
6670         * expr.c (build_field_ref): Move variable
6671         definition up.
6673 2004-01-28  Andrew Haley  <aph@redhat.com>
6675         * expr.c (build_field_ref): Widen field offset.
6677 2004-01-27  Andrew Haley  <aph@redhat.com>
6679         java/13273
6680         * parse.y (check_interface_throws_clauses): Make sure class_decl
6681         has been loaded.
6683 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
6685         PR java/13733
6686         * parse.y (patch_assignment): Don't modify lhs_type for
6687         reference assignments.
6689 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6691         * Make-lang.in: Replace $(docdir) with doc.
6692         (java.info, java.srcinfo, java.man, java.srcman): New rules.
6693         (java.install-man): Revamp rule.
6695 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6697         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6698         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6699         instead of deferred backquote.
6701 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
6703         * typeck.c (find_method_in_interfaces): Move variable
6704         definition up.
6706 2004-01-16  Andrew Haley  <aph@redhat.com>
6708         PR java/13273:
6709         * typeck.c (shallow_find_method): New.
6710         (find_method_in_superclasses): New.
6711         (find_method_in_interfaces): New.
6712         (lookup_do): Rewrite.
6713         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6715         * jcf-parse.c (read_class): Save and restore output_class.
6716         * decl.c (java_expand_body): Set output_class from fndecl.
6718 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
6720         * class.c (gen_indirect_dispatch_tables): Fix string length
6721         calculations.
6723 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
6725         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6726         (java.srcextra): Copy above back to source directory if requested.
6727         (po-generated): Delete reference to $(parsedir).
6728         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6729         Use implicit rule.
6731 2004-01-14  Jan Hubicka  <jh@suse.cz>
6733         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6734         estimation.
6736 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
6738         * java-tree.h (java_expand_expr): Change prototype.
6739         * expr.c (java_expand_expr): Add alt_rtl parameter.
6741 2004-01-09  Andrew Haley  <aph@redhat.com>
6743         PR java/12755:
6744         * parse.y (java_fix_constructors):  Set output_class.
6745         (java_reorder_fields): Likewise.
6746         (java_layout_classes): Likewise.
6747         (java_expand_classes): Generate indirect dispatch tables.
6748         (java_expand_classes): Set output_class.
6749         (java_finish_classes): Likewise.
6750         * lang.c (java_init): Turn on always_initialize_class_p if we're
6751         using indirect dis[atch.
6752         (java_decl_ok_for_sibcall): Use output_class, not current_class.
6753         (java_get_callee_fndecl): Use class local atable.
6754         * jcf-parse.c
6755         (always_initialize_class_p): Decl moved to java-tree.h.
6756         (HANDLE_CLASS_INFO): Set output_class.
6757         (read_class): Likewise.
6758         (parse_class_file): Call gen_indirect_dispatch_tables.
6759         (parse_zip_file_entries): Set output_class.
6760         (java_parse_file): Set output_class.  Don't emit symbol tables.
6761         * java-tree.h (output_class): New.
6762         Remove global declarations for otable, atable, and ctable.
6763         (always_initialize_class_p): moved here from decl.c.
6764         (DECL_OWNER): New.
6765         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6766         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6767         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6768         (struct lang_type): Add otable_methods, otable_decl,
6769         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6770         ctable_decl, catch_classes, type_to_runtime_map.
6771         * expr.c (build_field_ref): Make otable, atable, and ctable class
6772         local rather than global.
6773         (build_known_method_ref): Likewise.
6774         (build_invokeinterface): Likewise.
6775         (java_expand_expr): Pass runtime type (rather than actual type) to
6776         expand_start_catch.
6777         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6778         this class.  Look up each class in that map to delete duplicates.
6779         (expand_end_java_handler): Pass runtime type (rather than actual
6780         type) to expand_start_catch.
6781         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6782         (do_nothing): New.
6783         (java_init_decl_processing): Rearrange things.  Remove global
6784         declarations of otable, atable, and ctable.
6785         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6786         (java_expand_body): Set output_class.
6787         * constants.c (build_constant_data_ref): Use output_class, not
6788         current_class.
6789         (alloc_name_constant): Likewise.
6790         * class.c (gen_indirect_dispatch_tables): New.
6791         (build_class_ref): Generate hard reference to superclass, even if
6792         using indirect dispatch.
6793         (build_static_field_ref): Use class local atable.
6794         (make_class_data): Generate hard reference to superclass, even if
6795         using indirect dispatch.
6796         Generate symbolic references to interfaces when using indirect
6797         dispatch.
6798         (make_class_data): Emit otable, atable, and ctable.
6799         Make otable, atable, and ctable class local rather than global.
6800         (emit_catch_table): Make otable, atable, and ctable class local
6801         rather than global.
6803 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
6805         * parse.y (catch_clause_parameter): Fix typo.
6807         PR java/13404
6808         * parse.y: (catch_clause_parameter): Return early if $3, aka
6809         formal_parameter, is null.
6811 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6813         * class.c: Remove uses of "register" specifier in
6814         declarations of arguments and local variables.
6815         * decl.c: Likewise.
6816         * expr.c: Likewise.
6817         * gjavah.c: Likewise.
6818         * jcf-dump.c: Likewise.
6819         * jcf-io.c: Likewise.
6820         * jcf-parse.c: Likewise.
6821         * jcf-write.c: Likewise.
6822         * keyword.h: Likewise.
6823         * parse.y: Likewise.
6824         * typeck.c: Likewise.
6825         * verify.c: Likewise.
6827 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
6829         * Make-lang.in (GCJ_CROSS_NAME): Delete.
6830         (java.install_common, java.install-man): Adjust for above.
6831         (java.uninstall): Likewise.
6833 2003-12-03  Michael Koch  <konqueror@gmx.de>
6835         * class.c (make_class_data):
6836         Push field value to 'hack_signers' instead of 'signers'.
6837         * decl.c (java_init_decl_processing):
6838         Push field 'hack_signers' instead of 'signers'.
6840 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
6842         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6843         including iconv.h.
6845 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
6847         PR java/12374:
6848         * parse.y (qualify_ambiguous_name): Remove lots of broken
6849         field access processing - there's no need to do that here,
6850         because we have resolve_field_access.  Remove
6851         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6852         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6853         used.
6855 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
6857         Fix PR java/13237
6858         * parse.y (java_complete_lhs): Save location prior to patching
6859         CALL_EXPR.
6861 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
6863         PR java/12548
6864         * resource.c (write_resource_constructor): Append
6865         "_resource" to constructor identifier name.
6867 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
6869         Fix PR java/13183.
6870         * constants.c (cpool_for_class): New function.
6871         (outgoing_cpool): Remove global variable.
6872         (alloc_name_constant): Use cpool_for_class.
6873         (build_constants_constructor): Likewise.
6874         * decl.c (java_expand_body): Set current_class.
6875         * java-tree.h (outgoing_cpool) Remove declaration.
6876         (init_outgoing_cpool): Likewise.
6877         * jcf-parse.c (init_outgoing_cpool): Remove function.
6878         (parse_class_file): Don't call init_outgoing_cpool.
6879         * parse.y (java_complete_expand_methods): Don't call
6880         init_outgoing_cpool.  Don't save outgoing_cpool.
6881         (java_expand_classes): Don't restore outgoing_cpool.
6882         (java_finish_classes): Likewise.
6884 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
6886         * Make-lang.in: (java.install-common) Add
6887         symlink for $(target_noncanonical)-gcjh for
6888         native builds.
6890 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6892         * Make-lang.in (java.extraclean): Delete.
6894 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6896         * Make-lang.in (check-java): Add.
6898 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
6900         Fix PR java/13024.
6901         * except.c (prepare_eh_table_type): Allocate variable-sized
6902         buffer `buf' with alloca.
6904 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6906         Fix PR java/12857.
6908         decl.c (java_init_decl_processing): Don't initialize
6909         class_not_found_type_node, no_class_def_found_type_node.
6911         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6912         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6913         (class_not_found_type_node, no_class_def_found_type_node):
6914         Don't define.
6916         parse.y (build_dot_class_method_invocation): Add this_class
6917         argument.  Qualify method invocations to a different class.
6918         (create_new_parser_context): Initialize saved_data_ctx to 0.
6919         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6920         (build_dot_class_method): Don't load classes.  Register
6921         incomplete types.
6922         (build_incomplete_class_ref): Special cases for interfaces
6923         and inner classes.  Move build_dot_class_method call to here...
6924         (patch_incomplete_class_ref): ...from here.  Pass current_class
6925         to build_dot_class_method_invocation.
6926         (build_assertion): Pass class_type to
6927         build_dot_class_method_invocation.
6928         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6930 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6932         Fix PR java/12739.
6933         * java-tree.h (BLOCK_EMPTY_P): Define.
6934         * parse.y (java_complete_lhs): Check for empty blocks
6935         in TRY_FINALLY_EXPR case.
6937 2003-11-17  Andrew Haley  <aph@redhat.com>
6939         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6940         (struct lang_decl_var:freed): New variable.
6941         * decl.c (poplevel): Mark local vars that have gone out of scope.
6942         (push_jvm_slot): Don't use the RTL of a var that has gone out of
6943         scope.
6945 2003-11-16  Jason Merrill  <jason@redhat.com>
6947         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6948         and TAGS files that include them for each front end.
6950 2003-11-15  Tom Tromey  <tromey@redhat.com>
6952         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6954 2003-11-12  Jason Merrill  <jason@redhat.com>
6956         PR optimization/12547
6957         * lang.c (java_tree_inlining_walk_subtrees): Just walk
6958         BLOCK_EXPR_BODY directly.
6960 2003-11-12  Andrew Haley  <aph@redhat.com>
6962         PR java/11045
6963         * parse.y (fold_constant_for_init): Check that we really do have a
6964         constant.
6966         PR java/11533
6967         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6968         init_test_decls being inlined.
6970         PR java/12890:
6971         * parse.y (do_resolve_class): Check return value from
6972         breakdown_qualified().
6974 2003-11-11  Tom Tromey  <tromey@redhat.com>
6976         PR java/12915:
6977         * parse.y (merge_string_cste): Handle case where we have a
6978         pointer that happens to be zero, not null_pointer_node.
6980 2003-11-10  Tom Tromey  <tromey@redhat.com>
6982         * jcf-parse.c (classify_zip_file): Correctly compare
6983         filename_length against length of manifest file's name.
6985 2003-11-08  Tom Tromey  <tromey@redhat.com>
6987         PR java/12894:
6988         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6990 2003-11-06  Andrew Haley  <aph@redhat.com>
6992         * expr.c (java_stack_swap): Make sure destination stack slots are
6993         of the correct type.
6995 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
6997         * Make-lang.in (dvi): Move targets to $(docobjdir).
6998         (gcj.dvi): Simplify rule and adjust target.
6999         (gcj.info): Simplify rule.
7000         (gcj.pod): New intermediate rule.
7001         (gcjh.pod): Likewise.
7002         (jv-scan.pod): Likewise.
7003         (jcf-dump.pod): Likewise.
7004         (gij.pod): Likewise.
7005         (jv-convert.pod): Likewise.
7006         (rmic.pod): Likewise.
7007         (rmiregistry.pod): Likewise.
7008         (gcj.1): Delete.
7009         (gcjh.1): Delete.
7010         (jv-scan.1): Delete.
7011         (jcf-dump.1): Delete.
7012         (gij.1): Delete.
7013         (jv-convert.1): Delete.
7014         (rmic.1): Delete.
7015         (rmiregistry.1): Delete.
7017 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
7019         Fixes PR java/12866.
7020         * parse.y (resolve_qualified_expression_name): Move test
7021         for outer field access methods from here...
7022         (check_thrown_exceptions) ...to here.
7024 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
7026         * .cvsignore: Delete.
7028 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
7030         * verify.c (verify_jvm_instructions): Don't warn about legal
7031         eh binding regions generated for example by jdk 1.4.1.
7033 2003-10-24  David S. Miller  <davem@redhat.com>
7035         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7037 2003-10-22  Andrew Haley  <aph@redhat.com>
7039         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7040         (java_get_callee_fndecl): New.
7042         * jcf-parse.c (java_parse_file): Call emit_catch_table().
7044         * java-tree.h (ctable_decl): New.
7045         (catch_classes):  New.
7046         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7048         * decl.c (java_init_decl_processing): Add catch_class_type.
7049         Add ctable_decl.
7050         Add catch_classes field.
7052         * class.c (build_indirect_class_ref): Break out from
7053         build_class_ref.
7054         (make_field_value): Check flag_indirect_dispatch.
7055         (make_class_data): Ditto.
7056         Tidy uses of PUSH_FIELD_VALUE.
7057         Add field catch_classes.
7058         (make_catch_class_record): New.
7060         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7062 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
7064         * jcf-write.c: Follow spelling conventions.
7065         * parse.y: Likewise.
7067 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
7069         * ChangeLog: Fix typos.
7070         * expr.c: Fix comment typos.
7071         * jcf-write.c: Likewise.
7072         * lang.c: Likewise.
7073         * lex.c: Likewise.
7074         * mangle.c: Likewise.
7075         * parse-scan.y: Likewise.
7076         * parse.y: Likewise.
7078 2003-10-22  Tom Tromey  <tromey@redhat.com>
7080         * expr.c (expand_byte_code): Only warn about dead bytecode when
7081         extra_warnings is set.
7083 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
7085         Fix for PR java/12586.
7086         * mangle.c (find_compression_record_match): Don't iterate through
7087         package namespace elements unless they all match compression_table
7088         entries.
7090 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
7092         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7093         (generate-manpages): Likewise.
7094         (java.maintainer-clean): Likewise.
7095         (gcj.info): Likewise.
7096         (gcj.1): Likewise.
7097         (gcjh.1): Likewise.
7098         (jv-scan.1): Likewise.
7099         (jcf-dump.1): Likewise.
7100         (gij.1): Likewise.
7101         (jv-convert.1): Likewise.
7102         (rmic.1): Likewise.
7103         (rmiregistry.1): Likewise.
7104         (java.install-man): Likewise.
7105         (parse-scan.o): Move and define complete compile line.
7106         (parse.o): Likewise.
7107         (jcf-tree-inline.o): Move.
7109 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
7111         * Make-lang.in (info): Update dependencies.
7112         (java.install-info): Remove.
7113         ($(srcdir)/java/gcj.info): Replace with ...
7114         ($(docobjdir)/gcj.info): ... this.
7116 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
7118         * Make-lang.in: Replace uses of $(target_alias) with
7119         $(target_noncanonical).
7121 2003-10-09  Tom Tromey  <tromey@redhat.com>
7123         * decl.c (java_init_decl_processing): Declare signers field.
7124         * class.c (make_class_data): Set signers field.
7126 2003-10-09  Jason Merrill  <jason@redhat.com>
7128         * parse.y (patch_assignment): Use make_node to create a BLOCK.
7129         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7130         POINTER_TYPE.
7132 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
7134         * Make-lang.in (java.info): Replace with ...
7135         (info): ... this.
7136         (java.dvi): Replace with ...
7137         (dvi): ... this.
7138         (java.generated-manpages): Replace with ...
7140 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
7142         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7144 2003-10-01  Andrew Haley  <aph@redhat.com>
7146         * jcf-parse.c (java_parse_file): Write otable and atable.
7147         * java-tree.h (atable_methods): New.
7148         (atable_decl): New.
7149         (atable_syms_decl): New.
7150         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7151         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7152         (symbol_*type): Rename method_symbol* to symbol*type.
7153         (emit_offset_symbol_table): Delete.
7154         (emit_symbol_table): New.
7155         (get_symbol_table_index): New.
7156         (atable_type): New.
7157         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7158         (build_known_method_ref): Likewise.
7159         (get_symbol_table_index): Rename from get_offset_table_index.
7160         Parameterize to allow re-use by differing types of symbol table.
7161         (build_invokevirtual): Pass table to get_offset_table_index.
7162         * decl.c (java_init_decl_processing): Push types and decls for
7163         atable and atable_syyms.
7164         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7165         (make_class_data): Add new fields atable and atable_syms.
7166         (emit_symbol_table): Rename from emit_offset_symbol_table.
7167         Parameterize to allow re-use by different types of symbol table.
7168         (build_symbol_entry): Renamed from build_method_symbols_entry.
7170 2003-09-30  Roger Sayle  <roger@eyesopen.com>
7172         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7173         semantics for SAVE_EXPR, by caching the result in a temporary.
7175 2003-09-28  Richard Henderson  <rth@redhat.com>
7177         * check-init.c (check_init): Save and restore input_location
7178         instead of file and line separately.
7179         * decl.c (java_expand_body): Likewise.
7180         * jcf-write.c (generate_bytecode_insns): Likewise.
7181         * parse.y (safe_layout_class): Likewise.
7182         * jcf-parse.c (read_class, parse_class_file): Likewise.
7183         (java_parse_file): Use %H for warning locator.
7185 2003-09-28  Roger Sayle  <roger@eyesopen.com>
7187         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7188         with void-type branches instead of using a COMPOUND_EXPR.
7190 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
7192         * decl.c (java_optimize_inline, dump_function): Remove.
7193         * java-tree.h (java_optimize_inline): Remove declaration.
7194         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7195         * parse.y (source_end_java_method, java_expand_classes):
7196         Likewise.  Remove dead code.
7198 2003-09-27  Roger Sayle  <roger@eyesopen.com>
7200         * lang.c (java_init_options): Set flag_evaluation_order.
7201         * expr.c (force_evaluation_order): Don't attempt to force
7202         evaluation order of binary operations using save_expr.
7203         * parse.y (java_complete_lhs): No longer need to call
7204         force_evaluation_order when constructing binary operators.
7206 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7207             Bryce McKinlay  <bryce@mckinlay.net.nz>
7209         PR java/1333:
7210         * parse.y (not_accessible_field_error): New function.
7211         (resolve_expression_name): Check field access permissions.
7212         (resolve_qualified_expression_name): Use
7213         not_accessible_field_error.
7214         (resolve_qualified_expression_name): Likewise.
7216 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7218         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7220 2003-09-23  Roger Sayle  <roger@eyesopen.com>
7222         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7223         with equal operands without side-effects.
7225 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
7227         * decl.c (java_init_decl_processing): Don't emit otable decls
7228         if flag_indirect_dispatch is not set.
7230 2003-09-21  Richard Henderson  <rth@redhat.com>
7232         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7233         resource.c: Revert.
7235 2003-09-21  Richard Henderson  <rth@redhat.com>
7237         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7238         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7240 2003-09-20  Richard Henderson  <rth@redhat.com>
7242         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7244 2003-09-18  Roger Sayle  <roger@eyesopen.com>
7246         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7247         * check-init.c (check_init): Likewise.
7249 2003-09-18  Roger Sayle  <roger@eyesopen.com>
7251         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7253 2003-09-16  Andrew Haley  <aph@redhat.com>
7255         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7257 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
7259         Fixes PR java/9577
7260         * mangle.c (find_compression_record_match): Skip
7261         over a "6JArray" (the array template mangled string)
7262         IDENTIFIER_NODE.
7263         (mangle_array_type): Correct minor typo.
7264         (atms): Move definition to the beginning.
7266 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
7268         * class.c (add_miranda_methods): Ensure super-interfaces are laid
7269         out. Fix for PR java/12254.
7271 2003-09-11  Richard Henderson  <rth@redhat.com>
7273         * parse.y (source_end_java_method): Update for new
7274         cgraph_finalize_function argument.
7276 2003-09-09  Richard Henderson  <rth@redhat.com>
7278         * parse.y (source_end_java_method): Update call to
7279         cgraph_finalize_function.
7281 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
7283         * decl.c (java_expand_body): New function.
7284         * expr.c (build_class_init): Set DECL_IGNORED_P.
7285         * java-tree.h (start_complete_expand_method,
7286         java_expand_body): Declare.
7287         * jcf-parse.c (cgraph.h): Include.
7288         (java_parse_file): Handle flag_unit_at_a_time.
7289         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7290         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7291         (java_estimate_num_insns): Use walk_tree_without_duplicates.
7292         (java_start_inlining): New function.
7293         * parse.h (java_finish_classes): Declare.
7294         * parse.y: Include cgraph.h.
7295         (block): Don't special-case empty block production.
7296         (craft_constructor): Set DECL_INLINE.
7297         (source_end_java_method): Handle flag_unit_at_a_time.
7298         Replace inline code with call to java_expand_body.
7299         (start_complete_expand_method): Remove static modifier.
7300         (java_expand_method_bodies): Patch function tree for
7301         class initialization and/or synchronization as needed.
7302         Don't begin RTL expansion yet.
7303         (java_expand_classes): Check flag_unit_at_a_time before
7304         calling finish_class.
7305         (java_finish_classes): New function.
7306         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7307         (patch_assignment): Set DECL_CONTEXT on temporary variable.
7308         (emit_test_initialization): Set DECL_IGNORED_P.
7310 2003-09-03  Roger Sayle  <roger@eyesopen.com>
7312         * builtins.c (enum builtin_type): Delete unused enumeration.
7313         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7315 2003-08-28  Tom Tromey  <tromey@redhat.com>
7317         * gcj.texi (Extensions): Document gcjlib URLs.
7319 2003-08-20  Tom Tromey  <tromey@redhat.com>
7321         * gcj.texi (Extensions): Added xref.
7322         (libgcj Runtime Properties): Document
7323         gnu.gcj.runtime.VMClassLoader.library_control.
7325 2003-08-20  Andrew Haley  <aph@redhat.com>
7327         * except.c (prepare_eh_table_type): Use new encoding for exception
7328         handlers when using -fno-assume-compiled.
7330 2003-08-13  Tom Tromey  <tromey@redhat.com>
7332         * gcj.texi (Invoking gij): Document -X and -?.
7334 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
7336         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7337         GCJH_OBJS, JCFDUMP_OBJS
7338         * win32-host.c: Removed the unnecessary and broken dependency
7339         on jcf.h
7341 2003-08-11  Tom Tromey  <tromey@redhat.com>
7343         * parse.y (java_check_regular_methods): Typo fixes.  Call
7344         check_interface_throws_clauses.  Use
7345         check_concrete_throws_clauses.
7346         (check_interface_throws_clauses): New function.
7347         (check_concrete_throws_clauses): New function.
7348         (hack_is_accessible_p): New function.
7349         (find_most_specific_methods_list): Added FIXME.
7350         * typeck.c (lookup_do): Use `flags' argument to decide what to
7351         do.  Reimplemented.
7352         (lookup_argument_method_generic): New function.
7353         (lookup_argument_method2): Removed.
7354         * jcf.h (ACC_INVISIBLE): New define.
7355         * jcf-write.c (generate_classfile): Skip invisible methods.
7356         * class.c (add_miranda_methods): New function.
7357         (layout_class_methods): Use it.
7358         (get_access_flags_from_decl): Use ACC_INVISIBLE.
7359         * java-tree.h (METHOD_INVISIBLE): New define.
7360         (lang_decl_func) [invisible]: New field.
7361         (lookup_argument_method_generic): Declare.
7362         (SEARCH_INTERFACE): New define.
7363         (SEARCH_SUPER): Likewise.
7364         (SEARCH_ONLY_INTERFACE): Likewise.
7365         (SEARCH_VISIBLE): Likewise.
7366         (lookup_argument_method2): Removed declaration.
7368 2003-08-05  Tom Tromey  <tromey@redhat.com>
7370         Fix for PR java/11600:
7371         * parse.y (java_complete_lhs): See whether we're calling a method
7372         on an array.
7373         (check_thrown_exceptions): Added `is_array_call' argument;
7374         fixed `clone' checking; updated all callers.
7376 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
7378         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7380 2003-08-03  Tom Tromey  <tromey@redhat.com>
7382         * java-tree.h (METHOD_TRANSIENT): Removed.
7383         * decl.c (pushdecl): Removed some dead code.
7384         * class.c (get_access_flags_from_decl): Can't have transient
7385         method.
7386         (add_method_1): Can't have a transient method.
7388 2003-07-28  Andreas Jaeger  <aj@suse.de>
7390         * jvspec.c: Convert to ISO C90 prototypes.
7392 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7394         * decl.c (force_poplevels): Fix warning call.
7396 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7398         * expr.c (expand_java_field_op): Don't use xxx_with_decl
7399         (expand_java_field_op): Likewise.
7400         * class.c (layout_class_method): Likewise
7401         (emit_register_classes): Likewise.
7402         * decl.c (pushdecl): Likewise.
7403         (poplevel): Likewise.
7404         (force_poplevels): Likewise.
7405         (give_name_to_locals): Likewise.
7406         * check-init.c (check_for_initialization): Likewise.
7408 2003-07-24  Jason Merrill  <jason@redhat.com>
7410         * java-tree.h: Move boolean_type_node et al to the back end.
7412 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7414         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7415         casts.
7417 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
7419         * lang.opt: Don't show -MD_ and -MDD_.
7421 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
7423         * lang-options.h: Remove.
7424         * lang.opt: Add help text.
7426 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
7428         * expr.c: Remove the last argument to expand_assignment().
7430 2003-07-09  Jan Hubicka  <jh@suse.cz>
7432         * java-tree.h (DECL_NUM_STMTS): Rename to...
7433         (DECL_ESTIMATED_INSNS): ... this.
7434         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7435         New static functions.
7436         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7437         * parser.y (add_stmt_to_compound): Do not account statements.
7439 2003-07-08  Mark Wielaard  <mark@klomp.org>
7441         * gcj.texi: CNI now expands to Compiled Native Interface.
7443 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7445         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7447 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
7449         * expr.c (expand_byte_code): Adjist emit_line_note call.
7451 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
7453         * lang.c (java_handle_option): Don't handle filenames.
7455 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
7457         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7458         DIR_SEPARATOR.
7459         Use FILENAME_CMP.
7460         * jcf-write.c: Don't default-define DIR_SEPARATOR.
7461         * jcf.h: Delete COMPARE_FILENAMES definition.
7463 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
7465         * lang.c (java_init_options): Update prototype.
7467 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
7469         * decl.c (poplevel): Adjust define_label call.
7471 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
7473         * gjavah.c (flag_jni): Make non-static.
7474         * parse-scan.y (ctxp): Make non-static.
7476         * class.c (build_method_symbols_entry)
7477         * expr.c (get_offset_table_index)
7478         * jcf-parse.c (jcf_parse):
7479         Mark the definition static, matching the forward declaration.
7481 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
7483         * lang.c (java_handle_option): Don't check for missing arguments.
7485 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7487         * class.c (push_class): Use a location_t to save place.
7488         (emit_register_classes): Set input_location. Adjust
7489         expand_function_end call.
7490         * resource.c (write_resource_constructor): Likewise.
7491         * decl.c (end_java_method): Adjust expand_function_end call.
7492         * parse.y (source_end_java_method): Likewise.
7494 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
7496         * lang.c (java_handle_option): Likewise.
7498 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
7500         * lang.c (java_handle_option): Special-casing of optional
7501         joined arguments no longer needed.
7502         * lang.opt: Update switches that take optional argument.
7504 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7506         * lang.opt: Declare Java.
7507         * lang.c (java_init_options): Update.
7509 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7511         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7513 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7515         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7516         * lang.c (java_handle_option): -MD and -MMD have an underscore.
7517         * lang.opt: -MD and -MMD have an underscore.
7519 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7521         * class.c (emit_register_classes): Adjust init_function_start
7522         call.
7523         * decl.c (complete_start_java_method): Likewise.
7524         * resource.c (write_resource_constructor): Likewise.
7526 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7528         * Make-lang.in: Update to use options.c and options.h.
7529         * lang.c: Include options.h not j-options.h.
7530         (java_handle_option): Abort on unrecognized option.
7531         (java_init_options): Request Java switches.
7533 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
7535         * Make-lang.in: Handle mostlyclean.
7537 2003-06-11  Tom Tromey  <tromey@redhat.com>
7539         * lang.c (java_handle_option): Update dependency_tracking for
7540         OPT_MF case.
7542         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7543         empty argument.
7545 2003-06-10  Andrew Haley  <aph@redhat.com>
7547         * resource.c (write_resource_constructor): Use expand_expr to
7548         generate the address of the label attached to a resource.
7549         * Make-lang.in (java/resource.o): Add expr.h
7551 2003-06-10  Andrew Haley  <aph@redhat.com>
7553         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7554         (java_decl_ok_for_sibcall): New.
7556 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
7558         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7559         (java/j-options.c, java/j-options.h): New.
7560         * java-tree.h (resource_name, compile_resource_file,
7561         compile_resource_data): Constify.
7562         * jcf-write.c (jcf_write_base_directory): Similarly.
7563         * jcf.h (jcf_write_base_directory): Similarly.
7564         * lang.c: Include j-options.h.
7565         (cl_options_count, cl_options, string_option, java_decode_option,
7566         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7567         process_option_with_no): Remove.
7568         (resource_name): Constify.
7569         (LANG_HOOKS_HANDLE_OPTION): Override.
7570         (java_handle_option): New.
7571         (java_init): Don't call jcf_path_init.
7572         (java_init_options): Call jcf_path_init.
7573         * lang.opt: New.
7574         * resource.c (compile_resource_data, compile_resource_file): Constify.
7576 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
7578         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7579         (struct lang_decl_func): Add last_line field.
7580         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7581         DECL_SOURCE_LINE_LAST): Remove.
7582         * parse.y (missing_return_error, finish_method_declaration,
7583         lookup_cl, start_artificial_method_body, source_end_java_method,
7584         start_complete_expand_method): Adjust.
7586 2003-06-08  Tom Tromey  <tromey@redhat.com>
7588         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7589         fno-assume-compiled.
7591 2003-06-08  Roger Sayle  <roger@eyesopen.com>
7593         * builtins.c (define_builtin_type, builtin_types): Delete.
7594         (define_builtin): Rewritten to take just the built-in code,
7595         the function's name, type and fallback library function name.
7596         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7597         (initialize_builtins): Overhaul to define the GCC builtins
7598         used by gcj manually, providing the Java run-time's
7599         implementations as the fallback library function.
7601 2003-06-08  Anthony Green  <green@redhat.com>
7603         * parse.y (patch_cast): Fix conversions from floating-point to
7604         integral types.
7606 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
7608         * Make-lang.in: Update.
7609         * lang.c: Include opts.h. Define cl_options_count and cl_options.
7611 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
7613         * lang.c (java_init_options): Update.
7615 2003-06-05  Jan Hubicka  <jh@suse.cz>
7617         * Make-lang.in:  Add support for stageprofile and stagefeedback
7619 2003-05-31  Roger Sayle  <roger@eyesopen.com>
7621         * lang.c (java_init_options): Prescribe wrap-around two's
7622         complement arithmetic overflow by setting flag_wrapv.
7624 2003-05-29  Roger Sayle  <roger@eyesopen.com>
7626         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7627         (builtin_record): Add an additional builtin_code field to
7628         record which GCC built-in corresponds to the Java function.
7629         (java_builtins):  Add new entries for atan, atan2, exp, log,
7630         pow and tan.
7631         (max_builtin, min_builtin, abs_builtin): Perform constant
7632         folding on the resulting tree.
7633         (java_build_function_call_expr): Likewise, perform constant
7634         folding on the resulting tree.
7635         (initialize_builtins): The NULL creators are now allowed in
7636         the java_builtins table, which is now terminated by an entry
7637         with builtin_code == END_BUILTINS.
7638         (check_for_builtin): Likewise.  If the matching creator is
7639         NULL, construct the call using java_build_function_call_expr
7640         directly with the decl for the corresponding builtin_code.
7642 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
7644         * win32-host.c: Normalize copyright boilerplate.
7646 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7648         * parse.y (print_int_node): Use string concatentation on
7649         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7650         function calls into one.
7652 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
7654         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7655         fatal_io_error with calls to fatal_error; add ": %m" to the end of
7656         all the affected error messages.
7658 2003-05-13  Richard Henderson  <rth@redhat.com>
7660         * class.c (layout_class_method): Set DECL_EXTERNAL.
7661         * decl.c (java_mark_decl_local, java_mark_class_local): New.
7662         * java-tree.h (java_mark_class_local): Declare.
7663         * jcf-parse.c (parse_class_file): Use it.
7664         * parse.y (java_expand_classes): Likewise.
7666 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
7668         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7669         * lex.h: #include input.h.
7670         * jv-scan.c (input_filename): Remove.
7672 2003-05-02  Tom Tromey  <tromey@redhat.com>
7674         PR java/10491:
7675         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7676         (handle_inner_classes): New function.
7678 2003-05-01  Tom Tromey  <tromey@redhat.com>
7680         PR java/10459:
7681         * parse.y (finish_for_loop): Do nothing if update expression is a
7682         EXPR_WFL_NODE wrapping nothing.
7683         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7685 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
7687         * lex.h (input_lineno): Remove declaration.
7688         * parse-scan.y: #include input.h.
7689         (input_filename): Remove declaration.
7690         (input_location): Add definition.
7691         (input_line): Remove definition.
7693 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7695         * lex.h (lineno): Rename to ...
7696         (input_line): ... here
7697         * parse-scan.y (lineno): Rename to ...
7698         (input_line): ... here.
7699         (reset_report): Rename lineno to input_line.
7700         * check-init.c (check_init): Likewise.
7701         * class.c (push_class): Likewise.
7702         * decl.c (complete_start_java_method, end_java_method): Likewise.
7703         * expr.c (expand_byte_code): Likewise.
7704         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7705         * jcf-write.c (generate_bytecode_insns): Likewise.
7706         * lex.c (java_init_lex, java_allocate_new_line,
7707         do_java_lex): Likewise.
7708         * parse.h (YYNOT_TWICE): Likewise.
7709         * parse.y (empty_statement, expression_statement,
7710         java_pop_parser_context, java_parser_context_save_global,
7711         yyerror, register_fields, method_header, safe_layout_class,
7712         find_in_imports_on_demand, create_artificial_method,
7713         source_end_java_method, start_complete_expand_method,
7714         build_thisn_assign, java_complete_lhs,
7715         maybe_absorb_scoping_block): Likewise.
7717 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
7719         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7720         '/' when computing java source filename
7722 2003-04-13  Tom Tromey  <tromey@redhat.com>
7724         * gjavah.c (print_c_decl): Indentation fix.
7726 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
7728         * class.c (make_field_value, make_method_value, get_dispatch_table)
7729         (make_class_data, emit_offset_symbol_table)
7730         * constants.c (build_constants_constructor)
7731         * java-tree.h (START_RECORD_CONSTRUCTOR)
7732         * parse.y (maybe_build_array_element_wfl):
7733         Use build_constructor.
7735 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
7737         PR java/10253:
7738         * parse.y (string_convert_int_cst): Always use at least one digit
7739         in string conversion. Remove ASCII dependence.
7740         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7742 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
7744         * Make-lang.in: added win32-host.c
7745         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7746         resolves to open() on non-Win32 platforms and
7747         Win32-specific jcf_open_exact_case() on Win32
7748         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7749         when trying .java and .class files
7750         * win32-host.c: added to repository. Defines
7751         Win32-specific jcf_open_exact_case()
7753 2003-04-10  Andrew Haley  <aph@redhat.com>
7755         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7756         (maybe_free_localvar): Renamed from localvar_free.
7757         Add new arg, really.
7758         (generate_bytecode_insns): Set new variable, jsrs.
7759         Only free local vars if no jsr insns have been emittted.
7760         Call maybe_free_localvar, not localvar_free.
7762 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
7764         * gcj.texi: Remove @ at start of file.
7766 2003-03-25  Tom Tromey  <tromey@redhat.com>
7768         * parse.y (create_interface): Call CHECK_DEPRECATED.
7770 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
7772         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7774 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
7776         * javaop.h (jfloat, jdouble): Make them structures mirroring
7777         the bit fields of IEEE float and double respectively.
7778         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7779         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7780         (union Word, union DWord): Delete.
7781         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7783         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7784         D_NAN_MASK): Delete.
7785         (jni_print_float, jni_print_double): New.  Generate
7786         hexadecimal floating constants.
7787         (print_field_info): Use jni_print_float/double.
7789         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
7790         finite floating point numbers for output; special case
7791         non-finite floats.
7793 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
7795         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7796         Replace 0 and 1 with true and false in return statements.
7798 2003-03-19  Tom Tromey  <tromey@redhat.com>
7800         * lex.c (do_java_lex): Renamed from java_lex.
7801         (java_lex): New function.
7802         Include timevar.h.
7804 2003-03-13  Tom Tromey  <tromey@redhat.com>
7806         * parse.y (resolve_inner_class): Error if qualifier is a primitive
7807         type.
7809 2003-03-04  Andrew Haley  <aph@redhat.com>
7811         * gjavah.c (is_first_data_member): New global variable.
7812         (print_c_decl): If it's the first data member, align it as the
7813         superclass.
7814         (process_file): Set is_first_data_member.
7816 2003-03-11  Tom Tromey  <tromey@redhat.com>
7818         * parse.y (resolve_field_access): Initialize class if field is
7819         found in another static field.
7820         * expr.c (build_class_init): Don't optimize out initialization of
7821         implemented interface.
7823 2003-03-11  Andrew Haley  <aph@redhat.com>
7825         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7826         warning.
7828 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
7830         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7831         and DIR_SEPARATOR_2 for a target.
7832         Correct minor typos.
7834         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7835         and DIR_SEPARATOR_2 for a target into account.
7837 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
7839         * lang.c (java_init): Update prototype, move code to java_post_options.
7840         (java_post_options): Similarly.
7842 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
7844         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7845         compare file name components depending on the case-sensitivity
7846         or otherwise of the host file system.
7848         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7849         "strcmp" to compare file name components.
7850         Use IS_DIR_SEPARATOR instead of comparing directly against
7851         DIR_SEPARATOR.
7852         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7853         comparing directly against DIR_SEPARATOR.
7855 2003-03-04  Tom Tromey  <tromey@redhat.com>
7857         * Make-lang.in (java.tags): New target.
7859 2003-03-01  Roger Sayle  <roger@eyesopen.com>
7861         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7862         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7864 2003-03-01  Tom Tromey  <tromey@redhat.com>
7866         * parse.y (jdep_resolve_class): Only check deprecation if we found
7867         a decl.
7869 2003-02-28  Tom Tromey  <tromey@redhat.com>
7871         PR java/9695:
7872         * class.c (maybe_layout_super_class): Always pass a WFL to
7873         do_resolve_class.
7874         * parse.y (do_resolve_class): Updated comment to explain
7875         parameters.
7877 2003-02-26  Tom Tromey  <tromey@redhat.com>
7879         * jcf-write.c (generate_classfile): Check whether class is
7880         deprecated before writing attribute count.
7882 2003-02-25  Roger Sayle  <roger@eyesopen.com>
7884         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7885         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7887 2003-02-23  Tom Tromey  <tromey@redhat.com>
7889         * lang-options.h: Added -Wdeprecated.
7890         * gcj.texi (Warnings): Document -Wdeprecated.
7891         * java-tree.h (flag_deprecated): Declare.
7892         * lang.c (lang_W_options): Added deprecated.
7893         (flag_deprecated): New global.
7894         * chartables.h: Rebuilt.
7895         * gen-table.pl (process_one): Look at whitespace.
7896         (print_tables): Define LETTER_SPACE, LETTER_MASK.
7897         * parse.h (CLEAR_DEPRECATED): New macro.
7898         (CHECK_DEPRECATED_NO_RESET): New macro.
7899         * jcf-parse.c (handle_deprecated): New function.
7900         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7901         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7902         * parse.y (resolve_type_during_patch): Check deprecation.
7903         (jdep_resolve_class): Likewise.
7904         (process_imports): Likewise.
7905         (resolve_expression_name): Likewise.
7906         (check_deprecation): Strip arrays from decl.  Check
7907         flag_deprecated.
7908         (patch_method_invocation): Also check the particular constructor
7909         for deprecation.
7910         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7911         * jcf-write.c (append_deprecated_attribute): New function.
7912         (generate_classfile): Generate deprecated attribute when
7913         appropriate.
7914         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
7915         (java_lex) [case '*']: Simplify logic.
7916         (java_start_char_p): Use LETTER_MASK.
7917         (java_part_char_p): Likewise.
7918         (java_space_char_p): New function.
7920 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
7922         Change base class access representation.
7923         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7924         (add_interface_do): Likewise.
7926 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
7928         * decl.c (java_init_decl_processing): Change
7929         soft_lookupjnimethod_node to reflect the change in
7930         signature of _Jv_LookupJNIMethod in libjava/jni.cc
7931         * expr.c (build_jni_stub): Calculate and pass the size
7932         on the stack of the arguments to a JNI function. Use
7933         new target macro MODIFY_JNI_METHOD_CALL to allow a
7934         target to modify the call to a JNI method.
7936 2003-02-08  Roger Sayle  <roger@eyesopen.com>
7938         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7939         instead of basename to avoid compiler warnings on Tru64.
7941 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7943         * gcj.texi: Update to GFDL 1.2.
7945 2003-01-31  Andrew Haley  <aph@redhat.com>
7947         * parse.y (java_expand_classes): Scan the whole class list looking
7948         for access methods that haven't yet been expanded.
7950 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7952         Fix for java/4269:
7954         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7955         to fix bootstrap on sparc-unknown-netbsdelf1.5.
7956         * jcf-parse.c: Likewise.
7958 2003-01-31  Mark Wielaard  <mark@klomp.org>
7960         * gjavah.c (throwable_p): Allocate 1 more byte for string.
7962 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
7964         * class.c (make_class): Use BINFO_ELTS.
7965         (set_super_info): Likewse.
7966         (add_interface_do): Likewise.
7968 2003-01-30  Tom Tromey  <tromey@redhat.com>
7970         * jcf-parse.c (read_class): Update identifier's class value if it
7971         changed during parsing.
7973 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
7975         * Make-lang.in (po-generated): Find the targets in $(parsedir).
7976         Propagate change to all other rules as required.
7977         (java/parse-scan.o): Add explicit dependency on
7978         $(parsedir)/java/parse-scan.c .
7980 2003-01-29  Tom Tromey  <tromey@redhat.com>
7982         * parse.y (patch_assignment): Only transform the rhs of an
7983         assignment when compiling to native.
7985 2003-01-28  Tom Tromey  <tromey@redhat.com>
7987         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7989 2003-01-28  Tom Tromey  <tromey@redhat.com>
7991         * lex.c (java_lex): Don't include UEOF as part of token.
7992         (java_read_unicode): Error if \u sequence prematurely terminated.
7994 2003-01-27  Tom Tromey  <tromey@redhat.com>
7996         * parse.y (java_check_regular_methods): Check for construct after
7997         checking types in throws clause.
7999 2003-01-24  Tom Tromey  <tromey@redhat.com>
8001         * class.c (build_static_field_ref): Only a String or numeric field
8002         can fold to a constant.
8004 2003-01-23  Tom Tromey  <tromey@redhat.com>
8006         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8007         file name in resource buffer.
8009 2003-01-23  Tom Tromey  <tromey@redhat.com>
8011         * expr.c (build_known_method_ref): Use method's context to find
8012         method table index.
8014 2003-01-23  Tom Tromey  <tromey@redhat.com>
8016         * constants.c (set_constant_entry): Allocated cleared memory.
8018 2003-01-22  Tom Tromey  <tromey@redhat.com>
8020         * java-tree.h: Don't use PARAMS.
8021         * resource.c: Add prototypes for all functions.
8022         (write_resource_constructor): Use `const char *' to avoid
8023         warning.
8025 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
8027         * jcf-parse.c (process_zip_dir): Remove unused variable.
8029 2003-01-22  Tom Tromey  <tromey@redhat.com>
8031         * expr.c (build_invokeinterface): Abort if method's context is not
8032         an interface.
8034 2003-01-22  Tom Tromey  <tromey@redhat.com>
8036         * gcj.texi (Input and output files): Mention non-class entries.
8037         * decl.c (java_init_decl_processing): Call
8038         init_resource_processing.
8039         * java-tree.h (compile_resource_data, write_resource_constructor,
8040         compile_resource_file, init_resource_processing): Declare.
8041         * config-lang.in (gtfiles): Added resource.c.
8042         * Make-lang.in (gt-java-resource.h): New target.
8043         (JAVA_OBJS): Added resource.o.
8044         (java/resource.o): New target.
8045         * resource.c: New file.
8046         * class.c (compile_resource_file): Moved to resource.c.
8047         (registerResource_libfunc): Likewise.
8048         (utf8_decl_list): Mark with GTY; now static.
8049         * jcf-parse.c (classify_zip_file): New function.
8050         (parse_zip_file_entries): Use it; compile .properties files.
8051         (process_zip_dir): Use classify_zip_file and compute_class_name.
8052         Don't write class name into zip directory.
8053         (java_parse_file): Call write_resource_constructor.
8054         (compute_class_name): New function.
8055         * jcf-io.c (read_zip_member): Reindented.
8057 2003-01-21  Tom Tromey  <tromey@redhat.com>
8059         * class.c (supers_all_compiled): New function.
8060         (make_class_data): Use it.
8062 2003-01-21  Tom Tromey  <tromey@redhat.com>
8064         * parse.y (method_header): Native method can't be strictfp.
8065         No method can be transient or volatile.
8067 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8069         Make-lang.in (jvspec.o-warn): Add -Wno-error.
8071 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
8073         * check-init.c: Fix comment typos.
8074         * class.c: Likewise.
8075         * constants.c: Likewise.
8076         * decl.c: Likewise.
8077         * except.c: Likewise.
8078         * expr.c: Likewise.
8079         * java-except.h: Likewise.
8080         * java-tree.h: Likewise.
8081         * javaop.h: Likewise.
8082         * jcf-dump.c: Likewise.
8083         * jcf-io.c: Likewise.
8084         * jcf-parse.c: Likewise.
8085         * jcf-write.c: Likewise.
8086         * lang.c: Likewise.
8087         * mangle.c: Likewise.
8088         * typeck.c: Likewise.
8089         * verify.c: Likewise.
8091 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8093         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8094         * jcf-write.c: Include "tm_p.h".
8096 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8098         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8100 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8102         * builtins.c (java_build_function_call_expr): Renamed from
8103         build_function_call_expr.  All callers changed.
8105         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8106         * jcf-parse.c: Include tm_p.h.
8108         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8109         warning.
8111 2003-01-14  Tom Tromey  <tromey@redhat.com>
8113         * class.c (make_class_data): Check that super is compiled before
8114         building class reference to it.
8116 2003-01-14  Andrew Haley  <aph@redhat.com>
8118         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8119         varargs function -- correct.
8121 2003-01-14  Andrew Haley  <aph@redhat.com>
8123         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8125 2003-01-14  Andrew Haley  <aph@redhat.com>
8127         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8128         varargs function -- correct.
8130         * parse.y (patch_assignment): Copy the rhs of an assignment into a
8131         temporary if the RHS is a reference.
8133 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8135         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8136         * keyword.h: Regenerated.
8138         * All Files: Convert to ISO C style function definitions.
8140 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
8142         * parse.y (check_pkg_class_access): ANSIfy definition.
8144 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8146         * decl.c, parse-scan.y, parse.y: Don't cast return value of
8147         xmalloc et al.
8149         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8151 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
8153         Merge from pch-branch:
8155         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
8157         * Make-lang.in (java/gjavah.o): Update dependencies.
8158         * gjavah.c: Include ggc.h.
8160         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
8162         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8163         (JCFDUMP_OBJS): Add ggc-none.o.
8164         (java/jcf-dump.o): Depend on GGC_H.
8165         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8166         CPool substructures.
8167         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8168         * jcf-dump.c: Include ggc.h.
8170         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
8172         * jcf.h (union cpool_entry): New.
8173         (struct CPool): Use gengtype to mark.  Change field 'data' to be
8174         an array of unions.
8175         (struct JCF): Use gengtype to mark.
8176         (CPOOL_UINT): Update for new cpool_entry type.
8177         (CPOOL_USHORT1): Likewise.
8178         (CPOOL_USHORT2): Likewise.
8179         (CPOOL_FINISH): Use GC to free cpool subfields.
8180         * parse.h (struct parser_ctxt): Mark field current_jcf.
8181         * lex.c (java_init_lex): Use GC to allocate struct JCF.
8182         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8183         (main_jcf): Use gengtype to mark.
8184         (ggc_mark_jcf): Delete.
8185         (get_constant): Update for new cpool_entry type.
8186         (give_name_to_class): Likewise.
8187         (get_class_constant): Likewise.
8188         (init_outgoing_cpool): Use GGC to allocate struct CPool.
8189         (java_parse_file): Use GGC to allocate struct JCF.
8190         (init_jcf_parse): Don't call ggc_add_root.
8191         * jcf-reader.c (jcf_parse_constant_pool): Update for new
8192         cpool_entry type.
8193         * java-tree.h (current_jcf): Use gengtype to mark.
8194         (CPOOL_UTF): Update for new cpool_entry type.
8195         (outgoing_cpool): Use gengtype to mark.
8196         (struct lang_type): GC struct JCF and struct CPool.
8197         * config-lang.in (gtfiles): Add jcf.h.
8198         * constants.c (find_tree_constant): New.
8199         (set_constant_entry): Allocate cpool subfields using GGC.  Update
8200         for new cpool_entry type.
8201         (find_constant1): Update for new cpool_entry type.
8202         (find_constant2): Likewise.
8203         (find_utf8_constant): Use find_tree_constant.
8204         (find_class_or_string_constant): Remove unnecessary cast to jword.
8205         Update for new cpool_entry type.
8206         (count_constant_pool_bytes): Update for new cpool_entry type.
8207         (write_constant_pool): Likewise.
8208         (alloc_name_constant): Use find_tree_constant.
8209         (build_constants_constructor): Update for new cpool_entry type.
8211         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
8213         * parse.y (mark_parser_ctxt): Delete.
8214         (goal): Don't use ggc_add_root.
8215         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8216         (java_pop_parser_context): Let GC free parser_ctxt.
8217         (java_parser_context_resume): Likewise.
8218         * parse.h (struct parser_ctxt): Use gengtype to mark.
8219         (ctxp): Likewise.
8220         (ctxp_for_generation): Likewise.
8221         * lex.h (struct java_lc_s): Mark for gengtype.
8222         (java_lexer): Rearrange for gengtype.
8223         * config-lang.in (gtfiles): Add lex.h, parse.h.
8225 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8227         * All Files: Remove PARAMS macro.
8229         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8230         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8231         `__STDC__' macros.
8233         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8234         VA_CLOSE.
8236 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
8238         * Make-lang.in (java.install-common, java.uninstall,
8239         java.install-info, java.install-man): Prepend $(DESTDIR)
8240         to destination paths in all (un)installation commands.
8241         (java.install-common): Rewrite $(LN) command to support
8242         DESTDIR with "ln" as well as with "ln -s".
8244 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
8246         * java-tree.h: Protect against multiple inclusion.
8248 2003-01-07  Tom Tromey  <tromey@redhat.com>
8250         * class.c (add_assume_compiled): Don't adjust parent if we're
8251         already at the root of tree.
8253 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8255         * lang.c (dump_compound_expr): Prototype.
8257 2003-01-03  Tom Tromey  <tromey@redhat.com>
8259         Fix for PR java/8712:
8260         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8261         when simply checking against `null'.
8263 2003-01-03  Tom Tromey  <tromey@redhat.com>
8265         * gcj.texi (Standard Properties): Document http.proxyHost and
8266         http.proxyPort.
8268         * gcj.texi (GNU Classpath Properties): Document new properties.
8270 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
8272         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8273         java/lang-options.h, java/mangle.c, java/mangle_name.c,
8274         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8276 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
8278         * Make-lang.in, boehm.c, buffer.c,
8279           buffer.h, builtins.c, class.c,
8280           config-lang.in, constants.c,
8281           convert.h, decl.c, except.c,
8282           expr.c, java-except.h,
8283           java-tree.h, javaop.def,
8284           jcf-parse.c, jcf-write.c,
8285           jv-scan.c, jvgenmain.c,
8286           jvspec.c, keyword.gperf,
8287           keyword.h, lang-options.h,
8288           lang-specs.h, lang.c, lex.c,
8289           lex.h, mangle.c, mangle_name.c,
8290           parse-scan.y, parse.h, parse.y,
8291           typeck.c, verify.c, xref.c,
8292           xref.h: Replace "GNU CC" with
8293           "GCC" in the copyright header.
8295         * check-init.c, gjavah.c, javaop.h,
8296           jcf-depend.c, jcf-dump.c, jcf-io.c,
8297           jcf-path.c, jcf-reader.c, jcf.h,
8298           zextract.c, zipfile.h: These files are
8299           "part of GCC". Also say "GCC" not "GNU CC".
8301 2002-12-30  DJ Delorie  <dj@redhat.com>
8303         * Make-lang.in: Protect against texi2pod/pod2man failing.
8305 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
8307         * gcj.texi: Use @copying.
8309 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
8311         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8312         print_cxx_classname.
8313         (print_cxx_classname): Add add_scope parameter.
8314         (print_class_decls): Do not emit a semicolon after the extern
8315         "Java" block.
8316         (process_file): Adjust calls to print_cxx_classname.
8318 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8320         * gcj.texi: Include Cover Texts in man page.
8322 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
8324         * class.c (build_static_field_ref): Check FIELD_FINAL.
8326         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8327         instead of current_constant_pool_data_ref.
8328         * java-tree.h (current_constant_pool_data_ref): Undefine.
8329         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8330         * jcf-parse.c (init_outgoing_cpool): Don't initialize
8331         current_constant_pool_data_ref.
8333         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8334         not build_internal_class_name.
8336         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8337         Use it when class ref isn't certain to be compiled.
8339 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8341         * gcj.texi: Include gcc-common.texi.
8342         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8343         $(srcdir)/doc/include/gcc-common.texi.
8345 2002-12-22  Anthony Green  <green@redhat.com>
8347         * gcj.texi (Limitations): Add note about org.xml.sax and
8348         org.w3c.dom.
8350 2002-12-20  Tom Tromey  <tromey@redhat.com>
8352         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8353         where minimum case value is Integer.MIN_VALUE.
8354         Fixes PR java/8955.
8356 2002-12-18  Andrew Haley  <aph@redhat.com>
8358         * parse.y (patch_invoke): Force evaluation order when `check' is
8359         set.  For PR libgcj/8945.
8361 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
8363         * gcj.texi: Change version number to 3.4.
8365 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
8366         Andrew Haley <aph@redhat.com>
8368         * parse.y (source_end_java_method): Remove custom encoding of line
8369         numbers for a function decl before passing it to the back end.
8371 2002-12-03  Andrew Haley  <aph@redhat.com>
8373         * class.c (make_class_data): New field, "chain".
8374         * decl.c (java_init_decl_processing): Likewise.
8376 2002-12-02  Tom Tromey  <tromey@redhat.com>
8378         For PR java/8740:
8379         * parse.y (do_resolve_class): Handle qualified name via
8380         recursion.
8382 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
8384         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8385         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8386         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8387         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8388         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8389         Include coretypes.h and tm.h.
8390         * Make-lang.in: Update dependencies.
8392 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8394         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8396 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8398         * jcf-reader.c: Don't expand JCF_readu4 inside the
8399         expansion of JCF_SKIP.
8401 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8403         * jcf-reader.c: Don't expand JCF_readu4 inside the
8404         expansion of JCF_SKIP.
8406 2002-11-22  Tom Tromey  <tromey@redhat.com>
8408         * parse.y (patch_binop): Cast right hand side of shift expression
8409         to `int'.  Fixes PR java/8676.
8411 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
8412             Andrew Haley <aph@redhat.com>
8414         * gcc/java/jcf-write.c (write_classfile): Remove target
8415         class file, if it exists, before renaming the temporary
8416         class file to it.
8418 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
8420         * jvspec.c (lang_specific_spec_functions): New.
8422 2002-11-18  Tom Tromey  <tromey@redhat.com>
8424         Fix for PR java/7912:
8425         * expr.c (can_widen_reference_to): Allow cast of array to
8426         Cloneable or Serializable.
8427         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8428         (java_io_serializable_identifier_node): Likewise.
8429         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8430         (valid_ref_assignconv_cast_p): Use new identifier nodes.
8431         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8432         java_io_serializable.
8433         * decl.c (java_init_decl_processing): Initialize
8434         java_lang_cloneable_identifier_node and
8435         java_io_serializable_identifier_node.
8436         (java_lang_cloneable_identifier_node): New global.
8437         (java_io_serializable_identifier_node): Likewise.
8439 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
8441         * buffer.c: Remove unnecessary casts.
8442         * check-init.c: Likewise.
8443         * class.c: Likewise.
8444         * constants.c: Likewise.
8445         * decl.c: Likewise.
8446         * except.c: Likewise.
8447         * gjavah.c: Likewise.
8448         * jcf-io.c: Likewise.
8449         * jcf-parse.c: Likewise.
8450         * jcf-path.c: Likewise.
8451         * jvspec.c: Likewise.
8452         * lang.c: Likewise.
8453         * lex.c: Likewise.
8454         * verify.c: Likewise.
8456 2002-11-06  Tom Tromey  <tromey@redhat.com>
8458         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8459         a JNI header.
8461 2002-11-05  Tom Tromey  <tromey@redhat.com>
8463         Fix for PR java/6388.
8464         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8465         * java-tree.h (enum java_tree_index): New values
8466         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8467         (decimal_int_max, decimal_long_max): New defines.
8468         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
8469         (error_if_numeric_overflow): Rewrote range checking.
8470         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8471         decimal_long_max.
8473 2002-11-02  Tom Tromey  <tromey@redhat.com>
8475         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8477         * class.c (make_method_value): Put class name, not signature, into
8478         `throws' field.  For PR java/8415.
8480 2002-10-24  Tom Tromey  <tromey@redhat.com>
8482         * gcj.texi (Invoking gij): Document --showversion.
8483         (Standard Properties): java.library.path now set.
8485 2002-10-23  Tom Tromey  <tromey@redhat.com>
8487         * gjavah.c (decode_signature_piece): In JNI mode, print
8488         `jobjectArray' when array depth is nonzero.
8489         Fixes PR java/8296.
8491 2002-10-15  Andrew Haley  <aph@redhat.com>
8493         * parse.y (patch_invoke): Call force_evaluation_order on a static
8494         arg list.
8495         (resolve_qualified_expression_name): Call force_evaluation_order
8496         on a arg list that is part of a Qualified Expression Name.
8498         * lang.c (dump_compound_expr): New.
8499         (java_dump_tree): New.
8501 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
8503         * gcj.texi: Added item describing the GCJ runtime property
8504         "gnu.gcj.progname".
8506 2002-10-15  Richard Henderson  <rth@redhat.com>
8508         * jcf-parse.c (get_constant): Fix type warning.
8510 2002-10-15  Andrew Haley  <aph@redhat.com>
8512         * java-tree.h (java_inlining_merge_static_initializers): Declare.
8513         (java_inlining_map_static_initializers): Declare.
8515 2002-10-14  Andrew Haley  <aph@redhat.com>
8517         * tree-inline.c (remap_block): All local class initialization
8518         flags go in the outermost scope.
8519         (expand_call_inline): Call java_inlining_map_static_initializers.
8520         (expand_call_inline): Call java_inlining_merge_static_initializers.
8521         * java/lang.c (merge_init_test_initialization): New.
8522         (java_inlining_merge_static_initializers): New.
8523         (inline_init_test_initialization): New.
8524         (java_inlining_map_static_initializers): New.
8526 2002-10-11  Mark Wielaard  <mark@klomp.org>
8528         * gcj.texi (Compatibility): Add Limitations and Extensions section.
8530 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8532         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8534 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8536         * parse.y (merge_string_cste): Add parentheses around & within |.
8538 2002-10-08  Tom Tromey  <tromey@redhat.com>
8540         * parse.y (variable_declarator_id): Simplify error path for
8541         array declarator error.  For PR java/8003.
8543 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
8545         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8546         bug_report_url.
8548 2002-10-08  Andrew Haley  <aph@redhat.com>
8550         * parse.y (attach_init_test_initialization_flags): Check for
8551         error_mark_node.
8553 2002-10-07  Anthony Green  <green@redhat.com>
8555         * parse.y (merge_string_cste): Fix bug in string concatenation.
8557 2002-10-03  Michael Koch  <konqueror@gmx.de>
8559         * gcj.texi (Standard properties):
8560         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8562 2002-10-02  Roger Sayle  <roger@eyesopen.com>
8564         PR optimization/6627
8565         * lang.c (java_init): If storing the vbit in function
8566         pointers, ensure that force_align_functions_log is atleast
8567         one to aid compatability with g++ vtables.
8569 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
8571         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8572         foul of type-based aliasing.
8574 2002-09-30  Anthony Green  <green@redhat.com>
8576         * gcj.texi (Invoking jv-scan): Fix texinfo.
8578 2002-09-28  Anthony Green  <green@redhat.com>
8580         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8581         (Code Generation): Add -fno-assert documentation.
8582         * jv-scan.c (flag_assert): New global.
8583         (options): Add assert option.
8584         (help): Add --no-assert documentation.
8585         * parse-scan.y (flag_assert): New global.
8586         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8587         (flag_assert): New global.
8588         * java-tree.h (flag_assert): New global.
8589         * lex.c (java_lex): Obey flag_assert.
8590         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8591         calling cc1.
8593 2002-09-26  Andrew Haley  <aph@redhat.com>
8595         * expr.c (build_java_array_length_access): Check for null pointer.
8596         * expr.c (expand_java_arrayload): Likewise.
8598 2002-09-21  Richard Henderson  <rth@redhat.com>
8600         * jcf-parse.c (get_constant): Decode from IEEE no matter
8601         what the target format.
8603 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
8605         * ChangeLog: Follow spelling conventions.
8606         * class.c: Likewise.
8607         * decl.c: Likewise.
8608         * expr.c: Likewise.
8609         * gjavah.c: Likewise.
8610         * java-tree.h: Likewise.
8611         * jcf-dump.c: Likewise.
8612         * jcf-parse.c: Likewise.
8613         * jvspec.c: Likewise.
8614         * lang.c: Likewise.
8615         * mangle.c: Likewise.
8616         * parse.y: Likewise.
8618 2002-09-17  Tom Tromey  <tromey@redhat.com>
8620         * lex.c (java_read_unicode_collapsing_terminators): Handle case
8621         where \r appears at EOF.  Fixes PR java/7950.
8623 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
8625         * jvspec.c (lang_specific_driver): Remove unused variable.
8627 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8629         * java-tree.h (union lang_tree_node): Add chain_next option.
8631 2002-09-16  Richard Henderson  <rth@redhat.com>
8633         * jcf-parse.c (get_constant): Runtime check for IEEE format;
8634         use new real.h interface.
8635         * jcf-write.c (find_constant_index): Use new real.h interface.
8636         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8638 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8640         * lang.c: Follow spelling conventions.
8642 2002-09-11  Per Bothner  <per@bothner.com>
8644         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
8645         constant to the type of the field.
8646         (java_complete_tree):  Remove now-redundant code.
8648         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
8650 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
8652         For PR java/5794:
8653         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8654         return label if a ret instruction for the jsr has been reached.
8656 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
8658         * parse.y (DIR_SEPARATOR): Don't define.
8659         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8661 2002-08-28  Andrew Haley  <aph@redhat.com>
8663         * verify.c (verify_jvm_instructions): Allow exception handler
8664         inside code that is being protected, but generate a warning.
8665         * except.c (link_handler): Initialize `expanded' in new eh_range.
8666         (binding_depth, is_class_level, current_pc): Declare extern.
8668 2002-09-01  Mark Wielaard <mark@klomp.org>
8670         * gcj.texi: Add chapter about system properties.
8671         Fixed some typos.
8673 2002-08-26  Tom Tromey  <tromey@redhat.com>
8675         * parse.y (try_builtin_assignconv): Allow narrowing primitive
8676         conversion if RHS_TYPE is byte, short, or char.
8678 2002-08-22  Tom Tromey  <tromey@redhat.com>
8680         * gcj.texi (Invoking gij): Document -cp and -classpath.
8682 2002-08-21  Tom Tromey  <tromey@redhat.com>
8684         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8685         $(prefix)/share.  For PR libgcj/7633.
8687         For PR java/6005 and PR java/7611:
8688         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8689         (java_can_use_bit_fields_p): New function.
8691 2002-08-16  Tom Tromey  <tromey@redhat.com>
8693         * gcj.texi (Class Initialization): Mention class initialization of
8694         arrays.
8696 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
8698         * Make-lang.in (java-tree-inline.o): New.
8699         (JAVA_OBJS): Add java-tree-inline.o.
8700         * parse.y (source_end_java_method): Call java_optimize_inline.
8701         (java_expand_method_bodies): Save method's tree in
8702         DECL_SAVED_TREE.
8703         (add_stmt_to_compound): Keep track of the number of statments.
8704         * lang.c (java_init): Enable flag_inline_trees.
8705         (java_post_options): If flag_inline_functions is on, enable
8706         flag_inline_trees instread.
8707         (decl_constant_value): New.
8708         (java_tree_inlining_walk_subtrees): New.
8709         * java-tree.h (DECL_NUM_STMTS): New macro.
8710         (java_optimize_inline): Declare.
8711         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8712         Handle a LABEL_EXPR.
8713         * decl.c (build_result_decl): If we already have a DECL_RESULT
8714         don't make another.
8715         (dump_function): New.
8716         (java_optimize_inline): New.
8717         (dump_function): New.
8719 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
8721         For PR java/7483:
8722         * parse.y (build_assertion): Invert return from
8723         desiredAssertionStatus.
8725 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8727         * jcf-write.c (get_access_flags): Return correct access flags for
8728         private and protected inner classes.
8730 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8732         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8734 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8736         * mangle_name.c: Don't include obstack.h twice.
8737         * xref.c: Don't include obstack.h.
8739 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8741         * class.c: (permanent_obstack): Delete declaration.
8742         * constants.c: (permanent_obstack): Delete declaration.
8743         * except.c: (permanent_obstack): Delete declaration.
8744         * expr.c: (permanent_obstack): Delete declaration.
8745         * jcf-parse.c: (permanent_obstack): Delete declaration.
8746         (saveable_obstack): Delete declaration.
8747         * parse.h: (permanent_obstack): Delete declaration.
8748         * typeck.c: (permanent_obstack): Delete declaration.
8750 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
8752         * gcj.texi (version-gcc): Increase to 3.3.
8754 2002-07-22  Tom Tromey  <tromey@redhat.com>
8756         * lex.c (java_lex): Check for `e' or `E' after 0.
8758 2002-07-21  Richard Henderson  <rth@redhat.com>
8760         * lang.c (java_unsafe_for_reeval): New.
8761         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8763 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
8765         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8766         (jcf_path_init): Use GET_ENVIRONMENT.
8768 2002-07-10  Roger Sayle  <roger@eyesopen.com>
8769             Zack Weinberg <zack@codesourcery.com>
8771         * builtins.c (initialize_builtins): Remove defines that
8772         handled C/C++ specific junk hereby removed from builtins.def.
8774 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
8776         * lang.c (java_post_options): Update prototype.
8778 2002-07-05  Roger Sayle  <roger@eyesopen.com>
8780         * builtins.c (initialize_builtins): Ignore the additional
8781         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
8782         the builtins.def file.
8784 2002-07-01  Tom Tromey  <tromey@redhat.com>
8786         For PR libgcj/7073:
8787         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8788         specially.
8790 2002-07-01  Roger Sayle  <roger@eyesopen.com>
8792         * java/decl.c (builtin_function): Accept additional parameter.
8793         (java_init_decl_processing): Pass an additional NULL_TREE
8794         argument to builtin_function.
8796 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
8798         * gcj.texi: Fixed gcj invocation example so that it compiles.
8800 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8802         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8803         * parse.y (mark_parser_ctxt): Likewise.
8804         (check_modifiers, declare_local_variables): Avoid incorrect
8805         hardcoded constant 10.
8807         * lex.c (java_read_char): Avoid "comparison is always true"
8808         warning.
8810 2002-06-25  Andreas Schwab  <schwab@suse.de>
8812         * expr.c (JSR): Avoid undefined operation on PC.
8814 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8816         * decl.c (clear_binding_level): Const-ify.
8818 2002-06-13  Akim Demaille  <akim@epita.fr>
8820         * parse.y (class_declaration, interface_declaration): Make sure
8821         all their rules have an action, in order to avoid meaningless `$$
8822         = $1' and their type clashes.
8824 2002-06-11  Tom Tromey  <tromey@redhat.com>
8826         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8827         * parse-scan.y (statement_without_trailing_substatement): Added
8828         assert_statement.
8829         (assert_statement): New rule.
8830         * java-tree.h (struct lang_type) [assertions]: New field.
8831         (TYPE_USES_ASSERTIONS): New macro.
8832         (CLASS_USES_ASSERTIONS): Likewise.
8833         (FIELD_SYNTHETIC): New define.
8834         * lex.c (java_lval;): Added ASSERT_TK.
8835         * parse.y (ASSERT_TK): Added.
8836         (statement_without_trailing_substatement): Added assert_statement.
8837         (assert_statement): New rule.
8838         (build_assertion): New function.
8839         (maybe_generate_pre_expand_clinit): Create and initialize
8840         $assertionsDisabled.
8841         (lookup_package_type): Removed decl.
8842         * keyword.h: Rebuilt.
8843         * keyword.gperf (assert): New token.
8845 2002-06-10  Akim Demaille  <akim@epita.fr>
8847         * parse.y (interface_type_list, class_member_declaration)
8848         (unary_expression_not_plus_minus): Remove duplicate %type.
8849         Whitespace changes.
8851 2002-06-09  Tom Tromey  <tromey@redhat.com>
8853         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8855         * parse.y (method_header): Give error message in all cases.
8856         Fixes PR java/6865.
8858 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8860         Don't use RTL inlining. Fix for PR java/6820.
8861         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8862         (flag_really_inline): New.
8863         (java_decode_option): Set flag_really_inline if -finline-functions
8864         is seen.
8865         (java_post_options): New function. Turn off inlining unless
8866         flag_really_inline is set.
8868 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8870         * gjavah.c (throwable_p): Accept argument as either a classname or
8871         signature fragment. Create null-terminated classname string for super
8872         when calling itself recursively.
8873         (decode_signature_piece): Skip first character from class name
8874         signature when calling throwable_p.
8876 2002-06-08  H.J. Lu  (hjl@gnu.org)
8878         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8880 2002-06-04  Tom Tromey  <tromey@redhat.com>
8882         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8884 2002-06-04  Michael Koch  <konqueror@gmx.de>
8886         * gcj.texi (Input Options): Fixed typo.
8888 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
8890         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8891         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8892         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8893         and all now-pointless local variables.  Rename other local
8894         variables to reflect their not being handles.
8896         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8897         #if JCF_USE_STDIO blocks.
8899         * parse.y: Add missing semicolon at end of rule.
8901 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8903         * check-init.c (attach_initialized_static_class): Delete, unused.
8904         * parse.y: Use htab_t instead of struct hashtable, update
8905         all uses.
8906         * java-tree.h: Include hashtab.h instead of hash.h.
8907         (struct lang_decl_func): Use htab_t, set up for gengtype.
8908         (struct init_test_hash_entry): Delete.
8909         (struct treetreehash_entry): New.
8910         (java_treetreehash_find): New
8911         (java_treetreehash_new): New prototype.
8912         (java_treetreehash_create): New prototype.
8913         (java_mark_tree): Delete prototype.
8914         (java_hash_hash_tree_node): Delete prototype.
8915         (java_hash_compare_tree_node): Delete prototype.
8916         (attach_initialized_static_class): Delete prototype.
8917         * expr.c (build_class_init): Update to use java_treetreehash
8918         functions.
8919         (java_expand_expr): Update to use htab_t.
8920         (emit_init_test_initialization): Likewise.
8921         * decl.c (java_mark_tree): Delete.
8922         * class.c (init_test_hash_newfunc): Delete.
8923         (java_hash_hash_tree_node): Delete.
8924         (java_hash_compare_tree_node): Delete.
8925         (add_method_1): Update to use java_treetreehash functions.
8926         (JAVA_TREEHASHHASH_H): New macro.
8927         (java_treetreehash_hash): New function.
8928         (java_treetreehash_compare): New function.
8929         (java_treetreehash_find): New function.
8930         (java_treetreehash_new): New function.
8931         (java_treetreehash_create): New function.
8932         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8934         * Make-lang.in (java/parse.o): Depend on debug.h.
8935         * java-tree.h (struct lang_identifier): Use gengtype.
8936         (union lang_tree_node): New.
8937         (struct lang_decl_func): Use gengtype.
8938         (struct lang_decl_var): Likewise.
8939         (struct lang_decl): Likewise.
8940         * parse.y: Include debug.h.
8941         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8943         * lang.c (struct language_function): New dummy structure.
8945         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8946         descriminator for DECL_LANG_SPECIFIC.
8947         (struct lang_decl_func): Rename from struct lang_decl.
8948         (enum lang_decl_desc): New.
8949         (struct lang_decl): Make it a union.  Update all the accessor macros.
8950         (struct lang_type): Use gengtype.
8951         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8952         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8953         are now the same size.
8954         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8955         use discriminator to mark DECL_LANG_SPECIFIC.
8957         * Make-lang.in (gt-java-builtins.h): New rule.
8958         (java/builtins.o): Add dependency on gt-<filename>.h.
8959         * builtins.c: Use gengtype for roots.
8960         (union string_or_tree): Use gengtype.
8961         (struct builtin_record): Use gengtype.
8962         * config-lang.in (gtfiles): Add builtins.c.
8964         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8965         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8966         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8967         gt-java-parse.h, gtype-java.h): Add rules to generate.
8968         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8969         (class.o): Add dependency on gt-*.h.
8970         (constants.o): Likewise.
8971         (decl.o): Likewise.
8972         (expr.o): Likewise.
8973         (jcf-parse.o): Likewise.
8974         (jcf-write.o): Likewise.
8975         (lang.o): Likewise.
8976         * config-lang.in (gtfiles): New.
8977         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8978         * constants.c: Replace uses of ggc_add_* with GTY markers.
8979         Include gt-*.h.
8980         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8981         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8982         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8983         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8984         Include gt-*.h.
8985         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8986         Include gt-*.h.
8987         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8988         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
8989         gt-*.h.
8990         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8991         Include gtype-java.h.
8993 2002-06-02  Tom Tromey  <tromey@redhat.com>
8995         Fix for PR java/5913:
8996         * parse.y (patch_binop): Call patch_string on op1.
8998 2002-06-02  Tom Tromey  <tromey@redhat.com>
9000         Fix for PR java/1343, PR java/6336:
9001         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9002         formatting.  Changed return type.
9003         (anonymous_class_counter): Moved to top of file.
9004         (maybe_make_nested_class_name): Append number to class name for
9005         function-local classes.
9007 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
9009         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9010         * Make-lang.in: Update dependency lists.
9012 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
9014         * gjavah.c (throwable_p): Do not free the name of the class after
9015         passing it to find_class.
9016         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9017         * jcf-io.c (dirent.h): Include it.
9018         (fnmatch.h): Likewise.
9019         (compare_path): New function.
9020         (java_or_class_file): Likewise.
9021         (memoized_dirlist_entry): New type.
9022         (memoized_dirlist_lookup_eq): New function.
9023         (memoized_dirlists): New variable.
9024         (caching_stat): New function.
9025         (memoized_class_lookup_eq): New function.
9026         (memoized_class_lookups): Likewise.
9027         (find_class): Use memoized_class_lookups and caching_stat.
9028         * jcf.h (JCF_USE_SCANDIR): Define.
9029         * parse.y (java_expand_classes): Write the class files in reverse
9030         order.
9032 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9034         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9036 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
9038         * jcf-write.c (write_classfile): Unlink the temporary file if it
9039         cannot be renamed.  Use concat to build up the name of the
9040         temporary file.
9042 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
9044         * jcf-write.c (write_classfile): Write the file to a
9045         temporary file and then rename it.
9047 2002-05-07  Tom Tromey  <tromey@redhat.com>
9049         * gjavah.c (throwable_p): Use xstrdup, not strdup.
9051         Fix for PR java/1200:
9052         * gjavah.c (throwable_p): New function.
9053         (decode_signature_piece): Use it.  A `WeakReference' isn't the
9054         same as a `jweak'.
9055         Include hashtab.h.
9056         (gcjh_streq): New function.
9058 2002-05-07  Andreas Jaeger  <aj@suse.de>
9060         * parse.y (finish_for_loop): Fix if statement.
9062 2002-05-06  Tom Tromey  <tromey@redhat.com>
9064         Fix for PR java/5941:
9065         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9066         loop update expression.
9067         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9068         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9070 2002-05-04  Mark Wielaard  <mark@klomp.org>
9072         For PR java/6519:
9073         * parse.y (build_string_concatenation): Return just op1 only when op2
9074         is null and op1 is a STRING_CST, otherwise always construct a
9075         StringBuffer.
9077 2002-04-27  Tom Tromey  <tromey@redhat.com>
9079         For PR java/6382:
9080         * parse.y (string_convert_int_cst): New function.
9081         (merge_string_cste): Use it.
9083 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9085         * java-tree.h (java_parse_file): Update.
9086         (java_set_yydebug): Remove.
9087         * jcf-parse.c (yydebug): Remove.
9088         (java_set_yydebug): Die.
9089         (java_parse_file): Update.
9090         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9092 2002-04-24  Tom Tromey  <tromey@redhat.com>
9094         For PR java/6425:
9095         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9096         EXPR_WFL_QUALIFICATION of qual_wfl.
9098 2002-04-23  Per Bothner  <per@bothner.com>
9100         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
9101         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
9102         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
9104 2002-04-23  Tom Tromey  <tromey@redhat.com>
9106         For PR java/6314:
9107         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
9108         recognize `-fcompile-resource='.
9109         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
9110         a bit.
9112 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9114         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9115         paths. Fixes PR java/2791.
9117 2002-04-19  Andrew Haley  <aph@redhat.com>
9119         * jcf-write.c (push_long_const): lo, hi: New variables.
9120         Use rshift_double to extract the high part of a 64-bit long.
9121         Use WORD_TO_INT to extract the low part.
9123         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9124         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
9125         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9127 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9129         * typeck.c (incomplete_type_error): Remove.
9131 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9133         * class.c (make_class_data): Set DECL_ALIGN on static class data,
9134         for hash synchronization.
9135         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9136         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9137         class_type_node.
9139 2002-04-16  Mark Wielaard  <mark@klomp.org>
9141         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9142         negative zero.
9144 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9146         Fix for PR java/6294:
9147         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9148         interfaces.
9150 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9152         Fix for PR java/6085:
9153         * parse.y (patch_method_invocation): Always use build_access_to_thisn
9154         to get enclosing "this" argument for inner-class constructor
9155         invocation. Pass correct arguments to build_access_to_thisn.
9157 2002-04-10  Andreas Jaeger  <aj@suse.de>
9159         * gcj.texi (Input Options): Fix extdirs patch.
9161 2002-04-10  Anthony Green  <green@redhat.com>
9163         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9165 2002-04-09  Anthony Green  <green@redhat.com>
9167         * gcj.texi (Input Options): Add --extdirs documentation.
9168         * jcf-dump.c (OPT_extdirs): New macro.
9169         (options): Add extdirs option.
9170         (help): Describe --extdirs.
9171         (main): Handle OPT_extdirs.
9172         * gjavah.c (OPT_extdirs): New macro.
9173         (options): Add extdirs option.
9174         (help): Describe --extdirs.
9175         (main): Handle OPT_extdirs.
9176         * jcf-path.c (jcf_path_init): Add extdirs support.
9177         (jcf_path_extdirs_arg): New function.
9178         (extensions): New variable to hold extensions path entries.
9179         * jvspec.c: Remove -fextdirs= when compiling main().
9180         * lang.c (java_decode_option): Handle -fextdirs=.
9181         * jcf.h (jcf_path_extdirs_arg): Declare new function.
9182         * Make-lang.in: Compile jcf-path with version info for use in
9183         identifying the appropriate libgcj.jar.
9185 2002-04-08  Tom Tromey  <tromey@redhat.com>
9187         For PR libgcj/5303:
9188         * .cvsignore: Added rmic.1 and rmiregistry.1.
9189         * gcj.texi (Top): Link to new nodes.
9190         (Invoking rmic): New node.
9191         (Invoking rmiregistry): Likewise.
9192         * Make-lang.in (java.generated-manpages): Added rmic.1 and
9193         rmiregistry.1.
9194         (java.maintainer-clean): Likewise.
9195         ($(srcdir)/java/rmic.1): New target.
9196         ($(srcdir)/java/rmiregistry.1): Likewise.
9197         (java.install-man): Handle rmic.1 and rmiregistry.1.
9199 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9201         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9202         Add note about handling uncaught exceptions. Add an exception handler
9203         to example.
9205 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9207         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9208         after using it to patch CALL_EXPR.
9210 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9212         * gcj.texi (Invocation): Document CNI invocation API.
9214 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9216         * expr.c (truthvalue_conversion): Rename.  Update.
9217         (expand_compare): Update.
9218         * java-tree.h (java_truthvalue_conversion): New.
9219         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9221 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9223         * java-tree.h (java_mark_addressable): New.
9224         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9225         * typeck.c (mark_addressable): Rename, update.
9227 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9229         * expr.c (build_java_binop): Update.
9230         * java-tree.h (java_signed_type, java_unsigned_type,
9231         java_signed_or_unsigned_type): Update.
9232         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9233         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9234         * parse.y (patch_binop): Update.
9235         * typeck.c (signed_or_unsigned_type, unsigned_type,
9236         signed_type): Update.
9238 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9240         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9241         (java_dummy_print): Remove.
9242         (lang_print_error): Rename.  Exit early if inhibiting output.
9243         (inhibit_error_printing_function): New.
9244         (java_init): Don't set hook.
9245         (lang_init_source): Use new boolean.
9247 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
9249         * parse.y (do_resolve_class): Fix infinite recursion.
9251 2002-03-29  Tom Tromey  <tromey@redhat.com>
9253         * parse.y (check_inner_circular_reference): Ignore incomplete
9254         types.
9256 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9258         * Make-lang.in (builtins.o): Update.
9259         * boehm.c (get_boehm_type_descriptor): Update.
9260         * builtins.c: Include langhooks.h.
9261         * decl.c (java_init_decl_processing): Update.
9262         * java-tree.h (java_type_for_mode, java_type_for_size): New.
9263         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9264         Redefine.
9265         * typeck.c (type_for_mode, type_for_size): Update.
9267 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
9269         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9271 2002-03-28  Tom Tromey  <tromey@redhat.com>
9273         * except.c (expand_end_java_handler): If the handler type is NULL,
9274         use java.lang.Throwable.  Fixes PR java/5986.
9276 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9278         Fix for PR java/4715:
9279         * jcf-parse.c (parse_source_file_3): New function.
9280         (read_class): Call it.
9281         (java_parse_file): Likewise.
9283 2002-03-28  Jan Hubicka  <jh@suse.cz>
9285         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9287 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9289         * parse.y (resolve_package): Initialize "decl".
9290         (lookup_package_type): Remove unused function.
9292 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9294         Fix for PR java/5993:
9295         * parse.y (resolve_package): Return the decl if resolution was
9296         successful. Don't special case "java.lang" and "java.lang.reflect"
9297         packages. Set type_name to the merged identifier.
9298         (resolved_qualified_expression_name): Print error using "name" if
9299         resolve_package returns NULL_TREE.
9301 2002-03-27  Tom Tromey  <tromey@redhat.com>
9303         * expr.c (expand_invoke): Don't generate null pointer check if
9304         we're calling <init>.
9306 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9308         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9309         fix prototype.
9310         * java-tree.h (java_lang_expand_expr): Similarly.
9311         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9312         (java_init): Don't set hook.
9314 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9316         Fix for PR java/5850:
9317         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9318         context if field was not found in the current scope.
9319         * expr.c (lookup_field): Don't look in enclosing contexts.
9321 2002-03-26  Tom Tromey  <tromey@redhat.com>
9323         Fix for PR java/5942:
9324         * parse.y (init_src_parse): Added sanity check.
9325         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9326         elements, not 11.
9328 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9330         * decl.c (lang_mark_tree): Rename java_mark_tree.
9331         * java-tree.h (java_mark_tree): New.
9332         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9334 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
9336         * lex.c: Change java_perform_atof to take normal parameters
9337         instead of a pointer to a parameter block.  Call it directly
9338         from java_lex.
9340 2002-03-22  Mark Wielaard  <mark@klomp.org>
9342         Fix for PR java/5368:
9343         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9344         when printing error message.
9346 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9348         * decl.c (maybe_build_cleanup): Remove.
9350 2002-03-22  Tom Tromey  <tromey@redhat.com>
9352         Andrew Haley  <aph@cambridge.redhat.com>
9354         * expr.c (build_field_ref): Don't build a check if the field is a
9355         member of `this'.
9357 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
9359         Fix for PR java/6026:
9360         * lex.c (java_lex): Fix parsing of consecutive floats.
9362 2002-03-21  Tom Tromey  <tromey@redhat.com>
9364         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9365         class.
9367 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9369         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9370         insert_block, getdecls, kept_level_p, global_bindings_p): New.
9372 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9374         * gcj.texi: @code{gcj} becomes @command{gcj}.
9375         @code{gcc} becomes @command{gcc}.
9376         GcjRaw changed to gnu.gcc.RawData.
9378 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9380         * decl.c (start_java_method): Use new hook.
9381         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9382         (java_init): Remove old hook.
9384 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9386         * builtins.c (define_builtin): Do nothing if `type' is null.
9387         Fixes PR java/5876.
9389 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9391         * parse.y (parser_check_super_interface): Fix error message
9392         grammar/order.
9394 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9396         * jcf-parse.c (get_constant): Delete unused variables.
9398 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9400         * java-tree.h (java_parse_file): New.
9401         * jcf-parse.c (yyparse): Rename java_parse_file.
9402         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9404 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9406         * parse.y (craft_constructor): Return the constructor decl.
9407         (java_expand_classes): Update comments.
9408         (lookup_method_invoke): Call fix_constructors immediately for
9409         anonymous class. Fixes PR java/5935.
9411 2002-03-15  Anthony Green  <green@redhat.com>
9413         * jcf-parse.c (yyparse): Don't emit class registration
9414         constructor when compiling resource files.
9416 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9418         * lang.c (java_tree_code_type, java_tree_code_length,
9419         tree_code_name): Delete.
9420         (tree_code_type, tree_code_length, tree_code_name): Define.
9421         (java_init): Don't try to copy into the various tree_code
9422         arrays.
9424 2002-03-12  Tom Tromey  <tromey@redhat.com>
9426         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9427         UTF-8, not UCS-2.  Fixes PR java/5923.
9429         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9430         a call_expr wrapped in a convert.  Fixes PR java/5848.
9432 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9434         * jcf-write.c (write_classfile): Improve error strings.
9436 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9438         * lex.c: Adjust comments to GNU standards.
9440 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9442         Fix for PR java/5902:
9443         * lex.c (java_lex): Fix parsing of literals.
9445 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9447         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9448         to prevent it getting evaluated twice in the store checking case.
9449         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9450         examining OBJECT.
9452 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9454         * decl.c (java_init_decl_processing): Make sure class_type_node
9455         alignment is not less than 64 bits if hash synchronization is enabled.
9457 2002-03-08  Per Bothner  <per@bothner.com>
9459         * parse.y (java_complete_lhs):  Check if patch_assignment
9460         returned an error-mark.
9462         * parse.y (try_builtin_assignconv):  Don't special-case zero.
9464 2002-03-08  Per Bothner  <per@bothner.com>
9466         Fix for PR java/5812.
9467         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
9468         here instead of in JSR macro.  Likewise with load_type_state call.
9469         Do the latter on if the return_pc has been verified (the jsr returns).
9470         (JSR):  Now just call build_java_jsr.
9472 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
9474         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9475         (java.install-common): Link native driver to
9476         JAVA_TARGET_INSTALL_NAME.
9478 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
9480         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9481         * builtins.c(sin_builtin): Likewise
9482         * builtins.c(sqrt_builtin): Likewise
9484 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
9486         * java/expr.c, java/jcf-parse.c, java/lex.c:
9487         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9488         REAL_ARITHMETIC blocks unconditional.  Delete some further
9489         #ifdef blocks predicated on REAL_ARITHMETIC.
9491 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9493         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9494         explicit sizeof/sizeof.
9495         * decl.c (java_init_decl_processing): Likewise.
9496         * jcf-parse.c (init_jcf_parse): Likewise.
9497         * parse.y (init_src_parse): Likewise.
9499 2002-03-02  Per Bothner  <per@bothner.com>
9501         Make --CLASSPATH by a synonym for --classpath and -classpath.
9502         Implement --bootclasspath.
9503         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
9504         (classpath_l):  Remove.
9505         (jcf_path_CLASSPATH_arg):  Remove.
9506         (jcf_path_bootclasspath_arg):  New function.
9507         (jcf_path_seal):  Simplify accordingly.
9509         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
9510         (jcf_path_CLASSPATH):  Remove declaration.
9511         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
9512         (lang_specific_driver):  Translate -bootclasspath.
9513         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
9514         * lang.c (decode_lang_options):  Do jcf_path_init first.
9515         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
9516         * gjavah.c:  Also handle --bootclasspath.
9517         Handle --CLASSPATH as a synonum for --classpath.
9518         * jcf-dump.c: Likewise.
9520         "." is not part of system path, but is the default for --classpath.
9521         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
9522         (jcf_path_seal):  Add "." if no CLASSPATH specified.
9524         * gcj.texi:  Document changes.
9526 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9528         * expr.c (build_java_arraystore_check): Fix formatting.
9530 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9532         Fix for PR java/5758, java/5632:
9533         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9534         inner-class separator too.
9535         * parse.y (do_resolve_class): New local `decl_result.'
9536         Progressively build a name for what can have been loaded.
9538 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9540         * expr.c (java_array_data_offset): Removed function.
9541         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9542         (build_java_array_length_access): Obtain "length" value using a
9543         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9544         (build_java_arrayaccess): Correct comment. Access "data" using a
9545         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9546         (build_java_arraystore_check): New function.
9547         (expand_java_arraystore): Use build_java_arraystore_check.
9548         * parse.y (patch_assignment): Simplify code to insert a store check
9549         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9550         * check-init.c (check_init): Update to reflect that an array length
9551         access is now a COMPONENT_REF.
9552         * gcj.texi (Code Generation): Improve documentation of
9553         -fno-bounds-check. Add documentation for -fno-store-check.
9554         * java-tree.h (flag_store_check): Declare.
9555         (build_java_arraystore_check): Declare.
9556         * lang.c (flag_store_check): Initialize to 1.
9557         (lang_f_options): Add store-check option.
9558         * jvspec.c: Don't pass store-check option to jvgenmain.
9559         * lang-options.h: Add help string for -fno-store-check.
9561 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9563         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9564         * java-tree.h (java_dup_lang_specific_decl): New.
9565         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9567 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9569         * builtins.c, decl.c: Delete traditional-mode-related code
9570         copied from the C front end but not used, or used only to
9571         permit the compiler to link.
9573 2002-02-22  Tom Tromey  <tromey@redhat.com>
9575         Fix for PR java/2369:
9576         * jvspec.c (verify_class_name): New function.
9577         (lang_specific_driver): Call it.
9578         (JAVA_START_CHAR_P): New macro.
9579         (JAVA_PART_CHAR_P): Likewise.
9581 2002-02-22  Per Bothner  <per@bothner.com>
9583         * class.c:  Change vtable to be more compatible with g++ v3 abi.
9584         (get_dispatch_table):  Prepend offset-to-top (always 0) and
9585         type_info pointer (currently unimplemented hence NULL) to vtable.
9586         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9587         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
9588         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9589         (build_dtable_decl):  Add declarations for new fields.
9591 2002-02-20  Per Bothner  <per@bothner.com>
9593         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9594         to finit$ (otherwise generate_bytecode_insns drops it). However, we
9595         don't need to set it on the COMPOUND_EXPR - the caller does that.
9597 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9599         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9600         `--CLASSPATH' becomes `--classpath.'
9601         * gjavah.c: Likewise.
9602         * jcf-dump.c: Likewise.
9603         * lang-options.h: Likewise.
9604         * lang.c: Likewise.
9605         * jcf-path.c: Updated comment.
9606         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9607         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9608         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9609         (jcf_path_CLASSPATH_arg): Ditto.
9610         (classpath_u): Updated leading comment.
9612 2002-02-20  Per Bothner  <per@bothner.com>
9614         * builtins.c (check_for_builtin):  New function.
9615         (build_call_or_builtin):  Remove.
9616         * java-tree.h:  Update accordingly.
9617         * expr.c (expand_invoke):  Use build + check_for_builtin instead
9618         of build_call_or_builtin.
9619         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
9620         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9621         flag (which had caused jcf-write to incorrectly emit invokevirtual).
9623 2002-02-17  Tom Tromey  <tromey@redhat.com>
9625         * java-tree.h (TYPE_STRICTFP): New macro.
9626         (struct lang_type) [strictfp]: New field.
9627         (CLASS_STRICTFP): New macro.
9628         (METHOD_STRICTFP): New macro.
9629         (struct lang_decl) [strictfp]: New field.
9630         * parse.y (method_header): Disallow strictfp constructor or
9631         abstract method.
9632         (STRICT_TK): Move before MODIFIER_TK.
9633         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9634         (METHOD_MODIFIERS): Likewise.
9635         (INTERFACE_MODIFIERS): Likewise.
9636         * jcf-write.c (get_access_flags): Likewise.
9637         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9638         (add_method_1): Likewise.
9639         (get_access_flags_from_decl): Likewise.
9640         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
9641         recognize strictfp flag.
9642         * jcf.h (ACC_STRICT): New define.
9644 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
9646         * class.c(build_utf8_ref): Move declaration of decl_size
9648 2002-02-07  Tom Tromey  <tromey@redhat.com>
9650         * gcj.texi (Input Options): --CLASSPATH does not suppress system
9651         path.
9653 2002-02-04  Anthony Green  <green@redhat.com>
9655         * class.c (build_utf8_ref): Put UTF-8 constants into merged
9656         sections if available.
9658 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9660         * parse.y (java_expand_classes): Fix typo in static field loop.
9662 2002-02-02  Richard Henderson  <rth@redhat.com>
9664         * class.c (add_field): Mark static fields external.
9665         (build_class_ref): Remove redundant set.
9666         * parse.y (java_expand_classes): Mark static fields of classes
9667         to be compiled as local.
9668         * jcf-parse.c (parse_class_file): Likewise.
9670 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9672         * gcj.texi (About CNI): New node.
9674 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9676         PR java/5080
9677         * jcf-parse.c : Check for HAVE_LOCALE_H before using
9678         setlocale() with LC_CTYPE as a parameter.
9679         * jv-scan.c: Same.
9681 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
9683         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9684         Follow GNU Coding Standards for --version.
9686 2002-01-28  Tom Tromey  <tromey@redhat.com>
9688         * expr.c (build_jni_stub): Ensure storage for `meth' is
9689         generated.
9690         * parse.y (java_complete_expand_methods): Set
9691         current_function_decl before building JNI stub.
9693 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9695         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9696         BUILT_IN_SQRTF.
9698 2002-01-22  Tom Tromey  <tromey@redhat.com>
9700         * decl.c (java_init_decl_processing): Use add_predefined_file.
9701         Predefine RawData.java.
9702         (predef_filenames): Removed.
9703         (java_init_decl_processing): Don't register predef_filenames.
9704         * jcf-parse.c (add_predefined_file): New function.
9705         (predefined_filename_p): Rewrote.
9706         (predefined_filename_p): No longer static.
9707         * decl.c (java_init_decl_processing): Call initialize_builtins.
9708         * Make-lang.in (JAVA_OBJS): Added builtins.o.
9709         (java/builtins.o): New target.
9710         * builtins.c: New file.
9711         * parse.y (patch_invoke): Use build_call_or_builtin.
9712         * java-tree.h (build_call_or_builtin): Declare.
9713         (initialize_builtins): Declare.
9714         (java_set_exception_lang_code): Removed unused declaration.
9715         (PREDEF_FILENAMES_SIZE): Removed.
9716         (java_tree_index): Added JTI_PREDEF_FILENAMES.
9717         (predef_filenames): New define.
9718         (add_predefined_file): Declare.
9719         (predefined_filename_p): Declare.
9720         * expr.c (expand_invoke): Use build_call_or_builtin.
9722 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9724         * parse.y (patch_switch_statement): Fix format specifier.
9726 2002-01-16  Tom Tromey  <tromey@redhat.com>
9728         More for PR java/5365:
9729         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9730         default.
9731         (process_file): Generate include for
9732         java.lang.UnsupportedOperationExceptions.
9734 2002-01-15  Andreas Jaeger  <aj@suse.de>
9736         * .cvsignore: Add man pages.
9738 2002-01-15  Tom Tromey  <tromey@redhat.com>
9740         Fix for PR java/5365:
9741         * gjavah.c (process_file): Turn class name into a file name.
9743 2002-01-14  Matthias Klose  <doko@debian.org>
9745         * gcj.texi: Fix whitespace and formatting errors in the
9746         synopsis of the man pages. Update copyright.
9748 2002-01-14  Tom Tromey  <tromey@redhat.com>
9750         For PR libgcj/5303:
9751         * Make-lang.in (java.install-man): Handle jv-convert man page.
9752         (java.generated-manpages): Added jv-convert.1.
9753         (java.uninstall): Remove jv-convert.1.
9754         (java.maintainer-clean): Likewise.
9755         ($(srcdir)/java/jv-convert.1): New target.
9756         * gcj.texi (Top): Link to jv-convert node.
9757         (Individual utilities): Likewise.
9758         (Invoking jv-convert): New node.
9760 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
9761             Martin Kahlert  <martin.kahlert@infineon.com>
9763         * jcf-parse.c (get_constant): Don't swap lo/hi for big
9764         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9766 2002-01-03  Graham Stott  <grahams@redhat.com>
9768         * class.c (compile_resource_file): Update copyright date.
9769         Constify filename parameter.
9770         (java-tree.h): Update copyright date.
9771         (compile_resource_file): Constify filename parameter.
9773 2002-01-03  Graham Stott  <grahams@redhat.com>
9775         * gcc/jcf-parse.c: Update copyright date.
9776         (yyparse): Constify resource_filename.
9778 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9780         * parse.y (src_parse_roots): Don't needlessly zero init.
9782 2001-12-31  Tom Tromey  <tromey@redhat.com>
9784         * parse.y (dump_java_tree): New function.
9785         (source_end_java_method): Call it.
9786         (end_class_declaration): Likewise.
9787         * lang.c (java_decode_option): Call dump_switch_p.
9789 2001-12-28  Tom Tromey  <tromey@redhat.com>
9791         * gen-table.pl: Don't process characters after \uffff.  Added
9792         comment pointing to input file.
9794 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9796         * gen-table.pl: Const-ify output.  Document the location of a
9797         suitable unicode input file.
9799         * chartables.h: Regenerate.
9801 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9803         * chartables.h: Const-ify.
9804         * gjavah.c (options): Likewise.
9805         * jcf-dump.c (options): Likewise.
9806         * jv-scan.c (options): Likewise.
9807         * lex.c (java_start_char_p, java_part_char_p): Likewise.
9808         * parse.y (binop_lookup): Likewise.
9810 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9812         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9813         the static arrays that are output.
9814         * jvspec.c (jvgenmain_spec): Make static.
9815         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9816         * keyword.h: Regenerate.
9817         * lang.c (string_option, process_option_with_no, lang_f_options,
9818         lang_W_options): Const-ify.
9819         * lex.c (java_lex): Likewise.
9821 2001-12-21  Richard Henderson  <rth@redhat.com>
9823         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9824         (get_boehm_type_descriptor): ... here.  Arrange for the
9825         TREE_TYPE to get set properly.
9827 2001-12-21  Richard Henderson  <rth@redhat.com>
9829         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9830         only if the target requires collect2.
9832         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9834 2001-12-20  Tom Tromey  <tromey@redhat.com>
9836         For PR java/4509:
9837         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9838         CAN_COMPLETE_NORMALLY for the node.
9839         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9840         generate code for second branch if first branch can't complete
9841         normally.
9842         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9843         the loop head if the loop body can't complete normally.
9845 2001-12-20  Tom Tromey  <tromey@redhat.com>
9847         For PR java/4766:
9848         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9849         case where `finally' clause can't complete normally.
9851 2001-12-20  Tom Tromey  <tromey@redhat.com>
9853         Fixes PR java/5057:
9854         * parse.y (analyze_clinit_body): Added this_class parameter.
9855         Check for more cases where we must keep <clinit>.
9856         (maybe_yank_clinit): Cleaned up flow control.
9858 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9860         * decl.c (java_init_decl_processing): Don't initialize
9861         finit_leg_identifier_node.
9862         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9863         (finit_leg_identifier_node): Remove.
9864         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9866 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9868         * mangle.c (mangle_member_name): Don't special-case for
9869         NO_DOLLAR_IN_LABEL.
9870         * mangle_name.c (unicode_mangling_length): Likewise.
9871         (append_unicode_mangled_name): Likewise.
9872         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9873         code.
9875 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9877         * expr.c (build_java_array_length_access): Don't force null pointer
9878         check unless flag_check_references is set.
9880 2001-12-20  Tom Tromey  <tromey@redhat.com>
9882         Fix for PR java/3417:
9883         * parse.y (patch_assignment): Added special processing for
9884         `return'.
9885         (patch_return): Don't convert booleans to integers, and don't
9886         special-case `null'.
9888 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9890         * config-lang.in (diff_excludes): Remove.
9892 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9894         * gcj.texi: Update link to GCC manual.
9896 2001-12-17  Tom Tromey  <tromey@redhat.com>
9898         * parse.y (link_nested_class_to_enclosing): Removed useless
9899         statement.
9901 2001-12-16  Tom Tromey  <tromey@redhat.com>
9903         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9904         Fixes PR java/5088.
9906 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9908         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9909         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9910         spelling errors.
9912 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9914         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9916 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9918         * decl.c (java_init_decl_processing): Build otable_type correctly.
9919         otable_decl is an otable_type.
9921 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9923         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9924         otable_type, otable_ptr_type, method_symbol_type,
9925         method_symbols_array_type, method_symbols_array_ptr_type): New
9926         field/global tree definitions.
9927         (flag_indirect_dispatch): New flag.
9928         * decl.c (java_init_decl_processing): Initialize new otable and
9929         otable_syms type nodes and decls. Add new field "index" to
9930         method_type_node.
9931         * class.c (build_method_symbols_entry): New function.
9932         (make_method_value): Set "index" to to method's vtable index for
9933         virtual methods when indirect-dispatch is not used.
9934         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9935         and set vtable_method_count to -1. Set otable and otable_syms field
9936         if indirect-dispatch is used and there was something to put in them.
9937         (build_method_symbols_entry): New function.
9938         (emit_offset_symbol_table): New function.
9939         * expr.c (get_offset_table_index): New function.
9940         (build_invokevirtual): Build array reference to otable at the index
9941         returned by get_offset_table_index, and use the result as the vtable
9942         offset.
9943         (build_invokeinterface): Similar.
9944         * jcf-parse.c (yyparse): If indirect-dispatch, call
9945         emit_offset_symbol_table at the end of compilation, after all classes
9946         have been generated.
9947         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9948         * lang.c (flag_indirect_dispatch): Define.
9949         (lang_f_options): Add indirect-dispatch flag.
9951 2001-12-14  Matthias Klose  <doko@debian.org>
9953         * gcj.texi: Markup for man page generation. Document missing
9954         options printed by <tool> --help.
9955         Terminate description of gij's -ms option with a dot.
9956         * Make-lang.in ($(srcdir)/java/*.1): New targets.
9957         (java.generated-manpages java.install-man, java.uninstall,
9958         java-maintainer-clean) Updated.
9960 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
9962         * class.c (get_dispatch_table): Fix java vtable layout
9963         for TARGET_VTABLE_USES_DESCRIPTORS.
9964         * decl.c (java_init_decl_processing): Initialize
9965         alloc_no_finalizer_node, finalize_identifier_node.
9966         * expr.c (class_has_finalize_method): New function.
9967         (expand_java_NEW): Generate calls for finalizer-free allocation.
9968         (build_invokevirtual): Fix java vtable layout for
9969         TARGET_VTABLE_USES_DESCRIPTORS.
9970         * java-tree.h (enum java_tree_index): New entries:
9971         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9972         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9973         (class_has_finalize_method): declare.
9974         (HAS_FINALIZER_P): New macro.
9975         * parse.y (patch_invoke): Generate calls for finalizer-free
9976         allocation.
9978 2001-12-12  Matthias Klose  <doko@debian.org>
9980         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9981         whitespace at end of line.
9983 2001-12-11  Tom Tromey  <tromey@redhat.com>
9985         * lex.c (java_init_lex): Define wfl_to_string as
9986         gnu.gcj.runtime.StringBuffer unless generating bytecode.
9988 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
9990         * class.c (make_method_value): Use null_pointer_node to
9991         represent empty exception table.
9993 2001-12-10  Tom Tromey  <tromey@redhat.com>
9995         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9997 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
9999         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10001 2001-12-09  Per Bothner  <per@bothner.com>
10003         * check-init.c (current_switch_has_default):  New static field.
10004         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
10005         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
10006         DEFAULT_EXPR seen, simulate a default alternative that copies state.
10008 2001-12-09  Tom Tromey  <tromey@redhat.com>
10010         * check-init.c (check_init): Don't allow pre- or post- increment
10011         or decrement of final variable.
10012         (final_assign_error): Minor error message rewording.
10014 2001-12-08  Tom Tromey  <tromey@redhat.com>
10016         * java-tree.h: Fixed typo.
10018         * gjavah.c (decompile_method): Don't decompile to `return this'
10019         for static methods.
10021         * gjavah.c (cxx_keywords): Re-sorted.
10022         * lex.c (cxx_keywords): Re-sorted.
10024         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10025         else.
10027         * gjavah.c (print_namelet): Clear subnamelets.
10028         (HANDLE_METHOD): Set `method_printed' earlier.
10030 2001-12-07  Tom Tromey  <tromey@redhat.com>
10032         * lang.c (lang_f_options): Added
10033         optimize-static-class-initialization.
10034         (java_decode_option): Removed special case.
10036 2001-12-07  Per Bothner  <per@bothner.com>
10038         * check-init.c (check_init):  Fix typo freeing memory twice.
10040 2001-12-05  Per Bothner  <per@bothner.com>
10042         Restore support for static class initialization optimization.
10043         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10044         * check-init.c (check_int):  At end of BLOCK handle initialization
10045         blocks, which used to be done in java_complete_expand_method but did
10046         not handle the case where check_for_initialization might allocate
10047         more than a word of bits.
10048         * decl.c (lang_make_tree):  The smic field is now a tree.
10049         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
10050         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
10052         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
10054         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10055         Change from a hash table to a list.
10056         (struct_lang_decl):  Change field 'smic' to match.
10057         * class.c (add_method_1):  Initialize
10058         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10059         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
10060         (java_expand_method_bodies): -here, since 'smic' is now a list.
10061         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
10063         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
10065         * class.c (java_hash_compare_tree_node):  Fix casts.
10067 2001-12-04  Per Bothner  <per@bothner.com>
10069         * check-init.c:   Handle definite unassignment to finals in addition
10070         to definite assignment.
10071         (loop_current_locals):  New field.
10072         (num_current_locals, int start_current_locals, num_current_words):
10073         Make static.
10074         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
10075         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10076         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
10077         (get_variable_decl, check_final_reassigned):  New functions.
10078         (check_init, check_bool_init):  Modify as needed for checking finals.
10079         (check_for_initialization):  Take extra parameter and return void.
10080         Do extra start-up logic to check final fields for assignment.
10081         * parse.y (check_static_final_variable_assignment_flag,
10082         reset_static_final_variable_assignment_flag, check_final_assignment,
10083         check_final_variable_local_assignment_flag,
10084         reset_final_variable_indirect_assignment_flag,
10085         reset_final_variable_global_assignment_flag):  Remove functions.
10086         (java_complete_expand_methods, outer_field_access_fix,
10087         patch_assignment): Remove no-longer used logic.
10088         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
10089         * parse.y (register_fields, java_complete_tree):  Update accordingly.
10091         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
10092         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
10093         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
10095         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
10097         * java-tree.h (DECL FINAL):  New bit-field.
10098         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
10099         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
10100         (DECL_INIT_CALLS_THIS):  New macro.
10101         (struct lang_decl):  New bit-field init_calls_this.
10102         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10103         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10104         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
10105         use it for both local variables and final fields.
10106         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
10107         and local_final.
10108         (struct lang_type):  Remove hfv bit-field.
10109         (check_for_initialization):  Change to return void.
10111         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
10112         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
10113         * check-init.c (final_assign_error):  New helper function.
10114         (check_final_reassigned, check_init):  Use it.
10115         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10117         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
10118         bit-fields to unsigned.
10120 2001-12-03  Per Bothner  <per@bothner.com>
10122         * parse.y (patch_binop):  Minor constant folding.
10124         * parse.y (build_current_thisn):  Shorter 'buffer'.
10126 2001-12-03  Per Bothner  <per@bothner.com>
10128         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
10129         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10130         * jcf-write.c (generate_bytecode_insns):  Remove support for
10131         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10132         * check-init.c (check_init):  Likewise.
10134 2001-12-03  Per Bothner  <per@bothner.com>
10136         * verify.c (subroutine_nesting):  New function.
10137         (verify_jvm_instructions):  Use it to fix logic for checking that
10138         we're done with the current subroutine.
10140         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10141         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10143 2001-12-03  Per Bothner  <per@bothner.com>
10145         * jcf.h:  Fix obvious typo in comment.
10146         * typeck.c (build_null_signature):  Add comment.
10148 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10150         * expr.c: Remove leading capital from diagnostic messages, as
10151         per GNU coding standards.
10152         * jcf-io.c: Similarly.
10153         * jcf-parse.c: Similarly.
10154         * jv-scan.c: Similarly.
10155         * jvspec.c: Similarly.
10156         * mangle.c: Similarly.
10158 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
10159             Alexandre Petit-Bianco  <apbianco@redhat.com>
10161         * expr.c (build_java_arrayaccess): Call save_expr on array for
10162         correct evaluation order, modified comment, fixed indentation.
10163         * parse.y: (patch_assignment): Correctly extract the array base
10164         from the tree generate by build_java_arrayaccess, added comments.
10165         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10166         Fixes PR java/3096, PR java/3803, PR java/3965.
10168 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10170         * expr.c (expand_byte_code): Remove trailing periods from messages.
10171         * jcf-parse.c (load_class, jcf_parse): Similarly.
10172         * jcf-write.c (generate_classfile): Similarly.
10173         * lex.c (java_lex): Similarly.
10175 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10177         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10179 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10181         * Make-lang.in (java.generated-manpages): New dummy target.
10183 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10185         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10186         ASM_FINAL_SPEC.
10187         (lang_specific_pre_link): Use set_input to set input_filename.
10188         Append `main' here.
10189         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10190         (main): Fix definition.
10191         Strip `main' from classname.
10192         Fixes PR java/227.
10194 2001-11-18  Roger Sayle <roger@eyesopen.com>
10196         * parse.h (java_expand_switch): Remove old prototype.
10198 2001-11-18  Tom Tromey  <tromey@redhat.com>
10200         Fix for PR java/1401:
10201         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10202         arg0 is null.
10203         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10204         correctly.
10206 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10208         * lang.c (finish_parse): Rename to java_finish.
10209         (LANG_HOOKS_FINISH, java_finish): New.
10211 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10213         * decl.c (init_decl_processing): Rename java_init_decl_processing.
10214         * java-tree.h: New prototype.
10215         * lang.c (java_init): Update prototype.  Combine with old init_parse.
10217 2001-11-13  Tom Tromey  <tromey@redhat.com>
10219         * gjavah.c (method_signature): New global.
10220         (HANDLE_METHOD): Set it.
10221         (decompile_return_statement): New function.
10222         (decompile_method): Use it.
10223         (print_method_info): Removed `synth' argument.
10225 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10227         * java-tree.h (java_set_yydebug): New.
10228         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10229         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10230         (print_lang_decl, print_lang_type, print_lang_identifier,
10231         print_lang_statistics, lang_print_xnode): Remove.
10233 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10235         * jcf-parse.c (init_lex): Remove.
10236         * lang.c (language_string, lang_identify): Remove.
10237         (struct lang_hooks): Constify.
10238         (LANG_HOOKS_NAME): Override.
10239         (init_parse): Update.
10241 2001-11-08  Andreas Franck  <afranck@gmx.de>
10243         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10244         program_transform_name the way suggested by autoconf.
10245         (java.install-common): Also transform auxiliary program names with
10246         program_transform_name.
10248 2001-11-08  Tom Tromey  <tromey@cygnus.com>
10250         * parse.y (trap_overflow_corner_case): New rule.
10251         (unary_expression): Use it.
10252         * lex.c (java_init_lex): Don't set minus_seen.
10253         (yylex): Don't use minus_seen.  Communicate overflow to parser for
10254         it to handle.
10255         (error_if_numeric_overflow): New function.
10256         * parse.h (minus_seen): Removed field.
10257         (JAVA_RADIX10_FLAG): New define.
10259 2001-11-07  Tom Tromey  <tromey@redhat.com>
10261         Patch for PR java/1414:
10262         * parse.y (case_label_list): New global.
10263         (goal): Register case_label_list with GC.
10264         (java_complete_lhs): Save new case on case_label_list.
10265         (patch_switch_statement): Check for duplicate case labels.
10267 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10269         * parse.y (patch_assignment): Removed unused third argument.
10270         (java_complete_lhs): Removed unused third argument to patch_assignment.
10272 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10274         * lang.c: Include langhooks-def.h.
10275         * Make-lang.in: Update.
10277 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
10279         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10281 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10283         * mangle.c (find_compression_record_match): Don't match compression
10284         records for package name elements unless they occur at the start of
10285         the name. Fix for PR java/4717.
10287 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10289         * expr.c (expand_java_field_op): Don't special-case references to
10290         java.lang.PRIMTYPE.TYPE.
10291         (build_primtype_type_ref): Removed.
10292         * java-tree.h (build_primtype_type_ref): Remove prototype.
10293         * parse.y (maybe_build_primttype_type_ref): Removed.
10294         (complete_function_arguments): Don't special-case references to
10295         java.lang.PRIMTYPE.TYPE.
10296         (patch_assignment): Likewise.
10297         (array_constructor_check_entry): Likewise.
10299 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10301         * mangle.c (static tree compression_table): Fixed leading comment.
10302         * parse.h (struct parser_ctxt): Fixed field comment.
10303         * parse.y (check_pkg_class_access): New prototype, fixed leading
10304         comment, new parameter used to emit error only if passed as true.
10305         (parse_check_super): Pass extra argument to check_pkg_class_access.
10306         (do_resolve_class): Likewise.
10307         (process_imports): Likewise.
10308         (read_import_dir): Fixed indentation.
10309         (find_in_imports_on_demand): New local class_type_name. Local
10310         node_to_use deleted. while loop changed into for loop. Report
10311         multiple definition only for accessible classes. Improved error
10312         message.
10313         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10314         assigned to parameter list, fixed indentation. while loop changed
10315         into for loop, restore TREE_CHAIN on local `tem' before the next
10316         iteration.
10318 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10320         * lang.c (lang_get_alias_set): Deleted.
10322 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10324         * gjavah.c (jni_print_char): Fix thinko in last change.
10326         * gjavah.c (jni_print_char, decode_signature_piece): Use
10327         safe-ctype macros and/or fold extra calls into fewer ones.
10328         * lex.c (java_read_unicode, java_lex): Likewise.
10329         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10330         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10331         * mangle_name.c (append_unicode_mangled_name,
10332         unicode_mangling_length): Likewise.
10334 2001-10-17  Richard Henderson  <rth@redhat.com>
10336         * Make-lang.in (java/lang.o): Depend on langhooks.h.
10338 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10340         * lang.c (langhooks.h): Included.
10341         (LANG_HOOKS_INIT): Redefined.
10342         (LANG_HOOKS_INIT_OPTIONS): Likewise.
10343         (LANG_HOOKS_DECODE_OPTION): Likewise.
10344         (struct lang_hooks lang_hooks): New initialization.
10346 2001-10-11  Per Bothner  <per@bothner.com>
10348         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
10349         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10350         The former is simpler, and jcf-write.c handles it better.
10351         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
10352         or WITH_CLEANUP_EXPR.
10353         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
10354         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10356         * parse.y (patch_if_else_statement):  If the condition is constant,
10357         optimize away the test.
10359 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10361         * parse.y (patch_cast): Call patch_string on the first operand of
10362         the incoming node, update it if necessary. Fixes PR java/4510.
10364 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10366         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10367         when name qualifier matches a package name.
10369 2001-10-08  Tom Tromey  <tromey@redhat.com>
10371         Fix for PR java/4489:
10372         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10373         force a new label when computing `body_block'.
10375 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10377         * jcf-io.c (format_uint): Const-ify.
10378         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10379         * lex.c (java_get_line_col): Likewise.
10380         * parse.y (build_incdec): Likewise.
10382 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10384         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10385         a NULL enclosing context if appropriate. Fixes PR java/4466.
10387 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10389         * parse.y (patch_assignment): Use lvalue's original TYPE when
10390         building the final COMPOUND_EXPR.
10391         (try_reference_assignconv): Fixed leading comment.
10393 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10395         * parse.y (check_final_variable_indirect_assignment): For
10396         COMPOUND_EXPR, return only if finals were found initialized
10397         properly, if not, keep on checking.
10398         (check_final_variable_global_assignment_flag): New local
10399         error_found, set when appropriate and used to decide whether to
10400         report uninitialized finals. Fixed typo in comment.
10402 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10404         * decl.c (init_decl_processing): Fixed typo in predef_filenames
10405         last three initializations. Fixes PR java/4360.
10407 2001-09-21  Richard Henderson  <rth@redhat.com>
10409         * class.c (get_dispatch_table): Handle function descriptors.
10410         (build_dtable_decl): Likewise.
10411         * expr.c (build_invokevirtual): Likewise.
10413 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10415         * parse.y (patch_method_invocation): Build class initialization
10416         when static finals are used to qualify method invocation.
10417         Fixes PR java/4366.
10419 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
10421         * parse.h: (WFL_STRIP_BRACKET): Re-written using
10422         build_type_name_from_array_name.
10423         (STRING_STRIP_BRACKETS): New macro.
10424         * parse.y (build_type_name_from_array_name): New function.
10425         (array_creation_expression:): Accumulate []s instead of [s.
10426         (cast_expression:): Accumulate []s instead of [s after cast type
10427         name.
10428         (build_array_from_name): Local string deleted, use
10429         build_type_name_from_array_name.
10430         (build_unresolved_array_type): Accumulate []s instead of [s after
10431         type name.
10432         (register_fields): Fixed comment.
10433         (resolve_class): Local name, base deleted, new locals tname and
10434         array_dims. Use build_type_name_from_array_name. Use array_dims to
10435         build array type.
10436         (purify_type_name): Use STRING_STRIP_BRACKETS.
10438 2001-09-18  Andreas Jaeger  <aj@suse.de>
10440         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10441         * jv-scan.c: Likewise.
10443 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10445         * parse.y (patch_method_invocation): Inner class creation context
10446         check not enforced within constructors. Fixes PR java/1873.
10448 2001-09-16  Tom Tromey  <tromey@redhat.com>
10450         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10451         NOTE_PUSH for single-case push.  Fixes PR java/4189.
10453 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10455         * java-tree.h (TYPE_IMPORT_LIST): New macro.
10456         (TYPE_IMPORT_DEMAND_LIST): Likewise.
10457         (struct lang_type): New fields import_list and import_demand_list.
10458         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10459         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10460         (do_resolve_class): New local saved_enclosing_type, initialized,
10461         passed as parameter to find_in_imports and find_in_imports_on_demand.
10462         (find_in_imports): Added paramater enclosing_type, use its
10463         TYPE_IMPORT_LIST when applicable.
10464         (find_in_imports_on_demand): Added parameter enclosing_type, use
10465         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10466         declaration and initialization.
10467         (fold_constant_for_init): Switch/restore current_class to the
10468         appropriate context.
10470 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
10472         * verify.c (verify_jvm_instructions): Fix typo.
10474 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10476         * expr.c (expand_invoke): Const-ification.
10477         * parse.y (patch_method_invocation): Likewise.
10479 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10481         * gjavah.c (cxx_keywords): Const-ification.
10482         * keyword.gperf (java_keyword): Likewise.
10483         * lang.c (java_tree_code_name): Likewise.
10484         * lex.c (cxx_keywords): Likewise.
10485         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10487 2001-09-11  Richard Henderson  <rth@redhat.com>
10489         * parse.h (ctxp_for_generation): Mark extern.
10491 2001-09-10  Richard Henderson  <rth@redhat.com>
10493         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10495 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10497         * typeck.c (java_array_type_length, build_prim_array_type):
10498         Represent empty arrays by NULL index.
10500 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
10502         * java-tree.h (compile_resource_file): Grouped with other prototypes.
10503         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10505 2001-09-06  Anthony Green  <green@redhat.com>
10507         * class.c (O_BINARY): Define if necessary.
10508         (registerResource_libfunc): Declare.
10509         (init_class_processing): Initilize registerResource_libfunc.
10510         (compile_resource_file): New function.
10511         * java-tree.h (resource_name): Declare.
10512         (compile_resource_file): Declare.
10513         * jcf-parse.c (yyparse): Handle compiling java resource files.
10514         * lang.c (java_decode_option): Handle -fcompile-resource option.
10515         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10516         resource files.
10517         * gcj.texi (Code Generation): Add documentation for -R flag.
10519 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
10521         * jcf-write.c (generate_classfile): Issue an error in case of
10522         field/initial value mismatch.
10523         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10524         being initialized and we're generating bytecode.
10525         (java_complete_lhs): In MODIFY_EXPR section: added comments,
10526         set DECL_INITIAL properly when appropriate.
10527         Fixes PR java/4230
10528         Fixes PR java/4204
10530 2001-09-01  Per Bothner  <per@bothner.com>
10532         * parse.y (maybe_yank_clinit):  A field without an initializer is not
10533         relevant.  All initializers except static final and constant require
10534         <clinit>, regardless of flag_emit_class_files.
10536 2001-08-31  Per Bothner  <per@bothner.com>
10538         * class.c (set_constant_value):  When not emitting class files, then a
10539         String ConstantValue is a utf8const_ptr_type.
10541 2001-08-30  Per Bothner  <per@bothner.com>
10543         * jcf-write.c (generate_classfile):  Check that field is primitive
10544         or string before emitting ConstantValue attribute.
10546 2001-08-30  Per Bothner  <per@bothner.com>
10548         * parse.y (resolve_qualified_expression_name):  If creating a
10549         COMPOUND_EXPR, set it's type correctly.
10551 2001-08-30  Per Bothner  <per@bothner.com>
10553         * jcf-io.c (open_class):  Set filename field.
10555         * jcf-parse,c (parse_class_file):  Set current_function_decl
10556         for better error message when Code attribute is missing.
10558         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
10559         better diagnostics, especially for constructors.
10561 2001-08-30  Per Bothner  <per@bothner.com>
10563         * jcf-write.c (generate_classfile):  Don't write ConstantValue
10564         attribute if field is not final, for compatibility with jdk.
10566         * jcf-write.c (generate_classfile):  Convert ConstantValue values
10567         to correct type.  Work-around for front-end bug.
10568         * class.c (set_constant_value):  Error if constant has wrong type.
10570 2001-08-30  Per Bothner  <per@bothner.com>
10572         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
10573         "Double" are printed at verbosity 1.
10575         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
10577         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
10579 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10581         * parse.y (patch_assignment): Don't verify final re-assignment here.
10582         (java_complete_lhs): Verify assignments to finals calling
10583         patch_assignment. Verify re-assignments to finals before calling
10584         patch_assignment.
10586 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
10588         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10589         Fixes PR java/1413
10591 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
10593         * lex.c (java_lex): new local found_hex_digits. Set and then used
10594         in test to reject invalid hexadecimal numbers.
10595         * parse.y (java_complete_tree): Prevent unwanted cast with
10596         initialized floating point finals.
10597         (patch_binop): Emit a warning when detecting a division by zero,
10598         mark result not constant, don't simplify non integer division.
10600 2001-08-28  Per Bothner  <per@bothner.com>
10602         * jcf-write.c  (generate_bytecode_insns):  For increments and
10603         decrements just recurse to push constant.  Improvement on Mark's patch.
10605 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
10607         * jcf-write.c (generate_bytecode_insns): Generate an integer to
10608         real conversion for increments and decrements of reals.
10610 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10612         * parse.y (resolve_qualified_expression_name): Handle unresolved
10613         qualified expressions, prevent numerical qualifiers, fixed typo.
10614         Fixes PR java/4141
10616 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10618         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10619         don't report anything but deprecated class when marked so. Handle
10620         VAR_DECL.
10621         (patch_method_invocation): Check deprecation on methods and types.
10622         (patch_binop): code becomes an enum tree_code, added default: to
10623         switch to handle that. Detect division by zero, try to fold and
10624         return before using a subroutine.
10626 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10628         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10629         file smaller than 4 bytes.
10630         * parse.y (check_inner_circular_reference): New function.
10631         (check_circular_reference): Likewise.
10632         (array_initializer:): Accept {,}.
10633         (java_check_circular_reference): Rewritten using
10634         check_circular_reference and check_inner_circular_reference.
10635         (java_complete_expand_method): Unconditionally save and restore
10636         the unpurged exception list.
10637         (build_dot_class_method_invocation): Unmangle signature parameter.
10639 2001-08-21  Tom Tromey  <tromey@redhat.com>
10641         * decl.c (init_decl_processing): Add `throws' field to method
10642         descriptor.
10643         * class.c (make_method_value): Compute `throws' field for method.
10645 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10647         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10648         circularity is detected.
10649         (ctors_unchecked_throws_clause_p): Fixed leading comment.
10651 2001-08-17  Richard Henderson  <rth@redhat.com>
10653         * class.c (emit_register_classes): Add align parameter to
10654         call to assemble_integer.
10656 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
10658         * jcf-parse.c (load_class): New locals saved and class_loaded. If
10659         loading a class_or_name fails, try considering an innerclass name
10660         and load the enclosing context.
10661         * parse.y (resolve_inner_class): New function.
10662         (find_as_inner_class): Added leading comment.
10663         (register_incomplete_type): Keep the current context as enclosing
10664         context for JDEP_FIELD dependencies.
10665         (do_resolve_class): Locals new_class_decl and super initialized to
10666         NULL. Call resolve_inner_class, explore the enclosing context
10667         superclass if necessary.
10668         Fixes PR java/4007
10670 2001-08-16  Tom Tromey  <tromey@redhat.com>
10672         * jcf-dump.c (main): Updated for change to jcf_path_seal.
10673         * gjavah.c (main): Updated for change to jcf_path_seal.
10674         * lang.c (version_flag): New global.
10675         (java_decode_option): Recognize `-version'.
10676         (java_init): Update for change to jcf_path_seal.
10677         * jcf.h (jcf_path_seal): Added `print' argument.
10678         * jcf-path.c (jcf_path_seal): Added `print' argument.
10680 2001-08-13  Zack Weinberg  <zackw@panix.com>
10682         * Make-lang.in (java/decl.o): Update dependencies.
10683         * decl.c: Include libfuncs.h, don't include toplev.h.
10685 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10687         * decl.c (init_decl_processing): exception_type_node,
10688         class_not_found_type_node, and no_class_def_found_type_node
10689         initialized. predef_filenames augmented accordingly.
10690         instinit_identifier_node initialized.
10691         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10692         * java-tree.h (enum java_tree_index): New entries
10693         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10694         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10695         (exception_type_node): New macro.
10696         (class_not_found_type_node): Likewise.
10697         (no_class_def_found_type_node): Likewise.
10698         (instinit_identifier_node): Likewise.
10699         (PREDEF_FILENAMES_SIZE): Adjusted.
10700         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10701         (struct lang_type): Fixed typo in bitfield name.
10702         (DECL_INSTINIT_P): New macro.
10703         (ID_INSTINIT_P): Likewise.
10704         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10705         attribute.
10706         * parse.y (encapsulate_with_try_catch): New function.
10707         (generate_instinit): Likewise.
10708         (build_instinit_invocation): Likewise.
10709         (ctors_unchecked_throws_clause_p): Likewise.
10710         (add_instance_initializer): Deleted.
10711         (build_instance_initializer): Likewise.
10712         (in_instance_initializer): Likewise.
10713         (check_method_redefinition): instinit$ not to be verified.
10714         (java_complete_expand_methods): Generate instinit$, simplified code.
10715         (build_dot_class_method): Eliminated unnecessary locals. Use
10716         encapsulate_with_try_catch, removed unnecessary code.
10717         (fix_constructors): New local iii. Use build_instinit_invocation.
10718         (patch_method_invocation): Added comment.
10719         (maybe_use_access_method): Don't consider instinit$.
10720         (find_applicable_accessible_methods_list): Shorten the search for
10721         instinit$ too.
10722         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10723         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10724         (patch_throw_statement): Likewise. Fixed typo.
10726 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
10728         Revert:
10729         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10730         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10731         ASM_FINAL_SPEC.
10732         (lang_specific_pre_link): Use set_input to set input_filename.
10733         Append `main' here.
10734         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10735         (main): Fix definition.
10736         Strip `main' from classname.
10737         Fixes PR java/227.
10739 2001-08-11  Zack Weinberg  <zackw@panix.com>
10741         * lex.h: Don't include setjmp.h.  Don't define
10742         SET_FLOAT_HANDLER or prototype set_float_handler.
10744 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10746         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10747         `poplevel' in the right order.
10749 2001-08-09  Richard Henderson  <rth@redhat.com>
10751         * Make-lang.in (class.o): Depend on TARGET_H.
10752         * class.c (emit_register_classes): Use target hooks instead of
10753         assemble_constructor and assemble_destructor.
10755 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
10757         * check-init.c (flags.h): Include
10758         (check_init): Don't report uninitialized static class
10759         initialization flags, don't free bit index when doing static class
10760         initialization optimization.
10761         (check_for_initialization): Return type changed to `unsigned int.'
10762         (attach_initialized_static_class): New function.
10763         * class.c (add_method_1): Create the initialized static class
10764         table if necessary.
10765         (finish_class): Always emit deferred inline methods.
10766         * decl.c (emit_init_test_initialization): Moved to expr.c
10767         (complete_start_java_method): Don't traverse
10768         DECL_FUNCTION_INIT_TEST_TABLE.
10769         (lang_mark_tree): Mark hash tables in function decls.
10770         * expr.c (emit_init_test_initialization): Moved from decl.c.
10771         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10772         initialization flag, set DECL_CONTEXT and
10773         LOCAL_CLASS_INITIALIZATION_FLAG.
10774         (java_lang_expand_expr): Emit initialization code for static class
10775         initialized flags when entering block, if necessary.
10776         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10777         * java-tree.h (flag_optimize_sci): New global variable declaration.
10778         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10779         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10780         (LOCAL_FINAL_P): Fixed typo in comment.
10781         (FINAL_VARIABLE_P): Likewise.
10782         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10783         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10784         (struct lang_decl): New fields `ict', `smic' and `cif.'
10785         (check_for_initialization): New returned value for global.
10786         (attach_initialized_static_class): New global function.
10787         (STATIC_CLASS_INIT_OPT_P): New macro.
10788         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10789         * lang.c (java_decode_option): Handle
10790         `-fno-optimize-static-class-initialization'
10791         * parse.y (start_complete_expand_method): New function.
10792         (java_expand_method_bodies): Likewise.
10793         (attach_init_test_initialization_flags): Likewise.
10794         (adjust_init_test_initialization): Likewise.
10795         (emit_test_initialization): Likewise.
10796         (java_complete_expand_methods): Nullify abstract and native method
10797         bodies.
10798         (java_complete_expand_method): New locals `fbody', `block_body'
10799         and `exception_copy.' Reorganized: directly return on empty method
10800         bodies, call `start_complete_expand_method', remember definitely
10801         initialized static class in function, don't expand method bodies.
10802         (java_expand_classes): Call `java_expand_method_bodies' before
10803         `finish_class' when compiling to native.
10804         (resolve_expression_name): Use `orig' after building outer class
10805         field access.
10806         (patch_invoke): Remember static method invocations.
10808 2001-08-06  Richard Henderson  <rth@redhat.com>
10810         * class.c (emit_register_classes): Pass a symbol_ref and priority
10811         to assemble_constructor.
10813 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
10815         * java-tree.h (all_class_filename): New macro.
10816         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10817         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10818         newly created IDENTIFIER_NODE to `all_class_filename.'
10820 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
10822         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10823         Use ggc_add_tree_root to register roots.
10825 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10827         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10828         second operand calling check_init.
10829         * decl.c (complete_start_java_method): Swaped second and third
10830         arguments while creating WITH_CLEANUP_EXPR node.
10831         * jcf-write.c (generate_bytecode_insns): Use second operand
10832         instead of third when handling WITH_CLEANUP_EXPR.
10833         * parse.y (java_complete_lhs): Expand second operand of
10834         WITH_CLEANUP_EXPR nodes.
10835         (patch_synchronized_statement): Swaped second and third arguments
10836         while creating WITH_CLEANUP_EXPR node.
10838 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
10840         * parse.y (create_interface): Avoid cyclic inheritance report when
10841         syntax error encountered during class definition.
10842         Fixes PR java/2956
10844 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10846         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10847         ASM_FINAL_SPEC.
10848         (lang_specific_pre_link): Use set_input to set input_filename.
10849         Append `main' here.
10850         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10851         (main): Fix definition.
10852         Strip `main' from classname.
10853         Fixes PR java/227.
10855 2001-07-18  Tom Tromey  <tromey@redhat.com>
10857         For PR java/2812:
10858         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10859         * lex.c (java_new_lexer): Use ICONV_CONST.
10860         (java_read_char): Likewise.
10861         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10862         (jv-scan$(exeext)): Likewise.
10864 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10866         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10867         * parse.y (check_class_interface_creation): Allow `private' if the
10868         enclosing is not an interface.
10869         (create_interface): Interface tagged public if the enclosing
10870         context is an interface.
10871         (create_class): Class tagged public if the enclosing context
10872         is an interface.
10873         Fixes PR java/2959
10875 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10877         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10878         Fixes PR java/2665
10880 2001-07-14  Tim Josling  <tej@melbpc.org.au>
10882         * check-init.c (check_init): Remove references to EXPON_EXPR.
10884 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10886         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10887         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10888         Fixes PR java/3602
10890 2001-07-13  Tom Tromey  <tromey@redhat.com>
10892         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10893         invocation.
10895 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10897         * parse.y (patch_method_invocation): Don't override primary if one
10898         is already provided, but let this$<n> be built. Fixed comment.
10900 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10902         * parse.y (empty_statement:): Report empty statement error only
10903         when found at class declaration level.
10904         Fixes PR java/3635
10906 2001-07-12  Tom Tromey  <tromey@redhat.com>
10908         * expr.c (expand_load_internal): New function.
10909         (LOAD_INTERNAL): Use it.
10911 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
10913         * parse.y (verify_constructor_super): Compare anonymous class ctor
10914         args with `valid_method_invocation_conversion_p.'
10915         Fixes PR java/3285
10917 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10919         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10920         `-fsyntax-only.' Fixes PR java/3248
10922 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10924         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10926 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10928         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10929         current function is static. Fixes PR java/1970
10931 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10933         * parse.y (patch_method_invocation): Add enclosing context to ctor
10934         calls if necessary. Fixes PR java/2953
10936 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10938         * parse.y (resolve_package): Abort if qualified expression member
10939         isn't right.
10940         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10941         Fixes PR java/1391
10943 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
10945         * verify.c: Don't use // comments.
10947 2001-07-05  Tom Tromey  <tromey@redhat.com>
10949         * lang.c (flag_assume_compiled): Removed.
10950         * java-tree.h (flag_assume_compiled): Removed.
10951         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10952         -fhash-synchronization, -fuse-divide-subroutine,
10953         -fcheck-references, -femit-class-file, -femit-class-files,
10954         -fassume-compiled.  Updated --encoding information.  Changed
10955         -foutput-class-dir to `-d'.
10957 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
10959         * jcf-parse.c (parse_class_file): Add lineno parameter to
10960         debug_start_source_file call.
10962 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10964         * gcj.texi: Use gpl.texi.
10965         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10966         dependencies and use doc/include in search path.
10968 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
10970         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10971         `this'.  If so, don't build instance initializers.
10973 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10975         * parse.y (resolve_expression_name): Improved error message for
10976         inner class cases. Fixes PR java/1958
10978 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
10980         * lang.c: #include diagnostic.h
10981         (lang_print_error): Add a `diagnostic_context *' parameter.
10982         (java_dummy_print): Likewise.
10983         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10985 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10987         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10988         * jcf.h (typedef struct JCF): New bitfield `finished.'
10989         (JCF_FINISH): Set `finished.'
10990         (JCF_ZERO): Reset `finished.'
10991         Fixes PR java/2633
10993 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10995         * parse.y (class_body_declaration:): Don't install empty instance
10996         initializers.
10997         Fixes PR java/1314
10999 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
11001         * class.c (set_super_info): Call `set_class_decl_access_flags.'
11002         (set_class_decl_access_flags): New function.
11003         * java-tree.h (set_class_decl_access_flags): New prototype.
11004         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11005         (parse_class_file): New local `decl_max_locals.' Take wide types
11006         into account to compute DECL_MAX_LOCALS.
11007         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11008         imports on demand.
11010 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
11012         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11014 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11016         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11017         * parse.y (do_resolve_class): Moved comments out to leading comment
11018         section. Removed local `start', New local `_ht' and
11019         `circularity_hash.'  Record `enclosing' in hash table and search
11020         it to detect circularity.  Use `enclosing' as an argument to
11021         `lookup_cl.' Free the hash table when done.
11023 2001-06-19  Tom Tromey  <tromey@redhat.com>
11025         * lex.c (java_read_char): Disallow invalid and overlong
11026         sequences.  Fixes PR java/2319.
11028 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
11030         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11032 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11034         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11035         arguments accordingly.
11037 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11039         * gcj.texi: Move contents to just after title page.
11041 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
11043         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11044         builtin type.
11045         (patch_incomplete_class_ref): Build the class ref, build the class
11046         init if necessary, complete the tree.
11047         Fixes PR java/2605
11049 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11051         * parse.y (lookup_field_wrapper): Test `name' code.
11052         (resolve_qualified_expression_name): Test `qual_wfl' code.
11053         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11054         handle `qual_wfl' by code.
11055         (maybe_build_primttype_type_ref): Test `wfl' code.
11057 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11059         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11060         fdl.texi.
11061         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
11062         the dvi file in the java directory.
11064 2001-05-25  Sam TH  <sam@uchicago.edu>
11066         * gen-table.pl javaop.h jcf.h lex.h,
11067         parse.h: Fix header include guards.
11069 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
11071         * jv-scan.c (version): Update copyright year.
11073 2001-05-21  Per Bothner  <per@bothner.com>
11075         * jcf-parse.c (read_class):  If class is from .class or .zip file
11076         and it's already been read, don't push/pop parser context.
11078 2001-05-18  Per Bothner  <per@bothner.com>
11080         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
11081         command line so the jvgenmain-generated main program comes first.
11083 2001-05-15  Tom Tromey  <tromey@redhat.com>
11085         * class.c (build_utf8_ref): Don't generate identifier based on
11086         utf8const contents.
11088 2001-05-12  Richard Henderson  <rth@redhat.com>
11090         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11091         * expr.c (java_lang_expand_expr): Expand it.
11092         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11093         calling build_exception_object_ref.
11094         * parse.y (catch_clause_parameter): Likewise.
11095         (build_dot_class_method): Likewise.
11096         (try_reference_assignconv): Likewise.
11097         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11098         * jcf-write.c (generate_bytecode_insns): Likewise.
11100 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
11102         * parse.y (build_unresolved_array_type): Set
11103         EXPR_WFL_QUALIFICATION on the newly created wfl.
11104         Fixes PR java/2538. Fixes PR java/2535.
11106 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
11108         * parse.y (fix_constructors): Removed unnecessary assignment to
11109         local. Moved assignment to `this$<n>', fixed comments and
11110         indentation.
11111         (build_wfl_wrap): Fixed indentation.
11112         Fixes PR java/2598, java/2579 and java/2658.
11114 2001-05-03  Mo DeJong  <mdejong@redhat.com>
11116         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11117         check for byte swap.
11119 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
11121         * expr.c (build_class_init): Move MODIFY_EXPR
11122         outside of COND_EXPR.  Remove variable `call'.
11124 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11126         * decl.c: NULL_PTR -> NULL.
11127         * jcf-write.c: Likewise.
11129 2001-05-01  Tom Tromey  <tromey@redhat.com>
11131         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11132         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11133         * gcj.texi: Updated copyright text.  Include fdl.texi.
11134         (Top): Link to new node.
11136 2001-05-01  Per Bothner  <per@bothner.com>
11138         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
11140 2001-05-01  Per Bothner  <per@bothner.com>
11142         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
11143         import_list contains the name, not the TREE_PURPOSE.
11145 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11147         * jcf-io.c (read_zip_member): Cast to long in comparison with
11148         signed value.
11150         * jvspec.c (lang_specific_driver): Initialize variables.
11152         * mangle.c (find_compression_record_match): Likewise.
11154         * typeck.c (build_null_signature): Provide static prototype.  Mark
11155         parameter with ATTRIBUTE_UNUSED.
11157         * verify.c (verify_jvm_instructions): Initialize variable.
11159 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11161         * parse.y (do_resolve_class): Check for cyclic inheritance during
11162         inner class resolution.
11164 2001-04-27  Per Bothner  <per@bothner.com>
11166         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
11167         while iterating, since that could cause gc to lose stuff.
11169 2001-04-26  Per Bothner  <per@bothner.com>
11171         Fix method search wrt scope of inner classes to match JLS2.
11172         * typeck.c (build_null_signature):  New static function.
11173         (has_method):  New function.  Uses build_null_signature and lookup_do.
11174         * java-tree.h (has_method):  New declaration.
11175         * parse.y (find_applicable_accessible_methods_list):  Do not search
11176         context of inner classes here.
11177         (patch_method_invocation):  Search scope, ie. current and outer clases,
11178         for method matching simple name, to find class.
11180 2001-04-26  Per Bothner  <per@bothner.com>
11182         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11183         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
11185         * constants.c (find_methodref_with_class_index):  New function.
11186         (find_methodref_index):  Use find_methodref_with_class_index.
11187         * java-tree.h (find_methodref_with_class_index):  New declaration.
11188         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
11189         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11190         If context changed from interface to class, don't use invokeinterface.
11192 2001-04-25  Per Bothner  <per@bothner.com>
11194         * verify.c (verify_jvm_instructions):  For field instructions,
11195         check that field index is valid.  For invoke instructions, check that
11196         method index is valid.
11198 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
11200         * config-lang.in (target_libs): Copy from $libgcj_saved.
11202 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11204         * decl.c (init_decl_processing): Add new class "protectionDomain"
11205         field.
11206         * class.c (make_class_data): Set initial value for "protectionDomain".
11208 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11210         * jvspec.c (lang_specific_driver): Fix memory allocation
11211         deficit, by using concat in lieu of xmalloc/sprintf.
11213 2001-04-20  Per Bothner  <per@bothner.com>
11215         Fixes to compile multiple .class files at once.
11216         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
11217         * java-tree.h (CLASS_PARSED_P):  New macro.
11218         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11219         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
11220         (read_class):  Avoid some code duplication.
11221         Don't call JCF_FINISH for a .class file - might be needed later.
11222         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
11223         rather than CLASS_LOADED_P, since latter implies class laid out.
11224         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
11225         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
11227 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11229         * Make-lang.in (java/boehm.o): Depend on toplev.h.
11231         * boehm.c: Include toplev.h.
11233 2001-04-06  Tom Tromey  <tromey@redhat.com>
11234             Alexandre Petit-Bianco  <apbianco@redhat.com>
11236         Fix for PR gcj/1404 and PR gcj/2332:
11237         * parse.y (build_array_from_name): If we use the type_wfl then
11238         accumulate dimensions from the original type as well.
11239         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11241 2001-04-06  Tom Tromey  <tromey@redhat.com>
11243         * parse.y (analyze_clinit_body): Return true if the second operand
11244         of a METHOD_EXPR is nonzero.
11246 2001-04-06  Tom Tromey  <tromey@redhat.com>
11248         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11249         directory.
11250         ($(srcdir)/java/parse.c): Likewise.
11252 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
11254         * gcj.texi: Use `which-gcj' instead of `which-g77.'
11255         (version-gcc): Initialized.
11256         (which-gcj): Likewise.
11258 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11260         * java-tree.h (struct lang_decl): New macro
11261         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11262         * parse.y (build_instance_initializer): New function.
11263         (add_instance_initializer): Use it.
11264         (java_fix_constructors): Set `current_class' before fix pass.
11265         (fix_constructors): Just return if already fixed. Move `super()'
11266         invocation ahead. Use `build_instance_initializer.'
11267         Fixes PR java/1315.
11269 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11271         * parse.y (resolve_qualified_expression_name): Pass field's
11272         DECL_CONTEXT to `not_accessible_p.'
11273         (not_accessible_p): Changed parameters order in `inherits_from_p'
11274         invocation.
11276 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
11278         * lang-options.h: Add flag_check_references.
11280 2001-04-04  Per Bothner  <per@bothner.com>
11282         * java-tree.h (CONSTANT_VALUE_P):  New macro.
11283         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
11284         * parse.y (maybe_build_class_init_for_field):  New static function.
11285         (resolve_expression_name, resolve_field_access):  Use
11286         maybe_build_class_init_for_field instead of build_class_init
11287         This does not do the init if the field is compile-time-constant.
11288         (resolve_field_access):  Simplify.
11290         * parse.y (fold_constant_for_init):  Merge test into switch.
11292 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
11294         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11295         on gansidecl.h.
11296         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11298 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
11300         * expr.c (pop_type_0): Save the result of the first
11301         lang_printable_name call in a scratch buffer, so it
11302         won't be clobbered by the second call.
11304 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
11306         * parse-scan.y (array_type:): Rewritten.
11307         (type_declaration:): `empty_statement' replaces `SC_TK.'
11308         (class_member_declaration:): `empty statement' added.
11309         (method_body:): Simplified.
11310         (static_initializer:): Likewise.
11311         (primary_no_new_array:): Use `type_literals.'
11312         (type_literals:): New rule.
11313         (dims:): Set and update `bracket_count.'
11314         Fixes PR java/1074. Fixes PR java/2412.
11316 2001-03-28  Hans Boehm  <boehm@acm.org>
11318         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11319         (get_boehm_type_descriptor): Set type on returned value to be a
11320         pointer length integer.
11322 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11324         * expr.c (pop_type_0): Call `concat' rather than building the
11325         string manually.
11326         (pop_type): Add format specifier in call to `error'.
11328         * parse.y (patch_method_invocation): Avoid casting away
11329         const-ness.
11331 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
11333         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11335 2001-03-28  Richard Henderson  <rth@redhat.com>
11337         IA-64 ABI Exception Handling:
11338         * Make-lang.in (except.o): Don't depend on eh-common.h.
11339         * check-init.c (check_init): Handle EXC_PTR_EXPR.
11340         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11341         [soft_exceptioninfo_call_node]: Remove.
11342         [eh_personality_libfunc, lang_eh_runtime_type]: New.
11343         (end_java_method): No emit_handlers.
11344         * except.c (java_set_exception_lang_code): Remove.
11345         (method_init_exceptions): Don't call it.
11346         (prepare_eh_table_type): No CATCH_ALL_TYPE.
11347         (build_exception_object_ref): New.
11348         (expand_end_java_handler): Update for except.h name changes.
11349         (emit_handlers, expand_resume_after_catch): Remove.
11350         * expr.c (java_lang_expand_expr): Update for except.h name changes.
11351         (process_jvm_instruction): Use build_exception_object_ref.
11352         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11353         (soft_exceptioninfo_call_node): Remove.
11354         (build_exception_object_ref): Declare.
11355         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11356         soft_exceptioninfo_call_node.  Move processing ...
11357         [EXC_PTR_EXPR]: ... here.
11358         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11359         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11360         (source_end_java_method): No java_set_exception_lang_code or
11361         emit_handlers.
11362         (build_dot_class_method): Use build_exception_object_ref.
11363         (try_reference_assignconv): Check EXC_PTR_EXPR not
11364         soft_exceptioninfo_call_node.
11366 2001-03-28  Richard Henderson  <rth@redhat.com>
11368         * java-tree.h (throw_node): Define as a single member of
11369         java_global_trees instead of a separate array.
11370         (JTI_THROW_NODE): New.
11371         * decl.c (throw_node): Don't declare.
11372         (init_decl_processing): Init a scalar throw_node.
11373         Don't register it for gc.
11374         * check-init.c (check_init): Reference scalar throw_node.
11375         * expr.c (build_java_athrow): Likewise.
11376         * jcf-write.c (generate_bytecode_insns): Likewise.
11377         * parse.h (BUILD_THROW): Likewise.
11379 2001-03-28  Richard Henderson  <rth@redhat.com>
11381         * decl.c (end_java_method): Do not save and restore
11382         flag_non_call_exceptions.
11383         * parse.y (source_end_java_method): Likewise.
11384         * lang.c (flag_exceptions): Don't declare.
11385         (java_init_options): Set flag_non_call_exceptions.  Set
11386         flag_exceptions here ...
11387         (java_init): ... not here.
11389 2001-03-27  Richard Henderson  <rth@redhat.com>
11391         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11392         exceptions_via_longjmp.
11394         * lang.c (flag_new_exceptions): Don't declare it.
11395         (java_init_options): Or set it.
11397 2001-03-27  Richard Henderson  <rth@redhat.com>
11399         * decl.c (end_java_method): Rename asynchronous_exceptions to
11400         flag_non_call_exceptions.
11401         * parse.y (source_end_java_method): Likewise.
11403 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11405         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11407 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11409         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11411 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
11413         * parse.y (find_as_inner_class): Follow current package
11414         indications not to mistakingly load an unrelated class.
11416 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11418         * constants.c (PUTN): Use memcpy, not bcopy.
11420         * lex.c (java_read_char): Use memmove, not bcopy.
11422         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11424 2001-03-23  Per Bothner  <per@bothner.com>
11426         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
11427         macro for better error pin-pointing.
11428         * java-tree.h:  Fix typo in comment.
11430         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
11431         Don't include jsr/goto in exception range.
11432         Check if start and end of exception range are the same (also TRY_EXPR).
11433         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11434         However, do emit the following goto even if try_block is empty.
11435         Defer freeing exception_decl until after the finalizer, to make
11436         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
11438         * parse.y (java_complete_lhs):  If the try-clause is empty, just
11439         return the finally-clause and vice versa.
11441 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
11443         * gcj.texi (Input Options): documented the check for attribute
11444         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11445         * java-tree.h (flag_force_classes_archive_check): Declared extern.
11446         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11447         (jcf_parse): Check for the right classes archive if necessary.
11448         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11449         (jcf_parse_fields): Fixed indentation.
11450         * jcf-write.c (append_gcj_attribute): New function.
11451         (generate_classfile): Compute the attribute count, invoke
11452         `append_gcj_attribute'.
11453         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11454         turned into bit-fields. New bit-field `right_zip.'
11455         (JCF_ZERO): Set `right_zip' to zero.
11456         * lang-options.h (-fforce-classes-archive-check): Added flag.
11457         * lang.c (flag_force_classes_archive_check): New flag.
11458         (lang_f_options): New entry `force-classes-archive-check.'
11459         Fixes PR java/1213.
11461 2001-02-07  Andrew Haley  <aph@redhat.com>
11463         * gcj.texi (Configure-time Options): Add -fcheck-references.
11464         * expr.c (build_java_indirect_ref): New function.
11465         (java_check_reference): New function.
11466         (build_java_array_length_access): Use build_java_indirect_ref to
11467         check for null references.
11468         (build_java_arrayaccess): Likewise.
11469         (build_get_class): Likewise.
11470         (build_field_ref): Likewise.
11471         (invoke_build_dtable): Likewise.
11472         (build_invokeinterface): Likewise.
11473         * lang.c (lang_f_options): Add flag_check_references.
11474         * jvspec.c (jvgenmain_spec): Add flag_check_references.
11475         * java-tree.h (flag_check_references): New variable.
11476         * lang.c (flag_check_references): Likewise.
11477         * parse.y (patch_invoke): Use java_check_reference.
11478         (patch_assignment): Allow for extra nesting in
11479         _Jv_CheckArrayStore.
11481 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
11483         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11484         * lex.c (cxx_keywords): Likewise.
11486 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11488         * parse.y (qualify_ambiguous_name): Broaden `length'
11489         recognition. Help MODIFY_EXPR be resolved as expression names.
11490         Fixes PR java/2066. Fixes PR java/2400.
11492 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
11494         * gjavah.c (process_file): Mark interface definitions with
11495         "__attribute__ ((java_interface))".
11497 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11499         * class.c (layout_class): Fixed push_super_field's second
11500         argument. Fixes PR java/2333.
11501         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11502         too early to lay innerclasses out.
11504 2001-03-20  Tom Tromey  <tromey@redhat.com>
11505             Alexandre Petit-Bianco <apbianco@redhat.com>
11507         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11508         inside an array reference. Insertion of the array store check
11509         rewritten. Fixes PR java/2299.
11511 2001-03-20  Tom Tromey  <tromey@redhat.com>
11513         * lex.c (java_read_unicode): Only accept leading `u's.
11515 2001-03-20  Tom Tromey  <tromey@redhat.com>
11517         * jcf-parse.c (read_class): Initialize `class'.
11519 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11521         * jcf_parse.c (jcf_parse): Eliminate unused variable.
11523 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11525         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11526         (layout_class): Likewise.
11527         (layout_class_method): Likewise.
11528         (emit_register_classes): Likewise.
11529         * decl.c (builtin_function): Likewise.
11530         (give_name_to_locals): Likewise.
11532 2001-03-19  Per Bothner  <per@bothner.com>
11534         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
11535         before trying to load an inner class.
11537         Fixes to process to command-line .class files in two passes.
11538         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
11539         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
11540         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
11541         * class.c (is_compiled_class):  Fix for renamed flag.
11542         * parse.y (maybe_create_class_interface_decl):  Likewise.
11543         * jcf-parse.c (yyparse):  Also set if compiling .class files.
11544         * jcf-parse.c (read_class);  Read current_class.
11545         (jcf_parse):  Make static.
11546         (load_inner_classes):  New function, with code moved from jcf_parse,
11547         because we need to inner classes after the command-line files are read.
11548         (yyparse):  Set finput to NULL when it doesn't need to be closed.
11549         Reduce use of main_jcf (basically only for archive) and
11550         use finput instead of main_jcf->read_state.
11551         Inline jcf_figure_file_type into yyparse.
11552         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11553         Defer load_inner_classes and parse_class_file to a second pass,
11554         after we've correctly mapped command-line .clas fiels to classes.
11555         (jcf_figure_file_type):  Removed.
11556         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
11557         (JCF_ZERO):  Also clear zipd field.
11558         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
11560 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11562         * jcf-parse.c (yyparse): Change ch from char * to char.
11564 2001-03-19  Per Bothner  <per@bothner.com>
11566         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
11567         Add constructed filelist-file at end, following -xjava.  Thus any .o
11568         and library files are not affected by the -xjava.  Also wrap
11569         explicit @FILE with -xjava and -xnone.
11571 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
11573         * class.c (build_static_field_ref): Call make_decl_rtl() after
11574         setting the DECL_EXTERNAL flag.
11576 2001-03-17  Per Bothner  <per@bothner.com>
11578         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
11580         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
11581         when result is is needed (target is STACK_TARGET).
11583         * parse.h (JDEP_SOLV):  Removed.
11584         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
11586         * parse.y (incomplete_class_list): Removed.
11587         (obtain_incomplete_type): Don't use or set incomplete_class_list.
11588         It doesn't work if resolve_class changes the name of an array type
11589         that is on the list and then someone else looks for the modified name.
11590         Also, seems liable to break when compiling multiple source files at
11591         once.  So the simplest is to just remove incomplete_class_list -
11592         it is only a minor space win and it is not even clear it saves time.
11594         * parse.y (resolve_class):  Remove unneeded promote_type.
11596 2001-03-15  Per Bothner  <per@bothner.com>
11598         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
11599         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
11600         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11601         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11603         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
11604         * parse.y (java_expand_classes):  Likewise.
11606         * parse.y (expand_start_java_method):  Was only called once and had a
11607         misleading name, so inline in caller java_complete_expand_method.
11608         (enter_a_block):  Likewise inline in enter_block and remove.
11610         Remove junk from when gcc/java was created (by copying from C/C++).
11611         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
11612         (struct binding_level):  Remove fields keep, keep_if_subblocks,
11613         more_cleanups_ok, have_cleanups (which have never been used).
11614         (pushlevel, poplevel):  Remove related useless code.
11616         * class.c (make_class_data):  The class_dtable_decl (i.e. the
11617         vtable for Class) should be external, except when compiling Class.
11619         * jvspec.c (lang_specific_driver):  Fix -C handling.
11620         Check -save-temps to see if temp @FILE should be deleted.
11621         Follow-up to/fix for February 16 patch.
11623         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
11624         (type_stack_dup):  Remove no-longer neded error check.
11626 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
11628         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11629         to 'for_pointer'. If this type is for a pointer (argument) mangling,
11630         don't surround the element with 'N..E' if the type name is
11631         unqualified.
11633 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11635         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11636         DECL_RTL_SET_P, etc.
11637         (make_method_value): Likewise.
11638         (get_dispatch_table): Likewise.
11640         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11642 2001-03-07  Tom Tromey  <tromey@redhat.com>
11644         * config-lang.in (lang_requires): Define.
11646 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
11648         * typeck.c (convert): Check flag_unsafe_math_optimizations,
11649         not flag_fast_math.
11651 2001-03-05  Per Bothner  <per@bothner.com>
11653         Fix a problem where rest_of_decl_compilation applied to
11654         class_dtable_decl causes problems because it was done too early,
11655         before output file was opened.
11656         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
11657         * class.c (class_dtable_decl):  Add macro - element of class_roots.
11658         (make_class_data):  Define class_dtable_decl.
11659         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
11661 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11663         * java/class.c, java/decl.c, java/java-tree.h: Replace all
11664         uses of 'boolean' with 'bool'.
11666 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11668         * lang-specs.h: Add zero initializer for cpp_spec field to all
11669         array elements.
11671 2001-02-16  Per Bothner  <per@bothner.com>
11673         Handle compiling multiple input files at once, and @FILE syntax.
11674         * gcj.texi:  Updated documentation to match.
11675         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
11676         * jcf-parse.c (parse_source_file):  Split into ...
11677         (parse_source_file_1):  New function - and:
11678         (parse_source_file_2):  New function.
11679         (yyparse):  On -ffilelist-file, open and scan named file.
11680         On first pass over files, only do parse_source_file_1.
11681         A new second pass calls parse_source_file_2 for each file to compile.
11682         (init_jcf_parse):  Call init_src_parse.
11683         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
11684         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
11685         as multiple input file combined in one compilation.
11686         * lang-options.h:  Add -ffilelist-file
11687         * lang.c (flag_filelist_file):  New flag variable.
11688         (lang_f_options):  Handle -ffilelist-file.
11689         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11690         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
11691         gclass_list - use global fields of src_parse_roots instead.
11692         * parse.y (src_parse_roots):  New array.
11693         (incomplete_class_list, gclass_list):  New macros.
11694         (push_parser_context, java_pop_parser_context,
11695         java_parser_context_resume):  Don't fiddle with deleted fields.
11696         (various):  Use incomplete_class gclass_list and global macros
11697         instead of parse_ctxt fields - the lists are global.
11698         (init_src_parse):  New function.
11700 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11702         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11704 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11706         * parse.y (check_inner_class_access): Moved declaration of local
11707         `enclosing_decl_type' to the right location.
11709 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
11711         * parse.y (parser_check_super_interface): Don't call
11712         check_pkg_class_access for an inner interface.
11713         (parser_check_super): Don't call check_pkg_class_access for inner
11714         class.
11715         (do_resolve_class): Simplify enclosing type loop. Don't call
11716         check_pkg_class_access if CL and DECL are not set.
11717         (find_in_imports_on_demand): Set DECL if class_type needed to be
11718         loaded. Don't call check_pkg_class_access for an inner class.
11719         (check_inner_class_access): Rewritten to implement member access
11720         rules as per spec 6.6.1.
11721         (check_pkg_class_access): Handle the empty package correctly.
11722         (in_same_package): New function. Determine if two classes are in the
11723         same package.
11725 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
11727         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11728         method into array types.
11729         * parse.y (patch_method_invocation): Bypass access check on clone call
11730         to array instance.
11732 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
11734         * expr.c (build_instanceof): Check for arrays when trying fold to
11735         false.
11737 2001-02-15  Jim Meyering  <meyering@lucent.com>
11739         * Make-lang.in (java.install-common): Depend on `installdirs'.
11740         (java.install-info): Likewise.
11742 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
11744         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11746 2001-02-14  Tom Tromey  <tromey@redhat.com>
11747             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11749         Fix for PR java/1261.
11750         * typeck.c (build_java_array_type): Add public `clone' method to
11751         arrays.
11752         * parse.y (resolve_qualified_expression_name): Use current_class
11753         when checking for inaccessibility.
11754         (patch_method_invocation): Fixed error message when accessibility
11755         denied.  Added `from_super' argument.
11757 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11759         * parse.y (resolve_class): Don't build a fake decl. Use the one
11760         already built.
11761         * typeck.c (build_java_array_type): Build and assign decl to array
11762         type.
11764 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11766         * parse.y (not_accessible_p): Changed leading comment. Added extra
11767         `where' argument. Use it to enforce protected access rules.
11768         (resolve_qualified_expression_name): Added extra argument to
11769         not_accessible_p.
11770         (patch_method_invocation): Use argument `primary' to provide
11771         not_accessible_p with an extra argument.
11772         (lookup_method_invoke): Added extra argument to not_accessible_p.
11773         (search_applicable_method_list): Likewise.
11775 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
11777         * parse.y (resolve_qualified_expression_name): Try to resolve as
11778         an inner class access only if `decl' is a TYPE_DECL.
11780 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11782         * decl.c (classdollar_identifier_node): Initialize.
11783         * java-tree.h (enum java_tree_index): New entry
11784         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11785         (classdollar_identifier_node): New macro.
11786         (ID_CLASSDOLLAR_P): Likewise.
11787         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11788         (build_dot_class_method_invocation): Likewise.
11789         (find_applicable_accessible_methods_list): `class$' can't be
11790         inherited.
11792 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
11794         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11796 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11798         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11799         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11800         gone.
11802 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11804         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11805         outside of the `__U' sequence too.
11806         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11807         sequence too.
11809 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11811         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11813 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11815         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11816         (JVGENMAIN_OBJS): Likewise.
11817         * java-tree.h (append_gpp_mangled_name): New prototype.
11818         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11819         Removed cast calling `gcc_add_root.'
11820         * jvgenmain.c (mangle_obstack): New global, initialized.
11821         (main): Use it.
11822         (do_mangle_class): Constify local `ptr.'
11823         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11824         append_gpp_mangle_name and update `count' if necessary.
11825         Use `mangle_obstack.'
11826         * mangle.c (append_unicode_mangled_name): Removed.
11827         (append_gpp_mangled_name): Likewise.
11828         (unicode_mangling_length): Likewise.
11829         (mangle_member_name): Return type set to `void.'
11830         (mangle_field_decl): Don't append `U' in escaped names.
11831         (mangle_method_decl): Likewise.
11832         (mangle_member_name): Just use `append_gpp_mangled_name.'
11833         * mangle_name.c: New file.
11835 2001-02-07  Per Bothner  <per@bothner.com>
11837         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
11839         * check-init.c (check_init):  Don't call done_alternative after
11840         processing loop code, as a LOOP_EXPR never terminates normally.
11842 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11844         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11846 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11848         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11849         DECLs.
11851 2001-02-06  Tom Tromey  <tromey@redhat.com>
11853         * lex.c (java_new_lexer): Longer error message.
11855 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
11856             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11858         * typeck.c (build_prim_array_type): Added leading comment.
11859         (build_java_array_type): Moved locals out of
11860         block. Always create the `data' field, fixed alignment to match
11861         C++.
11863 2001-02-04  Tom Tromey  <tromey@redhat.com>
11865         * expr.c (java_lang_expand_expr): Don't bother recomputing
11866         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
11867         Fixes PR java/1866.
11869 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11871         * parse.y (process_imports): Save the original name of the import
11872         for better error report.
11874 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
11876         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11877         of macros used when compiling jvspec.c.
11878         * jvspec.c (lang_specific_driver): Link with the shared
11879         libgcc by default.
11881 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11883         * check-init.c (check_init): Call internal_error instead of fatal.
11884         * expr.c (java_lang_expand_expr): Likewise.
11885         * jcf-parse.c (get_constant): Likewise.
11886         * mangle.c (java_mangle_decl): Likewise.
11887         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11888         (operator_string): Likewise.
11889         * check-init.c (check_init): Call abort instead of fatal.
11890         * class.c (build_class_ref): Likewise.
11891         * constants.c (write_constant_pool): Likewise.
11892         * decl.c (start_java_method): Likewise.
11893         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11894         (java_stack_dup, encode_newarray_type): Likewise.
11895         (build_java_array_length_access): Likewise.
11896         (build_java_check_indexed_type, expand_java_pushc): Likewise.
11897         (build_java_soft_divmod, build_invokeinterface): Likewise.
11898         * java-tree.h (INNER_CLASS_P): Likewise.
11899         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11900         (give_name_to_class, get_class_constant): Likewise.
11901         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11902         (find_constant_index, generate_bytecode_conditional): Likewise.
11903         (generate_bytecode_insns, perform_relocations): Likewise.
11904         * lex.c (java_unget_unicode, java_lex): Likewise.
11905         * mangle.c (mangle_type, mangle_record_type): Likewise.
11906         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11907         (finish_mangling): Likewise.
11908         * parse.h (MARK_FINAL_PARMS): Likewise.
11909         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11910         (obtain_incomplete_type, java_complete_class): Likewise.
11911         (java_check_regular_methods, java_complete_expand_method): Likewise.
11912         (cut_identifier_in_qualified, check_deprecation): Likewise.
11913         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11914         (java_complete_lhs, lookup_name_in_blocks): Likewise.
11915         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11916         * typeck.c (set_local_type, parse_signature_type): Likewise.
11917         (parse_signature_string, build_java_signature): Likewise;
11918         (set_java_signature): Likewise.
11919         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11920         * class.c (add_method): Call fatal_error instead of fatal.
11921         (build_static_field_ref): Likewise.
11922         * expr.c (build_known_method_ref, expand_invoke): Likewise.
11923         * jcf-parse.c (get_constant, jcf_parse): Likewise.
11924         * lex.c (java_new_new_lexer): Likewise.
11925         * jv-scan.c (main): Likewise.
11926         (fatal_error): Renamed from fatal.
11927         * jcf-parse.c (yyparse): Call fatal_io_error instead of
11928         pfatal_with_name.
11929         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11930         (yyparse): Likewise.
11931         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11932         * lex.c (java_get_line_col): Likewise.
11933         * jcf-parse.c (load_class): Make errors non-fatal.
11934         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11936 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
11938         * jvgenmain.c (class_mangling_suffix): Remove unused string.
11939         (error): Remove unused function.
11940         (main): Don't use "__attribute__ alias" on generated class symbol.
11942 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11944         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11945         argument.
11946         * parse.y (finish_method_declaration): Code accounting for WFLed
11947         method DECL_NAMEs deleted.
11948         (check_abstract_method_definitions): Likewise.
11949         (resolve_type_during_patch): Layout resolved type.
11950         * typeck.c (lookup_do): Removed unused local.
11952 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
11954         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11955         * decl.c (init_decl_processing): Use integer_minus_one_node, not
11956         integer_negative_one_node.
11957         * expr.c (build_java_binop): Likewise.
11959 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
11961         * zextract.c (read_zip_archive): Read file_offset before writing
11962         zipd and consequently clobbering the header contents.
11964 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11966         * Make-lang.in: Remove all dependencies on defaults.h.
11967         * decl.c: Don't include defaults.h.
11968         * expr.c: Likewise.
11969         * parse.y: Likewise.
11971 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11973         * ChangeLog (2001-01-21): Fixed typo.
11974         * class.c (layout_class_method): Code accounting for WFLed
11975         method DECL_NAMEs deleted.
11976         * constant.c (find_methodref_index): Likewise.
11977         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11978         * java-tree.h (DECL_FUNCTION_WFL): New macro.
11979         (struct lang_decl): New field `wfl'.
11980         (java_get_real_method_name): Prototype deleted.
11981         * mangle.c (mangle_method_decl): Code accounting for WFLed
11982         method DECL_NAMEs deleted.
11983         * parse.h (GET_METHOD_NAME): Macro deleted.
11984         * parse.y (reset_method_name): Deleted.
11985         (method_header): Set DECL_FUNCTION_WFL.
11986         (check_abstract_method_header): Code accounting for WFLed method
11987         DECL_NAMEs deleted.
11988         (java_get_real_method_name): Deleted.
11989         (check_method_redefinition): Code accounting for WFLed method
11990         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11991         (java_check_regular_methods): Likewise.
11992         (java_check_abstract_methods): Likewise.
11993         (java_expand_classes): Don't call `reset_method_name.'
11994         (search_applicable_method_list): Use DECL_NAMEs instead of
11995         GET_METHOD_NAME.
11996         * typeck.c (lookup_do): Code accounting for WFLed method
11997         DECL_NAMEs deleted.
11999 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
12001         * lex.c (java_read_char): Check for EOF from getc first.
12003 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12005         * class.c (layout_class): Don't lay the superclass out if it's
12006         already being laid out.
12007         * jcf-parse.c (handle_innerclass_attribute): New function.
12008         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12009         handle_innerclasses_attribute.
12010         (jcf_parse): Don't load an innerclasses if it's already being
12011         laid out.
12012         * jcf-write.c (append_innerclass_attribute_entry): Static
12013         `anonymous_name' and its initialization deleted. `ocii' and `ini'
12014         to be zero for anonymous classes.
12016 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12018         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12019         necessary.
12020         * jcf-parse.c (set_source_filename): Use
12021         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12023 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12025         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12026         gets a unique asm name.
12028 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12030         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12031         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12032         if necessary.
12033         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12034         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12035         * parse.y (lookup_package_type_and_set_next): Deleted.
12036         (resolve_package): Removed unnecessary code.
12037         (find_applicable_accessible_methods_list): `finit$' can't be
12038         inherited.
12039         * verify.c (pop_argument_types): Added missing prototype.
12041 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
12043         * config-lang.in: Disable java by default.
12045 2001-01-23  Tom Tromey  <tromey@redhat.com>
12047         * gcj.texi (Copying): New node.
12048         Added copyright information.
12050 2001-01-21  Per Bothner  <per@bothner.com>
12052         Various fixes to allow compiling a compressed .jar/.zip archive.
12053         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
12054         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
12055         (struct ZipDirectory):  New field zipf points to owning ZipFile.
12056         * jcf.h (struct ZipDirectory):  Add forward declaration.
12057         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
12058         Remove seen_in_zip and zip_offset fields.
12059         (JCF_SEEN_IN_ZIP):  New macro.
12060         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
12061         * jcf-io.c:  Change all ZipFileCache to ZipFile.
12062         (read_zip_member):  New function.
12063         (open_in_zip):  Call read_zip_member.
12064         * jcf-parse.c (find_in_current_zip):  Remove function.
12065         (read_class):  Merge in find_in_current_zip functionality.
12066         Call read_zip_member if needed.
12067         (parse_zip_file_entries):  Use read_zip_member.
12068         (process_zip_dir):  Update for removed and added JCF fields.
12069         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
12071 2001-01-21  Per Bothner  <per@bothner.com>
12073         Minor optimization of static ggc roots.
12074         * jcf-parse.c (parse_roots):  New static field.
12075         (current_field, current_method, current_file_list):  Replace by macros
12076         naming fields of parse_roots.
12077         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
12078         * class.c (class_roots):  New static field.
12079         (registered_class, fields_ident, info_ident, class_list):
12080         New macros naming fields of parse_roots.
12081         (build_static_field_ref):  Don't register roots here.
12082         (layout_class):  Static field list replaced by macro class_list.
12083         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
12084         Initialize fields_ident and info_ident here.
12086 2001-01-21  Per Bothner  <per@bothner.com>
12088         * jcf-parse.c (ggc_mark_jcf):  New function.
12089         (init_jcf_parse):  Register current_jcf as ggc root.
12091 2001-01-21  Per Bothner  <per@bothner.com>
12093         * lang.c (put_decl_node):  Print method's name.
12095 2001-01-21  Per Bothner  <per@bothner.com>
12097         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
12098         (verify_jvm_instructions):  Use it, for better error messages on loads.
12100 2001-01-21  Per Bothner  <per@bothner.com>
12102         * verify.c (merge_type_state):  Still may have to merge even if
12103         LABEL_VERIFIED (label).
12105 2001-01-21  Per Bothner  <per@bothner.com>
12107         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
12108         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12110 2001-01-19  Per Bothner  <per@bothner.com>
12112         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
12113         if expeting an interface type.  Refines Tom's change of 2000-09-12.
12115 2001-01-18  Per Bothner  <per@bothner.com>
12117         * gcj.texi (Input Options): Mention .java files.
12119 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12121         * lang-options.h (-Wunsupported-jdk11): Removed.
12122         * lang.c (flag_not_overriding): Deleted.
12123         (flag_static_local_jdk1_1): Likewise.
12124         (lang_W_options): Removed "unsupported-jdk11" entry.
12125         * parse.y (java_check_methods): Removed dead code.
12127 2001-01-17  Tom Tromey  <tromey@redhat.com>
12129         Changes suggested by Per Bothner:
12130         * gcj.texi (Input Options): Don't mention input files.
12131         (Code Generation): Updated --main information.
12132         (Invoking jcf-dump): Mention that --javap is incomplete.
12133         From Alexandre Petit-Bianco:
12134         (Warnings): Don't mention -Wunsupported-jdk11.
12135         My stuff:
12136         (Compatibility): Mention JDK 1.2-ness of libraries.
12137         (Resources): Mention resources used when writing gcj.
12139 2001-01-17  Tom Tromey  <tromey@redhat.com>
12141         * gcj.texi: New file.
12142         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12143         (java.info): Depend on gcj.info.
12144         (java/gcj.dvi): New target.
12145         (java.dvi): Depend on gcj.dvi.
12146         (java.install-info): Wrote.
12148 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
12150         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12151         having called make_decl_rtl.
12153 2001-01-14  Per Bothner  <per@bothner.com>
12155         Various patches to emit better messages on verification errors.
12156         * expr.c (push_type_0):  Return error indication on stack overflow,
12157         instead of callinfg fatal.
12158         (push_type):  Now just call push_type_0 (nd fatal on overflow).
12159         (pop_type_0):  Return detailed error message (in a char** argument).
12160         (pop_type):  If pop_type_0 fails, print error message.
12161         (pop_argument_types):  Moved to verify.c.
12162         * verify.c (pop_argument_types):  Moved from expr.c.
12163         Return a (possible) error message, rather than void.
12164         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
12165         (verify_jvm_instruction):  Use new macros, improving error messages.
12166         For case OPCODE_astore use object_ptr_type_node.
12167         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
12168         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
12170         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12171         constant, return body without wrapper.  (Improves constant folding.)
12172         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
12174 2001-01-13  Per Bothner  <per@bothner.com>
12176         * expr.c (expand_java_field_op):  Assigning to a final field outside
12177         an initializer does not violate JVM spec, so should be warning, not
12178         error.  (Sun's verifier does not complain - though MicroSoft's does.)
12180 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
12182         * gjavah.c (version), jcf-dump.c (version): Update copyright year
12183         to 2001.
12185 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
12187         * parse.y (resolve_expression_name): Permit instance variables from
12188         enclosing context in super constructor call.
12189         (resolve_qualified_expression_name): Permit enclosing class's qualified
12190         "this" in super constructor call.
12192 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12194         * class.c (build_utf8_ref): Remove last argument in call to
12195         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12196         (build_class_ref): Likewise.
12197         (build_static_field_ref): Likewise.
12198         (get_dispatch_table): Likewise.
12199         (layout_class_method): Likewise.
12200         (emit_register_classes): Likewise.
12201         * constants.c (build_constant_data_ref): Likewise.
12202         * decl.c (builtin_function): Likewise.
12203         (create_primitive_vtable): Likewise.
12204         * expr.c (build_known_method_def): Likewise.
12205         (build_jni_stub): Likewise.
12206         (java_lang_expand_expr): Likewise.
12208 2001-01-10  Tom Tromey  <tromey@redhat.com>
12210         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12212 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12214         * java-tree.h (lang_printable_name_wls): New prototype.
12215         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12216         rather than `current_class' to print type name. Don't prepend type
12217         names when printing constructor names.
12218         (lang_printable_name_wls): New function.
12219         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12220         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12221         * parse.y (patch_method_invocation): Message tuned for constructors.
12222         (not_accessible_p): Grant `private' access from within
12223         enclosing contexts.
12225 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12227         All files with updated copyright when applicable.
12228         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12229         * class.c (mangle_class_field): Function removed.
12230         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12231         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12232         (build_class_ref): Call `java_mangle_class_field' instead of
12233         `mangle_class_field.'
12234         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12235         (layout_class): Call `java_mangle_decl' instead of
12236         `mangle_static_field.'
12237         (cxx_keywords): Initialized static array moved to `lex.c.'
12238         (layout_class_method): Changed leading comment. Simplified to
12239         call `java_mangle_decl.' Local `ptr' moved in for loop body.
12240         * decl.c (lang_mark_tree): Mark field `package_list.'
12241         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12242         (struct lang_type): New field `package_list.'
12243         (unicode_mangling_length): Prototype removed.
12244         (append_gpp_mangled_name, append_gpp_mangled_classtype,
12245         emit_unicode_mangled_name): Likewise.
12246         (cxx_keyword_p): New prototype.
12247         (java_mangle_decl, java_mangle_class_field,
12248         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12249         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12250         `build_expr_wfl.'
12251         * jvgenmain.c (main_method_prefix): Global variable removed.
12252         (main_method_suffix): Likewise.
12253         (do_mangle_classname): New function.
12254         (main): Call it. Format changed to accommodate new mangling scheme.
12255         * lex.c: (utf8_cmp): Conditionally prototyped.
12256         (cxx_keywords): Moved from class.c, conditionally defined.
12257         (utf8_cmp, cxx_keyword_p): Likewise.
12258         * mangle.c (obstack.h, ggc.h): Included.
12259         (mangle_field_decl): New function.
12260         (mangle_method_decl, mangle_type, mangle_pointer_type,
12261         mangle_array_type, mangle_record_type,
12262         find_compression_pointer_match, find_compression_array_match,
12263         find_compression_record_match,
12264         find_compression_array_template_match, set_type_package_list,
12265         entry_match_pointer_p, emit_compression_string, init_mangling,
12266         finish_mangling, compression_table_add, mangle_member_name): Likewise.
12267         (mangle_obstack): New global.
12268         (MANGLE_RAW_STRING): New macro.
12269         (unicode_mangling_length): Turned static.
12270         (append_unicode_mangled_name): Renamed from
12271         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
12272         replaces `obstack', removed from the parameter list.
12273         (append_gpp_mangled_name): Turned static. `mangle_obstack'
12274         replaces parameter `obstack', removed from the parameter list. Call
12275         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12276         (append_gpp_mangled_classtype): Removed.
12277         (compression_table, compression_next): New static variables.
12278         * parse.y (temporary_obstack): Extern declaration removed.
12280 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12282         * parse.y (patch_binop): Compute missing type in error situations.
12284 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
12286         * class.c (make_class_data): Push initial value for "arrayclass".
12287         * decl.c (init_decl_processing): Add new class field "arrayclass".
12289 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
12291         From patha@softlab.ericsson.se:
12292         * parse.y (switch_label): Use build, not build1, to construct
12293         DEFAULT_EXPR.
12295 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
12297         * lang.c (lang_decode_option): Change -MA to -MP.
12298         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12299         Update to new prototype; do quote targets.
12300         (jcf_dependency_write): Update.
12302 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
12304         Shorten primitive array allocation path:
12305         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12306         to create new primitive arrays.
12307         * expr.c (build_newarray): If generating native code, call
12308         soft_newarray_node with a reference to the primitive TYPE identifier
12309         instead of type_value.
12311 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
12313         Fix for PRs gcj/312 and gcj/253:
12314         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12315         dest if they arn't already.
12316         * class.c (layout_class): Call maybe_layout_super_class on
12317         superinterfaces also, but only if compiling from bytecode.
12319         Fix for PR gcj/373:
12320         * parse.y (create_class): Set ACC_STATIC if class is declared in an
12321         interface.
12323 2000-12-15  Tom Tromey  <tromey@redhat.com>
12325         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12326         set.
12328 2000-12-14  Andrew Haley  <aph@redhat.com>
12330         * boehm.c (mark_reference_fields): Change test to correctly detect
12331         bitmap overflow.
12333 2000-12-15  Andreas Jaeger  <aj@suse.de>
12335         * config-lang.in (lang_dirs): Added.
12337 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12339         * parse.y (end_artificial_method_body): Fixed undefined behavior.
12340         Credits go to rth for finding it.
12342 2000-12-13  Mike Stump  <mrs@wrs.com>
12344         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12346 2000-11-07  Tom Tromey  <tromey@cygnus.com>
12348         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12349         * lex.c (java_ignorable_control_p): Removed.
12350         (java_letter_or_digit_p): Removed.
12351         (java_start_char_p): New function.
12352         (java_read_char): Return `int', not `unicode_t'.  Changed
12353         callers.
12354         (java_read_unicode): Likewise.
12355         (java_read_unicode_collapsing_terminators): Likewise.
12356         (java_get_unicode): Likewise.
12357         (java_new_lexer): Initialize hit_eof.
12358         (java_parse_end_comment): Take `int' argument.
12359         (java_parse_doc_section): Likewise.
12360         (java_parse_escape_sequence): Don't allow backlash-newline.
12361         Return `int'.
12362         * lex.h (JAVA_DIGIT_P): Removed.
12363         (_JAVA_LETTER_OR_DIGIT_P): Removed.
12364         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12365         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12366         (JAVA_PART_CHAR_P): New macro.
12367         (UEOF): Now -1.
12368         (JAVA_CHAR_ERROR): Now -2.
12369         (java_lexer): New field `hit_eof'.
12370         * chartables.h: New file.
12371         * gen-table.pl: new file.
12373 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12374             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12376         * parse.y (java_complete_lhs): Only allow compound assignment of
12377         reference type if type is String.
12379 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12381         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12382         jcf-path.c: Likewise.
12384 2000-12-09  Anthony Green  <green@redhat.com>
12386         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12387         filestart and filename_length as int values.
12389 2000-12-07  Mo DeJong  <mdejong@redhat.com>
12391         * jcf-io.c (find_class): Correct the logic that tests to see if a
12392         .java file is newer than its .class file. The compiler was
12393         incorrectly printing a warning when file mod times were equal.
12395 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
12397         * jvgenmain.c: Use ISPRINT not isascii.
12399 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12401         * parse.y (end_artificial_method_body): Fixed typo.
12403 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12405         * parse.y (patch_method_invocation): Pick the correct enclosing
12406         context when creating inner class instances.
12407         Fixes gcj/332.
12409 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
12411         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12412         Update copyright year to 2000.
12414 2000-11-23  Anthony Green  <green@redhat.com>
12416         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12417         Move current_file_list out of yyparse and make it static.
12419         * expr.c: Declare quick_stack and tree_list_free_list as static
12420         (init_expr_processing): Register quick_stack and
12421         tree_list_free_list roots.
12423 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12425         * parse.y (build_outer_field_access): New local `decl_ctx', use
12426         it. Check for field's context and current class immediate outer
12427         context inheritance.
12428         (outer_field_access_p): Consider fields inherited from the last
12429         enclosing context.
12430         (build_access_to_thisn): Stop at the last enclosing context if
12431         necessary.
12432         Fixes gcj/367.
12434 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12436         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12438 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
12440         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12441         scratch buffer.
12443 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12445         * jv-scan.c (help): Document --complexity.
12446         (options): Added --complexity.
12447         (flag_complexity): New global.
12448         (main): Call `report'.
12449         * parse-scan.y (complexity): New global.
12450         (if_then_statement, if_then_else_statement,
12451         if_then_else_statement_nsi, switch_block_statement_group,
12452         while_expression, do_statement, for_begin, continue_statement,
12453         throw_statement, catch_clause, finally, method_invocation,
12454         conditional_and_expression, conditional_or_expression,
12455         conditional_expression): Update complexity.
12456         (reset_report): Reset complexity.
12457         (report): New function.
12459 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12461         * lex.c (yylex): Added STRICT_TK case.
12462         * parse.y (STRICT_TK): Added.
12463         * parse-scan.y (STRICT_TK): Added.
12464         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12465         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
12466         file.
12467         * keyword.h: Rebuilt.
12468         * keyword.gperf (strictfp): Added.
12470 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12472         * lex.c (yylex): Recognize floating point constants with leading
12473         0.
12475 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12477         * java-tree.h (cyclic_inheritance_report): Constify.
12478         * parse.y (cyclic_inheritance_report): Likewise.
12480 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12482         * parse.y (goal): Remove call to ggc_add_string_root.
12484 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12486         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12487         Create string in scratch buffer, then pass to build_string.
12489 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12491         * parse.y (issue_warning_error_from_context): Add
12492         ATTRIBUTE_PRINTF.
12494 2000-11-11  Anthony Green  <green@redhat.com>
12496         * jcf-parse.c (process_zip_dir): Add finput parameter.
12497         (jcf_figure_file_type): Call process_zip_dir with appropriate
12498         argument.
12500 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12502         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12503         * jcf-parse.c (jcf_figure_file_type): Likewise.
12505 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12507         * parse.y (create_new_parser_context): Use memset () instead of
12508         bzero ().
12510 2000-11-08  Tom Tromey  <tromey@cygnus.com>
12512         * gjavah.c (process_file): Only include gcj/cni.h when generating
12513         CNI stubs.
12515 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12517         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12518         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12519         instead of bzero ().
12521 2000-11-05  Tom Tromey  <tromey@cygnus.com>
12523         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12524         * lex.c (IS_ZERO): New define.
12525         (java_perform_atof): Error on floating point underflow.
12527 2000-11-04  Tom Tromey  <tromey@cygnus.com>
12529         * lex.c (java_parse_escape_sequence): Only read two octal
12530         characters if the first one is greater than 3.  Don't allow
12531         "octal" numbers to include the digits 8 or 9.
12533 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12535         * Make-lang.in (java.distdir): Remove.
12537 2000-11-03  Tom Tromey  <tromey@cygnus.com>
12539         * Make-lang.in (java.dvi): New target.
12540         Partial fix for PR other/567.
12542         * lang-options.h: Mention -Wout-of-date.
12543         * jcf-dump.c (flag_newer): New global.
12544         * gjavah.c (flag_newer): New global.
12545         * jcf-io.c (find_class): Only warn when flag_newer set.
12546         * lang.c (flag_newer): New global.
12547         (struct string_option): New declaration.
12548         (lang_W_options): New global.
12549         (process_option_with_no): New function.
12550         (lang_decode_option): Use it.
12552         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12553         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12554         `$'.
12556         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12557         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12558         * lex.c (java_read_unicode): Removed `term_context' argument.
12559         Recognize any number of `u' in `\u'.
12560         (java_read_unicode_collapsing_terminators): New function.
12561         (java_get_unicode): Use it.
12562         (java_lineterminator): Removed.
12563         (yylex): Produce error if character literal is newline or single
12564         quote.  Return if eof found in middle of `//' comment.  EOF in
12565         `//' comment is only an error if pedantic.
12566         (java_ignorable_control_p): New function.
12567         (java_parse_end_comment): Return if eof found in middle of
12568         comment.
12569         Include flags.h.
12570         * jv-scan.c (pedantic): New global.
12572 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12574         * parse.y (outer_field_access_p): Inherited fields aren't
12575         consider outer fields.
12576         (maybe_build_thisn_access_method): Use
12577         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12578         (resolve_expression_name): Trigger an error if a static field
12579         is being accessed as an outer field.
12581 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12583         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12584         Fixes gcj/365.
12586 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12588         * Make-lang.in: Move all build rules here from Makefile.in,
12589         adapt to new context.  Wrap all rules that change the current
12590         directory in parentheses.  Expunge all references to $(P).
12591         When one command depends on another and they're run all at
12592         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12593         all object-file generation rules.  Delete obsolete variables.
12595         * Makefile.in: Delete.
12596         * config-lang.in: Delete outputs= line.
12598 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12600         * parse.y (patch_method_invocation): NULLify this_arg when already
12601         inserted.
12602         (maybe_use_access_method): Handle call to methods unrelated to the
12603         current class. Fixed comment.
12604         Fixes gcj/361.
12606 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12608         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12609         scope.
12611 2000-10-24  Tom Tromey  <tromey@cygnus.com>
12613         * lex.c (java_new_lexer): Initialize new fields.  Work around
12614         broken iconv() implementations.
12615         (java_read_char): Swap bytes if required.  Use fallback decoder if
12616         required.
12617         (byteswap_init, need_byteswap): New globals.
12618         (java_destroy_lexer): Only close iconv handle if it is in use.
12619         * lex.h (java_lexer): New fields read_anything, byte_swap,
12620         use_fallback.
12621         Made out_buffer unsigned.
12623 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12625         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12626         where an enclosing context can be set on the jdep.
12627         (do_resolve_class): Fixed identation.
12629 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12631         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12633         * jcf-reader.c (peek_attribute, skip_attribute): Only define
12634         when requested.
12636         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12638         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12640 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12642         * jcf-write.c (OP1): Update `last_bc'.
12643         (struct jcf_block): Fixed indentation and typo in comments.  New
12644         field `last_bc'.
12645         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12646         follows `monitorenter'.
12647         * parse.y (patch_synchronized_statement): New local `tmp'. Call
12648         `patch_string'.
12649         Fixes gcj/232.
12651 2000-10-16  Tom Tromey  <tromey@cygnus.com>
12653         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12654         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12655         * lang-options.h: Added -MA, -MT, -MF..
12656         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12657         (DEPEND_TARGET_SET): New macro.
12658         (DEPEND_FILE_ALREADY_SET): Likewise.
12659         (init_parse): Handle new flags.
12660         * jcf.h (jcf_dependency_print_dummies): Declare.
12661         * Make-lang.in (s-java): Added mkdeps.o.
12662         * Makefile.in (BACKEND): Added mkdeps.o.
12663         (../gcjh$(exeext)): Added mkdeps.o.
12664         (../jcf-dump$(exeext)): Added mkdeps.o.
12665         * jcf-depend.c: Include mkdeps.h.
12666         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12667         add_entry): Removed.
12668         (jcf_dependency_reset): Rewrote.
12669         (dependencies): New global.
12670         (jcf_dependency_set_target): Rewrote.
12671         (jcf_dependency_add_target): Likewise.
12672         (jcf_dependency_add_file): Likewise.
12673         (munge): Removed.
12674         (print_ents): Removed.
12675         (jcf_dependency_write): Rewrote.
12676         (print_dummies): New global.
12677         (jcf_dependency_print_dummies): New function
12678         (jcf_dependency_write): Call deps_dummy_targets if required.
12680 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12682         * gjavah.c (add_class_decl): Removed unused variables `tname',
12683         `tlen' and `name_index'.
12684         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12685         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12686         in `wfl_operator' with value.
12687         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12688         (jcf_figure_file_type): Fixed identation.
12689         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12690         * parse.y (analyze_clinit_body): New function.
12691         (static_initializer:): Reset `current_static_block'.
12692         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12693         `wfl_operator' with new value.
12694         (lookup_cl): Use EXPR_WFL_FILENAME.
12695         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12696         analyze_clinit_body.
12697         (build_outer_field_access): Access to this$<n> built from
12698         current_class, not its outer context.
12699         (build_access_to_thisn): Fixed leading comment. Tidied things up.
12700         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12701         (patch_method_invocation): Use `is_static_flag' when already
12702         initialized.
12703         (patch_newarray): Removed assignment in ternary operator.
12705 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12707         * except.c (free_eh_ranges): Don't free `whole_range'.
12709 2000-10-15  Anthony Green  <green@redhat.com>
12711         * decl.c (init_decl_processing): Call init_class_processing before
12712         anything else.
12714 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12716         * check-init.c (check_init): Fixed leading comment. Use
12717         LOCAL_FINAL_P.
12718         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12719         (give_name_to_locals): Likewise.
12720         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12721         fields in lang_decl_var.
12722         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12723         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12724         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12725         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12726         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12727         (LOCAL_FINAL): Rewritten.
12728         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12729         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12730         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12731         `init_final' fields.
12732         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12733         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12734         (TYPE_HAS_FINAL_VARIABLE): New macro.
12735         (struct lang_type): Added `afv' field.
12736         * parse.y (check_static_final_variable_assignment_flag): New function.
12737         (reset_static_final_variable_assignment_flag): Likewise.
12738         (check_final_variable_local_assignment_flag): Likewise.
12739         (reset_final_variable_local_assignment_flag): Likewise.
12740         (check_final_variable_indirect_assignment): Likewise.
12741         (check_final_variable_global_assignment_flag): Likewise.
12742         (add_inner_class_fields): Use LOCAL_FINAL_P.
12743         (register_fields): Handle local finals and final variables.
12744         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12745         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12746         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12747         on local finals.
12748         (java_complete_expand_methods): Loop to set
12749         TYPE_HAS_FINAL_VARIABLE. Call
12750         `reset_final_variable_local_assignment_flag' and
12751         `check_final_variable_local_assignment_flag' accordingly before
12752         and after constructor expansion. Call
12753         `reset_static_final_variable_assignment_flag'
12754         before expanding <clinit> and after call
12755         `check_static_final_variable_assignment_flag' if the
12756         current_class isn't an interface. After all methods have been
12757         expanded, call `check_final_variable_global_assignment_flag' and
12758         `check_static_final_variable_assignment_flag' if the current class
12759         is an interface.
12760         (maybe_yank_clinit): Fixed typo in comment.
12761         (build_outer_field_access_methods): Removed old sanity check. Use
12762         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12763         Don't create access methods for finals.
12764         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12765         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12766         existing DECL_INIT has been processed.
12767         (java_complete_lhs): Likewise.
12768         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12769         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12770         logic.
12771         (patch_assignment): Use LOCAL_FINAL_P.
12772         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12773         DECL_INITIAL is nullified.
12774         Fixes gcj/163.
12776 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12778         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12780         * Makefile.in (parse.c, parse-scan.c): Likewise.
12782 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12784         * class.c (temporary_obstack): Remove.
12785         (make_class): Don't mess with obstascks.
12786         (push_class): Likewise.
12787         (set_super_info): Likewise.
12788         (add_method_1): Likewise.
12789         (add_method): Likewise.
12790         (add_field): Likewise.
12791         (build_utf8_ref): Likewise.
12792         (build_class_ref): Likewise.
12793         (build_static_field_ref): Likewise.
12794         (finish_class): Likewise.
12795         (push_super_field): Likewise.
12796         (layout_class): Likewise.
12797         (layout_class_methods): Likewise.
12798         (init_class_processing): Likewise.
12799         * constants.c (get_tag_node): Likewise.
12800         (build_constant_data_ref): Likewise.
12801         * decl.c (ggc_p): Remove.
12802         (copy_lang_decl): Use ggc_alloc.
12803         (complete_start_java_method): Don't mess with obstacks.
12804         (start_java_method): Likewise.
12805         (end_java_method): Likewise.
12806         * except.c (link_handler): Use xmalloc.
12807         (free_eh_ranges): New function.
12808         (method_init_exceptions): Use it.
12809         (add_handler): Use xmalloc.
12810         (expand_start_java_handler): Don't mess with obstacks.
12811         (prepare_eh_table_type): Likewise.
12812         (expand_end_java_handler): Likewise.
12813         * expr.c (push_value): Likewise.
12814         (create_label_decl): Likewise.
12815         (build_jni_stub): Likewise.
12816         (java_lang_expand_expr): Likewise.
12817         (note_instructions): Use xrealloc.
12818         (java_push_constant_from_pool): Don't mess with obstacks.
12819         (process_jvm_instruction): Likewise.
12820         * java-tree.h (cyclic_inheritance_report): Remove duplicate
12821         declaration.
12822         * jcf-parse.c (get_constant): Don't mess with obstacks.
12823         (read_class): Likewise.
12824         (jcf_parse): Likewise.
12825         * lex.c (expression_obstack): Remove.
12826         (java_lex): Don't use obstack_free.
12827         * parse.h (exit_java_complete_class): Don't mess with obstacks.
12828         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12829         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12830         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12831         * parse.y (gaol): Add more GC roots.
12832         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12833         (lookup_field_wrapper): Likewise.
12834         (obtain_incomplete_type): Don't mess with obstacks.
12835         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12836         macros.
12837         (craft_constructor): Don't mess with obstacks.
12838         (safe_layout_class): Likewise.
12839         (java_complete_class): Likewise.
12840         (source_end_java_method): Likewise.
12841         (build_outer_field_access_methods): Likewise.
12842         (build_outer_method_access_method): Likewise.
12843         (maybe_build_thisn_access_method): Likewise.
12844         (build_dot_class_method_invocation): Likewise.
12845         (java_complete_tree): Likewise.
12846         (java_complete_lhs): Likewise.
12847         (do_merge_string_cste): Likewise.
12848         (patch_string_cst): Likewise.
12849         (array_constructor_check_entry): Likewise.
12850         * typeck.c (build_java_array_type): Likewise.
12851         (parse_signature_string): Likewise.
12852         (build_java_signature): Likewise.
12854 2000-10-12  Tom Tromey  <tromey@cygnus.com>
12856         Fix for PR gcj/356:
12857         * gjavah.c (add_class_decl): Don't special-case inner classes.
12858         (add_namelet): Likewise.
12860 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
12862         * java-tree.h: Constify current_encoding.
12863         * lang.c: Constify current_encoding.
12865 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
12867         * jvgenmain.c (class_mangling_suffix): Omit `.'.
12868         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12870 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12872         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12873         patch. Fixes gcj/340.
12875 2000-10-10  Tom Tromey  <tromey@cygnus.com>
12877         * lex.c (java_new_lexer): Initialize out_first and out_last
12878         fields.
12879         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12881 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12883         * parse.y (pop_current_osb): New function.
12884         (array_type:): Use `dims:', changed actions
12885         accordingly. Suggested by Anthony Green.
12886         (array_creation_expression:): Used pop_current_osb.
12887         (cast_expression:): Likewise.
12888         (search_applicable_method_list): Fixed indentation.
12890 2000-10-08  Anthony Green  <green@redhat.com>
12892         * parse.y (array_type_literal): Remove production.
12893         (type_literals): Refer to array_type, not array_type_literal.
12895 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12897         Patch contributed by Corey Minyard.
12898         * decl.c (check_local_named_variable): New function.
12899         (tree check_local_unnamed_variable): Likewise.
12900         (find_local_variable): Splitted. Call check_local_{un}named_variable.
12902 2000-10-07  Anthony Green  <green@redhat.com>
12904         * class.c (layout_class): Handle case where superclass can't be
12905         layed out yet.
12907 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12909         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12910         gperf.
12912 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12914         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12915         * jvgenmain.c (class_mangling_prefix): Removed.
12916         (class_mangling_suffix): New global.
12917         (main): Use it.
12918         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12919         `$'.
12920         (print_method_info): Handle overrides for static and final
12921         methods.
12922         (process_file): Generate declaration for class object field.
12923         * class.c (cxx_keywords): New array.
12924         (utf8_cmp): New function.
12925         (cxx_keyword_p): New function.
12926         (layout_class_method): Mangle C++ keywords by appending `$'.
12927         (mangle_field): New function.
12928         (mangle_class_field): Use mangle_field.  Mangle class name as
12929         `class$'.
12930         (mangle_static_field): Use mangle_field.
12932 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12934         * decl.c (find_local_variable): Removed uncessary type check and
12935         fixed range check typo. From Corey Minyard.
12937 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12939         * decl.c (give_name_to_locals): New local `code_offset'. Call
12940         `maybe_adjust_start_pc'.
12941         * expr.c (note_instructions): New function.
12942         (expand_byte_code): Don't collect insn starts here.
12943         (peek_opcode_at_pc): New function.
12944         (maybe_adjust_start_pc): Likewise.
12945         * java-tree.h (maybe_adjust_start_pc): Declare.
12946         (note_instructions): Likewise.
12947         * jcf-parse.c (parse_class_file): Call `note_instructions'.
12949 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12951         * parse.y (field_access:): Fixed indentation.
12952         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12954 2000-09-07  Tom Tromey  <tromey@cygnus.com>
12956         Fix for PR gcj/307:
12957         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12958         JPRIMITIVE_TYPE_P, for arithmetic operators.
12959         (patch_method_invocation): Indentation fix.
12960         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
12961         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12962         (do_unary_numeric_promotion): Cleaned up code.
12963         (valid_cast_to_p): Handle boolean correctly.
12965 2000-09-27  Tom Tromey  <tromey@cygnus.com>
12967         * lex.c (java_read_unicode): Reset bs_count when finished with
12968         `\u' sequence.
12970 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12972         Convert to GC.
12973         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12974         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12975         (typeck.o): Depend on ggc.h.
12976         * class.c (add_method_1): Use GC functions for allocation.
12977         (init_class_processing): Register roots.
12978         * decl.c (ggc_p): Set to 1.
12979         (pending_local_decls): Make it static.
12980         (push_jvm_slot): Use GC functions for allocation.
12981         (init_decl_processing): Register roots.
12982         (give_name_to_locals): Use GC functions for allocation.
12983         (lang_mark_tree): New function.
12984         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12985         functions for allocation.
12986         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12987         * lex.c (java_lex): Use build_string, rather than replicating it
12988         inline.
12989         * parse.y (goal): Add more roots.
12990         (mark_parser_ctxt): New function.
12991         * typeck.c: Include ggc.h.
12993 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12995         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12996         contains something else than MODIFY_EXPR.
12998 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
13000         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13001         * Makefile.in (parse.o): Depend on ggc.h.
13002         (class.o): Likewise.
13003         (constants.o): Likewise.
13004         (decl.o): Likewise.
13005         (expr.o): Likewise.
13006         (jcf-parse.o): Likewise.
13007         (jcf-write.o): Likewise.
13008         (mangle.o): Likewise.
13009         * class.c: Include ggc.h.
13010         (build_static_field_ref): Register GC roots.
13011         (layout_class): Likewise.
13012         (init_class_processing): Likewise.
13013         * constants.c: Include ggc.h.
13014         (current_constant_pool_data_ref): Remove.
13015         (tag_nodes): Move it to ...
13016         (get_tag_node): ... here.  Register GC roots.
13017         * decl.c: Include ggc.h.  Remove many global tree definitions.
13018         (throw_node): Define.
13019         (java_global_trees): Likewise.
13020         (predef_filenames): Make the size a constant.
13021         (init_decl_processing): Adjust accordingly.
13022         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
13023         * expr.c: Include ggc.h.
13024         (init_expr_processing): Register GC roots.
13025         (build_invokeinterface): Likewise.
13026         * java-tree.h: Replace extern tree declarations with macros.
13027         (java_global_trees): New variable.
13028         (java_tree_index): New enumeration.
13029         (init_jcf_parse): Declare.
13030         * jcf-parse.c: Include ggc.h.
13031         (current_class): Remove declaration.
13032         (main_class): Likewise.
13033         (all_class_list): Likewise.
13034         (predefined_filename_p): Adjust for constant size of
13035         predef_filenames.
13036         (init_jcf_parse): New function.
13037         * jcf-write.c: Include ggc.h.
13038         (generate_classfile): Register GC roots.
13039         (append_synthetic_attribute): Likewise.
13040         (append_innerclass_attribute_entry): Likewise.
13041         * lang.c: Include ggc.h.
13042         (lang_print_error): Register GC roots.
13043         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13044         with macros.
13045         * parse.y: Include ggc.h.
13046         (wfl_operator): Remove.
13047         (goal): Register GC roots.
13048         (java_pop_parser_context): Adjust for new field names.
13049         (java_parser_context_save_global): Likewse.
13050         (java_parser_context_restore_global): Likewise.
13051         (java_parser_context_suspend): Likewise.
13052         (java_parser_context_resume): Likewise.
13053         (verify_constructor_circularity): Register GC roots.
13054         (lookup_cl): Likewise.
13055         (java_reorder_fields): Likewise.
13056         (build_current_this): Likewise.
13057         (class_in_current_package): Likewise.
13058         (argument_types_convertible): Likewise.
13059         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13061 2000-09-14  Tom Tromey  <tromey@cygnus.com>
13063         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13065 2000-09-13  Tom Tromey  <tromey@cygnus.com>
13067         * jcf-parse.c: Include <locale.h>.
13068         * jv-scan.c: Include <locale.h>.
13070 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13072         * expr.c (pop_type_0): Return `Object' if trying to merge two
13073         interface types.
13074         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13075         interface types; `Object' is always a valid supertype.
13077 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13079         Fix for PR gcj/33:
13080         * jv-scan.c (help): Document --encoding.
13081         (options): Added `encoding' entry.
13082         (OPT_ENCODING): New define.
13083         (main): Handle --encoding.
13084         Include <langinfo.h> if nl_langinfo exists.
13085         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13086         --encoding.
13087         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13088         (parse_source_file): Correctly call java_init_lex.  Added `finput'
13089         argument.  Use nl_langinfo to determine default encoding.
13090         * java-tree.h (current_encoding): Declare.
13091         * parse.y (java_parser_context_restore_global): Don't restore
13092         `finput'.
13093         (java_parser_context_save_global): Don't set `finput' field.
13094         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
13095         if required.
13096         * lang.c (current_encoding): New global.
13097         (lang_decode_option): Recognize `-fencoding='.
13098         (finish_parse): Don't close finput.
13099         * parse.h (struct parser_ctxt): Removed `finput' and
13100         `unget_utf8_value' fields.  Added `lexer' field.
13101         (java_init_lex): Fixed declaration.
13102         * lex.c (java_new_lexer): New function.
13103         (java_destroy_lexer): Likewise.
13104         (java_read_char): Added `lex' argument.  Handle iconv case.
13105         (java_read_unicode): Added `lex' argument.  Count backslashes in
13106         lexer structure.
13107         (java_init_lex): Added `finput' and `encoding' arguments.  Set
13108         `lexer' field in ctxp.
13109         (BAD_UTF8_VALUE): Removed.
13110         (java_lex): Handle seeing UEOF in the middle of a string literal.
13111         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13112         (java_lexer): New structure.
13113         (UNGETC): Removed.
13114         (GETC): Removed.
13115         (DEFAULT_ENCODING): New define.
13116         (java_destroy_lexer): Declare.
13118 2000-09-12  Tom Tromey  <tromey@cygnus.com>
13120         Fix for PR gcj/343:
13121         * lex.c (java_init_lex): Initialize java_io_serializable.
13122         * parse.y (java_io_serializable): New global.
13123         (valid_ref_assignconv_cast_p): An array can be cast to
13124         serializable.
13126 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
13128         * decl.c, expr.c: Include defaults.h if not already included.
13129         Don't define the *_TYPE_SIZE macros.
13131 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
13133         * typeck.c (build_java_array_type): Correct first parameter
13134         in ADJUST_FIELD_ALIGN invocation.
13136 2000-09-06  Tom Tromey  <tromey@cygnus.com>
13138         * lang-specs.h: Also recognize `-femit-class-files'.
13140 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13142         * verify.c (merge_types): Load the types to merge if necessary.
13144 2000-09-02  Anthony Green  <green@redhat.com>
13146         * jcf-io.c: Include zlib.h.
13147         (open_in_zip): Read compressed class file archives.
13148         * zipfile.h (ZipDirectory): Add uncompressed_size and
13149         compression_method fields.
13150         * zextract.c (read_zip_archive): Collect file compression info.
13152 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
13154         * parse.y (do_resolve_class): Also explore superclasses of
13155         intermediate enclosing contexts when searching for inner classes.
13157 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13159         * parse.y (variable_declarator_id:): Better error message.
13160         (expression_statement:): Use YYNOT_TWICE.
13161         (cast_expression:): Likewise.
13162         (assignment:): Likewise.
13164 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13166         * parse.y (do_merge_string_cste): New locals. Create new
13167         STRING_CSTs each time, use memcpy. Fixes gcj/311.
13169 2000-08-07  Hans Boehm  <boehm@acm.org>
13171         * boehm.c (mark_reference_fields): Set marking bits for all words in
13172         a multiple-word record.
13173         (get_boehm_type_descriptor): Use the procedure marking descriptor for
13174         java.lang.Class.
13176 2000-08-31  Mike Stump  <mrs@wrs.com>
13178         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13179         jcf-dump$(exeext)): Make parallel safe.
13181 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13183         * jcf-parse.c (set_source_filename): Constify a char *.
13184         * jcf-write.c (append_innerclasses_attribute,
13185         make_class_file_name): Constify a char *.  Don't recycle a
13186         variable for an unrelated purpose.
13187         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13188         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13190 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13192         * expr.c (can_widen_reference_to): Fixed indentation.
13193         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13194         * parse.y: `finit$' replaces `$finit$' in comments.
13195         (try_builtin_assignconv): Fixed leading comment.
13197 2000-08-25  Greg McGary  <greg@mcgary.org>
13199         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13201 2000-08-24  Greg McGary  <greg@mcgary.org>
13203         * lang.c (lang_decode_option): Use ARRAY_SIZE.
13204         * parse.y (BINOP_LOOKUP): Likewise.
13206 2000-08-22  Andrew Haley  <aph@cygnus.com>
13208         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13209         sign extending. Fixes gcj/321.
13210         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13211         combining to make a jlong. Fixes gcj/321.
13213 2000-08-21  Nix  <nix@esperi.demon.co.uk>
13215         * lang-specs.h: Do not process -o or run the assembler if
13216         -fsyntax-only.
13218 2000-08-16  Andrew Haley  <aph@cygnus.com>
13220         * typeck.c (build_java_array_type): Rewrite code to do array
13221         alignment.  Take into account back-end macros when aligning array
13222         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13223         user to set alignment. Fixes gcj/252 and 160.
13225 2000-08-09  Tom Tromey  <tromey@cygnus.com>
13227         * parse.y (check_abstract_method_definitions): Now return `int'.
13228         Check implemented interfaces.  Fixes PR gcj/305.
13230         * parse.y (patch_switch_statement): Disallow `long' in switch
13231         expressions.  Fixes PR gcj/310.
13233 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13235         * decl.c (finit_leg_identifier_node): New global.
13236         (init_decl_processing): Use `finit$' to initialize
13237         finit_identifier_node. Use `$finit$' to initialize
13238         finit_leg_identifier_node.
13239         * expr.c (expand_java_field_op): Use ID_FINIT_P.
13240         * java-tree.h (finit_identifier_node): Changed attached comment.
13241         (finit_leg_identifier_node): New declaration.
13242         (ID_FINIT_P): Take finit_identifier_node and
13243         finit_leg_identifier_node into account. This is a backward
13244         compatibility hack.
13246 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13248         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13249         Jan 6 2000 patch.
13250         (generate_bytecode_insns): Check `nargs' before emitting it.
13251         * verify.c (merge_type_state): Fixed typo.
13252         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13253         generate_bytecode_{conditional,insns}.
13255 2000-08-13  Anthony Green  <green@redhat.com>
13257         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13258         for -pg builds).
13260 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13262         * class.c (maybe_layout_super_class): Fixed indentation.
13263         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13264         (java_check_methods): New function declaration.
13265         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13266         instead of `str_ptr'.
13267         * jcf-write.c (generate_bytecode_insns): Emit number the of args
13268         of a `invokeinterface' at the right time.
13269         * parse.h (WFL_STRIP_BRACKET): New macro.
13270         (SET_TYPE_FOR_RESOLUTION): Use it.
13271         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13272         (check_class_interface_creation): Don't check for cross package
13273         innerclass name clashes.
13274         (method_header): Behave properly if MDECL is `error_mark_node'.
13275         (method_declarator): Return `error_mark_node' if bogus current
13276         class.
13277         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13278         (resolve_and_layout): New local `decl_type', set and used. Call
13279         java_check_methods.
13280         (java_check_methods): New method.
13281         (java_layout_classes): Use it.
13282         (resolve_qualified_expression_name): No EH check necessary in
13283         access$<n>.
13284         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13285         `case' statement.
13286         (patch_assignment): Set DECL_INITIAL on integral final local.
13288 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13290         * java-tree.h (flag_extraneous_semicolon): New extern.
13291         * lang-options.h: (-Wextraneous-semicolon): New option.
13292         * lang.c (flag_redundant): Fixed typo in leading comment.
13293         (flag_extraneous_semicolon): New global.
13294         (lang_decode_option): Set `flag_extraneous_semicolon' when
13295         -Wall. Decode `-Wextraneous-semicolon'.
13296         * parse.y (type_declaration:): Removed `SC_TK' hack, added
13297         `empty_statement' rule.
13298         (class_body_declaration): Likewise.
13299         (method_body:): Accept `;' as a method body.
13300         (static_initializer:): Removed `SC_TK' hack.
13301         (constructor_block_end:): Likewise.
13302         (empty_statement:): Report deprecated empty declaration. Fixes
13303         gcj/295
13305 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13307         * parse.y (build_dot_class_method_invocation): Changed parameter
13308         name to `type'. Build signature from `type' and convert it to a
13309         STRING_CST if it's an array.
13310         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13311         to use `ref_type' directly.
13313 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
13315         * lang-options.h: Added a comma after the last element to avoid
13316         syntax errors when other languages define additional options.
13318 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
13320         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13321         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13322         (jc1): Link with $(BACKEND).
13323         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13325 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
13327         * jvspec.c: Adjust type of second argument to
13328         lang_specific_driver, and update code as necessary.
13330         * class.c (build_dtable_decl): Initialize dummy.
13332 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13334         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13335         method bodies not to rule out discarding `<clinit>'; don't use
13336         <clinit> to initialize static fields with constant initializers.
13338 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13340         * gjavah.c (print_method_info): Added `synth' parameter. Skip
13341         synthetic methods.
13342         (method_synthetic): New global.
13343         (HANDLE_METHOD): Recognize synthetic method and tell
13344         `print_method_info' about it.
13345         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13346         processing a synthetic method.
13347         * jcf-reader.c (skip_attribute): New function.
13348         ( skip_attribute): Likewise.
13350 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13352         * parse.y (build_outer_field_access): Fixed comments.
13353         (fix_constructors): Emit the initialization of this$<n> before
13354         calling $finit$.
13355         (resolve_qualified_expression_name): Build an access to `decl' if
13356         necessary.
13358 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13360         * parse-scan.y (curent_class): Non longer const.
13361         (inner_qualifier, inner_qualifier_length): Deleted.
13362         (current_class_length): New global.
13363         (bracket_count): Fixed typo in leading comment.
13364         (anonymous_count): New global.
13365         (class_instance_creation_expression:): Handle anonymous classes.
13366         (anonymous_class_creation:): New rule.
13367         (push_class_context): Rewritten.
13368         (pop_class_context): Likewise.
13369         (INNER_QUALIFIER): Macro deleted.
13370         (report_class_declaration): call `push_class_context' when
13371         entering the function. `fprintf' format modified not to use
13372         INNER_QUALIFIER.
13373         (report_class_declaration): Assign `package_name' and
13374         `current_class' to NULL separately.
13376 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13378         * expr.c (build_invokeinterface): Call layout_class_methods on
13379         target interface.
13381 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13382             Anthony Green  <green@cygnus.com>
13383             Alexandre Petit-Bianco  <apbianco@cygnus.com>
13385         * class.c (make_class_data): Create vtable for abstract classes.
13386         (get_dispatch_table): Changed to cope with abstract classes.
13388 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13390         * parse.y (patch_method_invocation): Don't reverse the argument
13391         list when dealing with anonymous class constructors. Fixed typo in
13392         comment.
13394 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13396         * parse.y (build_alias_initializer_parameter_list): Reverse
13397         crafted list when building aliases for anonymous class
13398         constructors.
13400 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13402         * parse.y (jdep_resolve_class): Don't bother checking potential
13403         innerclass access if `decl' is NULL.
13404         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13405         WFL.
13407 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13409         * parse.c: Remove (again.)
13411 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13413         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13414         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13415         outside the `if' statement, alias to innerclass removed, `decl'
13416         used to mark the class complete.
13418 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13420         * parse.y (simple_name:): Fixed typo in error message.
13422 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13424         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13425         or its first operand can be error marks.
13427 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13429         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13430         * parse.y (method_header): Likewise.
13432 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13434         * parse.y (process_imports): Consider that one might be trying to
13435         import an innerclass. Fixes gcj/254
13437 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13439         * parse.y (find_as_inner_class): Handle the case where the
13440         enclosing context of an innerclass has been loaded as bytecode.
13442 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13444         * parse.y (simple_name:): Reject `$' in type names.
13445         (resolve_type_during_patch): Use `type' as a second
13446         argument to resolve_no_layout. Fixes gcj/257.
13448 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
13450         * parse.y (find_most_specific_methods_list): Select the only
13451         non-abstract method even if max has been set.
13452         Fixes gcj/285, gcj/298.
13454 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
13456         * lang-specs.h: Added %(jc1) to java compiler options.
13458 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13460         * .cvsignore: New file.
13462 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13464         * parse.y (not_accessible_p): Access granted to innerclasses
13465         (indirectly) extending the reference type. Fixes gcj/249.
13467 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13469         * parse.y (patch_method_invocation): Fixed comment.
13470         (maybe_use_access_method): Build this$<n>s to the context of the
13471         target method, or a type that extends it. Fixes gcj/242.
13473 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13475         * parse.c: Remove.
13477 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13479         * parse.y (fold_constant_for_init): Avoid bullish conversion.
13481 2000-07-13  Tom Tromey  <tromey@cygnus.com>
13483         * lang-specs.h: Added %{I*}.
13485 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13487         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13489 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13491         * parse-scan.c: Remove.
13493 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13495         * class.c (set_super_info): Handled protected inner classes.
13496         (common_enclosing_context_p): Bail early if arguments aren't both
13497         inner classes.
13498         (get_access_flags_from_decl): Handle private and protected inner
13499         classes.
13500         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13501         (CLASS_PROTECTED): Likewise.
13502         (struct lang_type): New bitfield `poic'.
13503         * parse.y (jdep_resolve_class): Call check_inner_class_access on
13504         inner classes only.
13505         (check_inner_class_access): Renamed arguments, added
13506         comments. Handles protected inner classes (fixes gcj/225)
13507         (not_accessible_p): Fixed comments. Avoid handling inner classes.
13509 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13511         * parse.y (resolve_qualified_expression_name): Verify qualified
13512         access to `this'. Fixes gcj/239.
13514 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13516         * jcf-write.c (generate_classfile): Don't install ConstantValue
13517         for null pointers.
13519 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13521         * parse.y (resolve_qualified_expression_name): Handle inner class
13522         access. Fixes gcj/256.
13524 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13526         * jcf-write.c (generate_classfile): Properly install the
13527         ConstantValue attribute and the initial value constant pool index
13528         on string constants.
13529         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13530         class files.
13532 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13534         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13535         construct.
13536         * parse.y (find_as_inner_class): Fixed typo.
13537         (do_resolve_class): Explore enclosing contexts when searching for
13538         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13539         (check_inner_class_access): Check `decl' which can be null in case
13540         of previous errors.
13542 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13544         * java-tree.h (java_debug_context): Declared `extern'.
13545         (safe_layout_class): Likewise.
13546         * parse.y (resolve_field_access): Field must be `static' in order
13547         to be replaced by its initial value. Added comments.
13548         (find_applicable_accessible_methods_list): Fixed typo.
13549         (find_most_specific_methods_list): Methods found in innerclasses
13550         take over methods founds in the enclosing contexts.
13551         (java_complete_tree): Loosen restrictions on the type of DECLs
13552         that can be replaced by their initialization values.
13553         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13555 2000-07-05  Tom Tromey  <tromey@cygnus.com>
13557         * Make-lang.in (PARSE_DIR): New macro.
13558         (PARSE_RELDIR): Likewise.
13559         (PARSE_C): Likewise.
13560         (PARSE_SCAN_C): Likewise.
13561         ($(PARSE_C)): New target.
13562         ($(PARSE_SCAN_C)): Likewise.
13563         (SET_BISON): New macro.
13564         (BISONFLAGS): Likewise.
13565         (JAVABISONFLAGS): Likewise.
13567 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
13569         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13570         argument on the first pass for CNI as well as JNI.
13571         (print_method_info): Set up method name on the first pass only.
13573 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13575         * parse.y (parser_qualified_classname): Removed parameter
13576         `is_static'.
13577         (create_interface): Removed first passed parameter to
13578         parser_qualified_classname.
13579         (create_class): Likewise. Don't install alias on static
13580         innerclasses. Fixes gcj/275.
13582 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13584         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13585         debugable statement with empty_stmt_node. Fixes gcj/272
13587 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13589         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13590         gcj/271.
13592 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13594         * jcf-write.c (push_long_const): Appropriately cast short negative
13595         constant to jword.
13597 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13599         * parse.y (verify_constructor_super): Use loop variable
13600         `m_arg_type' initialized with `mdecl_arg_type'.
13602 2000-06-29  Tom Tromey  <tromey@cygnus.com>
13604         * parse.y (resolve_field_access): Handle case where `type_found'
13605         is NULL.
13607 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13609         * expr.c (lookup_field): The same field can be found through two
13610         different interface. Don't declare it ambiguous in that case.
13612 2000-06-27  Tom Tromey  <tromey@cygnus.com>
13614         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
13615         follows \r, then unget it at a lower level.
13617 2000-06-26  Tom Tromey  <tromey@cygnus.com>
13619         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13620         java_complete_tree.
13622 2000-06-25  Tom Tromey  <tromey@cygnus.com>
13624         * parse.y (for_statement): Wrap expression in a WFL if it is a
13625         constant.  For PR gcj/268.
13627 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13629         * parse.y (do_resolve_class): Minor optimiztion in the package
13630         list search. Removed unnecessary test and return statement.
13631         (valid_ref_assignconv_cast_p): Order of arguments to
13632         enclosing_context_p fixed.
13634 2000-06-24  Tom Tromey  <tromey@cygnus.com>
13636         * expr.c (lookup_field): Print error and return error_mark_node if
13637         field reference is ambiguous.
13639         * parse.y (check_abstract_method_definitions): Also check if
13640         `other_method' is abstract.
13642 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13644         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13645         classes.
13646         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13647         (struct lang_type): New field `pic'.
13648         (CLASS_PRIVATE): New macro.
13649         * parse.y (check_inner_class_access): New function.
13650         (jdep_resolve_class): Call it.
13652 2000-06-23  Tom Tromey  <tromey@cygnus.com>
13654         * parse.y (patch_incomplete_class_ref): Initialize the returned
13655         class.  For PR gcj/260.
13657 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13659         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13661 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13663         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13664         Java specific checks.
13665         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13666         screened by DECL_P.
13667         * java-tree.def (CASE_EXPR): Marked 'e'.
13668         (DEFAULT_EXPR): Likewise.
13669         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13670         screened by DECL_P.
13671         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13672         Java specific checks.
13673         (generate_bytecode_insns): Test try_block for BLOCK before using
13674         BLOCK_EXPR_BODY.
13675         * parse.y (build_wfl_wrap): Added `location' argument. Set
13676         EXPR_WFL_LINECOL accordingly.
13677         (dim_expr:): Wrap constants with WFLs.
13678         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13679         (resolve_package): Check for `stmt' not being a BLOCK before
13680         building a debuggable statement with it.
13681         (make_qualified_primary): Added extra parameter to build_wfl_wrap
13682         invocation.
13683         (resolve_field_access): Make sure `decl' is a DECL before treating
13684         it as such.
13685         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13686         IDENTIFIER_NODE before treating it as such.
13687         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13688         treating it as such.
13689         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13690         to be applied only on non array types.
13692 2000-06-16  Per Bothner  <per@bothner.com>
13694         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
13695         define in terms of DECL_RESULT, as that fails when --enable-checking.
13697 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13699         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
13700         types the same in comparison.
13701         (CHECK_OP): Add static prototype.
13703 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13705         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13706         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13707         * parse.c: Rebuilt.
13709 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13711         * decl.c (create_primitive_vtable): Prototype.
13713         * jcf-write.c (generate_bytecode_insns): Initialize variable
13714         `saved_context'.
13716         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13718 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13720         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13721         to track searched classes, and do not search the same class more than
13722         once. Call find_applicable_accessible_methods_list on immediate
13723         superclass, instead of search_applicable_method_list on all ancestors.
13724         Fix for PR gcj/238.
13726 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13728         * parse.y (register_fields): Permit static fields in inner classes
13729         if they are final. Fix for PR gcj/255.
13731 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13733         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13734         * parse.y (find_in_imports): Returned type changed to void,
13735         leading comment fixed.
13736         (register_package): New function.
13737         (qualify_and_find): Likewise.
13738         (package_declaration:): Use `register_package'.
13739         (single_type_import_declaration:): Removed local variable
13740         `node'. Added missing `;' for consistency.
13741         (type_import_on_demand_declaration:): Use `chainon' to link new
13742         entries.
13743         (lookup_field_wrapper): Lookup local variables defined in outer
13744         contexts first.
13745         (java_complete_class): Don't reverse the list of imported on demand.
13746         (do_resolve_class): Reorganized. Removed local variable
13747         `original_name'. Call `qualify_and_find' with the current package
13748         name, invoke `find_in_imports_on_demand' right after. Call
13749         `qualify_and_find' with the packages we've seen so far. Fixed
13750         operations numbering in comments.
13751         (java_expand_class): Don't reverse `package_list'.
13752         (find_most_specific_methods_list): New local variables `abstract'
13753         and `candidates'. Use them to pick the right method.
13755 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
13757         * parse.y (check_modifiers_consistency): Don't subtract out
13758         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13760 2000-06-04  Philipp Thomas  <pthomas@suse.de>
13762         * Makefile.in (INTLLIBS): New.
13763         (LIBS): Add above.
13764         (DEPLIBS): Ditto.
13766 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13768         * class.c (get_dispatch_table): Build the vtable dummy entry list
13769         element with a null purpose. Fixed leading comment.
13770         (build_dtable_decl): Build an accurate dtable type when appropriate
13771         and use it.
13773 2000-06-02  Richard Henderson  <rth@cygnus.com>
13775         * lang.c (lang_get_alias_set): New.
13777 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13779         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13780         before using it as the accessed field.
13782 2000-05-31  Tom Tromey  <tromey@cygnus.com>
13784         * java-tree.h (boolean_array_vtable, byte_array_vtable,
13785         char_array_vtable, short_array_vtable, int_array_vtable,
13786         long_array_vtable, float_array_vtable, double_array_vtable):
13787         Declare.
13788         * expr.c (get_primitive_array_vtable): New function.
13789         (create_primitive_vtable): New function.
13790         (java_lang_expand_expr): Enable code to statically generate
13791         arrays.
13792         * decl.c (init_decl_processing): Create primitive vtables.
13793         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13794         short_array_vtable, int_array_vtable, long_array_vtable,
13795         float_array_vtable, double_array_vtable): Define.
13797 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
13799         * java/parse.y (find_applicable_accessible_methods_list):
13800         Don't add an uninitialized value to the list.
13802 2000-05-25  Tom Tromey  <tromey@cygnus.com>
13804         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13805         when trying to see if field's class should be initialized.  Always
13806         initialize field's declaring class, not qualified class.
13807         For PR gcj/162.
13809         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13810         `wfl_operator', to maybe_build_primttype_type_ref.
13811         Fixes PR gcj/235.
13813 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
13815         * parse.y (patch_method_invocation): Don't try to lookup methods
13816         in primitive types.
13818 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13820         * parse.y (resolve_field_access): Call the appropriate <clinit>
13821         before accessing the length of a static array. Craft a decl for
13822         the field while its time. Fixes PR gcj/129.
13824 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13826         * parse.y (resolve_package): Correctly set `*next' (was off by
13827         one.)
13828         (resolve_qualified_expression_name): Fixed comment.
13830 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13832         * jcf-parse.c (jcf_parse_source): Reset current_class and
13833         current_function_decl to NULL before parsing a new file.
13835 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13837         * parse.y (block_end:): If the collected block doesn't feature a
13838         statement, insert an empty statement.
13840 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13842         * parse.y (maybe_yank_clinit): New function.
13843         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13844         end of the list of methods belonging to a class.
13845         (java_complete_expand_method): Check whether <clinit> is really
13846         necessary and expand it accordingly.
13848 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13850         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13851         processed by the method's switch statement.
13853 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13855         * java-tree.h: Added init state enum.
13856         * decl.c (emit_init_test_initialization): Initialize class
13857         initialization check variable by looking at class' state.
13859 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13861         * java-tree.h (build_instanceof): Declare.
13862         (build_get_class): Declare.
13863         * parse.y (patch_binop): Use build_instanceof.
13864         * expr.c (build_instanceof): New function.  If class is final,
13865         don't make a function call.
13866         (expand_java_INSTANCEOF): Use it.
13867         (build_get_class): New function.
13869 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
13871         * jcf-write.c (generate_classfile): Scan the source_file for
13872         slashes with the right pointer variable.
13874 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
13876         * lang.c (lang_decode_option): Update -Wunused flags by calling
13877         set_Wunused.
13878         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13880 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13882         * check_init.c (check_init): Constify local char *.
13883         * class.c (push_class): Constify local char *.
13884         * java_tree.h: Update prototypes.
13885         * jcf-io.c (open_class): Constify filename parameter and
13886         return value.
13887         (find_class): Remove redundant string copy.  Cast return from
13888         open_class.
13889         * jcf-parse.c (read_class, parse_class_file, yyparse):
13890         Constify local char *.
13891         * jcf-write.c (generate_bytecode_insns, generate_classfile):
13892         Constify local char *.
13893         * jcf.h (JCF): Constify filename and classname.
13894         (JCF_FINISH): Cast args to FREE to char * when appropriate.
13895         * lang.c (init_parse): Constify parameter and return value.
13896         * lex.c (java_get_line_col): Constify filename parameter.
13897         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
13898         * parse.y (java_parser_context_suspend,
13899         issue_warning_error_from_context, safe_layout_class): Constify
13900         local char *.
13901         * parse.c: Regenerate.
13903 2000-05-08  Tom Tromey  <tromey@cygnus.com>
13905         * expr.c (build_jni_stub): Cache the result of
13906         _Jv_LookupJNIMethod.
13908 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13910         * decl.c (predef_filenames_size): Now 7.
13911         (predef_filenames): New seventh entry.
13913 2000-05-04  Tom Tromey  <tromey@cygnus.com>
13915         * boehm.c (mark_reference_fields): Don't mark RawData fields.
13916         Keep track of when we've seen a reference field after a
13917         non-reference field.
13918         (get_boehm_type_descriptor): Handle case where we see
13919         non-reference fields but no trailing reference field.
13920         * decl.c (rawdata_ptr_type_node): Define.
13921         (init_decl_processing): Initialize rawdata_ptr_type_node.
13922         * java-tree.h (rawdata_ptr_type_node): Declare.
13924 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13926         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13927         specifiers in calls to fprintf.
13929 2000-05-03  Andrew Haley  <aph@cygnus.com>
13931         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13933         * javaop.h (WORD_TO_INT): New function.
13934         (IMMEDIATE_s4): Use WORD_TO_INT.
13935         * jcf.h (JPOOL_INT): Ditto.
13937         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13938         separator.
13940 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13942         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13943         on native function.
13944         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13945         JNI methods.
13946         * expr.c (build_jni_stub): New function.
13947         * lang-specs.h: -fjni and -femit-class-file are incompatible.
13948         * parse.c: Rebuilt.
13949         * parse.y (java_complete_expand_methods): Expand a native method
13950         and call build_jni_stub if -fjni given.
13951         * lang-options.h: Document -fjni.
13952         * lang.c (flag_jni): New global.
13953         (lang_f_options): Added `jni' entry.
13954         * java-tree.h (soft_lookupjnimethod_node,
13955         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13956         Declare.
13957         (flag_jni): Declare.
13958         (build_jni_stub): Declare.
13959         (struct lang_decl): Added `native' flag.
13960         (METHOD_NATIVE): Redefined to use `native' field of lang specific
13961         structure.
13962         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13963         soft_jnipopsystemframe_node): New globals.
13964         (init_decl_processing): Set them.  _Jv_InitClass only takes one
13965         argument.
13967         * java-tree.def: Put into `C' mode.
13969 2000-04-27  Tom Tromey  <tromey@cygnus.com>
13971         Fix for PR gcj/2:
13972         * expr.c (expand_invoke): Generate check to see if object pointer
13973         is null in nonvirtual invocation case.
13974         * java-tree.h (soft_nullpointer_node): Declare.
13975         * decl.c (soft_nullpointer_node): New global.
13976         (init_decl_processing): Initialize soft_nullpointer_node.
13977         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13978         or `private' methods.
13979         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13981 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13983         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13984         from <clinit>
13986 2000-04-26  Tom Tromey  <tromey@cygnus.com>
13988         * zextract.c (find_zip_file_start): New function.
13989         (read_zip_archive): Use it.
13991 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13993         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13995 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13997         * class.c (common_enclosing_context_p): New function.
13998         * java-tree.h (common_enclosing_context_p): Added prototype.
13999         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14000         classes sharing an outer context with the current instance.
14001         * parse.y (build_access_to_thisn): Fixed leading comment.
14002         (verify_constructor_super): New local `supper_inner'. Skip
14003         enclosing context argument in the case of inner class constructors.
14004         (patch_method_invocation): Insert proper context as second
14005         parameter to pure inner class constructor super invocations.
14007 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14009         * parse.y (end_class_declaration): Reset the interface number
14010         counter.
14012 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14014         * parse.y (source_start_java_method): Deleted unnecessary code.
14015         (patch_method_invocation): Fixed comment.
14017 2000-04-24  Robert Lipe <robertlipe@usa.net>
14019         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14021 2000-04-23  Tom Tromey  <tromey@cygnus.com>
14023         * boehm.c (mark_reference_fields): Use int_byte_position.
14025 2000-04-22  Tom Tromey  <tromey@cygnus.com>
14027         * boehm.c (mark_reference_fields): Only call byte_position on
14028         non-static fields.
14030 2000-04-22  Tom Tromey  <tromey@cygnus.com>
14032         * boehm.c (mark_reference_fields): Added `last_view_index'
14033         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
14035 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
14037         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14038         * parse.y (check_class_interface_creation): Fixed comments. Select
14039         permitted modifiers for (inner) interfaces. Changed error message
14040         to report rejected modifiers used with local classes.
14042 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14044         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14045         of directly inherited type considered in scope.
14046         * parse.y (do_resolve_class): Search inherited classes for inner
14047         classes.
14049 2000-04-20  Tom Tromey  <tromey@cygnus.com>
14051         * parse.y (not_accessible_p): Use member's class, not current
14052         class, when doing inheritance check for protected reference.
14053         Fixes PR gcj/124.
14055 2000-04-20  Jason Schroeder  <shrode@subnature.com>
14057         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14059 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14061         * parse.y (lookup_field_wrapper): Search for final local aliases.
14062         (resolve_expression_name): Let lookup_field_wrapper search for
14063         final local aliases. Force the value of `name' if one is found.
14064         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14065         an expression name. Fixed comments.
14067 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14069         * parse.y (yyerror): `msg' can be null, don't use it in that case.
14071 2000-04-19  Tom Tromey  <tromey@cygnus.com>
14073         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14075 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14077         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14079 2000-04-18  Tom Tromey  <tromey@cygnus.com>
14081         PR gcj/211:
14082         * gjavah.c (utf8_cmp): Changed return value.
14083         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
14084         result.
14085         (cxx_keywords): New global.
14086         (get_field_name): Handle new result of cxx_keyword_subst.
14087         (print_method_info): Likewise.
14089 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
14091         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14092         with a newline, for CNI.
14093         (print_stub_or_jni): Print a space or newline before method name for
14094         CNI as well as JNI.
14095         (print_cxx_classname): Don't write leading "::" in CNI stub method.
14096         (process_file): Include gcj/cni.h if generating CNI stubs.
14098 2000-04-16  Tom Tromey  <tromey@cygnus.com>
14100         * gjavah.c (decompile_method): Use print_field_name.
14101         Fixes PR gcj/205.
14103 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14105         * parse.y (java_expand_classes): Reverse the package list once.
14106         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14107         reduction.
14108         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14109         the `==' and `!=' operators.
14111 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14113         * jcf-write.c (generate_bytecode_insns): At invocation time,
14114         always relate an interface method to the type of its selector.
14116 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14118         Fix for PR gcj/2:
14119         * expr.c (expand_invoke): Generate check to see if object pointer
14120         is null in nonvirtual invocation case.
14121         * java-tree.h (soft_nullpointer_node): Declare.
14122         * decl.c (soft_nullpointer_node): New global.
14123         (init_decl_processing): Initialize soft_nullpointer_node.
14124         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14125         or `private' methods.
14126         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14128 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14130         Fix for PR gcj/140:
14131         * parse.y (check_final_assignment): Recognize assignments to the
14132         `length' field of an array when generating class files.
14134 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14136         * class.c (decl_hash): Prototype removed.
14137         (decl_compare): Likewise.
14139 2000-04-05  Tom Tromey  <tromey@cygnus.com>
14141         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14142         * parse.y (check_modifiers_consistency): Check for final/volatile
14143         clash.  Fixes PR gcj/164.
14145 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14147         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14148         made global.
14149         (java_hash_compare_tree_node): Renamed from `decl_compare, made
14150         global.
14151         (add_method_1): Use `java_hash_hash_tree_node' and
14152         `java_hash_compare_tree_node'.
14153         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14154         (java_hash_compare_tree_node): Likewise.
14155         * parse.y (find_applicable_accessible_methods_list): Create,
14156         delete and use a hash table to remember already searched interfaces.
14158 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
14160         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14161         with latest entry.
14163 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14165         * boehm.c (mark_reference_fields, set_bit): Prototype.
14166         (set_bit): Un-ANSI-fy definition.
14168         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14169         Prototype.
14171         * decl.c (emit_init_test_initialization): Likewise.
14173         * gjavah.c (jni_print_char): Likewise.
14175         * parse.y (create_new_parser_context): Likewise.
14177 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14179         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14180         patch missing hunk. Fixed indentation.
14182 2000-03-30  Tom Tromey  <tromey@cygnus.com>
14184         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14185         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14187 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14189         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14190         when negative *before* using it as an array index.
14191         * ChangeLog: Fixed typo.
14193 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14195         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14196         to 0 when it reaches -1.
14198 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14200         * jcf-parse.c (get_constant): Properly cast `num' during the
14201         invocation of `add_double'.
14202         * jcf-write.c (push_long_const): Properly cast `lo' before
14203         comparing it to short bounds.
14204         * parse-scan.y (interface_declaration:): Rule re-arrange so that
14205         `interface_body:' is reduced after the current interface is
14206         pushed.
14208 2000-03-26  Tom Tromey  <tromey@cygnus.com>
14210         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14211         Java-specific `-f' option.
14213 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14215         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14216         Adjust order of making types.
14217         Make bitsize_*_node values.
14219 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14221         * class.c (make_field_value): Use byte_position.
14222         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14223         (java_array_data_offset): Likewise.
14224         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14225         bzero call.
14227 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14229         * parse.y (check_abstract_method_definitions): New local
14230         `end_type_reached'. Make sure we also consider `end_type'.
14231         (java_check_abstract_method_definitions): Make sure we eventually
14232         consider `java.lang.Object'.
14233         (maybe_use_access_method): Don't use access method if not in the
14234         context of a pure inner class or if the method's context is right.
14235         (find_applicable_accessible_methods_list): New static flag
14236         `object_done'. Don't search abstract classes as interfaces. Fixed
14237         indentation. Fixed the `java.lang.Object' only search. Search
14238         class interface(s) first, then fully search enclosing contexts.
14239         (find_most_specific_methods_list): Pick the closest candidate when
14240         they're all abstract.
14242 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14244         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14245         properly initialize `finished_label'. Don't emit gotos for empty
14246         try statements.
14248 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14250         * except.c (emit_handlers): Clear catch_clauses_last.
14252 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14254         * parse.y (check_method_types_complete): New function.
14255         (create_class): Reset anonymous class counter only when seeing an
14256         non inner classe.
14257         (java_complete_class): JDEP_METHOD: Don't recompute signature
14258         if incomplete.
14260 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14262         * class.c (build_static_ref): Fixed indentation in comment.
14263         * java-tree.def (TRY_EXPR): Fixed typo in name.
14264         (CLASS_LITERAL): Likewise.
14265         * java-tree.h: (TYPE_DOT_CLASS): New macro.
14266         (struct lang_type): New field `dot_class'.
14267         * jcf-write.c (generate_bytecode_insns): Fixed error message.
14268         (generate_classfile): Method `class$' is synthetic.
14269         * parse.y (build_do_class_method): New function.
14270         (build_dot_class_method_invocation): Likewise.
14271         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14272         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14273         (qualify_ambiguous_name): Likewise.
14274         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14275         (build_try_statement): Fixed leading comment.
14277 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14279         * class.c (make_field_value): Properly handle sizes.
14280         (get_dispatch_vector): Use tree_low_cst and host_integerp.
14281         (layout_class_method): Count using trees.
14282         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14283         * expr.c (java_array_data_offset): Use int_bit_position.
14284         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14285         (build_invokevirtual): Use tree_low_cst and do computations with trees.
14287 2000-03-16  Tom Tromey  <tromey@cygnus.com>
14289         * lang.c (flag_hash_synchronization): New global.
14290         (lang_f_options): Added `hash-synchronization'.
14291         * lang-options.h: Mention -fhash-synchronization.
14292         * java-tree.h (flag_hash_synchronization): Declare.
14293         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14294         hash table synchronization is disabled.
14295         * decl.c (init_decl_processing): Only push `sync_info' value when
14296         hash table synchronization is disabled.
14297         * class.c (make_class_data): Only push `sync_info' field when hash
14298         table synchronization is disabled.  Removed dead code.
14300 2000-03-16  Tom Tromey  <tromey@cygnus.com>
14302         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14304 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14306         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14307         classes.
14308         * parse.y (patch_method_invocation): Handle anonymous classes
14309         creation in static context.
14311 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14313         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14314         * parse.y (resolve_qualified_expression_name): Use it.
14315         (patch_method_invocation): Likewise.
14317 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14319         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14320         depending on the type of dependency which dictates what the
14321         current class is.
14322         (unresolved_type_p): Resolved types limited to the current class.
14324 2000-03-15  Tom Tromey  <tromey@cygnus.com>
14326         * decl.c (init_decl_processing): Set type of `sync_info' to be
14327         pointer to Object.
14329         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14330         Correctly compute bit number for current slot.  Zero `high' and
14331         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
14332         mark_reference_fields.
14333         (mark_reference_fields): New function.
14335 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14337         * parse.y (register_incomplete_type): Fixed initialization of
14338         JDEP_ENCLOSING.
14340 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14342         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14343         static globals.
14344         (push_class_context, pop_class_context): New function.
14345         (class_body:): Call pop_class_context.
14346         (interface_body:): Likewise.
14347         (INNER_QUALIFIER): New macro.
14348         (report_class_declaration): Changed output format and use
14349         INNER_QUALIFIER. Call push_class_context.
14351 2000-02-14  Andrew Haley  <aph@cygnus.com>
14353         * check-init.c (check_init): Add new cases for unary and binary
14354         tree nodes.
14356 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14358         * parse.y (resolve_package): Set `next' once a type name has been
14359         progressively discovered.
14360         (resolve_qualified_expression_name): Propagate resolution only if
14361         there are remaining qualifiers. Take into account `q' might have
14362         been cleared after re-qualification.
14363         * parse.y (patch_method_invocation): New local `resolved'.
14364         Section dealing with qualified expression rewritten to use
14365         resolve_field_access.
14367 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14369         * parse.h (PUSH_CPC): Fixed indentation.
14370         (DEBUG_CPC): New macro.
14371         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14372         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14373         * parse.y (class_body_declaration:): Use
14374         SET_CPC_INSTANCE_INITIALIZER_STMT.
14375         (method_declaration:): Check for null current_function_decl.
14376         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14377         (java_parser_context_pop_initialized_field): Better handling of
14378         empty lists.
14379         (maybe_make_nested_class_name): Mark nested class name as
14380         qualified when necessary.
14381         (end_class_declaration): Don't call java_parse_context_resume when
14382         one or more error occurred.
14383         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14384         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14385         SET_CPC_INITIALIZER_STMT.
14386         (method_header): Check for inner classes declaring static methods.
14387         (resolve_qualified_expression_name): Handle situation where `this'
14388         is implied.
14390 2000-03-13  Hans Boehm <boehm@acm.org>
14392         * typeck.c (build_prim_array_type): Correctly set the high word too.
14394 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14396         * parse.y (java_complete_expand_methods): Leave <clinit> out of
14397         ordinary methods.
14398         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14399         list of methods for interfaces.
14401 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14403         * parse.y (qualify_ambiguous_name): Properly handle expressions
14404         using `null'.
14406 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14408         * parse.y (check_final_assignment): Extended to process
14409         COMPOUND_EXPR.
14410         (patch_assignment): Have check_final_assignment called only once.
14412 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14414         * java-tree.h (IS_INIT_CHECKED): New flag.
14415         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14416         * parse.y (patch_string): Call force_evaluation_order on the
14417         completed string concatenation tree.
14418         * expr.c (force_evaluation_order): Call force_evaluation_order on
14419         function's arguments too.
14421 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14423         * decl.c (emit_init_test_initialization): Mark KEY as unused.
14424         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14425         (build_anewarray): Likewise.
14426         * parse.y (patch_newarray): Likewise.
14427         * parse.c: Regenerated.
14429 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
14431         * decl.c (init_decl_processing): Added new class fields `depth',
14432         `ancestors', and `idt' to class_type_node. Use
14433         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14434         * class.c (make_class_data): Push initial values for new fields.
14435         * java-tree.h: Updated prototype for `build_invokeinterface'.
14436         * expr.c (build_invokeinterface): Changed parameters to accept
14437         `method' tree. Calculate index of `method' in its declaring
14438         interface. Build call to _Jv_LookupInterfaceMethodIdx.
14439         (expand_invoke): Call `build_invokeinterface' with new parameters.
14440         * parse.y (patch_invoke): Call `build_invokeinterface' with new
14441         parameters.
14443 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
14445         * typeck.c (lookup_do): Search superinterfaces first
14446         when looking up an interface method. From Godmar Back
14447         <gback@cs.utah.edu>
14449 2000-03-06  Tom Tromey  <tromey@cygnus.com>
14451         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14453 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14455         * java-tree.h (lookup_argument_method2): Declared.
14456         (safe_layout_class): Prototype moved from parse.h.
14457         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14458         * parse.y (java_check_regular_methods): Local `super_class' gone.
14459         Call lookup_argument_method2 instead of lookup_argument_method.
14460         Perform modifier match for methods found declared in implemented
14461         interfaces. Fixed indentation problem. Overriding/hiding error
14462         report to take place only for methods found in classes.
14463         * typeck.c (lookup_argument_method): Changed leading
14464         comment. Re-written by calling lookup_do.
14465         (lookup_argument_method2): New function.
14466         (lookup_java_method): Re-written by calling lookup_do.
14467         (lookup_do): New function.
14469 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14471         * check-init.c (check_init): Removed dead code. Handle (blank)
14472         final variables.
14473         * parse.y (declare_local_variables): New local `final_p', set it
14474         and use it to initialize LOCAL_FINAL.
14475         (check_final_assignment): Only check FIELD_DECLs.
14477 2000-02-17  Tom Tromey  <tromey@cygnus.com>
14479         * Makefile.in (JAVA_OBJS): Added boehm.o.
14480         (boehm.o): New target.
14481         * Make-lang.in (JAVA_SRCS): Added boehm.c.
14482         * java-tree.h (flag_use_boehm_gc): Declare.
14483         (get_boehm_type_descriptor): Declare.
14484         * lang.c (lang_f_options): Added `use-boehm-gc'.
14485         (flag_use_boehm_gc): New global.
14486         * lang-options.h: Added -fuse-boehm-gc.
14487         * boehm.c: New file.
14488         * class.c (get_dispatch_table): If class uses a Boehm type
14489         descriptor, put it in the vtable.
14490         (make_class_data): Removed dead code.
14492 2000-03-03  Per Bothner  <per@bothner.com>
14494         * decl.c (init_decl_processing):  Initialize sizetype properly.
14496 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14498         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14499         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14500         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14501         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14502         (jcf_parse): New local `current'. Load innerclasses seen in outer
14503         context being processed.
14504         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14505         * jcf-write.c (append_innerclasses_attribute): New function.
14506         (append_innerclasses_attribute_entry): Likewise.
14507         (get_access_flags): Handle static classes. Set anonymous and local
14508         classes to be private.
14509         (generate_classfile): Attribute count adjusted. Call
14510         append_innerclasses_attribute.
14511         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14512         PURE_INNER_CLASS_TYPE_P.
14513         * parse.y (parser_qualified_classname): New parameter `is_static',
14514         produce non qualified name accordingly.
14515         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14516         (create_interface): Added argument to parser_qualified_classname.
14517         (create_class): Added argument to parser_qualified_classname. Setup
14518         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14519         (add_inner_class_fields): Fixed indentation.
14520         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14521         (method_declarator): Fixed typo in comment.
14522         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14523         (build_current_thisn): Likewise.
14524         (patch_method_invocation): Likewise.
14526 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14528         * decl.c (current_function_decl): Move to toplev.c.
14530 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14532         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14533         (DECL_BIT_INDEX): Use underlying representation.
14534         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14536 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14538         * expr.c (build_java_ret): Pass proper type to size_binop.
14540 2000-02-25  Anthony Green  <green@cygnus.com>
14542         * expr.c (build_class_init): Mark the decl to be ignored by
14543         check_init.
14544         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14545         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14546         * class.c (init_test_hash_newfunc): New function.
14547         (decl_hash): New function.
14548         (decl_compare): New function.
14549         * decl.c (emit_init_test_initialization): New function.
14550         (complete_start_java_method): Traverse the init test hashtable,
14551         calling emit_init_test_initialization.
14552         (always_initialize_class_p): Define.
14553         * expr.c (build_class_init): Use initialization tests when
14554         emitting class initialization code.
14555         (always_initialize_class_p): Declare.
14556         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14557         1.
14558         * java-tree.h: Include hash.h.
14559         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14560         (struct lang_decl): Add init_test_table field.
14561         (init_test_hash_entry): Define.
14563 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14565         * gjavah.c (main): Avoid using `argi' to report unimplemented
14566         options.
14568 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14570         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14571         initialize locals to avoid warnings. Local `exception_type' moved
14572         into if statement.
14574 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14576         * parse.y (resolve_expression_name): Use `orig' as a second
14577         argument to resolve_field_access.
14578         (resolve_field_access): Removed unnecessary code when dealing with
14579         static fields.
14581 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14583         * class.c (push_super_field): Don't push the field twice.
14584         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14585         * parse.h (java_reorder_fields): Prototyped.
14586         * parse.y (java_reorder_fields): New function.
14587         (java_layout_class): Simplified not to worry about re-ordering.
14589 2000-02-23  Tom Tromey  <tromey@cygnus.com>
14591         * gjavah.c (print_name): In JNI case, correctly quote string.
14592         (print_method_info): Don't handle overrides in JNI mode.
14594 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14596         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14597         value type set to `boolean_type_node'.
14599 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14601         * jcf-dump.c (main): Test for correct condition after
14602         output file creation.
14604 2000-02-19  Anthony Green  <green@cygnus.com>
14606         * jcf-depend.c (add_entry): Fix test for first list entry.
14608 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14610         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14611         * constants.c (build_constants_constructor): Likewise.
14613 2000-02-19  Anthony Green  <green@cygnus.com>
14615         * jcf-depend.c (add_entry): Add entries to the end of the list.
14617 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
14619         * decl.c (INT_TYPE_SIZE): Define if necessary.
14620         (expand_java_return): Handle the case of a native integer smaller
14621         than a JVM integer.
14623 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14625         * gjavah.c (help): Use GCCBUGURL.
14626         * jv-scan.c (help): Likewise.
14627         * jcf-dump.c (help): Likewise.
14629 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14631         * jcf-write.c (generate_bytecode_insns): Don't generate empty
14632         `finally' clauses.
14634 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14636         * jcf-parse.c (load_class): Call `fatal' if no file containing
14637         the target class are found.
14639 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
14641         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14642         lex.c, lex.h, and PARSE_H to...
14643         (parse.o, parse-scan.o): ...here, respectively.
14645         * lex.c: Split out code that may trigger SIGFPE from yylex()
14646         to its own function.
14647         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14649 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14651         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14653 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14655         * parse.y (outer_field_access_p): Stop in time when outer contexts
14656         are exhausted.
14657         (resolve_qualified_expression_name): Properly qualify *everything*
14658         after a package.type to be resoled as expression names.
14659         (find_applicable_accessible_methods_list): Save/restore `class' to
14660         isolate it from a possible outer context search.
14662 2000-02-15  Tom Tromey  <tromey@cygnus.com>
14664         * gjavah.c (jni_print_char): New function.
14665         (print_full_cxx_name): Use it.
14666         (decode_signature_piece): Likewise.
14667         (print_cxx_classname): Likewise.
14669 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14671         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14672         version.o.
14673         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14675         * gjavah.c: Include version.h.
14677         * jcf-dump.c: Likewise.
14679         * jv-scan.c: Likewise.
14681 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14683         * parse.y (outer_field_access_fix): First parameter now a tree
14684         node. Check for assignment to final. First argument to
14685         build_outer_field_access_fix modified to accommodate prototype.
14686         (build_outer_field_access): Don't check for assignment to final
14687         here.
14688         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14689         possibly returned by outer_field_access_fix. Changed
14690         outer_field_access_fix's first argument.
14691         (check_final_assignment): $finit$'s context is OK.
14692         (patch_unaryop): Use node instead of its line/column value when
14693         calling outer_field_access_fix.
14695 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14697         * parse.y (interface_declaration:): No longer tagged
14698         <node>. Re-installed default action.
14699         (class_member_declaration:): Handle inner interfaces.
14700         (interface_member_declaration): Handle inner interfaces and
14701         classes.
14702         (create_interface): Push error if one seen. Suspend parsing
14703         context when processing an inner interface.
14704         (register_fields): Inner class static field limitations not to
14705         apply to inner interfaces.
14707 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14709         * jcf-parse.c (load_class): Update `java_error_count' when a
14710         class' file can't be found.
14711         (parse.y): Avoid (byte)code generation when errors seen.
14713 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14715         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14716         decodes a valid node.
14717         (patch_binop): Handle TRUNC_DIV_EXPR.
14719 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14721         * parse.y (resolve_package): New local `acc'. Try to progressively
14722         build and guess a package and type name.
14724 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14726         * parse.y (find_applicable_accessible_methods_list): Load and
14727         layout the search class if necessary.
14728         (java_complete_tree): Keep to original type of the folded initial
14729         value.
14731 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14733         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14734         Generate error message if circularity is detected. New static
14735         local `list'.
14736         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
14737         * jcf-write.c (generate_bytecode_insns): Very simply handle
14738         SAVE_EXPR.
14739         * parse.y (java_check_circular_reference): Use
14740         `cyclic_inheritance_report' during report, if necessary.
14741         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14742         walking NEW_ARRAY_INIT twice.
14744 2000-02-09  Tom Tromey  <tromey@cygnus.com>
14746         * parse.y (check_class_interface_creation): Allow inner classes to
14747         be `private' or `protected', check modifiers' consistency. Prevent
14748         block local classes from bearing any modifiers.
14750 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14752         * except.c (check_start_handlers): Re-add prototype lost in last
14753         patch.
14754         (maybe_start_try): Remove excess argument to `check_start_handlers'.
14756 2000-02-09  Andrew Haley  <aph@cygnus.com>
14758         * decl.c (clear_binding_level): Remove excess initializer.
14759         (maybe_poplevels): Remove unused variable.
14760         (force_poplevels): Ditto.
14761         (struct binding_level): Add comment.
14763 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14765         * jcf-write.c (generate_classfile): Don't consider
14766         pre-initialization with reference value (use <clinit> instead.)
14767         * parse.y (java_fix_constructors): No generated constructor for
14768         interfaces.
14769         (build_outer_field_access): Removed debug message.
14770         (outer_field_expanded_access_p): Adapted to bytecode generation.
14771         (build_outer_field_access_method): Use fix_method_argument_names.
14772         (build_outer_method_access_method): Fixed indentation. Added
14773         comment. Handle access method generation for static and also void
14774         methods.
14775         (build_access_to_thisn): Inserted debug message.
14776         (maybe_build_thisn_access_method): Use fix_method_argument_names.
14777         (resolve_qualified_expression_name): Fixed comment.
14778         (not_accessible_p): Adapted to bytecode generation. Added comment.
14779         (patch_method_invocation): Added comment.
14780         (maybe_use_access_method): Fixed leading comment. Handle static
14781         methods.
14782         (java_complete_lhs): Don't shortcut handling of initialized upon
14783         declaration String type static fields when generating bytecode.
14784         (patch_unaryop): Handle outer field access when generating
14785         bytecode.
14787 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14789         * java-tree.h (FIELD_THISN): New macro.
14790         * jcf-write.c (append_synthetic_attribute): New function.
14791         (generate_classfile): Set "Synthetic" attribute on this$<n>,
14792         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14793         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14794         this$<n> fields.
14795         (build_outer_field_access): Turned on access functions usage and
14796         generation when compiling to bytecode.
14797         (maybe_use_access_method): Likewise.
14799 2000-01-25  Andrew Haley  <aph@cygnus.com>
14801         * java-except.h (struct eh_range): Add `expanded' field.
14802         (maybe_start_try): Add end_pc arg.
14803         (maybe_end_try): Ditto.
14804         * java-tree.h (force_poplevels): new function.
14805         * expr.c (expand_byte_code): Don't call maybe_start_try or
14806         maybe_end_try.
14807         * except.c (add_handler): Reset expanded.
14808         (expand_start_java_handler): Set expanded.
14809         (check_start_handlers): Don't expand a start handler that's
14810         already been expanded.
14811         (maybe_start_try): Add end_pc arg.  Only expand a handler which
14812         ends after end_pc.
14813         (expand_end_java_handler): call force_poplevels.
14814         (force_poplevels): new function.
14815         * decl.c (binding_level): Add start_pc of binding level.
14816         (maybe_pushlevels): Call maybe_start_try when pushing binding
14817         levels.
14818         (maybe_poplevels): Call maybe_end_try when popping binding levels.
14819         (LARGEST_PC): Define.
14820         (clear_binding_level): Use LARGEST_PC.
14822         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14823         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14824         (binding_depth, is_class_level, current_pc): new variables.
14825         (struct binding_level): ditto.
14826         (indent): new function.
14827         (push_jvm_slot): add debugging info.
14828         (maybe_pushlevels): ditto.
14829         (maybe_poplevels): ditto.
14830         (pushlevel): ditto.
14831         (poplevel): ditto.
14832         (start_java_method): ditto.
14833         (give_name_to_locals): comment only.
14834         * except.c (binding_depth, is_class_level, current_pc):
14835         new variables.
14836         (expand_start_java_handler): add debugging info.
14837         (expand_end_java_handler): ditto.
14839 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14841         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14842         (print_name_for_stub_or_jni, process_file): Constify a char*.
14844 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14846         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14848 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14850         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14851         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14852         defined to be 1.
14854 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14856         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14857         * java-tree.h (TYPE_II_STMT_LIST): New macro.
14858         (struct lang_type): New field `ii_block'.
14859         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14860         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14861         * parse.h (struct parser_ctxt): New field `instance_initializers'.
14862         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14863         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14864         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14865         macros.
14866         * parse.y (add_instance_initializer): New function.
14867         (in_instance_initializer): New static global.
14868         (class_body_declaration:): Link instance initializer block.
14869         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14870         (array_creation_expression:): Remove unused local.
14871         (java_parser_context_push_initialized_field): Fixed leading
14872         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14873         CPC_INSTANCE_INITIALIZER_LIST.
14874         (java_parser_context_pop_initialized_field): Likewise.
14875         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14876         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14877         CPC_INITIALIZER_STMT.
14878         (fix_constructors): New local `class_type'. Use it. Call
14879         add_instance_initializer.
14880         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14881         (patch_return): Forbid return in instance initializers.
14882         (patch_throw_statement): Enforce exception handling in the context
14883         of instance initializers.
14885 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14887         * Make-lang.in (java.mostlyclean): Remove executables in
14888         `mostlyclean'.
14890 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14892         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14893         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14894         (java_float_finite): Convert to use union Word from javaop.h.
14895         (java_double_finite): Convert to use union DWord from javaop.h.
14897 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14899         * gjavah.c (options): Added `jni' entry.
14900         (help): Document -jni.
14901         (flag_jni): New global.
14902         (process_file): Handle JNI output.  Don't print text from
14903         -prepend, -add, etc, when generating stubs.  Only remove `.class'
14904         suffix if it actually exists.
14905         (main): Create a `.c' file when run with `--jni --stubs'.  Create
14906         correct output file name with `--jni'.
14907         (print_include): Mangle header name differently in JNI case.
14908         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14909         method list.
14910         (print_method_info): Handle JNI case.  Put signature info into
14911         method name.  Handle case when STREAM is NULL.
14912         (print_name_for_stub_or_jni): New function.
14913         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
14914         (print_cxx_classname): Handle JNI.
14915         (print_full_cxx_name): Likewise.
14916         (decode_signature_piece): Likewise.
14917         (overloaded_jni_method_exists_p): New function.
14918         (struct method_name): Added `signature' and `sig_length' fields.
14919         (HANDLE_END_FIELD): Do nothing in JNI mode.
14921 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14923         * jv-scan.c: Include version.c, <getopt.h>.
14924         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14925         (options): New array.
14926         (usage): New function.
14927         (version): New function.
14928         (main): Use getopt_long to parse command line.
14929         * jcf-dump.c: Include version.c, <getopt.h>.
14930         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14931         OPT_JAVAP): New macros.
14932         (options): New array.
14933         (usage): Return `void'.  Changed message.
14934         (help): New function.
14935         (version): New function.
14936         (main): Use getopt_long_only to parse command line.
14937         * gjavah.c: Include <getopt.h>.
14938         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14939         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14940         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14941         (options): New array.
14942         (java_no_argument): Removed.
14943         (help): Updated with missing options.
14944         (main): Use getopt_long_only to parse command line.
14945         (usage): Changed message.
14947 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14949         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14950         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14951         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14952         * parse.y (array_creation_expression:): Handle anonymous arrays.
14953         (build_array_from_name): Don't set `ret_name' if null.
14954         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14955         (qualify_ambiguous_name): Likewise.
14956         (java_complete_expand_class): Likewise.
14958 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14960         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14961         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14962         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14963         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14964         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14965         AIPL_FUNCTION_COMPLETED_INVOCATION.
14966         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14967         AIPL_FUNCTION_INVOCATION_READY.
14968         (AIPL_FUNCTION_DECLARATION): New enum entry.
14969         * parse.y (reorder_static_initialized): New function.
14970         (java_parser_context_pop_initialized_field): Use it.
14971         (add_inner_class_fields): Use
14972         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14973         augmented. Install marker after last alias initializer, if any.
14974         (generate_finit): Fixed typo. Don't try to retain only the used
14975         fields.
14976         (method_header): Compute and set DECL_FUNCTION_NAP.
14977         (method_declarator): Fixed comment. Insert alias initializer in
14978         parameter list.
14979         (build_alias_initializer_parameter_list): Fixed leading
14980         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14981         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14982         (java_complete_expand_class): Code to retain only used aliases
14983         removed.
14984         (java_complete_expand_methods): New local `first_decl'. Generate
14985         $finit$ first, then expand the constructors, regular methods and
14986         <clinit>.
14987         (java_complete_expand_method): Don't report error on missing
14988         return statement if previously detected bogus.
14989         (fix_constructors): Don't patch constructor parameters list.
14990         (patch_method_invocation): Use new AIPL enum values. Reverse
14991         alias initializer list for anonymous classes.
14993 2000-01-30  Anthony Green  <green@redhat.com>
14995         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14996         determine how many stack slots to pop.
14998 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15000         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15001         error handling/recovery.
15002         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15004 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15006         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
15007         FIELD_LOCAL_ALIAS_USED): New macros.
15008         (DECL_FUNCTION_NAP): New macro.
15009         (struct lang_decl): New field `nap'.
15010         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15011         (struct lang_type): New fields `finit_stmt_list' and
15012         `clinit_stmt_list'.
15013         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15014         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15015         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
15016         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
15017         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
15018         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
15019         (BUILD_THROW): Macro line separator re-indented.
15020         * parse.y (end_class_declaration): New function.
15021         (maybe_generate_pre_expand_clinit): New name for
15022         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15023         pre-expand static fields.
15024         (maybe_generate_clinit): Function deleted.
15025         (check_for_static_method_reference): Prototype's parameter list
15026         indented.
15027         (generate_finit): New name for maybe_generate_finit. Changed
15028         leading comment. Function rewritten to use
15029         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
15030         (build_alias_initializer_parameter_list): New function.
15031         (java_parser_context_pop_initialized_field): Likewise.
15032         (add_inner_class_fields): Likewise.
15033         (type_declaration:): Call end_class_declaration.
15034         (class_member_declaration:): Likewise.
15035         (formal_parameter_list:): Fixed typos.
15036         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
15037         element. Improved error handling.
15038         (block_statement:): Call end_class_declaration.
15039         (anonymous_class_creation:): Likewise.
15040         (create_anonymous_class): Fixed comments.
15041         (create_class): Call add_inner_class_fields.
15042         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15043         (method_header): Use MARK_FINAL_PARMS.
15044         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15045         (method_declarator): Propagate final argument flag.
15046         (craft_constructor): New local `artificial'. Call
15047         build_alias_initializer_parameter_list. Use
15048         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
15049         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
15050         necessary.
15051         (complete_expand_class): Get rid of unused outer context local
15052         alias fields.
15053         (java_complete_expand_methods): Fixed leading
15054         comment. Generate/pre-expand <clinit> first. Changed method
15055         expansion order to regular, $finit$, constructors, <clinit>.
15056         (java_complete_expand_method): Set current_function_decl.
15057         (fix_constructors): Fix constructor parameter list to account for
15058         outer context local alias initializers.
15059         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15060         (resolve_expression_name): Lookup outer context local aliases. New
15061         local `access', use it.
15062         (patch_method_invocation): Patch inner class ctor invocation with
15063         outer context local aliases initialization values. $finit$
15064         invocation patching now includes things generated with
15065         build_alias_initializer_parameter_list.
15066         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15067         (build_super_invocation): Likewise.
15068         (patch_assignment): Changed comment.
15070 2000-01-27  Andrew Haley  <aph@cygnus.com>
15072         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15073         (emit_if): Ditto.
15074         (emit_jsr): Ditto.
15076 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15078         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15079         concatenation.
15080         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15082         * parse.y (register_fields): Don't pass a format specifier to
15083         OBSOLETE_MODIFIER_WARNING.
15084         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15085         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15086         specifier.
15087         (check_modifiers): Change function into a macro.
15088         (check_class_interface_creation): Pass a literal format string.
15090 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15092         * buffer.h: PROTO -> PARAMS.
15093         * check-init.c: Likewise.
15094         * class.c: Likewise.
15095         * constants.c: Likewise.
15096         * convert.h: Likewise.
15097         * decl.c: Likewise.
15098         * except.c: Likewise.
15099         * expr.c: Likewise.
15100         * gjavah.c: Likewise.
15101         * java-except.h: Likewise.
15102         * java-tree.h: Likewise.
15103         * jcf-depend.c: Likewise.
15104         * jcf-dump.c: Likewise.
15105         * jcf-parse.c: Likewise.
15106         * jcf-path.c: Likewise.
15107         * jcf-reader.c: Likewise.
15108         * jcf-write.c: Likewise.
15109         * jcf.h: Likewise.
15110         * jv-scan.c: Likewise.
15111         * jvgenmain.c: Likewise.
15112         * jvspec.c: Likewise.
15113         * lang.c: Likewise.
15114         * lex.c: Likewise.
15115         * lex.h: Likewise.
15116         * parse-scan.y: Likewise.
15117         * parse.h: Likewise.
15118         * parse.y: Likewise.
15119         * typeck.c: Likewise.
15120         * verify.c: Likewise.
15121         * xref.c: Likewise.
15122         * xref.h: Likewise.
15123         * zextract.c: Likewise.
15124         * zipfile.h: Likewise.
15126 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15128         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15129         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15130         * constants.c (build_constant_data_ref): Check for cached
15131         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15132         in TYPE_CPOOL_DATE_REF.
15133         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15134         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15135         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15136         (LOCAL_FINAL): New macro.
15137         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15138         constant pool -- don't try to reuse.
15139         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15140         TYPE_LANG_SPECIFIC.
15141         (find_in_current_zip): Use TYPE_JCF.
15142         * parse.h (java_check_final): Prototype removed.
15143         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15144         (maybe_create_class_interface_decl,
15145         check_class_interface_creation): Likewise.
15146         (java_expand_finals): Function removed.
15147         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15148         (block_statement:): Fixed comment.
15149         (anonymous_class_creation:): Likewise.
15150         (check_class_interface_creation): Reversed Jan 12, 2000 extra
15151         argument patch.
15152         (check_class_interface_creation): Loosened error report on (inner)
15153         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15154         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15155         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15156         argument patch.
15157         (create_interface): Likewise.
15158         (anonymous_class_counter): New static global.
15159         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15160         patch. Fixed comments.
15161         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15162         anonymous_class_counter when declaring a toplevel class.
15163         (craft_constructor): Fixed constructor name when handling
15164         anonymous classes. Anonymous class constructors to feature hidden
15165         this$<n> parameter.
15166         (java_fix_constructors): Added comment.
15167         (java_check_final): Function removed.
15168         (java_complete_expand_methods): Fixed comment. Don't generate
15169         class data, save its outgoing constant pool instead.
15170         (verify_constructor_super): Skip anonymous class constructor
15171         hidden this$<n> parameter.
15172         (java_expand_classes): New local `saved_ctxp'. Removed call to
15173         java_expand_finals and java_check_final. Expand anonymous class
15174         constructors. Generate class data.
15175         (build_super_invocation): Skip anonymous class hidden this$<n>
15176         parameter.
15177         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15178         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15179         (set_java_signature): Likewise.
15181 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
15183         * gjavah.c: Delete ACC_VISIBILITY define.
15184         * jcf.h: Add ACC_VISIBILITY define.
15185         * parse.y: final: rule tagged <value>.
15186         (java_check_regular_methods): Use ACC_VISIBILITY define for
15187         default package access check.
15188         (local_variable_declaration_statement): Use final: rule.
15190 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
15192         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15193         (final:): New rule.
15195 2000-01-17  Tom Tromey  <tromey@cygnus.com>
15197         * gjavah.c (print_field_info): Allow non-static final fields.
15199 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15201         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15202         * parse.y (patch_anonymous_class): New function.
15203         (create_anonymous_class): Register incomplete type when the
15204         class/interface to extends/implement isn't known yet.
15205         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15206         (verify_constructor_super): Tuned error message.
15208 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15210         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15211         (ANONYMOUS_CLASS_P): New macro.
15212         (TYPE_SIGNATURE, TYPE_JCF): New macros.
15213         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15214         * parse.y (create_class): Added leading argument.
15215         (maybe_create_class_interface_decl,
15216         check_class_interface_creation): Likewise.
15217         (craft_constructor): New function.
15218         (verify_constructor_super): Added argument in prototype.
15219         (class_declaration:): Inserted leading argument.
15220         (for_begin:): Use FOR_LOOP_P.
15221         (anonymous_class_creation): Create WFL of the anonymous class to
15222         instantiate. Call build_new_invocation. Added comments.
15223         (check_class_interface_creation): Handle parameter `anonymous' in
15224         verbose mode class creation announce.
15225         (link_nested_class_to_enclosing): Exclude anonymous classes.
15226         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15227         anonymous class, even though they appear to have an enclosing
15228         context.
15229         (create_interface): Pass extra argument to
15230         check_class_interface_creation.
15231         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15232         (create_class): Call check_class_interface_creation and
15233         maybe_create_class_interface_decl with extra new argument. Don't
15234         add private this$<n> to anonymous classes.
15235         (method_declarator): Insert hidden this$<n> to anonymous class
15236         constructors.
15237         (java_fix_constructors): Deleted code creating default
15238         constructor. Call craft_constructor instead.
15239         (java_check_regular_methods): Set `saw_constructor' to 1 for
15240         anonymous classes.
15241         (fix_constructors): Pass extra argument to verify_constructor_super.
15242         (verify_constructor_super): New local `sdecl', use it. Search for
15243         matching constructor (possibly featuring arguments) in super
15244         class.
15245         (lookup_method_invoke): Craft constructor according to arguments
15246         list when dealing with anonymous class constructors.
15247         (build_super_invocation): Pass arguments to anonymous class super
15248         constructors.
15249         (search_loop): Use FOR_LOOP_P.
15250         (labeled_block_contains_loop_p): Likewise.
15252 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15254         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15255         (enclosing_context_p): New function.
15256         (get_access_flags_from_decl): Handle CLASS_STATIC.
15257         (maybe_layout_super_class): Extra first argument passed to
15258         do_resolve_class.
15259         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15260         ID_INIT_P.
15261         * decl.c (access0_identifier_node): New global.
15262         (init_decl_processing): access0_identifier_node initialized.
15263         (pushdecl): Set DECL_CONTEXT only on non type decls.
15264         * expr.c (lookup_field): Lookup inner class fields in enclosing
15265         contexts.
15266         (expand_invoke): Use ID_INIT_P.
15267         (expand_java_field_op): Use DECL_CLINIT_P.
15268         * java-tree.def (CLASS_LITERAL): New tree code.
15269         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15270         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15271         (struct lang_decl): New field `inner_access'.
15272         (enclosing_context_p): Prototyped.
15273         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15274         ID_CLINIT_P): New macros.
15275         (CLASS_STATIC): New macro.
15276         (CLASS_ACCESS0_GENERATED_P): New macro.
15277         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15278         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15279         INNER_CLASS_P): New macros.
15280         (DECL_INNER_CLASS_LIST): New macro.
15281         * jcf-parse.c (yyparse): Avoid the use of ANSI string
15282         concatenation.
15283         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15284         the shift value to int. Fixed typo in comment.
15285         * lex.c (inst_id, wpv_id): Initialize.
15286         * mangle.c (unicode_mangling_length): Take `$' into account.
15287         * parse.h (DRECOVER, RECOVER): Terminate properly.
15288         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15289         (typedef struct _jdep): New field `enclosing'.
15290         (JDEP_ENCLOSING): New macro.
15291         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15292         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15293         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15294         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15295         GET_ENCLOSING_CPC_CONTEXT): New macros.
15296         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15297         (do_resolve_class): Added extra argument in prototype.
15298         * parse.y (resolve_class): Added extra argument in prototype.
15299         (maybe_create_class_interface_decl): Likewise.
15300         (maybe_use_access_method, build_wfl_wrap): New functions.
15301         (java_complete_expand_classes, java_complete_expand_class):
15302         Likewise.
15303         (java_parser_context_push_initialized_field,
15304         java_parser_context_suspend, java_parser_context_resume):
15305         Likewise.
15306         (maybe_make_nested_class_name, make_nested_class_name,
15307         set_nested_class_simple_name_value,
15308         link_nested_class_to_enclosing, find_as_inner_class,
15309         find_as_inner_class_do, check_inner_class_redefinition,
15310         build_thisn_assign, build_current_thisn, build_access_to_thisn,
15311         maybe_build_thisn_access_method, build_outer_field_access,
15312         build_outer_field_access_methods, build_outer_field_access_expr,
15313         build_outer_method_access_method, build_new_access_id,
15314         build_outer_field_access_method, outer_field_access_p,
15315         outer_field_expanded_access_p, outer_field_access_fix,
15316         build_incomplete_class_ref, patch_incomplete_class_ref,
15317         create_anonymous_class): Likewise.
15318         (inst_id, wpv_id): New static global variables.
15319         (synchronized:): New rule, tagged <node>.
15320         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15321         rules.
15322         (anonymous_class_creation:): New rule, tagged <node>.
15323         (NEW_TK): Tagged <node>.
15324         (type_literals, array_type_literal): New rules, tagged <node>.
15325         (class_declaration:): Removed action when reducing by class_body:
15326         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15327         using GET_CPC in sub-rules.
15328         (class_member_declaration): Handle inner classes.
15329         (method_declaration): When reducing method_header:, reset
15330         current_function_decl when appropriate.
15331         (method_declarator:): Set the number of formal parameter to 0 for
15332         method declared without arguments.
15333         (constructor_declarator:): Likewise.
15334         (static_initializer:): List of elements kept in a list.
15335         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15336         use of the keyword `static' for type declarations.
15337         (block_statement:): Handle inner class declarations.
15338         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15339         type qualified `this'.
15340         (class_instance_creation_expression): Use anonymous_class_creation:
15341         to handle inner class instances creation. Handle qualified `new'.
15342         (something_dot_new): Added appropriate actions.
15343         (create_new_parser_context): New function.
15344         (java_push_parser_context, java_parser_context_save_global,
15345         java_parser_context_suspend): Use create_new_parser_context.
15346         (check_modifiers): Changed leading comment.
15347         (check_class_interface_creation): Handle interclasses.
15348         (add_superinterfaces): Fixed comment.
15349         (create_interface): Build qualified name from the raw_name instead
15350         of its matching WFL. Push the initialized fields list. raw_name added
15351         as an extra argument to maybe_create_class_interface_decl.
15352         (create_class): Build qualified name from the raw_name instead of
15353         its matching WFL. Removed assignment to current_parsed_class_un.
15354         Call PUSH_ERROR before returning an error. Suspend the current
15355         parser context when processing an inner class. Push the
15356         initialized fields list. raw_name added as an extra argument to
15357         maybe_create_class_interface_decl. Add the private this$<n>
15358         field.
15359         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15360         (register_fields): Get the class type from GET_CPC and handle
15361         previous errors.  Added code to handle the creation of static
15362         fields in inner classes. Initialized fields initialization
15363         statements kept in a list of lists.
15364         (maybe_generate_finit): Initialized fields initialization
15365         statements kept in a list of lists. Use GET_CPC.
15366         (maybe_generate_clinit): Likewise.
15367         (method_header): Use GET_CPC and GET_CPC_UN.
15368         (parser_qualified_classname): Handle inner classes.
15369         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15370         (java_fix_constructors): Hide pointer to enclosing context
15371         instance in constructor list when dealing with inner classes.
15372         (jdep_resolve_class): Call resolve_class with extra first argument
15373         JDEP_ENCLOSING.
15374         (resolve_class): Add enclosing context as a first extra argument
15375         to do_resolve_class.
15376         (do_resolve_class): Call find_as_inner_class. Handle WFLs
15377         properly.
15378         (resolve_no_layout): Extra argument added to resolve_class
15379         invocation.
15380         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15381         (java_get_real_method_name): Use GET_CPC_UN.
15382         (check_abstract_method_definitions): Use DECL_CLINIT_P.
15383         (java_check_abstract_methods): Handle static method declared in
15384         inner classes by an error.
15385         (java_check_regular_methods): Use DECL_CLINIT_P.
15386         (source_start_java_method): Also set DECL_MAX_LOCALS.
15387         (create_artificial_method): Call java_parser_context_save_global
15388         and java_parser_context_restore_global instead of saving/restoring
15389         the context by hand.
15390         (expand_start_java_method): Improved verbose mode message.
15391         (java_complete_expand_methods): Fixed leading comment. Use
15392         DECL_CLINIT_P.
15393         (fix_constructors): Added assignment to this$<n> if necessary.
15394         (java_expand_classes): Call java_complete_expand_classes instead
15395         of java_complete_expand_methods.
15396         (make_qualified_primary): Simplified.
15397         (merge_qualified_name): Optimized for missing left or right parts.
15398         (resolve_expression_name): Handle access to outer class fields from
15399         interclasses.
15400         (resolve_qualified_expression_name): New macro
15401         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15402         classes. Report error on non appropriate qualification of
15403         `new'. Handle qualified `this'.
15404         (not_accessible_p): Allow access to outer class private fields from
15405         inner classes.
15406         (patch_method_invocation): Handle method invocations through
15407         access methods and inner class constructor invocations.
15408         (find_applicable_accessible_methods_list): Search enclosing
15409         contexts of an inner class.
15410         (search_applicable_methods_list): Fixed typo.
15411         (argument_types_convertible): Handle inner class constructors'
15412         hidden outer context reference argument.
15413         (qualify_ambiguous_name): Handle qualified `this'.
15414         (java_complete_lhs): Handle use of field accessed through
15415         artificial access methods in various cases of assignments. Handle
15416         CLASS_LITERAL node.
15417         (check_final_assignment): Use DECL_CLINIT_P.
15418         (valid_ref_assignconv_cast_p): Handle the destination being an
15419         enclosing context of the source.
15420         (patch_unaryop): Handle use of field accessed through artificial
15421         access methods.
15422         (patch_return): Use DECL_CLINIT_P.
15423         (patch_throw_statement): Use DECL_CLINIT_P.
15424         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15425         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15426         ID_INIT_P.
15428 2000-01-16  Anthony Green  <green@cygnus.com>
15430         * parse.y (build_string_concatenation): Only use
15431         StringBuffer(String) shortcut if String arg is constant.
15433 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15435         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15436         the shift value to int. Fixed typo in comment.
15438 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15440         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15441         * jcf-write.c: Likewise.
15442         * parse.y: Likewise.
15443         * parse.c: Regenerate.
15445 2000-01-09  Anthony Green  <green@cygnus.com>
15447         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15448         bytecodes in the correct order.
15450 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15452         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15454 2000-01-06  Anthony Green  <green@cygnus.com>
15456         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15457         before building constant array decl.
15459 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15461         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15462         method invocation and typo in conditional expression.
15463         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15464         the appropriate NOTE_POP.
15465         * parse.y (patch_binop): Shift value mask to feature the right
15466         type.
15468 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15470         * class.c (assume_compiled, assume_compiled_node): Add static
15471         prototype.
15472         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15474         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15476         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15478         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15479         to `__modifier' to avoid stringifying it.
15481         * parse.y (verify_constructor_circularity): Don't call a variadic
15482         function with a non-literal format string.
15483         (java_check_abstract_methods): Move unreachable code inside
15484         `continue' statement.
15485         (lookup_method_invoke): Call xstrdup, not strdup.
15487         * expr.c (expand_java_field_op): Avoid the use of ANSI string
15488         concatenation.
15490         * jcf-parse.c (yyparse): Likewise.
15492         * jv-scan.c (main): Likewise.
15494 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15496         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15497         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15498         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15499         concatenation.
15501         * parse.y (synchronized, variable_redefinition_error,
15502         check_class_interface_creation, create_interface, create_class,
15503         method_header, finish_method_declaration,
15504         check_modifiers_consistency, method_declarator,
15505         complete_class_report_errors, check_abstract_method_definitions,
15506         java_check_regular_methods, check_throws_clauses,
15507         java_check_abstract_methods, read_import_dir,
15508         check_pkg_class_access, declare_local_variables, fix_constructors,
15509         cut_identifier_in_qualified, resolve_expression_name,
15510         resolve_qualified_expression_name, patch_method_invocation,
15511         java_complete_lhs, patch_assignment, try_builtin_assignconv,
15512         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15513         patch_exit_expr, patch_exit_expr, patch_switch_statement,
15514         patch_try_statement, patch_synchronized_statement,
15515         patch_throw_statement, check_thrown_exceptions,
15516         patch_conditional_expr): Likewise.
15518 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15520         * Makefile.in (LIBDEPS): Added gcc's errors.o
15521         (../jcf-dump$(exeext):): Link with gcc's errors.o
15522         (../gcjh$(exeext):): Likewise.
15523         * expr.c (expand_java_NEW): Layout the entire target type instead of
15524         laying out its methods only.
15525         (lookup_field): Layout the class after having loaded it.
15526         * java-tree.h (java_debug_context): Declared.
15527         * jcf-io.c (toplev.h): Included.
15528         (find_class): Removed assignment to jcf's outofsynch
15529         field. Force source file to be read if newer than its matching
15530         class file. Tweaked debug messages.
15531         * jcf-parse.c (jcf_out_of_synch): Deleted.
15532         (read_class): Call to jcf_out_of_synch removed.
15533         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15534         (jcf_out_of_synch): Prototype deleted.
15535         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15536         `deprecated' and `class_err': integer turned into bit-fields.
15537         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15538         * parse.y (package_list): New global.
15539         (package_declaration:): Record newly parsed package name.
15540         (extra_ctxp_pushed_p): Static global deleted.
15541         (java_parser_context_save_global): Create buffer context for the
15542         purpose of saving globals, if necessary.
15543         (java_parser_context_restore_global): Pop context pushed for the
15544         purpose of saving globals, if necessary.
15545         (java_debug_context_do): New prototype and function.
15546         (java_debug_context): Likewise.
15547         (do_resolve_class): Use already parsed package names to qualify
15548         and lookup class candidate.
15549         (java_pre_expand_clinit): Removed unnecessary local variable.
15551 1999-12-17  Tom Tromey  <tromey@cygnus.com>
15553         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
15554         fixes PR gcj/119.
15555         (process_file): Use `\n\' at end of each line in string.
15557 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15559         * expr.c (expand_invoke): Layout the loaded class before
15560         attempting to use it.
15561         (expand_java_field_op): Allow final field assignments to take
15562         place in $finit$.
15563         * typeck.c (convert): Return error_mark_node if expr is null.
15565 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15567         * class.c (class_depth): Return -1 if the class doesn't load
15568         properly.
15569         * expr.c (can_widen_reference_to): Check for errors during depth
15570         computation and return 0 accordingly.
15571         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15572         create default constructors and add an other error check.
15573         * parse.h (java_fix_constructors): Prototyped.
15574         * parse.y (java_pre_expand_clinit): Likewise.
15575         (build_super_invocation): Re-prototyped to feature one argument.
15576         (java_check_circular_reference): Directly use `current'.
15577         (java_fix_constructors): New function.
15578         (java_check_regular_methods): Don't create default constructors
15579         here, but abort if none were found.
15580         (java_complete_expand_methods): Pre-process <clinit> calling
15581         java_pre_expand_clinit.
15582         (java_pre_expand_clinit): New function.
15583         (fix_constructors): build_super_invocation invoked with the
15584         current method declaration as an argument.
15585         (build_super_invocation): Use the context of the processed method
15586         decl argument instead of current_class.
15587         * typeck.c (lookup_java_method): Take WFLs in method names into
15588         account.
15590 1999-12-14  Per Bothner  <per@bothner.com>
15592         * class.c (make_class_data): flag_keep_inline_functions to keep
15593         private methods in the method array.
15595 1999-12-15  Anthony Green  <green@cygnus.com>
15597         * check-init.c (check_init): Take into account both types of
15598         `throw's when checking for uninitialized variables.
15600 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15602         * parse.y (java_complete_lhs): Force conversion of array
15603         dimensions to int_type_node, that's what runtime's ABI expects.
15605 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15607         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15608         operand of a WFL, until the Java front-end gets fixed with regard
15609         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15611 1999-12-10  Andrew Haley  <aph@cygnus.com>
15613         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15614         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15615         expr.c (build_java_athrow): Add support for sjlj-exceptions.
15616         java-tree.h: Ditto.
15617         jcf-write.c: Ditto.
15619 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15621         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15622         before calling expand_eh_region_start and expand_start_all_catch.
15623         * except.c (expand_start_java_handler): Switch to permanent
15624         obstack before calling expand_eh_region_start.
15625         (expand_end_java_handler): Switch to permanent obstack before
15626         calling expand_start_all_catch.
15628 1999-12-5  Anthony Green  <green@cygnus.com>
15630         * decl.c (init_decl_processing): Mark throw_node as a noreturn
15631         function with side effects.
15632         (init_decl_processing): Mark all memory allocating DECLs with
15633         DECL_IS_MALLOC.
15635 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15637         * except.c (expand_end_java_handler): Call
15638         expand_resume_after_catch and end_catch_handler.
15640 1999-11-30  Anthony Green  <green@cygnus.com>
15642         * verify.c (verify_jvm_instructions): Create new return label
15643         chain if non existent (don't rely on the verified state of the jsr
15644         target.)
15646 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15648         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15649         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15651         * parse.y (patch_assignment): Removed bogus final class test on
15652         lhs when checking on whether to emit an ArrayStoreException runtime
15653         check.
15654         * expr.c (expand_java_arraystore): Likewise.
15656 1999-11-28 Anthony Green <green@cygnus.com>
15658         * decl.c (find_local_variable): Reuse single slot decls when
15659           appropriate.
15661 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15663         * jcf-parse.c (saw_java_source): Global variable removed.
15664         (read_class): Don't use `saw_java_source'. Added extra braces.
15665         (yyparse): Code setting `saw_java_source' removed.
15667 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
15669         * except.c (emit_handlers): Zero catch_clauses after emitting them.
15671 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15673         * verify.c (merge_type_state): Non verified subroutines being
15674         considered more than once to trigger passive type merge.
15676 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15678         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15679         in case of error. Error message tuned.
15681 1999-11-21  Anthony Green  <green@cygnus.com>
15683         * constants.c (find_methodref_index): Unwrap method names before
15684         inserting them in the constant pool.
15686         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15688         * class.c (assume_compiled_node): New typedef.
15689         (assume_compiled_tree): New static data.
15690         (find_assume_compiled_node): New function.
15691         (add_assume_compiled): New function.
15692         (assume_compiled): New function.
15693         * class.c (make_class_data): Use assume_compiled.
15694         (is_compiled_class): Use assume_compiled.
15696         * java-tree.h (add_assume_compiled): Declare.
15698         * lang.c (lang_decode_option): Parse new options.
15700 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15702         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15703         int_type_node: that's what `_Jv_AllocObject' expects.
15705 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15707         * parse.y (lookup_method_invoke): Use lang_printable_name to
15708         reliably build the type name during error report. Fixes PR gcj/97.
15710 1999-11-09  Tom Tromey  <tromey@cygnus.com>
15712         * jcf-path.c: Include <sys/stat.h>.
15713         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
15714         (DIR_UP): New macro.
15716 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15718         * parse.y (source_end_java_method): Resume permanent allocation,
15719         reversing Apr 27 1998 patch.
15720         (patch_string_cst): Pop obstacks after having pushed the permanent
15721         ones.
15723 1999-11-05  Tom Tromey  <tromey@cygnus.com>
15725         * class.c (finish_class): Emit inlined methods if any native
15726         methods exist in the class.  Fixes PR gcj/85.
15728 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15730         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15731         (qualify_ambiguous_name): Likewise.
15733 1999-11-03  Godmar Back <gback@cs.utah.edu>
15735         * typeck.c: (lookup_java_method):  search all inherited
15736         interfaces when looking up interface method.
15738 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15740         * parse.y (method_header:): Issue error message for rule `type
15741         error'.
15742         (synchronized:): Error report when not using synchronized.
15744 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15746         * parse.y (resolve_qualified_expression_name): Prevent `this' from
15747         being used before the superclass constructor has been called.
15748         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15749         instead of `CALL_THIS_CONSTRUCTOR_P'.
15751 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
15753         * check-init.c: Fix typo in comment.
15755 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15757         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15758         and final method.
15760 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15762         * parse.y (expression_statement:): Call function to report
15763         improper invocation of a constructor.
15764         (parse_ctor_invocation_error): New function.
15766 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
15768         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15769         remember_end_note.
15771 1999-10-21  Tom Tromey  <tromey@cygnus.com>
15773         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15774         in generated `main'.
15776 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15778         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15779         (qualify_ambiguous_name): Likewise.
15781 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15783         * parse.y (java_complete_tree): fold_constant_for_init to work on
15784         permanent_obstack.
15785         (java_complete_lhs): Likewise.
15786         (array_constructor_check_entry): Complete an initializer element
15787         on permanent_obstack.
15789 1999-10-19  Tom Tromey  <tromey@cygnus.com>
15791         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15792         From Mike Moreton <mike@pillim.demon.co.uk>.
15794 1999-10-15  Greg McGary  <gkm@gnu.org>
15796         * java-tree.h (flag_bounds_check): Remove extern decl.
15797         * lang.c (flag_bounds_check): Remove global variable.
15798         (lang_f_options): Remove "bounds-check" entry.
15799         (lang_init_options): Default flag_bounds_check to "on".
15801 1999-10-14  Tom Tromey  <tromey@cygnus.com>
15803         * jvgenmain.c (usage): New function.
15804         (main): Use it.  Also, handle `-D' options.
15805         * jvspec.c (lang_specific_driver): Recognize -D.
15806         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15808         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15810 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15812         * jcf-dump.c (print_constant, disassemble_method): Don't call a
15813         variadic function with a non-literal format string.
15815         * parse-scan.y (report_main_declaration): Likewise.
15817         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15819         * parse.y (read_import_dir, patch_assignment, patch_binop,
15820         patch_array_ref): Likewise.
15822         * typeck.c (build_java_array_type): Likewise.
15824         * verify.c (verify_jvm_instructions): Likewise.
15826 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15828         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15830 1999-10-07  Anthony Green  <green@cygnus.com>
15832         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15833         where CHECK_PUT may fail for valid reasons.
15835         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15836         UNSAFE_PUTN): New macros.
15838 1999-10-04  Tom Tromey  <tromey@cygnus.com>
15840         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15841         well.  Fixes Java PR gcj/59.
15842         * parse-scan.y (yyerror): Report errors.
15844 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
15846         * decl.c (insert_block): Remove unconditional `abort'.
15848 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
15850         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
15851         FUNCTION_CODE now of type int.  All callers changed.
15852         Set the builtin's DECL_BUILT_IN_CLASS.
15854 1999-09-23  Tom Tromey  <tromey@cygnus.com>
15856         * jvspec.c (lang_specific_driver): Don't read spec file if
15857         -fsyntax-only given.
15859 1999-09-22  Tom Tromey  <tromey@cygnus.com>
15861         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15863         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15864         (WORDS_TO_LONG): Likewise.
15865         (WORDS_TO_DOUBLE): Likewise.
15867 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15869         * jcf-write.c (RELOCATION_VALUE_0): New macro.
15870         (RELOCATION_VALUE_1): Likewise.
15871         (emit_iinc, emit_reloc, push_constant1, push_constant2,
15872         push_in_const, push_long_const): Prototyped.
15873         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15874         (push_constant2): Likewise.
15875         (push_int_const): Cast find_constant1's integer arguments to `jword'.
15876         (find_constant_wide): Cast find_constant2's integer arguments to
15877         `jword'.
15878         (find_constant_index): Cast find_constant2's and find_constant2's
15879         integer arguments to `jword'.
15880         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15881         (emit_switch_reloc): Use RELOCATION_VALUE_0.
15882         (emit_if): Use RELOCATION_VALUE_1.
15883         (emit_goto): Likewise.
15884         (emit_jsr): Likewise.
15885         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15886         argument to push_long_const to HOST_WIDE_INT.
15888 1999-09-15  Andreas Schwab  <schwab@suse.de>
15890         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15892 1999-09-20  Nick Clifton  <nickc@cygnus.com>
15894         * lang.c (lang_decode_option): Extend comment.
15896 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15898         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15899         instead of fndecl.
15901 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15903         * gjavah.c (get_field_name, print_method_info, print_include,
15904         add_namelet): Use xmalloc, not malloc.
15906         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
15907         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15908         NULL pointer.
15910         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15912         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15914         * jcf-path.c (add_entry): Likewise.
15916         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15918         * jv-scan.c (xmalloc): Remove definition.
15920         * jvgenmain.c (xmalloc): Likewise.
15922         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15924         * lex.c (java_store_unicode): Use xrealloc, not realloc.
15926         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
15927         concat, not xmalloc/sprintf.
15928         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15929         (xstrdup): Remove definition.
15931         * parse.y (duplicate_declaration_error_p,
15932         constructor_circularity_msg, verify_constructor_circularity,
15933         check_abstract_method_definitions, java_check_regular_methods,
15934         java_check_abstract_methods, patch_method_invocation,
15935         check_for_static_method_reference, patch_assignment, patch_binop,
15936         patch_cast, array_constructor_check_entry, patch_return,
15937         patch_conditional_expr): Use xstrdup, not strdup.
15939         * zextract.c (ALLOC): Use xmalloc, not malloc.
15941 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15943         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15945         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
15946         (do_spec, lang_specific_pre_link, lang_specific_driver,
15947         input_filename, input_filename_length): Don't declare.
15948         (main_class_name, jvgenmain_spec, lang_specific_driver):
15949         Constify a char*.
15950         (lang_specific_driver): All calls to the function pointer
15951         parameter now explicitly call `fatal'.
15953 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15955         * parse.y (find_applicable_accessible_methods_list): Search
15956         abstract classes as interfaces.
15958 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15960         * class.c (finish_class): We're now outside a valid method
15961         declaration. Tell the rest of gcc so.
15963 1999-09-08  Bruce Korb  autogen@linuxbox.com
15965         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15967 1999-09-07  Tom Tromey  <tromey@cygnus.com>
15969         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15970         java-array.h.
15971         (decode_signature_piece): Don't emit "::" in JArray<>.
15972         (print_namelet): Only print trailing `;' when printing a class.
15974 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
15976         * java-tree.h: Delete declarations for all tree nodes now moved to
15977         global_trees.
15978         * decl.c: Delete their definitions.
15980 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
15982         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15983         * Makefile.in (OBJS): Add ggc-callbacks.o.
15984         (OBJDEPS): Likewise.
15986 1999-09-03  Tom Tromey  <tromey@cygnus.com>
15988         * parse.y (strip_out_static_field_access_decl): Return operand if
15989         it satisfies JDECL_P.
15991 1999-09-02  Tom Tromey  <tromey@cygnus.com>
15993         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15994         Handle nested arrays, like `[[I'.
15996 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15998         * class.c (finish_class): Remove unused parameter, all callers
15999         changed.
16001         * expr.c (build_java_athrow): Change return type to void.
16002         (java_lang_expand_expr): Make sure each case in switch returns a
16003         value.
16005         * java-tree.h (finish_class): Fix prototype to take void args.
16007         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16008         (main): Issue return from main, not exit.
16010         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16012         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16014         * jv-scan.c (main): Issue return from main, not exit.
16016         * parse.y (check_abstract_method_definitions,
16017         java_check_abstract_method_definitions): Add static prototypes.
16018         (java_complete_expand_methods): Fix call to `finish_class'.
16020         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16021         and `prevpc'.
16023 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16025         * lang.c (language_string): Constify.
16027 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16029         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16030         Remove hacks for stuff which comes from libiberty.
16032         * Make-lang.in: Likewise.
16034 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
16036         * Makefile.in (xref.o): Depend on xref.c explicitly.
16038 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16040         * java-tree.h (lang_printable_name): Constify a char*.
16042         * lang.c (lang_printable_name): Likewise.
16044 1999-08-27  Jeffrey A Law  (law@cygnus.com)
16046         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16047         comments in C code.
16049 1999-08-26  Tom Tromey  <tromey@cygnus.com>
16051         * gjavah.c (print_cxx_classname): Print "::" before qualified
16052         name.
16054 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16056         * parse.y (lookup_cl): Changed leading comment. Now does its best
16057         to set the column number.
16058         (qualify_ambiguous_name): Take WFL wrappers into account.
16060 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
16062         * verify.c (verify_jvm_instructions): Don't check instruction
16063         validity beyond end of method.
16065 1999-08-25  Tom Tromey  <tromey@cygnus.com>
16067         * jvspec.c (lang_specific_driver): Correctly handle --help again.
16069 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16071         * gjavah.c (print_name, print_base_classname, utf8_cmp,
16072         cxx_keyword_subst, generate_access, name_is_method_p,
16073         get_field_name, print_field_name, super_class_name, print_include,
16074         decode_signature_piece, print_class_decls, usage, help,
16075         java_no_argument, version, add_namelet, print_namelet): Add static
16076         prototype.
16077         (print_base_classname, utf8_cmp, cxx_keyword_subst,
16078         name_is_method_p): Constify a char*.
16079         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
16080         Provide a final else clause in an if-else-if.
16081         (print_field_info): Add missing final arg in function call to
16082         `print_field_name'.
16083         (print_method_info, decompile_method, decode_signature_piece,
16084         print_c_decl, print_full_cxx_name, print_stub,
16085         print_mangled_classname, super_class_name, print_include,
16086         add_namelet, add_class_decl, print_class_decls, process_file,
16087         help): Constify a char*.
16089         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16090         push_int_const, find_constant_wide, find_constant_index,
16091         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16092         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16093         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16094         emit_if, emit_goto, emit_jsr, call_cleanups,
16095         make_class_file_name): Add static prototypes.
16096         (generate_bytecode_return, generate_bytecode_insns): Pass a
16097         NULL_PTR, not a NULL_TREE.
16099         * jv-scan.c: Include "jcf.h".
16100         (main): Declare using DEFUN macro.
16102         * jvspec.c (find_spec_file, lang_specific_pre_link,
16103         lang_specific_driver): Add prototypes.
16104         (find_spec_file): Constify a char*.
16106         * keyword.gperf (hash, java_keyword): Add prototypes.
16108         * lang.c (lang_print_error): Add static prototype.
16109         (lang_init): Prefer memcpy over bcopy to avoid casts.
16111         * lex.c (yylex): Add static prototype.
16113         * parse-scan.y: Include "lex.c" earlier.
16115         * parse.h: Remove redundant declaration for `yylex'.
16117         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16118         labeled_block_contains_loop_p): Add static prototypes.
16119         (not_accessible_p): Make static to match prototype.
16121         * verify.c (start_pc_cmp): Don't needlessly cast away const.
16123 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16125         * parse.y (check_method_redefinition): Changed leading comment.
16126         (check_abstract_method_definitions): New function.
16127         (java_check_abstract_method_definitions): New function.
16128         (java_check_regular_methods): Call it.
16129         (verify_constructor_super): Fixed indentation.
16130         (lookup_method_invoke): Likewise.
16132 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16134         * parse.y (method_header): Return a null pointer if the current
16135         class node is null.
16136         (finish_method_declaration): Return if the current function decl
16137         is null.
16138         (source_start_java_method): Likewise.
16139         (java_method_add_stmt): Likewise.
16141 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16143         * class.c (emit_register_class): Removed unnecessary call to
16144         start_sequence.
16145         * parse.y (labeled_block_contains_loop_p): Removed unused local
16146         variable.
16148 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16150         * parse.y (java_refold): Added prototype.
16152 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16154         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16155         (java_stabilize_reference): Removed unnecessary `else'.
16156         (java_complete_lhs): Set flag to remember boolean. Call
16157         java_refold. Added comments.
16158         (java_decl_equiv): New function.
16159         (binop_compound_p): Likewise.
16160         (java_refold): Likewise.
16161         (patch_unaryop): Striped static field access assigned to decl and
16162         op. Changed promotion scheme for ++/-- operators.
16163         (search_loop): New function.
16164         (labeled_block_contains_loop_p): Likewise.
16165         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16166         comment.
16167         (patch_bc_statement): Call search_loop. Fixed comment.
16169 1999-08-14  Anthony Green  <green@cygnus.com>
16171         * expr.c (java_lang_expand_expr): Mark static array data as
16172         referenced.
16174 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
16176         * jvgenmain.c (main): NUL-terminate name_obstack.
16178 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16180         * check-init.c (check_bool2_init, done_alternative): Add static
16181         prototypes.
16183         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16184         (add_method, build_utf8_ref, build_class_ref,
16185         append_gpp_mangled_type, layout_class_method): Constify a char*.
16187         * decl.c (push_promoted_type, make_binding_level): Add static
16188         prototypes.
16189         (push_promoted_type, pushdecl): Constify a char*.
16191         * except.c (find_handler_in_range, link_handler,
16192         check_start_handlers): Add static prototypes.
16194         * expr.c (process_jvm_instruction): Constify a char*.
16196         * gjavah.c (main): Constify a char*.
16198         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16199         Constify a char*.
16201         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16202         static prototypes.
16203         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16204         munge, print_ents): Constify a char*.
16206         * jcf-dump.c (disassemble_method): Constify a char*.
16207         (print_constant_pool, print_exception_table): Add static prototypes.
16208         (print_constant, print_exception_table, main, disassemble_method):
16209         Constify a char*.
16211         * jcf-io.c (find_classfile, find_class): Likewise.
16213         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16214         (set_source_filename, predefined_filename_p): Add static prototypes.
16215         (set_source_filename, get_constant, get_class_constant,
16216         find_in_current_zip): Constify a char*.
16218         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16219         static prototypes.
16220         (add_entry, add_path, jcf_path_classpath_arg,
16221         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16223         * jcf-reader.c (get_attribute, jcf_parse_preamble,
16224         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16225         jcf_parse_one_method, jcf_parse_methods,
16226         jcf_parse_final_attributes): Add static prototypes.
16227         (get_attribute): Constify a char*.
16229         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16230         jcf_dependency_add_target, jcf_path_classpath_arg,
16231         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16233         * jv-scan.c (main): Constify a char*.
16234         (gcc_obstack_init): Add prototype arguments.
16236         * jvgenmain.c (gcc_obstack_init): Likewise.
16237         (main): Constify a char*.
16239         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16240         static prototypes.
16241         (put_decl_string, lang_print_error): Constify a char*.
16242         (lang_init): Remove redundant extern prototype.
16244         * mangle.c (emit_unicode_mangled_name): Constify a char*.
16246         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16247         Add static prototypes.
16248         (get_type_from_signature): Constify a char*.
16250         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16251         Add static prototypes.
16252         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16253         (verify_jvm_instructions): Constify a char*.
16255         * xref.c (xref_flag_value): Likewise.
16257         * xref.h (xref_flag_value): Likewise.
16259         * zextract.c (makeword, makelong): Add static prototypes.
16260         (makeword, makelong): Constify a uch*.
16262 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16264         * lang.c (java_dummy_print): Constify a char*.
16265         (lang_print_error): Likewise.
16266         (lang_init): Remove redundant prototype for `print_error_function'.
16267         (lang_init_source): Likewise.
16268         (lang_identify): Constify a char*.
16270 1999-08-09  Tom Tromey  <tromey@cygnus.com>
16272         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16273         (WORDS_TO_LONG): Likewise.
16274         (WORDS_TO_DOUBLE): Likewise.
16276 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16278         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16280         * expr.c (java_stack_pop, java_array_data_offset,
16281         build_java_throw_out_of_bounds_exception, case_identity,
16282         build_java_check_indexed_type): Add static prototypes.
16283         (linenumber_table, expand_invoke, expand_java_field_op,
16284         build_primtype_type_ref, expand_byte_code): Constify a char*.
16286         * java-tree.h (build_primtype_type_ref, linenumber_table):
16287         Constify a char*.
16288         (java_lang_expand_expr): Add prototype.
16290         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
16291         `java_lang_expand_expr'.
16293         * lex.c (java_lex_error): Constify a char*.
16294         (java_get_unicode, java_read_char, java_allocate_new_line,
16295         java_unget_unicode, java_sneak_unicode): Prototype.
16297         * parse-scan.y (current_class, package_name, method_declarator,
16298         report_class_declaration, yyerror): Constify a char*.
16300         * parse.h (java_report_errors): Prototype.
16301         (yyerror): Constify a char*.
16303         * parse.y (classitf_redefinition_error, check_modifiers,
16304         parse_jdk1_1_error, lookup_package_type,
16305         lookup_package_type_and_set_next, get_printable_method_name,
16306         purify_type_name): Constify a char*.
16307         (build_super_invocation, maybe_generate_finit,
16308         verify_constructor_super, parser_add_interface,
16309         add_superinterfaces, jdep_resolve_class, note_possible_classname,
16310         java_complete_expand_methods, java_expand_finals,
16311         cut_identifier_in_qualified, java_stabilize_reference,
16312         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16313         merge_string_cste): Prototype.
16314         (single_type_import_declaration, yyerror,
16315         variable_redefinition_error, build_array_from_name,
16316         build_unresolved_array_type, check_class_interface_creation,
16317         resolve_class, complete_class_report_errors,
16318         note_possible_classname, read_import_dir,
16319         find_in_imports_on_demand, resolve_package, fix_constructors,
16320         check_deprecation, lookup_method_invoke,
16321         maybe_build_primttype_type_ref, array_constructor_check_entry):
16322         Constify a char*.
16323         (java_complete_expand_methods, java_expand_finals): Make static.
16324         (convert_narrow): Remove static prototype.
16326 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
16328         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16330 1999-08-02  Richard Henderson  <rth@cygnus.com>
16332         * decl.c: Include defaults.h instead of expr.h.
16333         * parse.y: Likewise.
16335 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
16337         * java/decl.c (start_java_method): Change all uses of
16338         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16339         Ensure expr.h is included.
16340         * java/expr.c (pop_arguments): Ditto.
16341         * java/parse.y (expand_start_java_method): Ditto.
16343 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16345         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16347 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
16349         * decl.c: Include "function.h".
16350         * except.c: Likewise.
16351         * parse.y: Likewise.
16352         * Makefile.in: Update dependencies.
16354 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16356         * expr.c (build_java_soft_divmod): Provide a default case in switch.
16357         (java_lang_expand_expr): Mark parameters `target', `tmode' and
16358         `modifier' with ATTRIBUTE_UNUSED.
16360         * gjavah.c (process_file): Add braces around ambiguous `else'.
16362         * jcf-dump.c (print_access_flags, localvar_free): Change return
16363         type to void.
16365         * parse.y (java_complete_expand_method): Initialize variable
16366         `exception_copy'.
16367         (resolve_qualified_expression_name): Likewise for `field_decl'.
16368         (patch_method_invocation): Likewise for `class_to_search'.
16369         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16370         (patch_assignment): Likewise for `lhs_type'.
16372         * verify.c (verify_jvm_instructions): Remove unused variable
16373         `caller'.
16375 1999-07-25  Richard Henderson  <rth@cygnus.com>
16377         * decl.c (va_list_type_node): New.
16379 1999-07-25  Anthony Green  <green@cygnus.com>
16381         * gjavah.c (print_stub): New function.
16382         (METHOD_IS_NATIVE): New macro.
16383         (print_mangled_classname): Make static.
16384         (HANDLE_END_FIELD): Don't emit fields during stub generation.
16385         (process_file): Perform stub generation.
16386         (HANDLE_METHOD): Don't emit class decls during stub
16387         generation.
16388         (HANDLE_END_METHOD): Take into account stub generation.
16389         (print_method_info): Handle stub generation.
16390         (print_stub): New function.
16391         (print_cxx_classname): Make signature consistant with others.
16392         (help): Describe -stubs option.
16393         (main): Create stub file.
16394         (version): Use version.c.
16395         (print_full_cxx_name): New function.
16396         (print_c_decl): Use print_full_cxx_name.
16398 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16400         * check-init.c (check_init): Handle MAX_EXPR.
16402 1999-07-15  Andrew Haley  <aph@cygnus.com>
16404         * lang.c (flag_use_divide_subroutine): New variable.
16405         * typeck.c: (convert_ieee_real_to_integer): Bounds check
16406         fp-to-integer conversion.
16407         (convert): Call convert_ieee_real_to_integer when flag_fast_math
16408         is not set.
16410         * expr.c (build_java_soft_divmod): New function.
16411         (build_java_binop): Call build_java_soft_divmod if
16412         flag_use_divide_subroutine is set.
16413         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16414         soft_lrem_node: new builtin functions.
16415         (init_decl_processing) Initialize the new builtins.
16416         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16417         soft_lrem_node: new builtin functions.
16418         (build_java_soft_divmod): New function.
16419         * parse.y: Call build_java_soft_divmod if
16420         flag_use_divide_subroutine is set.
16421         * parse.c: Rebuilt.
16423         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16424         a --specs= arg) even if not linking.
16425         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16426         -fuse-divide-subroutine
16428 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16430         * parse.y (resolve_and_layout): Check methods only once.
16431         (resolve_qualified_expression_name): Verify thrown exceptions
16432         compatibility.
16433         (check_thrown_exceptions): Reject exceptions thrown in
16434         initializer. Error message tuned.
16436 1999-07-14  Andrew Haley  <aph@cygnus.com>
16438         * expr.c (expand_expr): Do not return the last statement in a
16439         block as the block's value.
16441 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16443         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16444         CALL_EXPR, to avoid order of evaluation changes.
16446 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16448         * parse.y (qualify_ambiguous_name): Do not use
16449         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16451 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16453         * check-init.c (check_init): Handle MAX_EXPR.
16454         * expr.c (force_evaluation_order): Force method call arguments to
16455         be evaluated in left-to-right order.
16456         * parse.y (qualify_ambiguous_name): Loop again to qualify
16457         NEW_ARRAY_EXPR properly.
16459 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16461         * parse.y (patch_invoke): Resolve unresolved invoked method
16462         returned type.
16463         (qualify_ambiguous_name): STRING_CST to qualify expression for
16464         type name resolution.
16466 1999-06-24  Andrew Haley  <aph@cygnus.com>
16468         * class.c (finish_class): Whenever a deferred method is
16469         output, rescan the list of methods to see if a new candidate for
16470         output can be found.
16472 1999-06-28  Tom Tromey  <tromey@cygnus.com>
16474         * jvspec.c (lang_specific_driver): Recognize --help.
16476 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16478         * parse.y (resolve_package): Fixed bogus return statement.
16479         (patch_method_invocation): Resolve method invocation beginning with
16480         a package name qualifier.
16482 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16484         * Make-lang.in (java.stage1): Depend on stage1-start.
16485         (java.stage2): Likewise for stage2-start.
16486         (java.stage3): Likewise for stage3-start.
16487         (java.stage4): Likewise for stage4-start.
16489 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16491         * parse.y (java_complete_lhs): When doing cross referencing, don't
16492         try to keep file location on a WFL expanded as a CALL_EXPR.
16494 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16496         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16497         compiling to class file a void method with an empty method body.
16498         As a side effect, the bytecode backend will generate the
16499         appropriate `return' instruction.
16501 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16503         * parse.y (lookup_package_type_and_set_next): New function prototype.
16504         (resolve_package): Search current and imported packages.
16505         (lookup_package_type_and_set_next): New function.
16507 1999-06-22  Andrew Haley  <aph@cygnus.com>
16509         * verify.c (verify_jvm_instructions): Check for pending blocks
16510         before invalid PC test and opcode switch, not after.
16512 1999-06-21  Andrew Haley  <aph@cygnus.com>
16514         * except.c (find_handler_in_range): The upper limit for exception
16515         ranges is exclusive, not inclusive: (start <= pc < end).
16516         (link_handler): find child pointer which points to outer by
16517         searching sibling list: previous code incorrectly assumed that
16518         outer->outer->first_child must point to outer.
16519         * verify.c (verify_jvm_instructions): FIXME added to code for
16520         `athrow'.
16521         (verify_jvm_instructions): Do not assume that the last block
16522         processed in a subroutine is a block which ends with a `ret'
16523         instruction.  With some control flows it is possible that the last
16524         block ends with an `athrow'.
16526 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16528         * parse.y (qualify_ambiguous_name): Reorganized the post
16529         evaluation of non WFL leading expression nodes.
16531 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16533         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16534         CONVERT_EXPR.
16536 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16538         * parse.y (qualify_ambiguous_name): Handle qualified expression
16539         beginning with a STRING_CST.
16541 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16543         * parse.y (register_fields): Set DECL_INITIAL on both
16544         pre-initialized static and public fields.
16545         (resolve_field_access): Static field access expressions to always
16546         use pointer types.
16547         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16548         qualification. CONVERT_EXPR to be resolved as an expression name.
16549         (java_complete_lhs): Identify and access qualified final
16550         initialized field in switch statement case expression.
16551         (fold_constant_for_init): Pre-initialized field decl constant to
16552         be folded.
16554 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16556         * parse.y (note_possible_classname): Mark returned node with
16557         QUALIFIED_P only if the original class name contained a '/'.
16559 1999-06-05  Anthony Green  <green@cygnus.com>
16561         * Make-lang.in (gcjh): More parallel build fixes.
16563 1999-06-03  Mike Stump  <mrs@wrs.com>
16565         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16567 1999-06-02  Anthony Green  <green@cygnus.com>
16569         * except.c (link_handler): Chain exception handlers in order.
16571 1999-06-02  Anthony Green  <green@cygnus.com>
16573         * expr.c (expand_byte_code): Fill unreachable bytecode regions
16574         with nops and process as usual in order to always set correct EH
16575         ranges.  Emit detailed warnings about unreachable bytecodes.
16577 1999-06-02  Anthony Green  <green@cygnus.com>
16579         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16580         constant.
16582 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16584         * parse.y (lookup_field_wrapper): Unified returned value to NULL
16585           or the searched field decl.
16587 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16589         * parse.y (fold_constant_for_init): Convert numerical constant
16590         values to the type of the assigned field.
16592 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16594         * expr.c (lookup_field): Relaxed the test on class loading error
16595         detection.
16596         * parse.y (fold_constant_for_init): Enabeled old code.
16598 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16600         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16601         decide the validity of the cast of a java.lang.Cloneable reference
16602         to an array.
16603         (patch_conditional_expr): Fixed first argument passed to
16604         binary_numeric_promotion.
16606 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16608         * parse.y (qualify_ambiguous_name): Take into account that a
16609         CONVERT_EXPR might specify a type as a WFL.
16611 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16613         * parse.y (patch_assignment): Save the rhs before using it as an
16614         argument to _Jv_CheckArrayStore.
16616 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16618         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16620 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16622         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16623         floating point literal only when the exponent indicator has been
16624         parsed.
16626 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16628         * parse.y (formal_parameter:): Construct argument tree list
16629         element even if a yet unsupported final parameter was encountered.
16631 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16633         * parse.y (finish_method_declaration): Issue errors for native or
16634         abstract methods declared with a method body, as well as for non
16635         native or non abstract methods with no method body.
16637 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16639         * class.c (build_utf8_ref): Initialize variable `field'.
16641         * decl.c (init_decl_processing): Initialize variable `field'.
16643         * expr.c (build_known_method_ref): Mark parameters `method_type',
16644         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16645         (process_jvm_instruction): Likewise for parameter `length'.
16647         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16648         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16649         ATTRIBUTE_UNUSED.
16651         * parse.y (maybe_generate_clinit): Remove unused variable
16652         `has_non_primitive_fields'.
16653         (find_in_imports_on_demand): Initialize variables `node_to_use'
16654         and `cl'.
16655         (patch_binop): Likewise for variable `prom_type'.
16656         (patch_unaryop): Likewise for variable `prom_type'.
16658         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16660         * xref.c (xref_table): Add missing initializer.
16662 1999-05-14  Tom Tromey  <tromey@cygnus.com>
16664         * java-except.h (struct eh_range): Removed unused `next' member.
16665         * verify.c (verify_jvm_instructions): Call check_nested_ranges
16666         after adding all exception handlers.  Sort exception ranges in
16667         order of start PC.
16668         (struct pc_index): New structure.
16669         (start_pc_cmp): New function.
16670         * except.c (add_handler): Return `void'.  Don't call link_handler;
16671         instead construct an ordinary linked list and do range
16672         coalescing.
16673         (check_nested_ranges): New function.
16674         (link_handler): Changed interface to allow merging of eh_ranges.
16675         Split overlapping ranges.  Return `void'.
16677 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16679         * parse.y (constructor_block_end:): New rule, tagged <node>.
16680         (constructor_body:): Use `constructor_block_end' instead of
16681         `block_end'.
16683 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16685         * parse.y (statement_nsi:): Pop `for' statement block.
16686         (java_complete_lhs): Labeled blocks containing no statement are
16687         marked as completing normally.
16689 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16691         * xref.c (xref_set_current_fp): New function, defined.
16692         * xref.h (xref_set_current_fp): New function, prototyped.
16694 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16696         * check-init.c (check_init): Take into account that
16697         LABELED_BLOCK_STMT can be empty.
16699 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16701         * parse.y (java_check_regular_methods): Warning check on not
16702         overriding methods with default access in other packages does not
16703         apply to `<clinit>'.
16704         (java_complete_lhs): If block body is an empty_stmt_node, replace
16705         it by NULL_TREE. This prevents gcc from generating an irrelevant
16706         warning.
16708 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16710         * check-init.c (check_init): Removed code accepting to see things
16711         falling through default:, when doing xrefs.
16712         * java-tree.h (do_not_fold): New global variable, declared.
16713         * parse.y (do_not_fold): New global variable, defined.
16714         (java_complete_expand_method): Set `do_not_fold' to the value of
16715         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16716         and reinstall them after them have been purged; do not check for
16717         initializations; do not issue missing return errors.
16718         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16719         when doing xrefs.
16720         (patch_binop): Skip the fold part when doing xrefs.
16721         (build_string_concatenation): Skip the concatenation part when
16722         doing xrefs.
16723         (patch_synchronized_statement): Do not generate a try-finally when
16724         doing xrefs.
16725         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16726         and keep the location where the throw was seen.
16727         * typeck.c (convert): When `do_not_fold' is set, do not attempt
16728         any treatment on the converted node an simply return a NOP_EXPR of
16729         the targeted type.
16730         * xref.c (xref_get_data): New function, defined.
16731         * xref.h (xref_get_data): New function, declared.
16732         (XREF_GET_DATA): Use xref_get_data.
16734 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16736         * gjavah.c (print_include): Cast the result of `strlen' to int
16737         when comparing against a signed value.
16738         (add_namelet): Likewise.
16740 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16742         * expr.c (expand_invoke): Mark parameter `nargs' with
16743         ATTRIBUTE_UNUSED.
16744         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16746         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16747         ATTRIBUTE_UNUSED.
16749         * jcf-reader.c (get_attribute): Cast a value to long
16750         when comparing against a signed expression.  Likewise.
16752         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16753         HOST_BITS_PER_CHAR.
16755 1999-05-11  Andrew Haley  <aph@cygnus.com>
16757         * parse.y (source_end_java_method): If the current method contains
16758         any exception handlers, force asynchronous_exceptions: this is
16759         necessary because signal handlers in libjava may throw exceptions.
16760         * decl.c (end_java_method): Ditto.
16762 1999-05-11  Tom Tromey  <tromey@cygnus.com>
16764         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16765         flags.
16766         * jvspec.c (THREAD_NAME): Removed.
16767         (GC_NAME): Likewise.
16768         (MATHLIB): Likewise.
16769         (WITHLIBC): Likewise.
16770         (GCLIB): Likewise.
16771         (THREADLIB): Likewise.
16772         (MATH_LIBRARY): Likewise.
16773         (lang_specific_driver): Don't add `-l' options to command line.
16774         Instead, add a single --specs option.  Recognize `-L' options and
16775         use them to search for spec file.
16776         (find_spec_file): New function.
16777         (SPEC_FILE): New define.
16779 1999-05-11  Dave Brolley  <brolley@cygnus.com>
16781         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16782         cpplib-enabled build.
16784 1999-05-05  Per Bothner  <bothner@cygnus.com>
16786         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
16787         temporarily zero it while calling rest_of_decl_compilation.
16789         * java-tree.h (string_ptr_type_node):  Add declaration.
16790         * decl.c:  Define and initialize string_ptr_type_node.
16791         * parse.y (patch_string_cst):  Use string_ptr_type_node.
16793         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
16794         * parse.y (for_statement):  Now unconditionally exit_block.
16795         (finish_labeled_statement):  No longer exit_block if for-loop.
16796         (patch_loop_statement):  Check harder if the loop is already labeled.
16798         * parse.y (patch_initialized_static_field):  Removed function.
16799         (maybe_generate_clinit):  Removed special handling for interfaces.
16800         (java_complete_expand_methods):  Do a preliminary java_complete_tree
16801         on <clinit> to determine if it can be removed.
16802         (java_complete_expand_method):  Remove special handling for <clinit>.
16803         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
16804         optimize if we get back empty_stmt_node.
16805         For MODIFY_EXPR, re-do checking of static initializers.
16806         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
16807         For VAR_DECL, pass correct context.
16809         * verify.c (verify_jvm_instructions):  Better error messages.
16811 1999-05-03  Tom Tromey  <tromey@cygnus.com>
16813         * parse-scan.y (interface_declaration): Call
16814         report_class_declaration for interfaces.
16816 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
16818         * Makefile.in: Remove -v from bison command lines.
16820 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16822         * check-init.c (check_init): Exclude a case of error when doing
16823         xrefs.
16824         * class.c (layout_class_method): Don't generate the error message
16825         twice when compiling from source.
16826         * lang-options.h: Added `-Wredundant-modifers' and
16827         `-Wunusupported-jdk11' flags and help text.
16828         * lang.c (lang_decode_option): Added support for
16829         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16830         flag_static_local_jdk11 and flag_redundant set accordingly.
16831         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16832         * parse.h (EXPR_WFL_ADD_COL): New macro.
16833         (DECL_END_SOURCE_LINE): Likewise.
16834         (DECL_INHERITED_SOURCE_LINE): Likewise.
16835         * parse.y (static_ref_err): New function, prototyped.
16836         (CCB_TK): Now tagged <operator>.
16837         (class_body:): Remember the location of the closing '}' of a class
16838         definition when doing xrefs.
16839         (block:): Likewise.
16840         (block_end:): Likewise.
16841         (create_class): Remember the location of the inherited class
16842         identifier when doing xrefs.
16843         (register_fields): Added test on first operand of `init' before
16844         testing it TREE_CODE.
16845         (method_header): Store the location of the class identifier in the
16846         class decl when doing xrefs.
16847         (finish_method_declaration): Don't combine first/last method line
16848         when doing xref.
16849         (java_check_regular_methods): Warning check on not overriding
16850         methods with default access on other packages move before check on
16851         static methods. Initialization of `aflags' also moved up.
16852         (resolve_expression_name): Call static_ref_err to report the error.
16853         (static_ref_err): New function, implemented.
16854         (resolve_field_access): Returned simplified static field access
16855         when doing xrefs.
16856         (resolve_qualified_expression_name): Check for illegal use of
16857         static fields in a non static context. Call static_ref_err to
16858         report error in various places.
16859         (java_complete_tree): Do not fold initialized static fields when
16860         doing xrefs.
16861         (java_complete_lhs): Likewise.
16863 1999-04-29  Anthony Green  <green@cygnus.com>
16865         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16866         create internal labels.
16867         (lookup_label): Ditto.
16869 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16871         * class.c (layout_class_method): Generate <clinit>'s rtl for
16872         interfaces.
16873         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16874         for interfaces' <clinit>.
16875         * expr.c (lookup_field): Search for fields in interfaces.
16876         (expand_invoke): Fixed indentation.
16877         (expand_java_field_op): Likewise. Use IS_CLINIT.
16878         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16879         (IS_CLINIT): New macro.
16880         * parse.y (type_declaration:): Call maybe_generate_clinit after an
16881         interface was parsed.
16882         (maybe_generate_clinit): Don't generate if the current class is an
16883         interface with only fields of primitive types.
16884         (reset_method_name): Use IS_CLINIT.
16885         (java_complete_expand_method): Expand <clinit> when it exists for
16886         interfaces. Use IS_CLINIT.
16887         (resolve_expression_name): Use DECL_CONTEXT instead of
16888         current_class to build static field references.
16889         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16890         ARRAY_REF when doing xreferencing.
16891         (check_final_assignment): Fixed typo in leading comment. Use
16892         IS_CLINIT.
16893         (patch_array_ref): Don't fully expand array references when
16894         xreferencing.
16895         (patch_return): Use IS_CLINIT.
16896         (patch_throw_statement): Likewise.
16898 1999-04-22  Tom Tromey  <tromey@cygnus.com>
16900         * Make-lang.in (JAVA_SRCS): Added check-init.c.
16902 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16904         * decl.c (predef_filenames, predef_filenames_size): New globals
16905         (init_decl_processing): predef_filenames and predef_filenames_size
16906         initialized.
16907         * java-tree.h (predef_filenames, predef_filenames_size): Declared
16908         extern.
16909         * jcf-parse.c (predefined_filename_p): New function.
16910         (yyparse): Check that files on the command line are specified only
16911         once and issue a warning otherwise.
16912         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16913         * parse.y (source_end_java_method): Nullify NOP method bodies, to
16914         avoid a gcc warning with -W -Wall turned on.
16915         (java_expand_classes): Abort if errors were encountered.
16916         (java_complete_lhs): If the cross reference flag is set, wrap
16917         field DECL node around a WFL when resolving expression name.
16919 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16921         * lang.c (lang_decode_option): Fixed returned value when parsing
16922         `-fxref=...' and `-Wall'.
16923         * parse.y (source_end_java_method): Do not generate code when
16924         flag_emit_xref is set.
16925         (resolve_expression_name): Do not build static field access when
16926         flag_emit_xref is set.
16927         (resolve_field_access): No special treatment on `length' when
16928         flag_emit_xref is set. Do not build qualified static field access
16929         when flag_emit_xref is set.
16930         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16931         when flag_emit_xref is set.
16932         (patch_assignment): Do not generate array store runtime check when
16933         flag_emit_xref is set.
16934         * xref.c (xref_flag_value): Fixed function declaration
16935         indentation.
16936         (xset_set_data): New function.
16937         * xref.h (xref_set_data): Added prototype for new function.
16938         (typedef struct xref_flag_table): New field data.
16939         (XREF_GET_DATA): New macro.
16941 1999-04-19  Tom Tromey  <tromey@cygnus.com>
16943         * xref.h (enum): Removed trailing comma.
16945         * parse.y (resolve_qualified_expression_name): Added missing
16946         `break'.
16948 1999-04-15  Anthony Green  <green@cygnus.com>
16950         * gjavah.c: New prototypes for java_float_finite and
16951         java_double_finite.
16953 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16955         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16956         references.
16958 1999-04-06  Jeffrey A Law  (law@cygnus.com)
16960         * Makefile.in (TREE_H): Add tree-check.h.
16961         (RTL_H): Add genrtl.h.
16963 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16965         * parse.y (patch_assignment): Added ArrayStoreException runtime
16966         check.
16968 1999-04-06  Per Bothner  <bothner@cygnus.com>
16970         * expr.c (pop_type_0):  New function.
16971         (pop_type):  Use pop_type_0.
16972         * java-tree.h (pop_type_0):  New declaration.
16973         * verify.c (verify_jvm_instructions):  Check return instructions.
16975         * parse.y (patch_binop):  Don't fold if non-constant and emiting
16976         class files.
16978 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16980         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16982         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
16983         (main_jcf): Don't define.
16984         (process_file): Don't set `main_jcf'.
16986         * java-tree.h (main_jcf): Don't declare.
16988         * jcf-parse.c (main_jcf): Add static definition.
16990         * lang.c (main_jcf): Don't define.
16992 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16994         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16996         * decl.c (copy_lang_decl): Likewise for `bcopy'.
16998         * jcf-depend.c: Include "config.h", not <config.h>.
17000         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
17001         `bcopy' to PTR.
17003         * jcf-path.c: Include "config.h", not <config.h>.
17005         * lex.c: Don't include various system header files.
17006         (java_init_lex): Cast the argument of `bzero' to PTR
17008         * parse-scan.y (java_push_parser_context): Likewise.
17010         * parse.y (java_push_parser_context): Likewise.
17011         (patch_bc_statement): Match format specifier to variable argument.
17013         * xref.c: Don't include <stdio.h>.
17015 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17017         * parse.y (struct parser_ctxt *ctxp): Now global.
17018         (declare_local_variables): Use WFL compound value for the
17019         declaration source line value, when doing cross-referencing.
17021 1999-03-31  Tom Tromey  <tromey@cygnus.com>
17023         * gjavah.c (print_field_info): Allow constants of other types.
17024         (print_include): Generate include when new name is proper prefix
17025         of already printed name.
17026         (add_namelet): Likewise.
17027         (cxx_keyword_subst): New function.
17028         (print_method_info): Use it.
17029         (print_field_name): New function.
17030         (get_field_name): New function.
17031         (print_field_info): Use get_field_name and print_field_name.
17033 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17035         * Makefile.in (keyword.h): Generate using gperf language 'C', not
17036         'KR-C', so gperf uses the `const' keyword on strings.
17038         * keyword.gperf (java_keyword): Const-ify a char*.
17040 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17042         * parse.y (patch_bc_statement): Fixed identation and a bogus
17043         `printf' format.
17045 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17047         * parse.y (patch_assignment): Allow static variables in other
17048         classes to be assigned.
17050 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17052         * class.c (maybe_add_interface): Remove unused variable
17053         `interface_binfo'.
17054         (make_class_data): Use = for assignment, not ==.  Likewise.
17055         (emit_register_classes): Remove unused variable `decl'.
17057         * lex.c: Fix comment so as not to contain an embedded `/*'.
17059         * verify.c (verify_jvm_instructions): Remove unused variable
17060         `self_type'.
17062 1999-03-27  Per Bothner  <bothner@cygnus.com>
17064         * parse.y (complete_loop_body):  Rename to finish_loop_body.
17065         (complete_labeled_statement):  Rename to finish_labeled_statement.
17066         (complete_for_loop):  Rename to finish_for_loop.
17067         (complete_method_declaration):  Rename to finish_method_declaration.
17069         * java-tree.h (continue_identifier_node):  New global node.
17070         * decl.c:  Define and initialize continue_identifier_node.
17071         * parse.y (generate_labeled_block):  Remove - no longer needed.
17072         (build_loop_body):  Use continue_identifier_node for continue block.
17073         (finish_labeled_statement):  Also do pop_labeled_block actions.
17074         (java_complete_lhs):  POP_LOOP even if error.
17075         (build_labeled_block):  Special handling for continue_identifier_node.
17076         (patch_loop_statement):  Re-organize.
17077         (patch_bc_statement):  Re-write.
17079 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17081         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17082         using a WFL compound value.
17083         * parse.y (xref.h): Include.
17084         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17085         WFL compound value.
17086         (register_fields): Set WFL compound value to lineno if doing
17087         xrefs.
17088         (java_complete_expand_method): Call expand_xref if flag_emit_xref
17089         is set.
17090         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17091         * xref.h (expand_xref): Prototype renamed from xref_generate.
17093 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17095         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17096         (GET_CURRENT_BLOCK): New macro.
17097         * parse.y (current_static_block): New global variable.
17098         (method_body:): Define action.
17099         (complete_method_declaration): Set current_function_decl to NULL
17100         when work on the current method is done.
17101         (declare_local_variables): Use GET_CURRENT_BLOCK.
17102         (java_method_add_stmt): Likewise.
17103         (java_complete_expand_method): Disable the use of `this' when
17104         expanding <clinit>.
17105         (enter_a_block): If no current method exist, use
17106         current_static_block to link static initializer blocks.
17107         (exit_block): Rewritten to use current_static_block when no current
17108         method decl exists.
17109         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17110         (patch_return): Forbid the use of `return' in static initializers.
17111         (patch_throw_statement): Fixed indentation. Issue specific error
17112         for uncaught thrown checked exception in static initializer
17113         blocks. Removed FIXME.
17115 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
17117         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17118         Link gcj from gcc.o.
17120 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17122         * parse.y (find_applicable_accessible_methods_list): When dealing
17123         with interface: ensure that a given interface or java.lang.Object
17124         are searched only once.
17126 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17128         * gjavah.c (print_c_decl): Remove unused argument `flags'.
17130         * jcf-dump.c (print_access_flags): Add braces around if-else.
17132         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17133         COMBINE_INPUTS.
17135         * lex.c (build_wfl_node): Add static prototype.
17137         * lex.h (build_wfl_node): Remove static prototype.
17139         * parse.y: Include lex.c early enough to declare everything needed.
17140         Ensure calls to `build_wfl_node' pass the proper arguments.
17141         (create_class): Remove unused variable `super_decl'.
17142         (get_printable_method_name): Initialize variable `name'.
17144 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17146         * Changelog: Fixed 1999-03-22 typos.
17147         * lang.c (lang_decode_option): Fixed typo in error string in the
17148         XARG section.
17150 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17152         * Makefile.in (JAVA_OBJS): Added entry xref.o.
17153         (xref.o): New rule.
17154         * java-tree.h (flag_emit_xref): Declared extern.
17155         * lang.c (xref.h): Included.
17156         (flag_emit_xref): New global variable.
17157         (lang_decode_option): Added support for -fxref.
17158         * xref.c: Created.
17159         * xref.h: Likewise.
17161 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
17163         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17164         linked with.
17166 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17168         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17169         $(srcdir)/../system.h and $(JAVA_TREE_H).
17170         (jcf-io.o): Depend on $(JAVA_TREE_H).
17171         (mangle.o): Likewise.
17173         * check-init.c (check_cond_init): Add static prototype.
17175         * class.c (build_java_method_type, hashUtf8String,
17176         make_field_value, get_dispatch_vector, get_dispatch_table,
17177         append_gpp_mangled_type, mangle_static_field): Likewise.
17178         (strLengthUtf8): Hide unused definition.
17179         (hashUtf8String): Const-ify.
17180         (make_field_value): Un-ANSI-fy.
17182         * constants.c: Move inclusion of jcf.h above java-tree.h.
17183         (set_constant_entry, find_class_or_string_constant,
17184         find_name_and_type_constant, get_tag_node,
17185         build_constant_data_ref): Add static prototype.
17187         * decl.c (push_jvm_slot, builtin_function,
17188         lookup_name_current_level): Likewise.
17189         (builtin_function): Const-ify.
17191         * except.c (expand_start_java_handler, expand_end_java_handler):
17192         Add static prototype.
17194         * expr.c (flush_quick_stack, push_value, pop_value,
17195         java_stack_swap, java_stack_dup, build_java_athrow,
17196         build_java_jsr, build_java_ret, expand_java_multianewarray,
17197         expand_java_arraystore, expand_java_arrayload,
17198         expand_java_array_length, build_java_monitor, expand_java_pushc,
17199         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17200         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17201         expand_compare, expand_test, expand_cond, expand_java_goto,
17202         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17203         expand_java_field_op, java_push_constant_from_pool): Likewise.
17205         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17206         (build_java_arraynull_check): Mark parameters `node' and `type'
17207         with ATTRIBUTE_UNUSED.
17208         (note_label): Likewise for parameter `current_pc'.
17209         (expand_java_call, expand_java_ret): Hide unused definition.
17211         * java-tree.h (make_class, build_constants_constructor,
17212         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17213         init_outgoing_cpool, register_class, emit_register_classes,
17214         java_layout_seen_class_methods): Prototype.
17215         (unicode_mangling_length): Const-ify.
17216         (append_gpp_mangled_name, append_gpp_mangled_classtype,
17217         emit_unicode_mangled_name, format_int, format_uint,
17218         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17219         jcf_print_utf8_replace, open_class): Prototype.
17221         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
17222         <stdio.h>.  Include tree.h/java-tree.h.
17223         (utf8_equal_string usage, process_class): Add static prototype.
17224         (open_class): Don't prototype this here.
17225         (utf8_equal_string): Match arguments to format specifiers.
17226         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17227         TABLE_SWITCH, disassemble_method): Likewise.
17229         * jcf-io.c: Include tree.h/java-tree.h.
17230         (open_class, find_classfile, jcf_print_utf8,
17231         jcf_print_utf8_replace): Const-ify.
17233         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17234         parse_class_file): Add static prototype.
17235         (find_in_current_zip): Match definition to existing static
17236         prototype.
17238         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17239         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17240         finish_jcf_block, define_jcf_label, get_jcf_label_here,
17241         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17242         write_chunks, adjust_typed_op, generate_bytecode_conditional,
17243         generate_bytecode_return, perform_relocations, init_jcf_state,
17244         init_jcf_method, release_jcf_state, generate_classfile):
17245         Add static prototype.
17246         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17247         (make_class_file_name): Const-ify.
17249         * jcf.h (find_classfile): Const-ify.
17251         * jv-scan.c (reset_report): Remove prototype.
17253         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17254         (error): Rewrite to allow varargs.
17256         * lang.c (lang_f_options): Const-ify.
17258         * lex.c (java_parse_escape_sequence): Add static prototype.
17259         (java_allocate_new_line): Match definition to existing static
17260         prototype.
17262         * mangle.c Include tree.h/java-tree.h.
17263         (unicode_mangling_length, emit_unicode_mangled_name,
17264         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17266         * parse.h (jdep_code): Remove trailing comma in enumeration.
17267         (java_get_line_col): Move prototype outside of !JC1_LITE test.
17268         (reset_report): Add prototype.
17270         * verify.c (push_pending_label, merge_types): Add static
17271         prototypes.
17273         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17275 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17277         * parse.y (find_applicable_accessible_methods_list): Extend the
17278         search to superinterfaces when relevant.
17279         (search_applicable_methods_list): New function.
17281 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17283         * class.c (unmangle_classname): Implemented stricter testing
17284         before setting the QUALIFIED_P flag on an identifier.
17286 1999-03-16  Per Bothner  <bothner@cygnus.com>
17288         * parse.y (java_complete_lhs):  Call force_evaluation_order
17289         after patch_newarray.
17290         (patch_binop):  Don't call fold if there are side effects.
17292 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17294         * parse.y (java_stabilize_reference): Use save_expr instead of
17295         building a SAVE_EXPR node.
17296         (java_complete_lhs): Patch the resulting string of the `+='
17297         operator (if necessary) and complete the RHS after having built
17298         the cast.
17300 1999-03-15  Per Bothner  <bothner@cygnus.com>
17302         * class.c (make_class):  Don't set CLASS_P here (because
17303         this function is also called by build_java_array_type).
17304         (push_class):  Set CLASS_P here instead.
17305         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
17307         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
17308         context.  If the context is class, perfer "super" over "synchronized".
17309         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
17311         * parse.y (create_class):  Don't call parser_check_super here;
17312         it is not robust.  Always wait until later.
17314         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
17315         match what JDK 1.2 does), but don't set ACC_PUBLIC.
17317 1999-03-13  Per Bothner  <bothner@cygnus.com>
17319         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
17320         * lex.h (UNGETC):  Change misleading macro.
17322 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17324         * parse.y (java_stabilize_reference): Return NODE when patching a
17325         COMPOUND_EXPR.
17326         (java_complete_lhs): Put parenthesis around truth values.
17328 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17330         * class.c (layout_class_method): Don't make rtl for interface
17331         methods.
17332         * parse.h (GET_TYPE_NAME): New macro.
17333         * parse.y (if_then_statement:): Fixed indentation.
17334         (if_then_else_statement:): Likewise.
17335         (for_statement:): Fixed spacing.
17336         (try_statement:): Fixed indentation.
17337         (create_interface): Don't force interfaces to be abstract.
17338         (method_header): Abstract methods are OK in interfaces.
17339         (declare_local_variables): Fixed typo in comment.
17340         (java_complete_expand_method): Fixed indentation.
17341         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17342         non accessible fields.
17343         (java_stabilize_reference): New function.
17344         (java_complete_lhs): Fixed indentation. Use
17345         java_stabilize_reference in compound assignment. Insert the
17346         cast. If not processing `+' fix string constants before processing
17347         binop.
17349 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17351         * constants.c (find_class_or_string_constant): Cast variable `j'
17352         to a `jword' when comparing against one.
17354         * expr.c (java_lang_expand_expr): Remove unused variables
17355         `has_finally_p' and `op0'.
17357         * gjavah.c (print_field_info): Cast a value to jint when comparing
17358         against one.  Likewise for a jlong.
17359         (add_namelet): Likewise cast a `sizeof' to an int when comparing
17360         against a signed quantity.
17362         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17363         (print_signature): Don't needlessly dereference variable `str'
17365         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17366         `max_locals' with ATTRIBUTE_UNUSED.
17367         (jcf_parse_class): Likewise for variable `index'.
17369         * parse.h (reverse_jdep_list): Remove static prototype.
17371         * parse.y (build_jump_to_finally): Remove prototype and definition.
17372         (reverse_jdep_list): Add static prototype.
17374         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17375         `assignment' and `expr_decl'.
17377         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17379 1999-03-12  Andrew Haley  <aph@cygnus.com>
17381         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17382         we'll need a directory separator and a null character.
17384 1999-03-10  Per Bothner  <bothner@cygnus.com>
17386         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
17388 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17390         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17391         interfaces.
17393 1999-03-05  Per Bothner  <bothner@cygnus.com>
17395         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
17397         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
17399         * class.c (layout_class_method):  A static method in a base class
17400         is never overridden, so treat it like it doesn't exist.
17401         However, do complain about private non-static method overriding
17402         public static method.
17404         * parse.y:  Don't set unused INITIALIZED_P flag.
17405         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
17407         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
17408         (build_array_from_name):  Re-order &index[string] to &string[index].
17410         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
17411         error_mark (it might catch more errors, but it is more likely to lose).
17413 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17415         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17416         (parse-scan.o): Depend on toplev.h.
17418         * class.c (make_method_value): Add prototype.  Make it static.
17419         Remove unused second argument, caller changed.
17421         * expr.c (java_lang_expand_expr): Remove unused variable
17422         `return_label'.
17424         * java-tree.h: Don't prototype find_in_current_zip.
17425         Add prototypes for verify_constant_pool, start_java_method,
17426         end_java_method, give_name_to_locals, expand_byte_code,
17427         open_in_zip, set_constant_value, find_constant1, find_constant2,
17428         find_utf8_constant, find_string_constant, find_class_constant,
17429         find_fieldref_index, find_methodref_index, write_constant_pool,
17430         count_constant_pool_bytes and encode_newarray_type.
17432         * jcf-dump.c: Remove unused variable `LONG_temp'.
17434         * jcf-parse.c: Include parse.h.
17435         (jcf_parse_source): Remove unused parameter, all callers changed.
17436         (jcf_figure_file_type): Add static prototype.
17437         (find_in_current_zip): Likewise.  Also remove unused parameter,
17438         all callers changed.
17439         (read_class): Initialize variable `saved_pos'.
17441         * jcf-reader.c (jcf_parse_preamble): Mark variables
17442         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17444         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17445         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17446         (java_parse_doc_section): Initialize variable `seen_star'.
17447         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17448         (java_lex_error): Mark parameters `msg' and `forward' with
17449         ATTRIBUTE_UNUSED.
17450         (java_get_line_col): Mark parameters `filename' and `line' with
17451         ATTRIBUTE_UNUSED.
17453         * parse-scan.y: Include toplev.h.
17454         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17456         * parse.h: use `struct JCF', not plain `JCF'.
17457         (java_parser_context_save_global, java_expand_classes
17458         java_parser_context_restore_global, java_parse): Add prototypes.
17460         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17461         `node'.
17463 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
17465         *  check-init.c (check_init):  COPYN takes word count, not bit count.
17467 1999-02-26  Per Bothner  <bothner@cygnus.com>
17469         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
17470         explicit build_decl.  (Avoids crash in reload when optimizing.)
17472 1999-02-25  Per Bothner  <bothner@cygnus.com>
17474         * decl.c (complete_start_java_method):  Handle synchronized method
17475         even when compiling from bytecode.
17477 1999-02-26  Tom Tromey  <tromey@cygnus.com>
17479         * gjavah.c (add_class_decl): Only generate `#include' if outer
17480         class is not the name of the class we are processing.  Correctly
17481         append `.h' in #include.
17482         (process_file): Clean up newlines around generated `#include's.
17483         (decode_signature_piece): Correctly handle inner classes.
17484         (struct include): New structure.
17485         (all_includes): New global.
17486         (print_include): New function.
17487         (add_class_decl): Use it.
17488         (process_file): Likewise.
17489         (add_class_decl): Generate include for java-array.h if array
17490         seen.
17491         (process_file): Don't generate java-array.h include.
17493         * gjavah.c (add_namelet): Check for standard package names here.
17494         (add_class_decl): Don't check for standard package names here.
17496 1999-02-25  Tom Tromey  <tromey@cygnus.com>
17498         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17499         When reading a zip file, only use strncmp if both strings are
17500         bigger than the buffer length.  Initialize `k' when looping
17501         through zip file.
17503 1999-02-24  Tom Tromey  <tromey@cygnus.com>
17505         * gjavah.c (struct namelet): New structure.
17506         (add_namelet): New function.
17507         (print_namelet): New function.
17508         (print_class_decls): Use add_namelet and print_namelet to generate
17509         namespaces and not classes.
17510         (method_printed): New global.
17511         (HANDLE_END_METHOD): Examine method_printed.
17512         (print_method_info): Set method_printed when required.  Print
17513         error if function to be ignored is marked virtual.  Handle $finit$
17514         method.
17515         (METHOD_IS_FINAL): New macro.
17516         (print_field_info): Use it.
17517         (HANDLE_METHOD): Clear method_printed.
17518         (method_pass): New global.
17519         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17520         (process_file): Do two passes over both fields and methods.
17521         (HANDLE_METHOD): Examine method_pass.
17522         (root): New global.
17523         (add_class_decl): New function.
17524         (print_class_decls): Don't scan over entire constant pool.
17526 1999-02-23  Tom Tromey  <tromey@cygnus.com>
17528         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17529         disable linking in that case.
17531 1999-02-20  Tom Tromey  <tromey@cygnus.com>
17533         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17534         not 0x1f.
17536 1999-02-21  Per Bothner  <bothner@cygnus.com>
17538         * decl.c (build_result_decl), java-tree.h:  New method.
17539         (complete_start_java_method):  Handle synchronized methods.
17540         Don't build DECL_RESULT here.  (Ordering dependency problem.)
17541         (start_java_method):  Call build_result_decl here instead  ...
17542         * parse.y (java_complete_expand_method):  ... and here.
17543         (expand_start_java_method): Don't call complete_start_java_method here.
17544         (java_complete_expand_method):  Call it here instead.
17545         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
17546         * java-tree.h:  ... here.
17548         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
17549         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
17550         for ARRAY_REF - it doesn't work when array bounds are checked.
17551         (patch_array_ref):  Handle it here instead.
17553         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
17555 1999-02-19  Per Bothner  <bothner@cygnus.com>
17557         Force left-to-right evaluation of binary operations etc.
17558         * expr.c (force_evaluation_order), java-tree.h:  New function.
17559         * parse.y (java_complete_lhs):  Pass binary operations, procedure
17560         calls, and ARRAY_REFs to force_evaluation_order.
17561         (various):  Set TREE_SIDE_EFFECTS more carefully.
17563         Tolerate random (non-UTF8) encoding in comments without complaining.
17564         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
17565         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
17567         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
17568         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
17570         * parse.y (java_complete_lhs):  Ignore an empty statement in a
17571         COMPOUND_EXPR.  Don't complain about empty statement after return.
17573 1999-02-19  Per Bothner  <bothner@cygnus.com>
17575         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
17576         in TREE_LIST - just chain the POINTER_TYPEs together.
17577         (resolve_class):  If type already resolved, return decl.
17578         After resolving, update TREE_TYPE(class_type), and name (if array).
17579         * parse.h (do_resolve_class), parse.y:  Make non-static.
17580         * class.c (maybe_layout_super_class):  Take this_class argument.
17581         Do do_resolve_class if necessary.
17582         (layout_class, layout_class_methods): Adjust calls appropriately.
17583         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17584         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
17585         * typeck.c (build_java_array_type):  Don't call layout_class.
17587 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17589         * parse.y (check_pkg_class_access): Allow private class access
17590         within the same package.
17591         (strip_out_static_field_access_decl): New function.
17592         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17593         operator argument before testing its nature.
17595 1999-02-03  Per Bothner  <bothner@cygnus.com>
17597         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
17598         (TRY_EXPR):  Simplify - it no longer has a finally clause.
17599         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
17600         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17601         * expr.c (java_lang_expand_expr):  Likewise.
17602         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
17603         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
17604         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
17605         (build_try_statement):  Remove finally parameter and handling.
17606         (build_try_finally_statement):  New function.
17607         (patch_try_statement):   No longer need to support finally clause.
17608         (try_statement):  Update grammar action rules.
17609         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
17610         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17612 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
17614         * jcf-parse.c (get_constant): Add braces around computation of 'd'
17615         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
17617 1999-02-17  Andrew Haley  <aph@cygnus.com>
17619         * class.c (build_utf8_ref): Back out broken patch which was
17620         intended to to output signatures using '.' as a separator.
17622         * class.c (make_class_data): Output signatures using '.' as a
17623         separator, rather than '/'.
17624         (mangled_classname): Likewise.
17625         (make_field_value): Likewise.
17626         (make_method_value): Likewise.
17627         * constants.c (alloc_class_constant): Likewise.
17628         * expr.c (build_invokeinterface): Likewise.
17630 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17632         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17633         of an ancient workaround.
17635 1999-02-10  Jeffrey A Law  (law@cygnus.com)
17637         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
17638         here anymore.
17640 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17642         * lex.c (yylex): Encode \0 as UTF8.
17644 1999-02-10  Tom Tromey  <tromey@cygnus.com>
17646         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17647         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17648         (libgcj_zip): Renamed.
17649         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17650         LIBJAVA_ZIP_FILE.
17651         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17653         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17654         (GC_NAME): Renamed -lgc to -lgcjgc.
17656 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17658         * lex.c (java_lang_cloneable): Initialize.
17659         * parse.y (java_lang_cloneable): New static variable.
17660         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17661         doing one more qualification round.
17662         (valid_ref_assignconv_cast_p): Reject null source or
17663         destination. Allow an array to be cast into java.lang.Cloneable.
17664         (patch_cast): Swapped two first arguments to first call to
17665         valid_ref_assignconv_cast_p.
17667 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17669         * parse.h: DECL_P renamed JDECL_P.
17670         * parse.y: DECL_P replaced by JDECL_P.
17671         (build_array_from_name): Always use pointer's type.
17672         (patch_bc_statement): Extra code to search continue target in a
17673         for loop. Fixed comments. Continue target is current loop when
17674         unlabeled.
17676 1999-02-05  Andrew Haley  <aph@cygnus.com>
17678         * class.c (make_class_data): The superclass of an interface should
17679         be null, not class Object.
17681         * lex.c (java_lex): Sign extend hex literals.
17683 1999-02-04  Andrew Haley  <aph@cygnus.com>
17685         * class.c (build_utf8_ref): Output signatures using '.' as a
17686         separator, rather than '/'.
17687         (make_class_data): Likewise.
17689 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
17691         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17692         mkstemp.o.  Get them from libiberty now.
17694 1999-02-02  Jeffrey A Law  (law@cygnus.com)
17696         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17698 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17700         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17701         from libiberty.h
17703 1999-02-02  Per Bothner  <bothner@cygnus.com>
17705         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17706         * jcf-write.c (generate_bytecode_return):  New function.
17707         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
17709         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
17710         generate special [fd]const_[01] instructions.
17712         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
17714         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
17715         handling OPCODE_lookupswitch or OPCODE_tableswitch.
17717 1999-02-01  Per Bothner  <bothner@cygnus.com>
17719         * parse.y (patch_method_invocation):  Handle calling static methods,
17720         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17722         * parse.y (java_complete_lhs):  Don't complain about unreachable
17723         exit condition in a do-while statement.
17725 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17727         * lex.c (java_read_char): Fixed utf8 decoding.
17728         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17729         range.
17730         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17731         comments. Local variable `all_primitive' is gone. Broadened
17732         acceptance of `0' to floating point targets. `long' can now be
17733         widened to `double' or `float'.
17734         (valid_method_invocation_conversion_p): Added leading
17735         comment. Fixed tabulation.
17736         (build_string_concatenation): Optimize out left or right empty
17737         string constants.
17739 1999-01-28  Per Bothner  <bothner@cygnus.com>
17741         * jcf-write.c (localvar_alloc):  Only emit entry for
17742         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17743         (generate_bytecode_insns):  Only call put_linenumber if
17744         debug_info_level > DINFO_LEVEL_NONE.
17745         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
17746         is specified, add -g1 (for compatibility wih javac).
17748 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
17750         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17751         gjavah.o, check-init.o, jv-scan.o
17753 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17755         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17757         * gjavah.c: Include config.h and system.h.
17759         * javaop.h (inline): Don't define, its handled by system.h.
17760         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17761         from `inline' to `static inline'.
17763         * jcf.h (inline): Don't define, its handled by system.h.
17765         * lex.c (inline): Likewise.
17767 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
17769         * lang-specs.h: Map -Qn to -fno-ident.
17771 1999-01-29  Richard Henderson  <rth@cygnus.com>
17773         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17775 1999-01-29  Tom Tromey  <tromey@cygnus.com>
17777         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17778         then cast it to Object before calling `append' method.
17780 1999-01-28  Per Bothner  <bothner@cygnus.com>
17782         * check-init.c (check_bool2_init, check_bool_init, check_init):
17783         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17784         * jcf-write.c (generate_bytecode_insns):  Likewise.
17786 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17788         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17789         * parse.y (patch_cast): Allow a boolean to be cast into a
17790         boolean.
17792 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17794         * parse.y: (class_declaration:): Fixed indentation.
17795         (class_member_declaration:): Extra `;' after field declaration now
17796         accepted.
17797         (interface_declaration:): Removed debug messages in error reports.
17798         (patch_binop): Nodes created and returned inherit the orignal
17799         node's COMPOUND_ASSIGN_P flag value.
17800         (patch_cast): Fix cast from char to floating point.
17802 1999-01-25  Andrew Haley  <aph@cygnus.com>
17804         * except.c, java-except.h (expand_resume_after_catch): new
17805         function.
17806         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17807         to branch back to main flow of control after a catch block.
17809 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17811         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17812         $(srcdir)/../system.h.
17813         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17814         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17815         (jcf-write.o): Likewise.
17816         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17817         (mangle.o): Depend on $(srcdir)/../toplev.h.
17818         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17819         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17821         * class.c: Include output.h and parse.h.
17822         (mangled_classname): Add the `const' keyword to a char*.
17823         (find_named_method): Hide unused function definition.
17824         (build_utf8_ref): Change type of variable `c' to unsigned char.
17825         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17826         (build_class_ref): Add the `const' keyword to a char*.
17827         (layout_class_method): Remove unused variable `buf'.
17829         * decl.c (find_local_variable): Remove unused variable `rtl'.
17830         (pushdecl): Likewise for variables `different_binding_level' and
17831         `oldglobal'.
17832         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17833         (maybe_build_cleanup): Likewise for parameter `decl'.
17835         * except.c (expand_start_java_handler): Mark parameter `range'
17836         with ATTRIBUTE_UNUSED.
17838         * expr.c: Include except.h.
17839         (pop_type): Remove unused variable `i'.
17840         (pop_value): Likewise for variables `n_words' and `i'.
17841         (expand_java_arrayload): Likewise for variable `convert'.
17842         (java_lang_expand_expr): Likewise for variables `op0', `type',
17843         `mode', `unsignedp', `node' and `elements'.
17844         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17845         `eh_ranges'.
17846         (process_jvm_instruction): Add a `const' qualifier to a char*.
17848         * gjavah.c (output_directory): Add the `const' keyword to a char*.
17849         (temp_directory): Likewise.
17850         (print_c_decl): Likewise.
17851         (print_method_info): Likewise.
17852         (decode_signature_piece): Likewise.
17853         (print_mangled_classname): Likewise.
17855         * java-except.h: Provide prototypes for maybe_start_try,
17856         maybe_end_try and add_handler.
17858         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17859         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
17860         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17861         init_expr_processing, push_super_field, init_class_processing,
17862         can_widen_reference_to, class_depth, verify_jvm_instructions,
17863         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17864         set_local_type, merge_type_state, push_type, load_type_state,
17865         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17866         emit_unicode_mangled_name): Add prototypes.
17868         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17869         (print_signature_type): Use ISDIGIT, not isdigit.
17870         (print_signature): Remove unused variable `j'.
17872         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17873         int when comparing against one.
17875         * jcf-parse.c: Include toplev.h.
17877         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
17878         (localvar_free): Remove unused variable `i'.
17879         (generate_bytecode_conditional): Likewise for variable `kind'.
17881         * jv-scan.c: Include config.h and system.h.  Remove redundant
17882         OS header and gansidecl.h includes.
17883         (warning): Add the `const' keyword to a char*.  Also add
17884         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
17885         __STDC__, when determining whether to use ANSI-isms.
17886         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
17887         (xmalloc): Don't redundantly prototype here.
17888         (main): Remove unused parameter `envp'.  Also fix the arguments
17889         passed to function `fatal' to match the format specifier.
17891         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17893         * mangle.c: Include toplev.h.
17894         (emit_unicode_mangled_name): Declare parameter `len'.
17896         * parse.y (parse_warning_context): Add the `const' keyword to a
17897         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
17898         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17899         (issue_warning_error_from_context): Add the `const' keyword to
17900         a char*.
17901         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
17902         not `__STDC__' for whether to use ANSI-isms.
17904         * typeck.c (incomplete_type_error): Mark parameters `value' and
17905         `type' with ATTRIBUTE_UNUSED.
17906         (parse_signature_type): Use ISDIGIT, not isdigit.
17908         * verify.c (check_pending_block): Add the `const' keyword to a char*.
17909         (verify_jvm_instructions): Likewise.  Remove unused variables
17910         `field_name' and `default_val'.
17912         * zextract.c: Include config.h and system.h.  Remove redundant
17913         OS header includes.
17915         * zipfile.h: Prototype `read_zip_archive'.
17917 1999-01-21  Andrew Haley  <aph@cygnus.com>
17919         * typeck.c (convert): Allow conversions to void type: some
17920         optimizations in gcc do this.
17922 1999-01-21  Andrew Haley  <aph@cygnus.com>
17924         * typeck.c (convert_ieee_real_to_integer): New function.
17925         (convert): When not using fast-math and using hardware fp, convert
17926         an IEEE NaN to zero.
17928 1999-01-18  Andrew Haley  <aph@cygnus.com>
17930         * parse.y (patch_binop): Do a type conversion from signed to
17931         unsigned and then back to signed when a ">>>" is found.
17933 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17935         * java-tree.h: (check_for_initialization): Added prototype.
17936         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17937         * parse.y (do_resolve_class): Removed unused locals.
17938         (read_import_dir): Likewise.
17939         (resolve_qualified_expression_name): Array creation
17940         expressions are valid primary expressions.
17941         (qualify_ambiguous_name): Likewise.
17942         (patch_synchronized_statement): Removed unused local.
17944 1999-01-17  Jeffrey A Law  (law@cygnus.com)
17946         * Makefile.in (zextract.o): Add dependencies.
17948         * Makefile.in: Do not put ^Ls at the start of a line.
17950 1999-01-15  Per Bothner  <bothner@cygnus.com>
17952         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
17953         sub-type the result of the call that gets the exception value.
17955         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
17956         don't call finish_class.
17958         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
17959         clear found before continuing.
17961         * verify.c (verify_jvm_instructions):  On an array load, allow
17962         and handle top of stack to be TYPE_NULL.
17964         * gjavah.c (generate_access):  Translate Java package private or
17965         protected access to C++ public, but with a comment.
17967 1999-01-13  Andrew Haley  <aph@cygnus.com>
17969         * expr.c (generate_name): Name prefix changed to avoid clashes
17970         with assembler temp labels.
17972         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17973         MODIFY_EXPR.  Without this, code for the assignment may not be
17974         generated at all and the synchronized statement will read an
17975         uninitialized variable.
17977 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17979         * class.c (maybe_layout_super_class): Fixed returned value.
17980         * lex.c: Added 1999 to the copyright.
17981         (java_init_lex): Initialize java_lang_imported.
17982         * lex.h: Added 1999 to the copyright.
17983         * parse.h: Added 1999 to the copyright.
17984         (REGISTER_IMPORT): Fixed typo in trailing macro.
17985         (CURRENT_OSB): New macro.
17986         (struct parser_ctxt): New fields osb_depth, osb_limit.
17987         * parse.y (java_lang_id): New global variable.
17988         (type_import_on_demand_declaration): Don't import java.lang.* twice.
17989         (array_creation_expression:): Use CURRENT_OSB.
17990         (dims:): Uses a stack to keep track of array dimensions.
17991         (cast_expression:): Use CURRENT_OSB.
17992         (find_expr_with_wfl): Return NULL if node found doesn't meet the
17993         conditions.
17994         (register_fields): Fixed typos in comment.
17995         (check_method_redefinition): Fixed comment indentation.
17996         (java_check_regular_methods): Set saved found wfl to NULL after
17997         having reinstalled it in the previously found DECL_NAME.
17999 1999-01-10  Richard Henderson  <rth@cygnus.com>
18001         * gjavah.c (java_float_finite): Use a union to do type punning.
18002         (java_double_finite): Likewise.
18004 1999-01-09  Per Bothner  <bothner@cygnus.com>
18006         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
18007         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18008         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
18009         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
18010         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18011         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
18013 1999-01-08  Per Bothner  <bothner@cygnus.com>
18015         * check-init.c (check_init):  If compiling to native, we don't
18016         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
18018 1999-01-08  Tom Tromey  <tromey@cygnus.com>
18020         * parse-scan.y (variable_declarator_id): Set or increment
18021         bracket_count.
18022         (bracket_count): New global.
18023         (formal_parameter): Handle case where bracket pairs trail variable
18024         declarator id.
18026 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
18028         * jcf-parse.c (yyparse): variable len changed from a char to an
18029         int to prevent overflow.
18031 1999-01-06  Per Bothner  <bothner@cygnus.com>
18033         * java-tree.h:  Declare read_class.
18034         * jcf-parse.c (read_class):  New function.
18035         (load_class):  Now just call read_class.
18037         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
18038         * jcf-parse.c (parse_source_file):  Declare save_error_count,
18039         which is needed by java_parse_abort_on_error macro,
18040         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
18042         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
18043         constructor, if initializing a static field.
18044         (patch_new_array_init):  Set TREE_CONSTANT if it is.
18045         * expr.c (java_lang_expand_expr):  For a static array constructor
18046         of primitive elements, allocate the array itself statically.
18047         Disabled until we can set the vtable field statically.
18049         * check-init.c:  New file.  Checks for definite assignment.
18050         * Makefile.in (JAVA_OBJS):  Add check-init.o.
18051         * parse.y (java_complete_expand_method): Call check_for_initialization.
18052         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
18054 1999-01-06  Graham <grahams@rcp.co.uk>
18056         * parse.y : include system.h instead of including
18057         standard headers directly with the exception of <dirent.h>.
18059 1999-01-06  Per Bothner  <bothner@cygnus.com>
18061         * lex.h:  Moved static function declarations to lex.c,
18062         to shut up some -Wall warnings.
18063         * lex.c:  Static function declarations moved here.
18064         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
18066 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18068         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18070 1998-12-22  Per Bothner  <bothner@cygnus.com>
18072         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
18073         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
18075         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
18076         (localvar_alloc):  Change return type to void,
18077         (emit_unop):  Remove unused variable size.
18079         * jcf-write.c (struct jcf_block):  Add new union.
18080         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
18081         (call_cleanups):  New functions.
18082         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
18083         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
18084         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18085         * lang.c (lang_init):  Call using_eh_for_cleanups.
18086         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
18087         completing operands to patch_synchronized_statement.
18088         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18089         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18090         WITH_CLEANUP_EXPR instead of TRY_EXPR.
18092 1998-12-20  John F. Carr  <jfc@mit.edu>
18094         * Make-lang.in: Comment out control-Ls; they upset some makes.
18096 1998-12-18  Tom Tromey  <tromey@cygnus.com>
18098         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18099         consistently.
18101 1998-12-17  Tom Tromey  <tromey@cygnus.com>
18103         * parse.y (DIR_SEPARATOR): New define.
18104         (check_class_interface_creation): Use it.
18106         * parse-scan.y (report_main_declaration): Recognize
18107         `java.lang.String' in argument to main.
18109 1998-12-16  Per Bothner  <bothner@cygnus.com>
18111         * parse.y (create_interface):  Remove bogus test.
18113 1998-12-16  Per Bothner  <bothner@cygnus.com>
18115         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
18116         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
18118 1998-12-16  Tom Tromey  <tromey@cygnus.com>
18120         * parse-scan.y (qualified_name): Use correct sprintf format.
18122 1998-12-15  Tom Tromey  <tromey@cygnus.com>
18124         * gjavah.c (print_field_info): Changed how most negative number is
18125         printed.
18127 1998-12-14  Per Bothner  <bothner@cygnus.com>
18129         * parse.y (fold_constant_for_init):  New function.
18130         (resolve_expression_name):  Don't replace static final
18131         constant-initialized fields by its value.
18132         (java_complete_lhs):  New.  Same as java_complete_tree, except does
18133         not replace static final constant-initialized fields by their values.
18134         (register_fields):  If there is an initializer, set DECL_INITIAL and
18135         MODIFY_EXPR_FROM_INITIALIZATION_P.
18136         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
18137         Only call patch_initialized_static_field if
18138         MODIFY_EXPR_FROM_INITIALIZATION_P.
18139         (patch_initialized_static_field):  If not valid constant, clear
18140         DECL_INITIAL.
18142         * parse.y (lookup_field_wrapper):  Fix thinko.
18144         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
18145         set and restore global lineno.
18147 1998-12-14  Tom Tromey  <tromey@cygnus.com>
18149         * gjavah.c (print_field_info): If value to print is the smallest
18150         value of its size, then print as hex to avoid later warnings from
18151         C++ compiler.
18153 1998-12-14  Tom Tromey  <tromey@cygnus.com>
18155         * gjavah.c (decompile_method): Decompile `return null'.
18156         (process_file): Generate `#pragma interface'.
18157         (method_declared): New global.
18158         (print_method_info): Set it.
18159         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18160         (print_method_info): Handle abstract methods.
18162 1998-12-13  Per Bothner  <bothner@cygnus.com>
18164         * parse.y (patch_method_invocation):  If class_decl is null
18165         (e.g. an array type), use original type.
18167         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
18168         errors about uncaught exception from clone (of array, specifically).
18170 1998-12-13  Tom Tromey  <tromey@cygnus.com>
18172         * gjavah.c (decompile_method): Handle all types of `return'
18173         opcode.  Decompile `return this' and `return'.
18174         (method_access): New global.
18175         (print_method_info): Set it.
18176         (decompile_method): Don't decompile a synchronized method.
18178 1998-12-13  Tom Tromey  <tromey@cygnus.com>
18180         * jcf-reader.c (jcf_parse_one_method): Recognize
18181         HANDLE_END_METHOD.
18182         * gjavah.c (HANDLE_END_METHOD): New macro.
18183         (HANDLE_CODE_ATTRIBUTE): New macro.
18184         (decompile_method): New function.
18185         (print_method_info): Don't print `;\n' at end of function decl.
18186         Include java-opcodes.h.
18187         (decompiled): New global.
18189 1998-12-12  Per Bothner  <bothner@cygnus.com>
18191         * class.c (build_class_ref):  Handle PRIMTYPE.class if
18192         flag_emit_class_files.
18193         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
18194         if flag_emit_class_files.
18195         * parse.y (java_complete_tree):  Pre-liminary support for
18196         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18198         * parse.y (patch_synchronized_statement):   Don't call monitorexit
18199         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
18201         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
18203         * zipfile.h (opendir_in_zip):  New declaration.
18204         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
18205         (opendir_in_zip):  New function, using code from open_in_zip.
18206         (open_in_zip):  Call opendir_in_zip.
18207         (find_class):  Remove no-longer-used do_class_file parameter,
18208         but add source_ok parameter.  Change logic so if we find a .java file,
18209         we don't look for .class in later classpath emtries.
18210         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
18211         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
18212         * gjavah.c: Update call to find_class.
18213         * jcf-dump.c:  Likewise.
18215         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
18216         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
18217         nothing if body is empty_stmt_node.
18218         Various little fixes so SP gets correctly adjusted.
18219         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18220         For CALL_EXPR, test if static first.
18221         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
18222         such as the ones we create for Object and Class.
18223         Set and restore current_function_decl.
18224         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18225         (note_possible_classname):  New function.
18226         (read_import_entry):  Removed.  Merged with read_import_dir.
18227         (read_import_dir):  Don't call find_class - that only gives us
18228         the first classpath entry having the needed package.
18229         Use the struct buffer data structure from buffer.h.
18230         (read_import_dir, find_in_imports_on_demand):  The remembered
18231         class names now use '.' (not '/') as package separator.
18233         * parse.y (java_complete_expand_methods):  Call write_classfile
18234         here, and not in java_expand_classes (which only gets first class).
18236 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18238         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
18239         (register_fields):  If a static fields has an initializer, just
18240         chain it on ctxp->static_initialized, and handle later.
18241         (java_complete_expand_methods):  Force <clinit> first.
18242         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
18243         - it's already been completed.
18244         (patch_initialized_static_field):  New function.
18245         (java_complete_field):  Call it.
18247 1998-12-12  Per Bothner  <bothner@cygnus.com>
18249         * expr.c (encode_newarray_type, build_new_array):  New functions.
18250         * java-tree.h:  Declare build_new_array.
18251         * jcf-write.c (patch_newarray):  Use build_new_array.
18253         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
18254         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
18256         * parse.y (patch_new_array_init):  Re-organize.
18257         Now is passed the actual array (pointer) type of the value.
18258         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18259         (patch_array_constructor):  Removed - merged into patch_new_array_init.
18260         (java_complete_tree):  Update patch_new_array_init.
18262         * jcf-write.c (find_constant_index):  New function.
18263         (generate_bytecode_insns):  Use find_constant_index.
18264         (generate_classfile):  Use find_constant_index for ConstantValue.
18266 1998-12-11  Tom Tromey  <tromey@cygnus.com>
18268         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18269         * decl.c (init_decl_processing): Renamed dtable -> vtable.
18270         * class.c (make_class_data): Renamed dtable -> vtable, and
18271         dtable_method_count -> vtable_method_count.
18273 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18275         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18276         global variables, initialized.
18277         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18278         Declared new global variables.
18279         * lex.c (java_lex): Return long_zero_node, float_zero_node,
18280         double_zero_node, integer_zero_node upon direct matching.
18281         * parse.y (purify_type_name): Added function prototype.
18282         (duplicate_declaration_error_p): Consider new_type as potentially
18283         being a incomplete type. Use purify_type_name on type string.
18284         (method_header): saved_type: unused variable removed. Don't figure
18285         return type if method name is invalid.
18286         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18287         processed by patch_unaryop.
18288         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18289         increment/decrement node into its original type after binary
18290         numeric promotion on its operands.
18292 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18294         * parse.y (array_initializer:): Array init operand is NULL_TREE
18295         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18296         now an error. Fixed indentation problems.
18297         (patch_string): Handle error_mark_node as an argument.
18298         (patch_new_array_init): Fixed indentation problems.
18299         (array_constructor_check_entry): Removed check on null wfl_value.
18300         Return an error if wfl_value's walk returns an error.
18302 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18304         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18305         * lex.c (java_lex): Remember column position before advancing one
18306         token. Retain location information on OCB_TK.
18307         * lex.h (typedef struct java_lc): Added new field.
18308         * parse.h (GET_SKIP_TYPE): New macro.
18309         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18310         * parse.y (build_new_array_init, patch_new_array_init,
18311         patch_array_constructor, maybe_build_array_element_wfl,
18312         array_constructor_check_entry): New function prototypes.
18313         (switch_block:): Tagged <node>.
18314         (OCB_TK): Tagged <operator>.
18315         (array_initializer:): Installed actions.
18316         (variable_initializer): Build location information on element if
18317         necessary.
18318         (switch_statement:): Fixed indentation typo.
18319         (switch_block:): Redefined default action.
18320         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18321         (patch_assignment): Removed duplicate code.
18322         (maybe_build_array_element_wfl, build_new_array_init,
18323         patch_new_array_init, patch_array_constructor,
18324         array_constructor_check_entry): New functions.
18326 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18328         * parse.y (array_initializer): Tagged <node>.
18329         (variable_initializer:): Use default rule.
18330         (array_initializer:): Defined actions.
18331         (variable_initializers:): Likewise.
18332         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18333         non-static field accesses.
18334         (patch_invoke): Fixed indentation typo.
18335         (java_complete_tree): Likewise.
18336         (build_labeled_block): Changed leading comment. Generate an error
18337         in case of duplicate loop labels.
18338         (patch_conditional_expr): Patch results of string concatenation
18339         operations.
18341 1998-12-06  Per Bothner  <bothner@cygnus.com>
18343         * constants.c (find_methodref_index):  When the class is an interface,
18344         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18346         * decl.c (finit_identifier_node):  Use "$finit$", rather than
18347         "<finit>" (which Sun's verifier rejects).
18348         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
18349         (generate_field_initialization_code):  Removed.
18350         (fix_constructors)  Don't add call to $finit$ here (wrong order).
18351         (patch_method_invocation):  Add $finit$ call here.
18353         * java-tree.h (CALL_USING_SUPER):  New macro.
18354         * parse.y (patch_invoke):  Remove im local variable.
18355         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
18356         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
18357         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
18359         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
18361         * parse.y (java_complete_tree):  Don't complain about unreachable
18362         statement if it is empty_stmt_node.
18364         * jcf-write.c (find_constant_wide):  New function.
18365         (push_long_const):  Use find_constant_wide.
18367         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
18368         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
18369         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18370         Emit invokeinterface when calling an interface method.
18371         Emit invokespecial also when calling super or private methods.
18373         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
18375 1998-12-06  Per Bothner  <bothner@cygnus.com>
18377         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
18379 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18381         * java-tree.h (java_layout_seen_class_methods): New function
18382         prototype.
18383         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18384         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18385         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18386         * parse.y (method_declarator:): Defined action.
18387         (issue_warning_error_from_context): input_filename saved, set to
18388         the appropriate value and restored after java_error is called.
18389         (build_unresolved_array_type): Fixed comment.
18390         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18391         (method_header): Deal with return type the same way type are
18392         handled for fields and method's parameters and local variables
18393         types are handled.
18394         (check_method_redefinition): Removed extra CR.
18395         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18396         (java_layout_seen_class_methods): New function.
18397         (java_layout_classes): Call java_layout_seen_class_methods.
18399 1998-12-03  Per Bothner  <bothner@cygnus.com>
18401         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
18403 1998-12-03  Per Bothner  <bothner@cygnus.com>
18405         * jcf-dump.c (main):  Fix error message.
18406         * jcf-path.c (add_entry):  Style fix.
18408 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18410         * class.c (layout_class_method): Call build_java_argument_signature
18411         on constructors too.
18412         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18413         (patch_method_invocation): Define a primary when resolving an
18414         expression name. Augmented comment on code checking illegal `this'
18415         usage. Loosened it test by accepting NEW_CLASS_EXPR.
18417 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18419         * class.c (layout_class_method): Don't report error on non-static
18420         overriding static if the method is private.
18421         * java-tree.h (finish_class): Prototype added.
18422         * lex.c (java_get_line_col): Handle col argument -2 value.
18423         * parse.h: All static method declarations moved to parse.y.
18424         * parse.y: Now contains all static method declarations previously
18425         found in parse.h.
18426         (find_expr_with_wfl, missing_return_error,
18427         unreachable_stmt_error): New functions.
18428         (java_get_real_method_name): Identify constructors bearing class
18429         names in source code compiled classes only.
18430         (java_complete_expand_methods): Call missing_return_error.
18431         (invocation_mode): Private methods invoked as static methods.
18432         (java_complete_tree): Call unreachable_stmt_error.
18434 1998-12-01  Tom Tromey  <tromey@cygnus.com>
18436         * Makefile.in (+target): Removed.
18437         (+xmake_file): Likewise.
18438         (+tmake_file): Likewise.
18439         (.NOEXPORT): Removed duplicate.
18441 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18443         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18445         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
18447         * jvgenmain.c: Remove the xmalloc prototype, we get it from
18448         libiberty.h.  Provide an xmalloc definition.
18450         * jvspec.c: Remove the xmalloc prototype.
18452         * parse-scan.y: Include config.h and system.h.  Don't include
18453         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
18454         Provide an xstrdup definition.
18456 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
18458         * jcf-path.c (add_entry): Recognize ".jar" too.
18459         * lang-specs.h: Likewise.
18461 1998-11-26  Per Bothner  <bothner@cygnus.com>
18463         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
18464         soft_monitorenter_node, soft_monitorexit_node, throw_node.
18466         * jcf-write.c (generate_bytecode_insns):
18467         Handle pre/post-increment/decrement of long.
18469         * jcf-write.c (generate_bytecode_insns):
18470         Handle missing exception handler (finally for synchronized).
18472 1998-11-25  Per Bothner  <bothner@cygnus.com>
18474         * java-tree.h (end_params_node):  Declare global.
18475         * decl.c (end_params_node):  New global.
18476         (init_decl_processing, start_java_method):  Use end_params_node for
18477         end of list of parameter types.  Follows correct gcc conventions.
18478         * expr.c (pop_argument_types, pop_arguments):  Likewise.
18479         * lang.c (put_decl_node):  Likewise.
18480         * typeck.c (various places):  Likewise.
18481         * class.y (various places):  Likewise.
18482         * parse.y (various places):  Likewise.
18484         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
18485         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
18487         * class.c:  Add #include flags.h, remove no-longer needed declaration.
18489         * class.c (layout_class_method):  Remove commented-out code, re-format.
18490         Don't add vtable entry (or index) for private methods.
18491         * expr.c (expand_invoke):  A private method is implicitly final.
18492         * class.c (make_class_data):  If inlining or optimizing,
18493         skip private methods.
18495         * class.c (finish_class):  New function.  Calls existing methods,
18496         but alls emits deferred inline functions.
18497         * jcf-parse.c (parse_class_file):  Call finish_class.
18498         * parse.y (java_complete_expand_methods):  Likewise.
18500         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
18502         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
18504 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
18506         * jcf-write.c (generate_bytecode_conditional): Fix typo.
18508 1998-11-24  Per Bothner  <bothner@cygnus.com>
18510         * (generate_classfile): Always write class access flag with
18511         ACC_SUPER set.
18513 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18515         * class.c (maybe_layout_super_class): New function.
18516         (layout_class): Reorganized. Loop on class methods dispatched into
18517         a new function. Call maybe_layout_super_class.
18518         (layout_class_methods, layout_class_method): New functions.
18519         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18520         class.
18521         (expand_invoke): Likewise.
18522         * java-tree.h (all_class_list): New global variable declared.
18523         (layout_class_methods, layout_class_method): New function
18524         prototypes.
18525         (LAYOUT_SEEN_CLASS_METHODS): New macro.
18526         * jcf-parse.c (all_class_list): New global variable.
18527         (load_class): Extended what class_or_name can be. Use parser
18528         context mechanism to save globals before calling jcf_parse.
18529         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18530         is set on the file name.
18531         (jcf_parse): Layout class methods when Object is loaded, otherwise
18532         record class in all_class_list for delayed method layout.
18533         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18534         * lang.c (put_decl_node): Decode <init> into the decl context
18535         class name.
18536         * lex.c (java_allocate_new_line): Use xmalloc.
18537         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18538         pointers, not TREE_LIST elements.
18539         (struct parser_ctxt): Fixed comment indentations, added comments
18540         and reordered some fields.
18541         (java_check_methods): Function prototype removed.
18542         * parse.y (java_push_parser_context): Use xmalloc.
18543         (java_parser_context_restore_global): Pop extra pushed ctxp only
18544         when there's nothing next.
18545         (maybe_create_class_interface_decl): Fixed comment, add new
18546         created class decl to all_class_list.
18547         (method_header): Use GET_REAL_TYPE on argument's types.
18548         (method_declarator): Use GET_REAL_TYPE, change type to the real
18549         type in TREE_LIST dependency node. Build argument list with the
18550         real type.
18551         (create_jdep_list): Use xmalloc. Removed allocation error message.
18552         (obtain_incomplete_type): Fixed leading comment. Broadened
18553         incoming argument meaning.
18554         (register_incomplete_type): Use xmalloc. Removed allocation error
18555         message.
18556         (safe_layout_class): Fixed leading comment.
18557         (jdep_resolve_class): Reversed if statement condition and switch
18558         if and else bodies.
18559         (resolve_and_layout): Fixed leading comment. Broadened incoming
18560         argument meaning.
18561         (complete_class_report_errors): New local variable name, for
18562         clarity. purify_type_name used for all error cases.
18563         (java_get_real_method_name): Stricter check on constructors.
18564         (java_check_regular_methods): Reverse methods list only if not
18565         already laid out. Layout artificial constructor.
18566         (java_check_methods): Deleted.
18567         (source_start_java_method): Obtain incomplete type for patchable
18568         method arguments.
18569         (java_layout_classes): Fixed leading comment. Use
18570         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18571         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18572         before returning. Fixed comments.
18573         (java_expand_classes): Check for errors up front.
18574         (patch_method_invocation): Class to search is resolved and laid
18575         out.
18577 1998-11-24  Per Bothner  <bothner@cygnus.com>
18579         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
18581         * javaop.h (int8):  Removed - not used.
18582         (jbyte):  Redefine portably with correct signedness.
18584         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
18586         * jcf-write.c (generate_bytecode_insns):  Fix typo
18587         OPCODE_getstatic to OPCODE_getfield.
18589         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
18590         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
18591         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18593 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18595         * jcf-parse.c (jcf_parse_source): Function returned type is
18596         void. Added prototype.
18597         (jcf_parse): Function returned type is void.
18598         (yyparse): Remove call to fclose on the last parsed file.
18600         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18602 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18604         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18605         (layout_class): Cope with methods featuring WFL in decl names.
18606         * decl.c (unqualified_object_id_node): New global variable,
18607         initialized.
18608         (build_decl_no_layout): Removed.
18609         * expr.c (build_primtype_type_ref): Handle Double.
18610         (java_lang_expand_expr): Fixed indentations.
18611         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18612         (flag_wall, flag_redundant, flag_not_overriding,
18613         flag_static_local_jdk1_1, unqualified_object_id_node): Global
18614         variable declarations.
18615         (build_decl_no_layout): Removed prototype.
18616         (java_get_real_method_name): Added prototype.
18617         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18618         (java_parse_abort_on_error): Macro now just returns.
18619         * jcf-parse.c (jcf_parse_source): Check fclose returned
18620         value. Call emit_register_classes if java_report_errors returns
18621         zero.
18622         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18623         flag_static_local_jdk1_1): New integer flags.
18624         (lang_decode_option): New flags set here.
18625         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18626         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18627         the flag_redundant variable.
18628         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18629         when parsing java.lang.Object class.
18630         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18631         NULL_TREE to build.
18632         (resolve_qualified_expression_name): Fixed indentation.
18633         (patch_array_ref): Changed prototype.
18634         (not_initialized_as_it_should_p): Prototype removed.
18635         (java_report_errors): Added function prototype.
18636         * parse.y (formal_parameter:): Changed error message for not yet
18637         supported final parameters.
18638         (class_type_list:): Set both PURPOSE and VALUE of created
18639         TREE_LIST to be class_type.
18640         (primary_no_new_array:): Handle class literals on primitive types.
18641         (parse_warning_context): Reinstalled correct force_error and
18642         do_warning flags setups.
18643         (java_report_errors): Changed prototype. Return java_error_count
18644         value.
18645         (variable_redefinition_error): Consider treating variable type as
18646         a fake pointer.
18647         (create_interface): Warn about redundant abstract modifier if
18648         flag_redundant is set. Changed error message.
18649         (lookup_field_wrapper): Save/restore globals before/after looking
18650         up field.
18651         (duplicate_declaration_error_p): Consider treating declaration
18652         type as a fake pointer.
18653         (register_fields): Extract real type from dependency node. Check
18654         for duplicate field declaration after type adjustment. Use
18655         DECL_INITIAL to store static final initialized values.
18656         (method_header): Extract real function type from dependency node.
18657         (check_abstract_method_header): Use GET_METHOD_NAME.
18658         (obtain_incomplete_type): Layout fake pointer type.
18659         (safe_layout_class): Don't try to check for methods before layout.
18660         (java_complete_class): Don't check for correct throws clause
18661         elements inheritance here.
18662         (resolve_and_layout): Broadened name parameter meaning.
18663         (reset_method_name): Use GET_METHOD_NAME.
18664         (java_get_real_method_name): New function.
18665         (java_check_regular_methods): Don't check methods in
18666         java.lang.Object.  Verify lineage of throws clause elements. Use
18667         flag_no_overriding in warning report.
18668         (check_throws_clauses): Don't check if class was from
18669         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18670         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18671         (declare_local_variables): Use flag_static_local_jdk1_1 to report
18672         warning on unsupported final local variables. Use build_decl
18673         instead of build_decl_no_layout. Get real local variable type from
18674         dependency node.
18675         (source_start_java_method): Get real parameter type from
18676         dependency node. Call build_decl instead of build_decl_no_layout.
18677         (java_layout_classes): Reverse tree and layout type and class as
18678         required. Mark class as loaded when done.
18679         (resolve_field_access): Fixed indentation. Restricted condition
18680         leading to static field access code generation. Set field_type
18681         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18682         (resolve_qualified_expression_name): Initialize type_found to
18683         null. Handle static field resolved during qualification. Fixed
18684         layout on non primitive field decl types.
18685         (not_accessible_p): Fixed typo in comment.
18686         (patch_method_invocation): Resolve and layout class to search from
18687         type.
18688         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18689         layout non primitive type, if necessary. Make method node only to
18690         report errors.
18691         (find_applicable_accessible_methods_list): Consider WFL'ed method
18692         decl names. Fixed indentation.
18693         (argument_types_convertible): Resolve and layout target type if
18694         necessary.
18695         (java_complete_tree): Fixed indentation problems. Rewrote
18696         CALL_EXPR thrown exceptions check. Re-installed further processing
18697         of the assignment in certain cases.
18698         (patch_assignment): Call maybe_build_primttype_type_ref to perform
18699         inlining on class literals.
18700         (valid_builtin_assignconv_identity_widening_p): Cope with constant
18701         0 literal.
18702         (valid_method_invocation_conversion_p): Likewise.
18703         (patch_string): Temporary disable forbidden use of `this' in
18704         explicit constructor invocations when doing string concatenation
18705         within their scope.
18706         (patch_unaryop): Added comment. Reinstalled code to disable
18707         further check on assignment operation with cast expression RHS.
18708         (patch_switch_statement): Fixed indentation.
18709         (build_try_statement): Call build_decl instead of
18710         build_decl_no_layout.
18711         (patch_synchronized_statement): Likewise.
18712         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18713         IS_UNCHECKED_EXPRESSION_P.
18714         (check_thrown_exceptions_do): Changed leading comment. Resolve and
18715         layout argument exception type.
18716         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18717         of IS_UNCHECKED_EXPRESSION_P.
18719 1998-11-18  Anthony Green  <green@cygnus.com>
18721         * jcf-parse.c (yyparse): Open class file in binary mode.
18723 1998-11-15  Per Bothner  <bothner@cygnus.com>
18725         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
18727         * jcf-write.c (perform_relocations):  Move check out one loop.
18729 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
18731         * Make-lang.in: Fix reference to srcdir.
18732         * jv-scan.c: Add missing xmalloc prototype.
18733         * jvgenmain.c: Ditto.
18735 1998-11-15  Per Bothner  <bothner@cygnus.com>
18737         * decl.c (error_mark_node), java-tree.h:  New global.
18738         * parse.y:  Use empty_stmt_node instead of size_zero_node.
18739         (build_if_else_statement):  If missing else, use empty_stmt_node.
18741         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
18742         (java_complete_expand_method):  Complain if return is missing.
18743         (java_check_regular_methods):  Comment out incorrect error check.
18744         (not_accessible_p):  Fix incorrect handling of protected methods.
18745         (patch_method_invocation):  Pass correct context to not_accessible_p.
18746         (find_applicable_accessible_methods_list):  Likewise.
18747         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
18748         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
18749         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
18750         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
18752         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
18753         (push_int_const):  Remove reundant NOTE_PUSH.
18754         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
18755         (- case SWITCH_EXPR):  Fix code generation bug.
18756         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
18757         (generate_classfile):  More robust for abstract methods.
18759 1998-11-15  Anthony Green  <green@cygnus.com>
18761         * Makefile.in: jv-scan and jvgenmain all require libiberty.
18762         * Make-lang.in: Ditto.
18764         * jv-scan.c: Remove xmalloc and xstrdup definitions.
18765         * jvgenmain: Ditto.
18767 1998-11-15  Per Bothner  <bothner@cygnus.com>
18769         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
18771         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
18773 1998-11-14  Per Bothner  <bothner@cygnus.com>
18775         Allow uses of interface types to verify.  This is not really
18776         type-safe, but it matches what Sun does, and is OK as long as
18777         there are appropriate run-time checks.
18778         * verify.c (merge_types):  If merging two interface types,
18779         just set the result to java.lang.Object.
18780         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
18782 1998-11-13  Tom Tromey  <tromey@cygnus.com>
18784         * gjavah.c (main): Handle --output-class-directory argument.
18785         * jvspec.c (lang_specific_driver): Translate `-d' into
18786         -foutput-class-dir.
18787         * jcf.h (jcf_write_base_directory): Declare.
18788         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18789         * lang-options.h: Mention -foutput-class-dir.
18790         * jcf-write.c (jcf_write_base_directory): New global.
18791         (make_class_file_name): Put generated .class file into `-d'
18792         directory, or into source directory if -d not given.  Function now
18793         static.
18794         (write_classfile): Free class file name.  Handle case where class
18795         file name is NULL.
18796         (DIR_SEPARATOR): New macro.
18797         Include <sys/stat.h>
18799         * Makefile.in (prefix): New macro.
18801 1998-11-12  Per Bothner  <bothner@cygnus.com>
18803         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
18804         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
18805         here (done in patch_invoke instead).
18806         (case_identity):  Moved here from parse.y.
18808         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
18809         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
18810         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
18811         so they can be efficiently scanned without recursion.
18812         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18813         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
18814         in BLOCK iteratively, rather than recursively.
18816         * parse.y (do_unary_numeric_promotion):  New function.
18817         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
18819         * parse.y (patch_newarray):  Various fixes.
18821         Re-do handling of switch statements (for proper block scoping).
18822         * parse.y:  Add just a single block for the enture switch block,
18823         but don't create any "case blocks".
18824         (group_of_labels):  Rmeoved unneeded non-terminal.
18825         CASE_EXPR and DEFAULT_EXPR are added to current block.
18826         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
18827         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18828         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
18829         * parse.y (wfl_operator, print_int_node): Make non-static.
18830         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
18831         as part of recursive scan of block.
18832         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
18833         (patch_switch_statement):  Most tests move dinto java_complete_tree.
18835         * parse.y:  Make various production be non-typed (void).
18836         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
18837         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
18838         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
18840         * jcf-write.c (struct jcf_handler):  New type.
18841         (struct jcf_switch_state):  New type.
18842         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
18843         (alloc_handler, emit_unop, emit_reloc):  New functions.
18844         (adjust_typed_op):  Add extra parameter ("max type" offset).
18845         (emit_switch_reloc, emit_case-reloc):  New function.
18846         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
18847         (generate_bytecode_insns):  Support REAL_CST, switch statements,
18848         exception handling, method calls, object/array creation, and more.
18850         * class.c:  Remove some unused variables.
18851         * constants.c (find_string_constant):  New function.
18852         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
18853         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
18854         if flag_emit_class_files.
18856 1998-11-12  Tom Tromey  <tromey@cygnus.com>
18858         * jcf-io.c (find_class): Added explanatory comment.
18860         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
18861         trailing slash to `.zip' entries.
18863         * jvspec.c (lang_specific_driver): Correctly handle case where
18864         GC_NAME not defined.
18866 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18868         * jvspec.c (GC_NAME): New define.
18869         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
18870         if required.
18871         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18873 1998-11-11  Per Bothner  <bothner@cygnus.com>
18875         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
18877 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18879         * jcf-dump.c (main): Correctly recognize `--'-style long options.
18881 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18883         * class.c (is_compiled_class): Call safe_layout_class for class
18884         compiled from source.
18885         * conver.h (convert_to_integer, convert_to_real,
18886         convert_to_pointer): Added prototypes.
18887         * decl.c (init_decl_processing): Non longer push the decls of
18888         `methodtable', `constants', `Class', `Field', `dispatchTable'
18889         `jexception' and `Method'.
18890         * expr.c (build_invokeinterface): New function.
18891         (expand_invoke): static variable CLASS_IDENT now in
18892         build_invokeinterface. Use build_invokeinterface.
18893         (expand_java_field_op): Moved code to inline
18894         java.lang.PRIMTYPE.TYPE into a function.
18895         (build_primtype_type_ref): New function.
18896         * java-tree.def (INSTANCEOF_EXPR): New tree code.
18897         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18898         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18899         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18900         (DECL_LOCAL_STATIC_VALUE): New macro.
18901         (build_invokeinterface, build_primtype_type_ref): New function
18902         prototypes.
18903         (java_parse_abort_on_error): Macro rewritten.
18904         * jcf-parse.c (current_method): Add comment to declaration.
18905         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18906         Function prototypes fixed.
18907         (jcf_parse_source): push/pop parser context. save/restore global.
18908         (parse_source_file): Fixed leading comment. Now take a
18909         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18910         classes and pop the parser context anymore.
18911         (yyparse): Push parser context, save globals, parse the source
18912         file, restore globals and pop the parser context when processing a
18913         source file.
18914         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18915         * lex.c (java_parse_doc_section): New function.
18916         (java_lex): Call java_parse_doc_section when appropriate. Build an
18917         operator around INSTANCEOF_TK.
18918         * lex.h (java_lineterminator, java_sprint_unicode,
18919         java_unicode_2_utf8, java_lex_error, java_store_unicode):
18920         Prototypes rewritten.
18921         (java_parse_escape_sequence, java_letter_or_digit_p,
18922         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18923         java_read_unicode, java_store_unicode, java_read_char,
18924         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18925         Added function prototypes.
18926         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18927         define.
18928         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18929         New macros
18930         (struct parser_ctxt): New fields: deprecated,
18931         current_parsed_class_un, gclass_list.
18932         (fix_method_argument_names, issue_warning_error_from_context,
18933         resolve_package, lookup_package_type): New function prototypes.
18934         (resolve_expression_name): Fixed function prototype.
18935         (find_applicable_accessible_methods_list): Fixed indentation, added
18936         extra argument in prototype.
18937         (check_final_assignment, build_null_of_type, check_deprecation,
18938         check_method_redefinition, reset_method_name,
18939         java_check_regular_methods, java_check_abstract_methods,
18940         maybe_build_primttype_type_ref): New function prototype.
18941         * parse.y (conver.h): Include.
18942         (INSTANCEOF_TK): Tagged <operator>.
18943         (single_type_import_declaration): Use REGISTER_IMPORT macro.
18944         (relational_expression:): Build binop for instanceof.
18945         (java_push_parser_context): Remember ctxp->gclass_list across
18946         contexts.
18947         (java_pop_parser_context): Simply return if no context
18948         exists. Remember gclass_list across contexts.
18949         (issue_warning_error_from_context): New function.
18950         (parse_error_context): Don't setup ctxp->elc here. Call
18951         issue_warning_error_from_context instead.
18952         (parse_warning_context): Likewise.
18953         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18954         setup. Link new class/interface to ctxp->gclass_list.
18955         (add_superinterfaces): Register interface as incomplete if not
18956         loaded.
18957         (create_class): Remember class unqualified name in
18958         ctxp->current_parsed_class_un. Check class deprecation.
18959         (register_fields): Check field deprecation. Remember static final
18960         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18961         processing INIT.
18962         (method_header): New local variable ORIG_ARG. Use unqualified
18963         current class name for check on constructor errors. Promote return
18964         type if of record type. Argument list fix moved in
18965         fix_method_argument_names, called here. Check method deprecation.
18966         (fix_method_argument_names): New function.
18967         (method_declarator): Promote record typed arguments.
18968         (safe_layout_class): Check class methods before layout.
18969         (java_complete_class): Compute field layout when patched.
18970         (do_resolve_class): Try to load class after having it renamed
18971         after the package name.
18972         (get_printable_method_name): Use DECL_CONTEXT.
18973         (reset_method_name): New function.
18974         (check_method_redefinition): Use reset_method_name.
18975         (java_check_regular_methods): New local variable
18976         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18977         names for error report. Check for compile-time error when method
18978         found has default (package) access.
18979         (java_check_abstract_methods): Now takes an interface DECL node as
18980         an argument. Also reinstall real name on unchecked
18981         overriding/hiding methods for error report.
18982         (java_check_methods): Fixed leading comment. Get classes to verify
18983         from ctxp->gclass_list. Use CHECK_METHODS macro and set
18984         CLASS_METHOD_CHECKED_P on class verification.
18985         (lookup_java_method2): Get real method name if necessary.
18986         (find_in_imports): Don't check package class access here.
18987         (resolve_package, lookup_package_type): New functions.
18988         (java_layout_classes): Fixed leading comment. Take classes to be
18989         laid out from ctxp->gclass_list.
18990         (java_complete_expand_methods): Don't expand native and abstract
18991         methods.
18992         (java_expand_classes): New function.
18993         (resolve_expression_name): Use additional argument ORIG.  Retrieve
18994         values of static final field of primitive types.
18995         (resolve_field_access): Handles static final field of promotive
18996         type.
18997         (resolve_qualified_expression_name): Handle STRING_CST as
18998         primaries and package name resolution. Check deprecation on found
18999         decls. Set where_found and type_found on non static field resolved
19000         during qualification. Layout non primitive field decl types.
19001         (check_deprecation): New function.
19002         (maybe_access_field): Simplified.
19003         (patch_method_invocation_stmt): Local variable CLASS_TYPE
19004         removed. Reverse method's argument when primary is a type. Don't
19005         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19006         instead. Include abstract class in the list of class searchable
19007         for constructors. Use DECL_CONTEXT of found method for access
19008         checks. Check method deprecation.
19009         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
19010         converting arguments. Handle INVOKE_INTERFACE.
19011         (lookup_method_invoke): Search constructor using existing
19012         infrastructure (don't rely on lookup_java_constructor anymore).
19013         (find_applicable_accessible_methods_list): Extra argument flag
19014         LC. Now include constructor in the search.
19015         (qualify_ambiguous_name): Conditional expression are primaries.
19016         (not_initialized_as_it_should_p): static final are always
19017         initialized.
19018         (java_complete_tree): Pass extra NULL argument to
19019         resolve_expression_name. Stricter test to carry on patching
19020         assignments. New case for INSTANCEOF_EXPR.
19021         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19022         (check_final_assignment, maybe_build_primttype_type_ref): New
19023         functions.
19024         (patch_assignment): Detect resolved static finals and carry normal
19025         assignment error check on them. Inline PRIMTYPE.TYPE read access.
19026         (try_builtin_assignconv): Access constant 0 on all primitive
19027         types.
19028         (valid_builtin_assignconv_identity_widening_p): Accept identical
19029         types. Accept all promoted type on int type.
19030         (valid_ref_assignconv_cast_p): Accept a null pointer to be
19031         assigned to a reference.
19032         (valid_method_invocation_conversion_p): Accept to check null
19033         pointers.
19034         (build_binop): Merge declaration and initialization of local
19035         variable BINOP.
19036         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
19037         numeric types. Improved validity test for qualify operators on
19038         references.
19039         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
19040         and PREINCREMENT_EXPR. Also detect resolved static finals of a
19041         primitive type and issue the appropriate error message.
19042         (resolve_type_during_patch): Mark class loaded when resolved.
19043         (patch_cast): Allow null to be cased to reference types.
19044         (build_null_of_type): New function.
19045         (patch_array_ref): Handle array on references correctly.
19046         (patch_return): Removed unused local variable MODIFY. Force
19047         boolean to be returned as integers. Allows null to be returned by
19048         a function returning a reference.
19049         * typeck.c (convert_to_integer, convert_to_real,
19050         convert_to_pointer): Prototypes moved to convert.h
19051         (lookup_argument_method): Use method real name, if necessary.
19053 1998-10-30  Tom Tromey  <tromey@cygnus.com>
19055         * class.c (build_class_ref): Changed name of primitive classes to
19056         start with `_Jv_'.
19058         * class.c (make_class_data): Renamed fields: nmethods to
19059         method_count, method_count to dtable_method_count.  Always set
19060         `state' field to 0.
19061         * decl.c (init_decl_processing): Likewise.
19063 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19065         * class.c (layout_class): Don't mangle <finit>, produce
19066         __finit<class> instead. Don't verify artificial methods.
19067         * decl.c (finit_identifier_node): New declared global.
19068         (init_decl_processing): finit_identifier_node initialized.
19069         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19070         * java-tree.h (finit_identifier_node): Declared as extern.
19071         (struct lang_decl): New field called_constructor.
19072         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19073         (CLASS_HAS_FINIT_P): New macro.
19074         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19075         explicit constructor invocation.
19076         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19077         CALL_SUPER_CONSTRUCTOR_P): New macros.
19078         (write_classfile): Added prototype.
19079         * jcf-parse.c (jcf_parse_source): Parse and remember for
19080         generation if the file was seen on the command line.
19081         (parse_source_file): Don't write the class file here.
19082         (yyparse): Loop on files rewritten. Set current_jcf.
19083         (parse_zip_file_entries): Parse class file only if it was found.
19084         * lang.c (init_parse): Don't open command line provided filename
19085         here.
19086         (lang_parse): Don't set main_jcf anymore.
19087         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19088         (JCONSTRUCTOR_CHECK): New macro.
19089         (JBSC_TYPE_P): New macro.
19090         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19091         (COMPLETE_CHECK_OP_2): New macro.
19092         (struct parse_ctxt): New field explicit_constructor_p.
19093         (check_class_interface_creation): Fixed prototype indentation.
19094         (patch_method_invocation_stmt): Prototype reflects added argument.
19095         (patch_invoke): Likewise.
19096         (complete_method_declaration, build_super_invocation,
19097         verify_constructor_circularity,
19098         build_this_super_qualified_invocation, get_printable_method_name,
19099         patch_conditional_expr, maybe_generate_finit, fix_constructors,
19100         verify_constructor_super, create_artificial_method,
19101         start_artificial_method_body, end_artificial_method_body,
19102         generate_field_initialization_code): New function prototypes.
19103         * parse.y: Fixed leading comment
19104         (constructor_header:, constructor_body:, block_end:): Rules tagged
19105         <node>.
19106         (type_declaration:): Call maybe_generate_finit.
19107         (method_declaration:): Action for method_body: placed in new
19108         function complete_method_declaration, called here.
19109         (constructor_declaration:): Defined actions. Removed leading
19110         FIXME.
19111         (constructor_header:): New rule with action.
19112         (constructor_body:): Rule rewritten using block_begin: and
19113         block_end:. Defined actions.
19114         (constructor_declarator:, explicit_constructor_invocation:):
19115         Defined actions.
19116         (block:): Use new rules block_begin: block_end:.
19117         (block_begin:, block_end:): New rules and actions.
19118         (block_statements:): Fixed error message for explicit
19119         constructors.
19120         (method_invocation:): Call build_this_super_qualified_invocation
19121         if primary is `this' or `super' was seen.
19122         (conditional_expression:): Action defined.
19123         (extra_ctxp_pushed_p): New static global flag.
19124         (java_parser_context_save_global): Create parser context if
19125         necessary. Use extra_ctxp_pushed_p to remember it.
19126         (java_parser_context_restore_global): Pop extra parser context if
19127         one exists.
19128         (build_array_from_name): Array on primitive types are marked
19129         loaded.
19130         (register_fields): Restore new name in field initializer
19131         expression if type was altered. Non static fields initialized upon
19132         declaration marked initialized.
19133         (maybe_generate_finit): New function.
19134         (maybe_generate_clinit): Use create_artificial_method,
19135         start_artificial_method_body, end_artificial_method_body. Generate
19136         debug info for enclosed initialization statements.
19137         (method_header): Fixed leading comment. Check constructor
19138         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19139         accordingly.
19140         (complete_method_declaration, constructor_circularity_msg,
19141         verify_constructor_circularity): New functions.
19142         (get_printable_method_name): New function.
19143         (check_method_redefinition): Don't rename <finit> methods. Fix
19144         declared constructor names. Error message for
19145         constructors modified.
19146         (java_check_regular_methods): Local variable seen_constructor
19147         renamed saw_constructor. Skip verification on constructors. Create
19148         default constructor with create_artificial_method.
19149         (java_check_methods): Removed unnecessary empty line.
19150         (create_artificial_method, start_artificial_method_body,
19151         end_artificial_method_body): New functions.
19152         (java_layout_classes): Changed leading comment. Reverse fields
19153         list if necessary. Always layout java.lang.Object if being
19154         defined.
19155         (java_complete_expand_methods): Verify constructor circularity.
19156         (java_complete_expand_method): Call fix_constructor on
19157         constructors.  Local variable no_ac_found removed. Restore
19158         bindings if method body expansion failed.
19159         (fix_constructors, verify_constructor_super,
19160         generate_field_initialization_code): New function.
19161         (java_expand_classes): Fixed leading comment. Write class file
19162         here.
19163         (resolve_expression_name): Check for illegal instance variable
19164         usage within the argument scope of an explicit constructor
19165         invocation.
19166         (resolve_qualified_expression_name): Pass extra from_super flag
19167         when invoking patch_method_invocation_stmt. New case for
19168         conditional expression when used as a primary. Check for error
19169         when acquiring super.
19170         (patch_method_invocation_stmt): Added extra argument super. New
19171         local variable is_static_flag. Set class_to_search according to
19172         the nature of the constructor invocation. Don't add `this'
19173         argument when expanding NEW_CLASS_EXPR. Check for illegal method
19174         invocation within the argument scope of explicit constructor
19175         invocation. Set is_static according to is_static_flag. Provide
19176         extra `super' argument to patch_invoke invocation.
19177         (patch_invoke): New argument from_super. Loop on arguments
19178         indentation fixed. Pass from_super to invocation_mode. New switch
19179         case INVOKE_SUPER. Fixed error message in switch default case.
19180         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19181         value.
19182         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19183         (lookup_method_invoke): Fixed prototypes in candidates list. Error
19184         message takes constructors into account.
19185         (find_applicable_accessible_methods_list): Fixed indentation.
19186         (qualify_ambiguous_name): Take explicit constructor invocation
19187         into account. Deal with a conditional expression as a primary to
19188         a method call.
19189         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19190         case. Added extra argument to patch_method_invocation_stmt.
19191         Register calls made to explicit constructor `this'. Don't call
19192         save_expr in ARRAY_REF case when emitting class files. Check for
19193         illegal use of this when expanding explicit constructor invocation
19194         arguments.
19195         (complete_function_arguments): Set and reset parser context
19196         explicit_constructor_p field value when appropriate.
19197         (build_super_invocation, build_this_super_qualified_invocation):
19198         New functions.
19199         (patch_assignment): Fixed typo.
19200         (patch_unaryop): Check on final fields occurs only when a decl
19201         exits.
19202         (patch_return): Take constructors into account.
19203         (patch_conditional_expr): New function.
19204         * typeck.c (build_java_signature): Removed unnecessary empty line.
19206 1998-10-28  Jeffrey A Law  (law@cygnus.com)
19208         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19210 1998-10-28  Tom Tromey  <tromey@cygnus.com>
19212         * decl.c (init_decl_processing): Renamed fields.
19213         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19214         interface_len, msize fields.
19216         * class.c (make_class_data): Removed subclass_head and
19217         subclass_next fields.
19218         * decl.c (init_decl_processing): Removed subclass_head and
19219         subclass_next fields.
19221 1998-10-28  Jeffrey A Law  (law@cygnus.com)
19223         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19224         * mangle.c (emit_unicode_mangled_name): Similarly.
19226 1998-10-26  Nick Clifton  <nickc@cygnus.com>
19228         * jcf-parse.c (get_constant): Place braces around code to compute
19229         'd' when REAL_ARITHMETIC is not defined.
19231 1998-10-25  H.J. Lu  (hjl@gnu.org)
19233         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19234         dependency.
19236 1998-10-23  Tom Tromey  <tromey@cygnus.com>
19238         * lang-specs.h: `.zip' files are input to jc1.
19240 1998-10-22  Per Bothner  <bothner@cygnus.com>
19242         * jvspecs.c:  Add (but don't enable) support for combining multiple
19243         .class and .java input filenames to a single jc1 invocation.
19244         Add support for -C flag (copile to .class files).
19245         Translate -classpath and -CLASSPATH arguments.
19246         * lang-specs.h:  Don't set %2 spec.
19248 1998-10-22  Tom Tromey  <tromey@cygnus.com>
19250         * jcf-path.c (add_entry): Don't add trailing separator if entry is
19251         a .zip file.
19252         (add_path): Don't add trailing separator to non-empty path
19253         elements.
19255         * lang.c (lang_decode_option): Check for -fclasspath and
19256         -fCLASSPATH before examining other `-f' options.
19258         * java-tree.h (finalize_identifier_node): Don't declare.
19259         * class.c (make_class_data): Don't push "final" field.
19260         * decl.c (init_decl_processing): Don't push "final" field.
19261         (finalize_identifier_node): Removed.
19262         (init_decl_processing): Don't set finalize_identifier_node.
19264         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19266 1998-10-11  Anthony Green  <green@cygnus.com>
19268         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19269         (JV_SCAN_SOURCES): New macro.
19270         (JCF_DUMP_SOURCES): Likewise.
19271         (jcf-dump$(exeext)): New target.
19272         (jv-scan$(exeext)): New target.
19274 1998-10-22  Tom Tromey  <tromey@cygnus.com>
19276         * Makefile.in (LEX): Removed.
19277         (LEXFLAGS): Likewise.
19278         (SET_BISON): New macro.
19279         (BISON): Removed.
19280         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
19281         spurious diffs in parse.c.
19282         ($(PARSE_SCAN_C)): Likewise.
19283         (PARSE_DIR): New macro.
19284         (PARSE_C): Use it.
19285         (PARSE_SCAN_C): Likewise.
19286         (PARSE_RELDIR): New macro.
19288         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19290         * jcf-io.c (find_class): Use saw_java_source to determine when to
19291         look for `.java' file.
19292         * jcf-parse.c (saw_java_source): New global.
19293         (yyparse): Set it if `.java' file seen.
19295         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19296         (GCJH_SOURCES): Likewise.
19297         * Makefile.in (datadir): New macro.
19298         (libjava_zip): Likewise.
19299         (JAVA_OBJS): Added jcf-path.o.
19300         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19301         (../gcjh$(exeext)): Likewise.
19302         (jcf-path.o): New target.
19303         * java-tree.h (fix_classpath): Removed decl.
19304         * jcf-parse.c (fix_classpath): Removed.
19305         (load_class): Don't call fix_classpath.
19306         * parse.y (read_import_dir): Don't call fix_classpath.
19307         * lex.h: Don't mention classpath.
19308         * lex.c (java_init_lex): Don't initialize classpath.
19309         * jcf-io.c (classpath): Removed global.
19310         (find_class): Use jcf_path iteration functions.  Correctly search
19311         class path for .java file.
19312         (open_in_zip): New argument `is_system'.
19313         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
19314         classpath-related options.
19315         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19316         and -I.
19317         (lang_init): Call jcf_path_init.
19318         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19319         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
19320         Correctly put braces around second string in each entry.
19321         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
19322         classpath-related options.
19323         (help): Updated for new options.
19324         * jcf.h: Declare functions from jcf-path.c.  Don't mention
19325         `classpath' global.
19326         * jcf-path.c: New file.
19328         * jcf-depend.c: Include jcf.h.
19330         * jcf-write.c (localvar_alloc): Returns `void'.
19331         (localvar_free): Removed unused variable.
19333         * lang.c (OBJECT_SUFFIX): Define if not already defined.
19334         (init_parse): Use OBJECT_SUFFIX, not ".o".
19336 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19338         * class.c (emit_register_classes): Renamed from
19339         emit_register_class.
19340         * java-tree.h (emit_register_classes): Prototype renamed from
19341         emit_register_class.
19342         * jcf-parse.c (yyparse): Call emit_register_classes once before
19343         returning.
19344         * parse.y (java_expand_classes): No longer register classes.
19346 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19348         * class.c (is_compiled_class): New local variable
19349         seen_in_zip. Identify classes found in currently compiled source
19350         file(s).
19351         * decl.c (complete_start_java_method): Fixed typo.
19352         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19353         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19354         (CLASS_P): Moved around.
19355         (java_parse_abort_on_error): Macro moved from jcf-parse.c
19356         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19357         java-tree.h
19358         (jcf_parse_source): Changed leading comment. Removed unnecessary
19359         fclose and CLASS_FROM_SOURCE_P marking.
19360         (parse_source_file): New local variables remember_for_generation
19361         and filename. Mark parsed file name identifier node. Removed block
19362         executed when parse_only was null. Set remember_for_generation.
19363         Use it as an argument to java_pop_parser_context.
19364         (yyparse): New local variables several_files, list, next node and
19365         current_file_list. Split ampersand separated file names into
19366         current_file_list. Iterate through the list and parse accordingly.
19367         * parse.h (java_pop_parser_context): New function prototype.
19368         * parse.y (ctxp_for_generation): New static global variable.
19369         (java_pop_parser_context): New argument generate. Link popped ctxp
19370         to ctxp_for_generation list accordingly.
19371         (java_complete_expand_methods): Fixed indentation.
19372         (java_expand_classes): New function.
19374 1998-10-17  Per Bothner  <bothner@cygnus.com>
19376         * Makefile.in:  Link with libiberty.a instead of memmove.o.
19378 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19380         * lex.c (setjmp.h): No longer included.
19381         * lex.h (setjmp.h): Included.
19382         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19383         (duplicate_declaration_error_p): Renamed from
19384         duplicate_declaration_error.
19385         (build_array_from_name): New function prototype.
19386         * parse.y (setjmp.h): No longer included.
19387         (variable_declarator_id): Define action.
19388         (build_array_from_name): New function.
19389         (duplicate_declaration_error_p): Renamed from
19390         duplicate_declaration_error.  Fixed leading comment.
19391         (register_fields): Main `for' loop reorganized. Uses
19392         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19393         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19394         build_array_from_name.
19395         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19396         types.
19397         (read_import_dir): Don't try to skip `.' and `..'.
19398         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19399         build_array_from_name. Main `for' loop reorganized.
19400         (resolve_qualified_expression_name): When building access to a
19401         field, use the type where the field was found, not its own type.
19402         (maybe_access_field): Use field DECL_CONTEXT if the type where the
19403         field was found is null.
19404         (qualify_ambiguous_name): Sweep through all successive array
19405         dimensions.
19407 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19409         * java-tree.h (pop_labeled_block, lang_printable_name,
19410         maybe_add_interface, set_super_info, get_access_flags_from_decl,
19411         interface_of_p, inherits_from_p, fix_classpath,
19412         complete_start_java_method, emit_handlers, init_outgoing_cpool,
19413         make_class_data, register_class, alloc_name_constant): New
19414         function prototypes.
19415         * lang.c (lang_decode_option): Set argc argument unused. Fixed
19416         indentation. Added cast to remove warning.
19417         (lang_printable_name): Set v argument unused.
19418         (lang_print_error): Added argument to lang_printable_name call.
19419         (java_dummy_print, print_lang_decl, print_lang_type,
19420         print_lang_identifier, lang_print_xnode): All argument marked
19421         unused.
19422         * lex.c (java_unget_unicode): Removed unnecessary argument.
19423         (java_allocate_new_line): Unused local variable is gone.
19424         (java_read_char): Added parenthesis in expressions to remove
19425         warnings.  Added final return statement.
19426         (java_read_unicode): Added parenthesis in expression to remove
19427         warning.
19428         (java_parse_end_comment): Fixed java_unget_unicode invocation.
19429         (java_parse_escape_sequence): Likewise.
19430         (java_lex): Unused local variables are gone. Fixed
19431         java_unget_unicode invocation.
19432         * lex.h (set_float_handler): Prototype added when JC1_LITE not
19433         defined.
19434         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19435         lang_printable_name invocation in macro.
19436         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19437         Likewise.
19438         (duplicate_declaration_error): Suppressed unused argument in
19439         prototype.
19440         (identical_subpath_p): Function declaration is gone.
19441         (patch_invoke): Suppressed unused argument in prototype.
19442         (patch_cast, build_labeled_block, check_thrown_exceptions):
19443         Likewise.
19444         * parse.y (setjmp.h): Included
19445         (toplev.h): Likewise.
19446         (field_declaration:): Suppressed unused local
19447         (label_decl:): Fixed build_labeled_block invocation.
19448         (java_pop_parser_context): Put extra parenthesis around assignment
19449         in if.
19450         (yyerror): Suppressed unused local variables.
19451         (variable_redefinition_error): Fixed lang_printable_name
19452         invocation.
19453         (create_interface): Suppressed unused local variables.
19454         (create_class): Likewise.
19455         (duplicate_declaration_error): Suppressed unused argument. Fixed
19456         lang_printable_name invocation.
19457         (register_fields): Suppressed unused local variable. Fixed
19458         duplicate_declaration_error invocation.
19459         (method_header): Suppressed unused local variable.
19460         (method_declarator, parser_check_super): Likewise.
19461         (java_complete_class): Suppressed unused local variable. Fixed
19462         fatal error message.
19463         (complete_class_report_errors): Added default: in switch.
19464         (java_check_regular_methods): Fixed lang_printable_name
19465         invocations.
19466         (check_throws_clauses): Likewise.
19467         (java_check_abstract_methods): Suppressed unused local
19468         variable. Fixed lang_printable_name invocation.
19469         (read_import_entry): Added supplemental return statement.
19470         (read_import_dir): Suppressed unused local variables.
19471         (check_pkg_class_access, declare_local_variables): Likewise.
19472         (source_start_java_method): Suppressed unused extern variable
19473         declarations
19474         (expand_start_java_method): Suppressed unused extern and local
19475         variable declarations.
19476         (java_complete_expand_methods): Likewise.
19477         (java_complete_expand_method): Suppressed unused local variables.
19478         (make_qualified_name): Likewise.
19479         (resolve_qualified_expression_name): Added default: in
19480         switch. Fixed lang_printable_name invocation.
19481         (class_instance_creation_expression): Added parenthesis around
19482         expressions.
19483         (patch_method_invocation_stmt): Fixed lang_printable_name and
19484         patch_invoke invocations.
19485         (check_for_static_method_reference): Fixed lang_printable_name
19486         invocation.
19487         (patch_invoke): Suppressed unused arguments and local variables.
19488         (lookup_method_invoke): Suppressed unused local variables.
19489         (qualify_ambiguous_name): Added default: in switch.
19490         (identical_subpath_p): Function removed.
19491         (patch_assignment): Suppressed unused local variables. Suppressed
19492         unnecessary if statement. Fixed lang_printable_name invocations.
19493         (try_builtin_assignconv): Fixed lang_printable_name invocations.
19494         (valid_ref_assignconv_cast_p): Parenthesis around
19495         expression. Suppressed unused local variables.
19496         (build_binop): Suppressed unused local variables. fixed
19497         lang_printable_name invocations.
19498         (string_constant_concatenation): Suppressed unused local
19499         variables.
19500         (patch_unaryop): Fixed lang_printable_name invocation.
19501         (patch_cast): Suppressed unnecessary argument. Fixed
19502         lang_printable_name invocation.
19503         (patch_array_ref): Fixed lang_printable_name invocation.
19504         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19505         (build_labeled_block): Suppressed unused argument.
19506         (generate_labeled_block): Fixed build_labeled_block invocation.
19507         (build_loop_body): Suppressed unused local variables.
19508         (patch_loop_statement): Likewise.
19509         (patch_exit): Fixed lang_printable_name invocation.
19510         (patch_switch_statement): Likewise.
19511         (case_identity): First argument marked unused.
19512         (patch_try_statement): Fixed lang_printable_name invocations.
19513         (patch_synchronized_statement, patch_throw_statement): Likewise.
19514         (check_thrown_exceptions): Fixed check_thrown_exceptions and
19515         lang_printable_name invocations.
19516         (check_thrown_exceptions_do): Suppressed unused argument.
19518 1998-10-14  Tom Tromey  <tromey@cygnus.com>
19520         * jcf-write.c (write_classfile): Add output class file as target.
19521         * lang-options.h: Added -MD, -MMD, -M, and -MM.
19522         * jcf.h: Added declarations for dependency-tracking functions.
19523         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19524         * lang.c (lang_decode_option): Recognize -MD and -MMD.
19525         (finish_parse): Call jcf_dependency_write.
19526         (dependency_tracking): New global.
19527         (DEPEND_SET_FILE): New define.
19528         (DEPEND_ENABLE): New define.
19529         (init_parse): Enable dependency tracking if required.
19530         Include "flags.h".
19531         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19532         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19533         (../gcjh$(exeext)): Likewise.
19534         (jcf-depend.o): New target.
19535         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19536         (GCJH_SOURCES): Likewise.
19537         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
19538         dep_name argument.
19539         (find_classfile): Added dep_name argument.
19540         (find_class): Compute name of dependency.
19541         (open_in_zip): Call jcf_dependency_add_file.
19542         * gjavah.c (output_file): No longer global.
19543         (usage): Don't mention "gjavah".
19544         (help): Likewise.
19545         (java_no_argument): Likewise.
19546         (version): Likewise.
19547         (main): Recognize and handle -M family of options.
19548         (print_mangled_classname): Return is void.
19549         (process_file): Handle case where output is suppressed.
19550         (HANDLE_END_FIELD): Likewise.
19551         (HANDLE_METHOD): Likewise.
19552         * jcf-depend.c: New file.
19554 1998-10-13  Jeffrey A Law  (law@cygnus.com)
19556         * java-tree.def: Add missing newline at EOF.
19558 1998-10-13  Tom Tromey  <tromey@cygnus.com>
19560         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19561         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
19562         function.
19563         Include <config.h> and "system.h".
19564         (disassemble_method): Undefine RET to avoid clash with
19565         config/i386/i386.h.
19567 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19569         * decl.c (runtime_exception_type_node, error_exception_type_node):
19570         New global variables.
19571         (init_decl_processing): Initialized.
19572         * expr.c (java_lang_expand_expr): Set caught exception type to
19573         null if catch handler argument doesn't exit.
19574         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19575         tree codes.
19576         * java-tree.h (runtime_exception_type_node,
19577         error_exception_type_node): Global variables declared.
19578         (DECL_FUNCTION_THROWS): New macro.
19579         (DECL_FUNCTION_BODY): Modified comment.
19580         (DECL_SPECIFIC_COUNT): Likewise.
19581         (struct lang_decl): New field throws_list.
19582         (IS_UNCHECKED_EXPRESSION_P): New macro.
19583         * lex.c (java_lex): Generate location information for THROW_TK.
19584         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19585         EXCEPTIONS_P): New macros.
19586         (enum jdep_code): New value JDEP_EXCEPTION.
19587         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19588         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19589         PATCH_METHOD_RETURN_ERROR): New macros.
19590         (patch_method_invocation_stmt): Added new argument to prototype.
19591         (patch_synchronized_statement, patch_throw_statement,
19592         check_thrown_exceptions, check_thrown_exceptions_do,
19593         purge_unchecked_exceptions, check_throws_clauses): New function
19594         prototypes.
19595         * parse.y Fixed typo in keyword section.
19596         (throw:): Rule tagged <node>.
19597         (THROW_TK): Keyword tagged <operator>.
19598         (method_header:): Last argument to call to method_header passed
19599         from throws: rule.
19600         (throws:, class_type_list:, throw_statement:,
19601         synchronized_statement:, synchronized:): Defined actions.
19602         (method_header): New local variable current. Register exceptions
19603         from throws clause.
19604         (java_complete_tree): Complete and verify exceptions from throws
19605         clause.
19606         (complete_class_report_errors): Error message on exceptions not
19607         found
19608         (java_check_regular_methods): Fixed typo. Shortcut on private
19609         overriding methods. Changed error message on method
19610         redefinition. Check for throws clause compatibility.
19611         (check_throws_clauses): New function.
19612         (java_check_abstract_methods): Use DECL_NAME for wfl or current
19613         method. Changed error message on method redefinition.
19614         (currently_caught_type_list): New static variable.
19615         (java_complete_expand_methods): Purge unchecked exceptions from
19616         throws clause list. Call PUSH_EXCEPTIONS before walk and
19617         POP_EXCEPTIONS after.
19618         (resolve_qualified_expression_name): Pass new argument as NULL to
19619         patch_method_invocation_stmt.
19620         (patch_method_invocation_stmt): New argument ref_decl. Invoke
19621         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19622         argument list when appropriate. Use new argument if non null to
19623         store selected method decl.
19624         (patch_invoke): Convert if necessary args of builtin types before
19625         forming CALL_EXPR. Argument list no longer reversed here.
19626         (invocation_mode): Treat final methods as static methods.
19627         (java_complete_tree): New cases for THROW_EXPR: and
19628         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19629         function call.
19630         (complete_function_arguments): No more RECORD_TYPE
19631         conversion. Function parameter nodes no longer saved.
19632         (valid_ref_assignconv_cast_p): Avoid handling null type.
19633         (patch_binop): Fixed null constant reference handling.
19634         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19635         BUILD_THROW macros.
19636         (patch_try_statement): Fixed comments. Record caught types in
19637         list, push the list, expand try block and pop the list.
19638         (patch_synchronized_statement, patch_throw_statement,
19639         check_thrown_exceptions, check_thrown_exceptions_do,
19640         purge_unchecked_exceptions): New functions.
19641         * typeck.c (lookup_argument_method): Allow WFL in place of method
19642         DECL_NAME during method definition check
19644 1998-10-09  Tom Tromey  <tromey@cygnus.com>
19646         * gjavah.c (decode_signature_piece): New function.
19647         (print_c_decl): Use it.  Added `name_override' argument.
19648         (print_method_info): Use name_override argument to print_c_decl.
19649         (seen_fields): Removed.
19650         (print_field_info): Don't update seen_fields.
19651         (struct method_name): New structure.
19652         (method_name_list): New global.
19653         (print_method_info): Add new method to list of methods.
19654         (name_is_method_p): New function.
19655         (print_field_info): If field name has same name as method, then
19656         change field name.
19657         (process_file): Parse methods before fields.
19658         (field_pass): New global.
19659         (HANDLE_END_FIELD): Take field_pass into account.
19661 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19663         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19664         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19666 1998-10-03  Anthony Green  <green@cygnus.com>
19668         * jvspec.c: Fix bug in jvgenmain_spec patch.
19670 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19672         * Makefile.in (lang.o:): Install dependency on java-tree.def.
19673         * decl.c (soft_exceptioninfo_call_node): New global variable.
19674         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19675         takes extra integer argument. soft_exceptioninfo_call_node
19676         initialized.
19677         * except.c (java_set_exception_lang_code): New function
19678         (method_init_exceptions): Called here.
19679         (prepare_eh_table_type): New function.
19680         (expand_end_java_handler): Called here.
19681         * expr.c (build_java_throw_out_of_bounds_exception): Now features
19682         one argument. Modified generation of call to
19683         soft_badarrayindex_node to use new argument.
19684         (build_java_arrayaccess): Pass faulty index value to
19685         build_java_throw_out_of_bounds_exception.
19686         (generate_name): New function.
19687         (java_lang_expand_expr): New local variables node, current,
19688         has_finally_p. Expand TRY_EXPR node.
19689         (process_jvm_instruction): Replace top of the stack with thrown
19690         object reference when entering exception handler.
19691         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19692         specific tree codes.
19693         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19694         global.
19695         (DECL_SPECIFIC_COUNT): New macro.
19696         (prepare_eh_table_type, java_set_exception_lang_code,
19697         generate_name): New function declarations.
19698         (match_java_method): Declaration deleted.
19699         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19700         macros.
19701         * lex.c (TRY_TK, CATCH_TK): Generate location information.
19702         * parse.h (redefinition_error, refine_accessible_methods_list,
19703         can_cast_to_p): Function declaration removed.
19704         (classitf_redefinition_error, variable_redefinition_error,
19705         parse_jdk1_1_error, find_applicable_accessible_methods_list,
19706         find_most_specific_methods_list, argument_types_convertible,
19707         enter_a_block, valid_builtin_assignconv_identity_widening_p,
19708         valid_cast_to_p, valid_method_invocation_conversion_p,
19709         try_reference_assignconv, add_stmt_to_compound,
19710         build_jump_to_finally, build_tree_list, patch_try_statement,
19711         java_get_catch_block): New function declarations.
19712         * parse.y (string_buffer_type): Global variable deleted.
19713         (group_of_labels, catches, catch_clause, catch_clause_parameter,
19714         finally): Rules tagged <node>.
19715         (TRY_TK, CATCH_TK): Token tagged <operator>.
19716         (class_body_declaration:, class_member_declaration:,
19717         formal_parameter:, explicit_constructor_invocation:,
19718         interface_member_declaration:, constant_declaration:,
19719         primary_no_new_array:, class_instance_creation_expression:,
19720         array_creation_expression:): Issue error on unsuported JDK1.1
19721         features.
19722         (try_statement:, catches:, finally:): Define actions.
19723         (catch_clause_parameter): New rule.
19724         (catch_clause:): Use new rule catch_clause_parameter.
19725         (parse_jdk1_1_error): New function.
19726         (redefinition_error): Renamed classitf_redefinition_error.
19727         (variable_redefinition_error): New function.
19728         (check_class_interface_creation): Call
19729         classitf_redefinition_error.
19730         (java_complete_tree): Added error message on JDEP_TYPE: case.
19731         (complete_class_report_errors): Fixed indentation.
19732         (declare_local_variables): Call variable_redefinition_error.
19733         (source_end_java_method): Call java_set_exception_lang_code and
19734         emit_handlers where appropriate.
19735         (java_method_add_stmt): Call add_stmt_to_block.
19736         (add_stmt_to_block): New function.
19737         (lookup_method_invoke): Fixed outside comment. new local variable
19738         candicates.  Call find_applicable_accessible_methods_list and
19739         find_most_specific_methods_list when searching for a
19740         method. Modified error report to list possible candidates when
19741         applicable.
19742         (find_applicable_accessible_methods_list,
19743         find_most_specific_methods_list, argument_types_convertible): New
19744         function.
19745         (refine_accessible_methods_list): Function deleted.
19746         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19747         expr (if applicable) before calling patch_array_ref.
19748         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19749         (enter_block): Fixed comment.
19750         (enter_a_block): New function.
19751         (patch_assignment): Reorganized. Call try_reference_assignconv for
19752         references. Call valid_cast_to_p instead of can_cast_to_p.
19753         (try_reference_assignconv,
19754         valid_builtin_assignconv_identity_widening_p): New functions.
19755         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19756         (valid_cast_to_p, valid_method_invocation_conversion_p): New
19757         functions.
19758         (build_string_concatenation): Don't resolve StringBuffer.
19759         (patch_cast): Fixed inverted arguments.
19760         (patch_array_ref): Code to save array expr deleted. Call
19761         valid_cast_to_p instead of can_cast_to_p.
19762         (generate_labeled_block): Call generate_name.
19763         (build_jump_to_finally, build_try_statement, java_get_catch_block,
19764         patch_try_statement): New functions.
19765         * typeck.c (match_java_method): Function deleted.
19767 1998-10-02  Anthony Green  <green@cygnus.com>
19769         * jvspec.c: jvgenmain_spec uses different temporary file names.
19771 1998-10-02  Anthony Green  <green@cygnus.com>
19773         * jvspec.c (lang_specific_driver): Fail if user specifies
19774         --main= when not linking.
19776 1998-09-28  Tom Tromey  <tromey@cygnus.com>
19778         * class.c (make_class_data): Push value for `thread' field.
19779         * decl.c (init_decl_processing): Added `thread' field to class.
19781         * class.c (add_field): Always make static fields externally
19782         visible.
19784 1998-09-26  Anthony Green  <green@cygnus.com>
19786         * expr.c (build_java_athrow,
19787         build_java_throw_out_of_bounds_exception, expand_invoke,
19788         build_newarray, expand_java_multianewarray, build_java_monitor):
19789         Update comments to reflect _Jv_* function names.
19791 1998-09-25  Per Bothner  <bothner@cygnus.com>
19793         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
19794         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
19795         * parse.y (expand_start_java_method):  Likewise.
19797 1998-09-24  Per Bothner  <bothner@cygnus.com>
19799         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
19801         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19802         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
19803         * expr.c:  Remove no-longer-needed calls to promote_type.
19804         * decl.c (give_name_to_locals):  Liekwise.
19805         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
19806         * parse.y:  Add/remove promote_type calls as appropriate.
19807         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
19808         (parse_signature_string):  Likewise.
19809         (build_java_array_type):  Fix for now signature convenions.
19811         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
19813 1998-09-23  Tom Tromey  <tromey@cygnus.com>
19815         * class.c (init_class_processing): libjava function renamed to
19816         _Jv_RegisterClass.
19818 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19820         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19821         * java-tree.def: Fixed DEFTREECODE third argument.
19822         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19823         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19824         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19825         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19826         JAVA_THIS_EXPR): Now replaced by tree code definitions.
19827         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19828         * lang.c (java_tree_code_type, java_tree_code_length,
19829         java_tree_code_name): New arrays.
19830         (lang_init): Append Java tree node definitions to Gcc ones.
19831         * lex.c (expression_obstack): Declared as extern when JC1_LITE
19832         defined.
19833         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19834         wfl_to_string.
19835         (java_lex): Allow declaration of empty string constants. Retain
19836         location information on CASE_TK and DEFAULT_TK.
19837         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19838         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19839         Modified to be more robust.
19840         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19841         (build_new_invocation, try_builtin_assignconv,
19842         patch_switch_statement, string_constant_concatenation,
19843         build_string_concatenation, patch_string_cst, patch_string,
19844         java_expand_switch): New function declarations.
19845         * parse.y: Rules related to switch and EH tagged <node>.
19846         (label_id): Set to NULL_TREE
19847         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19848         tree nodes.
19849         (this_or_super:): Fixed indentation.
19850         (statement:, statement_nsi:, statement_without_trailing_substatement:,
19851         statement_expression:): Removed call to RULE on all sub-rules.
19852         (switch_expression:, switch_labels:): New rules.
19853         (switch_statement:, switch_block:, switch_block_statement_groups:,
19854         switch_block_statement_group:, switch_labels:, switch_label:):
19855         Defined actions.
19856         (throw_statement:, synchronized_statement:, try_statement:):
19857         Defined temporary actions.
19858         (class_instance_creation_expression:): Call
19859         build_new_invocation. Fixed indentation.
19860         (field_access): Fixed indentation.
19861         (method_invocation): Likewise.
19862         (make_qualified_primary): Use THIS_EXPR.
19863         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19864         resolving from SUPER, set *type_found.
19865         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19866         (java_complete_tree): Removed unused local variable `location'. Case
19867         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19868         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19869         on MODIFY_EXPR: and all binary operator tree code cases. Removed
19870         STRING_CST: case. default: checks for patchable strings.
19871         (complete_function_arguments): Transform string constant or
19872         crafted StringBuffer if necessary.
19873         (build_method_invocation): Fixed comments.
19874         (build_new_invocation): New function.
19875         (patch_assignment): Call try_builtin_assignconv to figure a valid
19876         assignment conversion between builtin types.
19877         (try_builtin_assignconv): New function.
19878         (build_binop): Use URSHIFT_EXPR directly to call build.
19879         (operator_string): Use UNARY_PLUS_EXPR.
19880         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19881         operator.
19882         (do_merge_string_cste, merge_string_cste,
19883         string_constant_concatenation, build_string_concatenation,
19884         patch_string, patch_string_cst): New function.
19885         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19886         (patch_unaryop): Likewise. New test of valid ++/-- operands.
19887         (build_newarray_node): Use NEW_ARRAY_EXPR.
19888         (build_this): Use THIS_EXPR.
19889         (build_return): Enable debug information on return statement.
19890         (build_if_else_statement): Likewise.
19891         (complete_labeled_statement): Fixed related comment.
19892         (build_loop_body): Fixed comment.
19893         (build_bc_statement): Enable debug information on break/continue
19894         statements.
19895         (patch_bc_statement): Fixed typos. Handle SWITCH statement
19896         context.
19897         (patch_switch_statement, case_identity, java_expand_switch): New
19898         functions.
19900 1998-09-21  Per Bothner  <bothner@cygnus.com>
19902         * buffer.h (BUFFER_INIT):  New macro.
19903         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
19904         Pass (struct jcf_partial *state) to most functions.
19905         (jcf_block, jcf_relocation):  New types.
19906         Support labels, branches, conditionals, loops.
19908 1998-09-21  Tom Tromey  <tromey@cygnus.com>
19910         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19912 1998-09-21  Per Bothner  <bothner@cygnus.com>
19914         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
19915         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
19916         not integer_type_node (INT_TYPE_SIZ bits).
19918         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
19920         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
19921         * jcf-dump.c (print_exception_table):  New function.
19922         (disassemble_method):  Better handling of wide instructions.
19923         Make more robust for bad input.
19925 1998-09-30  Jeffrey A Law  (law@cygnus.com)
19927         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19928         FreeBSD.
19930 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19932         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19934 1998-09-17  Tom Tromey  <tromey@cygnus.com>
19936         * Makefile.in ($(PARSE_H)): Removed target.
19938 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19940         * Makefile.in (JAVA_OBJS): Add memmove.o
19941         (memmove.o): New target & rules.
19943 1998-09-15  Tom Tromey  <tromey@cygnus.com>
19945         * expr.c (expand_invoke): Don't generate a call to the class init
19946         code.
19948 1998-09-14  Jeffrey A Law  (law@cygnus.com)
19950         * Makefile.in: Add many missing dependencies.
19951         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19952         as appropriate.
19953         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19954         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19956 1998-09-11  Per Bothner  <bothner@cygnus.com>
19958         * decl.c (complete_start_java_method):  If method is static (and
19959         not private) call _Jv_InitClass.
19960         * expr.c (expand_invoke):  Don't call build_class_init.
19962         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
19964 1998-09-10  Jeffrey A Law  (law@cygnus.com)
19966         * Make-lang.in (GCJ): Define before using.
19968 1998-09-09  Jeffrey A Law  (law@cygnus.com)
19970         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19971         losing due to namespace pollution in GNU getopt.h
19973 1998-09-09  Tom Tromey  <tromey@cygnus.com>
19975         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19976         (java.all.cross): Likewise.
19977         (java.rest.encap): Likewise.
19979 1998-09-08  Jeffrey A Law  (law@cygnus.com)
19981         * gjavah.c (print_class_decls): Fix thinko in arglist
19982         * jcv-io.c (find_classfile): Similarly.
19984 1998-09-07  Jeffrey A Law  (law@cygnus.com)
19986         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19988 1998-09-05  Tom Tromey  <tromey@cygnus.com>
19990         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19991         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19992         * Makefile.in (PARSE_C): New macro.
19993         (PARSE_H): Likewise.
19994         (PARSE_SCAN_C): Likewise.
19995         ($(PARSE_C)): Target renamed from parse.c.
19996         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19997         (clean): Remove parse-scan.c as well.
19998         (parse.o): Depend on $(PARSE_C).
20000 1998-09-05  Anthony Green  <green@cygnus.com>
20002         * README, license.terms: Removed.
20004         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20005         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20006         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20007         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20008         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20009         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20010         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20011         and Java trademark attribution.
20013 1998-09-04  Tom Tromey  <tromey@cygnus.com>
20015         * Makefile.in: Use gcjh, not gjavah.
20016         * config-lang.in (stagestuff): Use gcjh, not gjavah.
20017         * Make-lang.in: Changed gjavah to gcjh everywhere.
20019 1998-09-03  Per Bothner  <bothner@cygnus.com>
20021         * gjavah.c:  Support new -prepend -add -append flags.
20022         (print_method_info):  Method is not virtual if class is final.
20024 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20026         * jv-scan.c: Fixed copyright assignment.
20027         * keyword.gperf: Likewise.
20028         * keyword.h: Likewise.
20029         * lex.c: Fixed copyright assignment.
20030         (java_lex): Push unicode back when parsing '<'.
20031         * lex.h: Fixed copyright assignment.
20032         * parse-scan.y: Likewise.
20033         * parse.h: Fixed copyright assignment.
20034         (build_debugable_stmt, complete_for_loop): New function prototypes.
20035         * parse.y: Fixed copyright assignment.
20036         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
20037         size_zero_node when completing a loop with no exit condition.
20038         (for_statement_nsi:): Define action.
20039         (for_init:, for_update:): Return size_zero_node when empty.
20040         (declare_local_variables): Call build_debugable_stmt.
20041         (build_debugable_stmt): New function.
20042         (build_loop_body): Build debugable statement around loop
20043         condition part.
20044         (complete_loop_body): Take into account the debugable statement
20045         around the EXIT_EXPR.
20046         (complete_loop_body): New function.
20047         (patch_exit_expr): Fixed condition inversion.
20049 1998-09-02  Tom Tromey  <tromey@cygnus.com>
20051         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20052         name of thread define.
20053         * jvspec.c (THREAD_NAME): New macro.
20054         (GCLIB): Likewise.
20055         (THREADLIB): Likewise.
20056         (lang_specific_driver): Recognize attempt to link with thread
20057         library or gc library.  Recognize -ljava on command line so it
20058         isn't linked against more than once.
20060 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20062         * parse-scan.y (report_main_declaration): Name of the class
20063         containing `main' can be a qualified name.
20065 1998-08-31  Tom Tromey  <tromey@cygnus.com>
20067         * config-lang.in: Changed gjavac to gjc everywhere.
20068         * Make-lang.in: Changed gjavac to gjc everywhere.
20070 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20072         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20073         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20074         and install the files.
20075         * Makefile.in (JAVA_OBJS_LITE): New variable.
20076         (compiler:): Now include jv-scan as a dependency.
20077         (../jv-scan$(exeext), parse-scan.c): New targets.
20078         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20079         * config-lang.in (compilers): Removed gcj, gjavah from the list.
20080         * jcf-parse.c (parse_source_file): Call java_layout_classes and
20081         check for errors even if parse_only.
20082         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20083         defined.
20084         (yylex): New function. Uses java_lex body.
20085         (java_lex): Removed commented out statement. Remove local variable
20086         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20087         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20088         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20089         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20090         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20091         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20092         where appropriate.
20093         (java_lex_error): Empty if JC1_LITE is defined.
20094         (java_get_line_col): Return 0 if JC1_LITE is defined.
20095         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20096         SET_MODIFIER_CTX): Moved into the section containing the macros
20097         conditionally defined by JC1_LITE.
20098         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20099         argument if JC1_LITE is defined.
20100         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20101         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20102         is defined.
20103         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20104         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20105         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20106         to different values according to JC1_LITE.
20107         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20108         declared if JC1_LITE set.
20109         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20110         defined if JC1_LITE not set.
20111         (struct parser_ctx): Reorganized and skip the jc1 front end part
20112         if JC1_LITE set.
20113         (java_layout_classes): New function definition.
20114         (java_push_parser_context, java_init_lex, yyparse, yylex,
20115         yyerror): Prototype always declared. All other static function
20116         prototypes declared only if JC1_LITE is not set.
20117         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20118         declared in parse.h.
20119         (java_layout_classes): New function.
20120         (java_complete_expand_methods): No longer layout the class here.
20121         * parse-scan.y: New file.
20122         * jv-scan.c: New file.
20124 1998-08-25  Tom Tromey  <tromey@cygnus.com>
20126         * gjavah.c (main): Handle -friend option.
20127         (friend_specs): New global.
20128         (generate_access): Handle friend_specs.
20129         (process_file): Likewise.
20130         (MAX_FRIENDS): New macro.
20131         (friend_count): New global.
20132         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
20133         Changed all callers.
20135 1998-08-24  Per Bothner  <bothner@cygnus.com>
20137         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
20138         (main):  Handle processing all the entries of a named .zip archive.
20139         * jcf-io.c (jcf_trim_old_input):  New function.
20140         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
20142 1998-08-24  Per Bothner  <bothner@cygnus.com>
20144         * lang.c (flag_assume_compiled):  Make default be on.
20146 1998-08-21  Per Bothner  <bothner@cygnus.com>
20148         * jcf-dump.c:  Add bunches of flags to control output more.
20149         (process_class):  New function;  support printing more than one class.
20150         (main): Support new --print-main and --javap flags.
20151         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
20152         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
20154 1998-08-20  Per Bothner  <bothner@cygnus.com>
20156         Change mangling of dispatch table to match C++ vtable (w/thunks).
20157         * class.c (build_dtable_decl), java-tree.h:  New function.
20158         (make_class_data):  Call it.
20159         * decl.c (init_decl_processing):  Likewise.
20161 1998-08-19  Warren Levy  <warrenl@cygnus.com>
20163         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20164         soft_anewarray; adjust args passed.
20165         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20166         match _Jv_NewObjectArray.
20168 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20170         * decl.c (push_labeled_block, pop_labeled_block): New functions.
20171         * expr.c (loopup_label): Call create_label_decl.
20172         (create_label_decl): New function.
20173         (java_lang_expand_expr): Call expand_start_bindings with argument
20174         set to zero.
20175         * java-tree.h Added space after PROTO in function declarations
20176         when necessary.
20177         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20178         (create_label_decl, push_labeled_block): New function
20179         declarations.
20180         * lex.c (label_id): Initialize.
20181         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20182         switch.
20183         * parse.h Added space after PROTO in function declarations when
20184         necessary.
20185         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20186         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20187         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20188         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20189         macros.
20190         (struct parser_ctxt): New fields current_loop,
20191         current_labeled_block.
20192         (build_if_else_statement, patch_if_else_statement,
20193         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20194         generate_labeled_block, complete_labeled_statement,
20195         build_bc_statement, patch_bc_statement, patch_loop_statement,
20196         build_new_loop, build_loop_body, complete_loop_body): New function
20197         declarations.
20198         * parse.y (java_warning_count): New global variable.
20199         (label_id): New static variable.
20200         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20201         (block:): Return size_zero_node when block is empty.
20202         (empty_statement:): Return size_zero_node.
20203         (statement:): Implement supplemental action when for_statement: is
20204         reduced.
20205         (label_decl:): New rule.
20206         (labeled_statement:): Rewritten using label_decl. Actions
20207         implemented.
20208         (labeled_statement_nsi:): Likewise.
20209         (if_then_statement): Actions implemented.
20210         (while_expression): New rule.
20211         (while_statement:): Rewritten using while_expression. Actions
20212         implemented.
20213         (while_statement_nsi:): Likewise.
20214         (do_statement_begin:): New rule.
20215         (do_statement:): Rewritten using do_statement_begin. Actions
20216         implemented.
20217         (for_statement:): Rewritten using for_begin. Actions implemented.
20218         (for_statement_nsi:): Likewise.
20219         (for_header:, for_begin:): New rules.
20220         (for_init:): Actions implemented.
20221         (statement_expression_list:, break_statement:,
20222         continue_statement:): Likewise.
20223         (yyerror): Count number of issued warning(s).
20224         (java_report_errors): Report error(s) and/or warning(s).
20225         (java_complete_class): Use build_java_argument_signature to
20226         recompute completed method signature.
20227         (java_check_regular_methods): New locals method_wfl and aflags.
20228         Use method_wfl instead of lookup_cl during error reports. Fixed
20229         indentation and modified some error messages. Use
20230         lang_printable_name in method instead of the DECL_NAME. New code
20231         to issue warnings on methods not overriding corresponding methods
20232         private to a different package.
20233         (java_method_add_stmt): Call add_stmt_to_compound.
20234         (add_stmt_to_compound): New function.
20235         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20236         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20237         (build_if_else_statement, patch_if_else_statement,
20238         build_labeled_block, generate_labeled_block,
20239         complete_labeled_statement, build_new_loop, build_loop_body,
20240         complete_loop_body, patch_loop_statement, build_bc_statement,
20241         patch_bc_statement, patch_exit_expr): New functions.
20242         * typeck.c (build_java_signature): Build argument signature before
20243         enclosing it in between parenthesis.
20245 1998-08-17  Warren Levy  <warrenl@cygnus.com>
20247         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20248         (JAVA_OBJS): Added reminder comment
20250 1998-08-13  Nick Clifton  <nickc@cygnus.com>
20252         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20253         be interpreted as a long long.
20255 1998-08-13  Warren Levy  <warrenl@cygnus.com>
20257         * decl.c (init_decl_processing): Use _Jv_InitClass, not
20258         soft_initialise_class.  Use _Jv_NewMultiArray, not
20259         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
20260         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
20261         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
20262         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20264 1998-08-12  Per Bothner  <bothner@cygnus.com>
20266         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20267         length_identifier_node):  New global tree node constants.
20268         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
20269         Replace uses by super_identifier_node etc.
20270         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
20272         * parse.y (resolve_field_access):  Don't special-case ".length" if
20273         flag_emit_class_files.
20274         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
20275         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
20276         and ARRAY.length.
20278 1998-08-11  Per Bothner  <bothner@cygnus.com>
20280         * decl.c (init_decl_processing): Remove unused method_type_node fields.
20281         * class.c (make_method_value):  Remove init for removed fields.
20283         * class.c (layout_class):  Use build_java_argument_signature.
20284         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
20286         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
20287         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
20288         (build_java_signature):  Don't use push_java_argument_signature.
20290         * typeck.c (lookup_argument_method):  New function.
20291         * parse.y (java_check_regular_methods):  Use lookup_argument_method
20292         instead of lookup_java_method2 followed by lookup_java_method.
20294         * parse.y (check_method_redefinition):  Minor optimization.
20296         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
20297         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20299 1998-08-10  Tom Tromey  <tromey@cygnus.com>
20301         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20302         c-pragma.o.
20304         * gjavah.c (java_float_finite): Use K&R-style definition.
20305         (java_double_finite): Likewise.
20306         (generate_access): Now returns void.  Changed all callers.
20307         (last_access_generated): Removed.
20308         (process_file): Only make a single pass over the .class file.
20310 1998-07-29  Per Bothner  <bothner@cygnus.com>
20312         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
20313         for compatibility for G++ (with -fvtable-thunks).
20314         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
20316         * gjavah.c (process_file):  Use public inheritance for super-class.
20318 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20320         * lex.c (java_init_lex): Initialize ctxp->package.
20321         * parse.h (struct parser_ctxt): package and package_len replaced
20322         by tree package, an identifier node. Field method_decl_list is
20323         gone. Fixed comments.
20324         (lookup_field_wrapper, merge_qualified_name, not_accessible,
20325         class_in_current_package): New function prototypes.
20326         * parse.y (array_type:): Set class loaded flag on primitive type
20327         arrays.
20328         (package_declaration:): Assign ctxp->package to the
20329         identifier node.
20330         (method_invocation:): Handle invocation of method qualified by
20331         `super'.
20332         (single_type_import_declaration:): Removed ambiguity check.
20333         (java_pop_parser_context): New local variable `next'. Reset and
20334         set IMPORT_CLASSFILE_NAME flags on current and previous import
20335         list.
20336         (java_accstring_lookup): Use new local macro COPY_RETURN.
20337         (lookup_field_wrapper): New function.
20338         (parser_qualified_classname): Use merge_qualified_name.
20339         (parser_check_super_interface): Broaden error message.
20340         (do_resolve_class): Check for qualified class name in the current
20341         compilation unit if appropriate.
20342         (process_imports): Check for already defined classes.
20343         (check_pkg_class_access): Got rid of call to
20344         get_access_flags_from_decl.
20345         (java_complete_expand_methods): Call safe_layout_class based on
20346         the current class size.
20347         (make_qualified_primary): Build a WFL qualification on primary if
20348         none exists.
20349         (merge_qualified_name): New function.
20350         (make_qualified_name): Use merge_qualified_name.
20351         (resolve_expression_name): Use safe_lookup_field.
20352         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20353         (resolve_qualified_expression_name): Likewise. Check on resolved
20354         element accessibility.
20355         (not_accessible_p, class_in_current_package): New functions.
20356         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20357         (patch_method_invocation_stmt): Merged common pieces. Check
20358         accessibility of invoked method.
20359         (check_for_static_method_reference): Add returned type in error
20360         message.
20361         (invocation_mode): Get rid of bogus check on PRIVATE methods.
20362         (refine_accessible_methods_list): Merged two conditions in test.
20363         (java_complete_class): Sanity check on stabilize_ref gone.
20364         * zextract.c (read_zip_archive): Cast lseek second argument to long.
20366 1998-07-28  Per Bothner  <bothner@cygnus.com>
20368         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
20370 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20372         * gjavah.c (F_NAN): Removed.
20373         (F_NAN_MASK): New macro.
20374         (F_POSITIVE_INFINITY): Removed.
20375         (F_NEGATIVE_INFINITY): Likewise.
20376         (java_float_finite): Rewrote.
20377         (D_NAN_MASK): Renamed.
20378         (java_double_finite): Rewrote.
20379         (D_POSITIVE_INFINITY): Removed.
20380         (D_NEGATIVE_INFINITY): Likewise.
20382         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20383         If verbose, print underlying representation of value in hex.
20385 1998-07-24  Per Bothner  <bothner@cygnus.com>
20387         * buffer.h, buffer.c:  New files.
20388         * Makefile.in (JAVA_OBJS):  Add buffer.o.
20390         Support locals variables and writing their debug entries to .class.
20391         * jcf-write.c:  Simplify some by user new buffer type.
20392         (vode_buffer_grow):  Removed.
20393         (struct localvar_info):  New type.
20394         (localsvars, localvartable):  New buffers.
20395         (localvar_alloc, localvar_free):  New functions.
20396         (generate_bytecode_insns):  Handle local variables.
20397         (generate_classfile):  Write LocalVariableTable attribute.
20399 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20401         * jcf-io.c (open_in_zip): Check the zipfile magic number.
20402         * zipfile.h (ZIPMAGIC): New macro.
20404 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20406         * Makefile.in (gjavah.o): Updated dependencies.
20407         (jcf-dump.o): Likewise.
20408         (all.indirect): Use ../gjavah.
20409         (../gjavah$(exeext)): Likewise.
20410         (clean): Don't remove gjavah.
20411         (clean): Remove parse.c, not java/parse.c.
20412         * Make-lang.in (java): Added gjavah.
20413         (gjavah$(exeext)): New target.
20414         (GJAVAH_SOURCES): New macro.
20415         (java.all.build): Added gjavah.
20416         (java.all.cross): Likewise.
20417         (java.rest.encap): Likewise.
20418         * config-lang.in (compilers, stagestuff): Added gjavah.
20420 1998-07-23  Tom Tromey  <tromey@cygnus.com>
20422         * gjavah.c (java_float_finite): New function.
20423         (java_double_finite): Likewise.
20424         (F_POSITIVE_INFINITY): New macro.
20425         (F_NEGATIVE_INFINITY): Likewise.
20426         (F_NAN): Likewise.
20427         (D_POSITIVE_INFINITY): Likewise.
20428         (D_NEGATIVE_INFINITY): Likewise.
20429         (D_NAN): Likewise.
20430         (print_field_info): Use java_float_finite and java_double_finite.
20432 1998-07-23  Per Bothner  <bothner@cygnus.com>
20434         * parse.y (method_header):  Name "this" implicit argument.
20436 1998-07-22  Per Bothner  <bothner@cygnus.com>
20438         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
20439         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
20440         (put_linenumber):  New function.
20441         (generate_bytecode_insns, generate_classfile):  Write line numbers.
20443 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20445         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20446         (lookup_name, build_known_method_ref, build_class_init,
20447         build_invokevirtual, invoke_build_dtable, match_java_method,
20448         build_field_ref, pushdecl_force_head, build_java_binop,
20449         binary_numeric_promotion, build_decl_no_layout,
20450         build_java_arrayaccess, build_newarray, build_anewarray,
20451         build_java_array_length_access, build_java_arraynull_check): New
20452         extern function prototypes.
20453         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20454         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20455         java-tree.h.
20456         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20457         to NULL
20458         * jcf.h (jcf_out_of_synch): New extern function prototype.
20459         * parse.h: Static/global function implemented in parse.y
20460         prototyped and declarations moved at the end of the file.
20461         (DECL_P): Check that the argument isn't null.
20462         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20463         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20464         (QUAL_DECL_TYPE): New macro.
20465         (PARAMS): Macro definition removed.
20466         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20467         (return_statement:): Call build_return.
20468         (field_access:): Call make_qualified_primary in sub rule.
20469         (method_invocation:): Build method invocation and call
20470         make_qualified_primary when processing primaries.
20471         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20472         get_type_from_signature.
20473         (java_check_regular_method): Extra integer 0 argument when calling
20474         lookup_java_method2.
20475         (lookup_java_interface_method2): Extra method DECL argument when
20476         calling lookup_java_interface_method2.
20477         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20478         COMPOUND_EXPR node.
20479         (java_complete_expand_method): Layout current class iff not
20480         already done. Don't process interface's methods.
20481         (java_complete_expand_method): Use super class only if it
20482         exists. Use current class otherwise.
20483         (make_qualified_primary): New function.
20484         (resolve_expression_name): Process qualified expression or
20485         expression from primary the same way.
20486         (resolve_expression_name): Two last arguments to
20487         resolve_field_access are now NULL_TREEs.
20488         (resolve_field_access): New variable is_static. Local field must
20489         be DECLs. is_static computed on field DECLs only. Append code in
20490         where_found to the field access if necessary. Use QUAL_DECL_TYPE
20491         to initialize field_type.
20492         (resolve_qualified_expression_name): New local variable,
20493         previous_call_static and is_static. Handle primaries with function
20494         calls, casts, array references and `this'. `super' now handled as
20495         `(super_class)this'. Use is_static to clarify boolean expressions.
20496         Added code to handle case where a proper handle is required to
20497         access a field. Use QUAL_DECL_TYPE where applicable.
20498         (maybe_access_field): New function.
20499         (patch_method_invocation_stmt): New arguments primary, where,
20500         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20501         deleted. Use `where' as a type to search from if specified. Check
20502         for static method reference where forbidden. Append primary or
20503         current_this to the argument list if not calling constructor nor
20504         static methods.
20505         (check_for_static_method_reference): New function.
20506         (patch_invoke): Layout the class on which new is done if
20507         necessary.
20508         (lookup_method_invoke): Changed format to report errors on
20509         methods.
20510         (qualify_ambiguous_name): New local variable this_found. Now
20511         handle things from primaries. Method call are considered
20512         expression names.
20513         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20514         changed into NULLs.
20515         (not_initialized_as_it_should_p): Comply with the new DECL_P.
20516         (java_complete_tree): New case fo RETURN_EXPR. Process function
20517         call arguments in separate function.
20518         (complete_function_arguments): New function.
20519         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20520         anymore.
20521         (patch_assignment): Take the return function slot into account as
20522         a RHS. Distinguish assignment from a return.
20523         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20524         when checking methods in interfaces.
20525         (resolve_type_during_patch): NULL argument to unresolve_type_p
20526         instead of NULL_TREE.
20527         (patch_newarray): Fixed typo in comment.
20528         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20529         (build_return, patch_return): New functions.
20530         * typeck.c (lookup_java_constructor): Fixed typo in comment.
20532 1998-07-21  Per Bothner  <bothner@cygnus.com>
20534         * constants.c (find_name_and_type_constant, find_fieldref_index,
20535         find_methodref_index):  New methods.
20536         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
20537         just return given method.  Also, rename to build_known_method_ref.
20538         (expand_invoke):  Rename call to build_invoke_non_interface.
20539         * java-tree.h, parse.h:  Update prototype.
20540         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
20541         (such as expand_expr_stmt) if flag_emit_class_files.
20542         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20543         STACK_TARGET, IGNORE_TARGET):  New macros.
20544         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
20545         (generate_bytecode_insn):  New function to generate method's bytecode.
20546         (generate_classfile):  Node generate Code attribute for a method.
20547         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20548         push_long_const, field_op, adjust_typed_op, maybe_wide):
20549         New functions used by generate_bytecode_insn.
20551         * typeck.c (signature_include_return):  Remove variable.
20552         (push_java_argument_signature, build_java_argument_signature):  New.
20553         (build_java_signature):  Use push_java_argument_signature.
20554         * parse.y:  Use build_java_argument_signature instead of fiddling
20555         with signature_include_return.
20557 1998-07-17  Tom Tromey  <tromey@cygnus.com>
20559         * gjavah.c (print_c_decl): Always generate JArray<>* for array
20560         types.
20562         * Makefile.in (all.indirect): Added gjavah$(exeext).
20563         (gjavah$(exeext)): Added $(exeext).
20564         (clean): Likewise.
20566 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20568         * class.c (layout_class): Call to java_layout_parsed_class replace
20569         by safe_layout_class.
20570         * expr.c (build_java_array_length_access): Removed static storage
20571         class in the function definition.
20572         (build_java_arraynull_check): Likewise.
20573         Also fixed typos in two comments.
20574         * lex.c (java_init_lex): Initialize static global kw_length.
20575         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20576         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20577         java_lex_error.
20578         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20579         * parse.h (resolve_no_layout): New static function declaration.
20580         (get_identifier_in_static): Declaration removed.
20581         (java_layout_parsed_class): Function name declaration changed to
20582         safe_layout_class.
20583         (build_newarray_node, patch_newarray, resolve_type_during_patch,
20584         not_initialized_as_it_should_p, build_this): New static function
20585         declarations.
20586         (pushdecl_force_head, build_java_binop, int_fits_type_p,
20587         binary_numeric_promotion, stabilize_reference,
20588         build_decl_no_layout, build_java_arrayaccess): Extern function
20589         declarations moved into their own section.
20590         (build_newarray, build_anewarray, build_java_array_length_access,
20591         build_java_arraynull_check): New extern function declarations.
20592         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20593         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20594         fake tree codes.
20595         (CALL_CONSTRUCTOR_P): New macro.
20596         * parse.y (kw_length): New static global tree node.
20597         (return_statement): Tagged <node>.
20598         (RETURN_TK): Tagged <operator>.
20599         (variable_declarator_id:): Build variable declaration with an
20600         empty initialization value if a syntax error was found in the
20601         initialization part of the variable declaration.
20602         (statement_without_trailing_substatement:): return_statement: now
20603         uses the default rule.
20604         (return_statement:): Temporarily fixed to return NULL_TREE.
20605         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20606         (class_instance_creation_expression:): Class creation rules now
20607         call build_method_invocation upon reduction.
20608         (array_creation_expression:): Rules call build_newarray_node upon
20609         reduction.
20610         (dim_exprs:): Build a list of dimension expressions.
20611         (dim_expr:): Store location of the OSB_TK in the dimension
20612         expression node.
20613         (method_invocation:): Added a new error rule.
20614         (build_unresolved_array_type): WFL argument may also be an array
20615         on a primitive type. Name of the argument changed to reflect this.
20616         (method_declarator): Insert argument type at the beginning of the
20617         argument type list and later reverse the list.
20618         (unresolved_type_p): Argument 'returned' may be optionally
20619         NULL_TREE.
20620         (java_layout_class_from_source): Function renamed
20621         safe_layout_class.
20622         (resolve_and_layout): Now call resolve_no_layout and
20623         safe_layout_class.
20624         (resolve_no_layout): New function.
20625         (purify_type_name): New function.
20626         (complete_class_report_errors): Call purify_type_name during error
20627         report on a type not found.
20628         (process_imports): error_found local variable doesn't need to be
20629         initialized to zero.
20630         (declare_local_variables): New local type_wfl. Fixed typo in error
20631         message. type_wfl assigned to unresolved type and used to register
20632         incomplete type. Build a WFL around the variable initialization
20633         statement so that debug info can be generated on it.
20634         (source_start_java_method): Reverse argument list after they've
20635         been processed.
20636         (current_this): New static global variable.
20637         (java_complete_expand_methods): Set current_this when appropriate.
20638         (resolve_expression_name): Build correct static and non static
20639         field access bearing a simple name.
20640         (resolve_field_access): Resolve the length field of arrays. Handle
20641         f.m() cases.
20642         (patch_method_invocation_stmt): Set the type of the method
20643         invocation to error_mark_node. This value is later overridden by a
20644         valid type, if any. Don't handle qualified constructor invocation
20645         as qualified method invocation. Call lookup_method_invoke with its
20646         new flag. It's no longer necessary to access the selected method
20647         as the value of a tree list. Handle constructor invocation.
20648         (patch_invoke): Reverse argument list when invoking non interface
20649         methods. Insert call to new as the first argument of the
20650         constructor.
20651         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20652         defined within a final class. Return INVOKE_STATIC if the invoked
20653         method is a constructor.
20654         (lookup_method_invoke): New lc argument is a flag to indicate a
20655         constructor lookup. Now handle constructor lookup. Choose the most
20656         specific method in case several were matching the invocation
20657         requirements. Return a method decl instead of a tree list featuring
20658         one single method decl element.
20659         (refine_accessible_methods_list): New lc flag argument to
20660         indicate that a constructor is being looked up.
20661         (not_initialized_as_it_should_p): New function.
20662         (java_complete_tree): Now process fake tree codes
20663         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20664         save_expr on resolved function call arguments. Case on
20665         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20666         (patch_assignment): LHS can be a field access expression. When
20667         dealing with reference, lhs_type is the promoted type of the
20668         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20669         applicable.
20670         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20671         (patch_binop): Use not_initialized_as_it_should_p where
20672         applicable.
20673         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20674         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20675         where applicable.
20676         (resolve_type_during_patch): New function.
20677         (patch_cast): Call resolve_type_during_patch to resolve type and
20678         report error accordingly.
20679         (patch_array_ref): Use not_initialized_as_it_should_p where
20680         applicable. Array base expression is saved before being
20681         used. Promote the type of an array elements if it contains non
20682         builtin types.
20683         (build_newarray_node, patch_newarray, build_this): New functions.
20685 1998-07-16  Tom Tromey  <tromey@cygnus.com>
20687         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20688         increment it in `for' statement.
20689         (print_field_info): If number is inf or nan, don't print it.
20690         (print_method_info): If method name is `delete', just ignore it.
20691         (print_c_decl): Special-case jstringArray.
20693         * gjavah.c (help): New function.
20694         (no_argument): New function.
20695         (usage): Changed text.
20696         (main): Rewrote argument handling.  Now handles -v, --help,
20697         --version.
20698         (version): New function.
20699         (found_error): New global.
20700         (main): Return found_error.
20701         (generate_access): Set found_error.
20702         (print_c_decl): Likewise.
20704 1998-07-15  Tom Tromey  <tromey@cygnus.com>
20706         * gjavah.c (print_c_decl): Don't print "," when examining field.
20707         Skip type name when looking at "[L" types.
20708         (process_file): Now static.
20709         (generate_access): Now returns int.
20710         (last_access_generated): New global.
20711         (process_file): Clear last_access_generated; make multiple passes
20712         over the class.
20713         (print_field_info): Just return if generate_access returns true.
20714         (print_method_info): Likewise.  Also, allow <init> functions to
20715         pass through.
20716         (print_c_decl): Added is_init argument.  Print constructors
20717         properly.
20718         (print_cxx_classname): Use UTF8_GET to extract characters from
20719         string.
20720         (print_base_classname): New function.
20721         (print_class_decls): New function.
20722         (process_file): Use it.
20723         (utf8_cmp): New function.
20725 1998-07-13  Nick Clifton  <nickc@cygnus.com>
20727         * lang-options.h: Format changed to match changes in gcc/toplev.c
20728         to implement a --help option.
20730 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
20732         * decl.c (init_decl_processing): Revert change to dtable_type.
20734 1998-07-09  Per Bothner  <bothner@cygnus.com>
20736         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20738 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
20740         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20742         * lang.c (lang_init): Default flag_exceptions to 1, without
20743         checking to see if it's 2 first.
20745 1998-07-08  Jeffrey A Law  (law@cygnus.com)
20747         * constants.c: Include "system.h".
20748         * decl.c: Likewise.
20749         * lang.c (flag_new_exceptions): Get via extern now.
20750         (lang_init_options): New functions.  Turn on flag_new_exceptions.
20752 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20754         * lex.c (java_lex): Return 0 when we see an invalid character in
20755         the input.
20757         * lex.c (java_read_char): Specify extra argument when calling
20758         java_lex_error.
20759         (java_read_unicode, java_parse_end_comment,
20760         java_parse_escape_sequence): Likewise,
20761         (java_lex): Specify extra argument when calling
20762         java_lex_error. Test that IDs are beginning with a legal character
20763         for IDs. Handle invalid characters with an error message and a
20764         call to java_lex_error.
20765         (java_lex_error): Adjust column position by new argument
20766         `forward'. Issue an error even if in the middle of reporting an
20767         other error.
20769 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
20771         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20772         we don't explicitly put a null pointer when we're copying it.
20774 1998-07-07  Tom Tromey  <tromey@cygnus.com>
20776         * gjavah.c (print_cxx_classname): New function.
20777         (super_class_name): Likewise.
20778         (print_super_fields): Removed.
20779         (in_super): Removed.
20780         (print_field_info): Never generate #defines.
20781         (print_c_decl): Changed generated types to match JNI.  No longer
20782         print class name before method name.
20783         (print_method_info): Print "static" before static methods.
20784         Print "virtual" before non-final methods.
20785         (usage): Use exit(1), not exit(-1).
20786         (main): Likewise.
20787         (print_field_info): Use %.17g to print a double.
20788         (last_access): New globals.
20789         (process_file): Initialize last_access.
20790         (usage): Now static.
20791         (ACC_VISIBILITY): New define.
20792         (generate_access): New function.
20793         (print_field_info): Call it.
20794         (print_method_info): Likewise.  Also, generate information for all
20795         methods, not just native methods.  Return void.
20796         (print_c_decl): Return void.
20797         (print_field_info): Return void.
20799 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20801         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20802         processing the jc1 grammar file. Prefix bison functions and
20803         variables with java_.
20804         (parse.c): Dependencies on parse.h and lex.h
20805         * expr.c (build_java_arrayaccess): Function now global.
20806         * java-tree.h: Comment reorganized to carry on previous
20807         classification effort.
20808         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20809         RESOLVE_TYPE_NAME_P): New flags on WFLs.
20810         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20811         java_parse (new prefix java_ generated by bison).
20812         (java_layout_parsed_class, java_register_parsed_class): Function
20813         call removed.
20814         (yyparse): Removed unnecessary call to init_outgoing_cpool.
20815         * lex.c (static tree wfl_op): Variable deleted.
20816         (java_init_lex): Initialize kw_super and kw_this. Initialize more
20817         ctxp fields to NULL_TREE.
20818         (java_lex): No longer create WFL for operators. Filename caching
20819         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20820         created as STRING_CST and later expanded. Removed extra argument
20821         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20822         and SUPER.
20823         (build_wfl_node): Removed code in comments.
20824         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20825         store token and location data in the current bison token.
20826         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20827         static/extern function declaration at the beginning of the file.
20828         (struct qualification): Data structure definition deleted.
20829         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20830         (qualify_ambiguous_name): Function declaration modified. Function
20831         now returns nothing.
20832         (build_array_ref, patch_array_ref, make_qualified_name,
20833         resolve_qualified_expression_name, maybe_generate_clinit,
20834         resolve_field_access): New static function declarations.
20835         (build_java_arrayaccess): New extern function declaration.
20836         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20837         (CALL_EXPR_PRIMARY): Macro deleted.
20838         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20839         (struct parser_ctxt): Field initialized_final
20840         removed. non_static_initialized, static_initialized: New fields.
20841         * parse.y (static tree kw_super, static tree kw_this): New global
20842         static.
20843         (%union): tree wfl field of operator member replaced by int
20844         location. WFLs are non longer created for operators.
20845         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20846         (qualified_name:): Now calls make_qualified_name to build the
20847         identifier.
20848         (type_declaration:): Consider generating <clinit> when class
20849         parsing completed.
20850         (variable_declarator:): Directly build an assignment node when the
20851         variable is initialized when declared.
20852         (this_or_super:): Build a WFL and set current location when THIS
20853         or SUPER are parsed.
20854         (expression_statement:): Wrap statement around a WFL.
20855         (primary_no_new_array:): Fixed typo. Changed value returned by
20856         THIS_TK because of its new type (temporary).
20857         (dim_exprs:): Temporary fix because of OSB_TK's new type.
20858         (field_access:): Build qualified name with SUPER.
20859         (method_invocation:): Fixed returned value because of SUPER's new
20860         type.
20861         (array_access:): Use OSB_TK location information.
20862         (post_increment_expression:, post_decrement_expression:,
20863         unary_expression:, pre_increment_expression:,
20864         pre_decrement_expression:, unary_expression_not_plus_minus:,
20865         cast_expression:, multiplicative_expression:,
20866         additive_expression:, shift_expression:, relational_expression:,
20867         equality_expression:, and_expression:, exclusive_or_expression:,
20868         inclusive_or_expression:, conditional_and_expression:,
20869         conditional_or_expression:, assignment:): Use new location/token
20870         information available on operators.
20871         (create_class): Set super_decl_type to NULL_TREE when processing
20872         java.lang.Object.
20873         (register_fields): Field initialization is now a MODIFY_EXPR
20874         node. Chain initialization code to the matching lists (according
20875         to the field declaration modifiers).
20876         (maybe_generate_clinit): New function.
20877         (method_header): Don't set method's DECL_NAME to a WFL when adding
20878         methods to java.lang.Object.
20879         (resolve_and_layout): Now can return NULL_TREE if the type
20880         resolution fails. Otherwise, return the class DECL instead of its
20881         TYPE.
20882         (check_method_redefinition): Don't patch method DECL_NAME if it
20883         belongs to java.lang.Object.
20884         (process_imports): Simply assign error_found to the value returned
20885         by check_pkg_class_access.
20886         (declare_local_variables): Don't use their init statements (if
20887         any) when parsing error were previously found. Reuse MODIFY_EXPR
20888         build during parsing as an init statement.
20889         (java_method_add_stmt): Now return the current method body.
20890         (java_layout_parsed_class, java_register_parsed_class): Functions
20891         removed.
20892         (java_complete_expand_methods): Initialize the constant pool on a
20893         per class basis. Layout the classes before expanding their method
20894         bodies. Don't try expand artificial constructor code if error were
20895         found. Make the classes data and register them if no error were
20896         found.
20897         (java_complete_expand_method): Retrieve an artificial constructor
20898         argument list before entering its body. Assign the top block to
20899         the artificial constructor function body and set types of declared
20900         blocks and compound statements to void. Walk method body if not an
20901         artificial constructor.
20902         (make_qualified_name, cut_identifier_in_qualified): New functions.
20903         (resolve_expression_name): Fixed comments. Save/restore the
20904         current class CLASS_LOADED_P flag value. Build non qualified
20905         static field access and handle qualified expression names.
20906         (resolve_field_access, resolve_qualified_expression_name): New
20907         functions.
20908         (patch_method_invocation_stmt): Use the new expression resolution
20909         scheme, calling resolve_field_access when the function call is
20910         resolved as an expression.
20911         (qualify_ambiguous_name): Function rewritten to work on qualified
20912         expression produced by make_qualified_name.
20913         (java_complete_tree): Promote type when function's argument are
20914         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20915         the assignment to discover further errors if RHS is a expression
20916         name that fails to evaluate. Declare LHS initialized even though
20917         the assignment failed. Don't use the location variable and removed
20918         extra argument in patch function calls. Now handle the ARRAY_REF
20919         case and build internal string representation when STRING_CSTs are
20920         walked.
20921         (build_method_invocation): Don't wrap function call around a WFL.
20922         (build_assignment): Likewise. Use the operator location
20923         information.
20924         (patch_assignment): Handle array access LHSs. Handle error
20925         provenance, resulting in a better error report.
20926         (build_binop): Use op_location from operator as binop location
20927         information.
20928         (build_unaryop, build_incdec, build_cast): Likewise.
20929         (patch_binop): Extract location information from the node. Fixed
20930         typo in error message.
20931         (patch_unary_op): Extract location information from the node.
20932         (build_array_ref, patch_array_ref): New functions.
20934 1998-07-01  Tom Tromey  <tromey@cygnus.com>
20936         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20937         match _Jv_IsInstanceOf.
20938         * decl.c (init_decl_processing): Use _Jv_NewArray, not
20939         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
20941 1998-06-30  Tom Tromey  <tromey@cygnus.com>
20943         * decl.c (init_decl_processing): Functions are now named
20944         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20946 1998-06-29  Per Bothner  <bothner@cygnus.com>
20948         * java-tree.h (load_class):  Add prototype.
20949         * class.c (is_compiled_class):  Add missing arg to load_class.
20950         * expr.c (expand_java_NEW):  Call load_class.
20951         * parse.y (process_import):  Removed bogus use of void return value.
20953 1998-06-25  Per Bothner  <bothner@cygnus.com>
20955         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
20956         Function name is "_Jv_Throw" instead of "soft_athrow".
20957         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
20958         Function name is "_Jv_AllocObject" instead of "soft_new".
20959         Takes an extra parameter (object size).
20960         * expr.c:  Update calls.
20962 1998-06-24  Per Bothner  <bothner@cygnus.com>
20964         * lex.c (java_get_line_col):  Handle end-of-file.
20965         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
20967 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
20969         * lang.c (lang_init): Make -fexceptions the default.
20970         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20971         exception handling is not turned on.
20973 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
20975         * lang.c (flag_new_exceptions): Make this this default.
20976         * decl.c (end_java_method): Call emit_handlers.
20977         * except.c (method_init_exceptions): Set language code and version.
20978         (expand_start_java_handler): Enable exception, and call
20979         expand_eh_region_start.
20980         (expand_end_java_handler): Enable exception, and set up catch blocks.
20981         (emit_handlers): New routine to generate the saved handlers.
20982         * java-except.h (emit_handlers): Add prototype.
20984 1998-06-12  Per Bothner  <bothner@cygnus.com>
20986         We used to have three different representations of the constant pool:
20987         the CPool structure, the tree_constant_pool, and the constructures
20988         used to build the Class object (which may need class and string
20989         constants) in compiled code.  None were appropriate for compiling
20990         to .class files, so I did a major overhaul.
20992         First, the tree_constant_pool array was removed.  Things were
20993         modified to the CPool structure in the JCF could be used.
20994         Second, a "capacity" field was added to the CPool, and functions
20995         written to search for a matching constant, adding one if not found.
20996         The code that generated the Class object was changed to use a CPool.
20997         The actual TREE_LISTs used to build the CONSTRUCTORs used for
20998         the static Class object are now only in build_constants_constructor.
20999         Finally, I wrote code which can generate a .class file (including its
21000         constant pool) from the RECORD_TYPE of a class.  This is a big step
21001         on the way to compiling Java source into .class files.
21003         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
21004         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
21006         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21007         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
21008         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21009         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21010         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
21011         (lang_type):  Removed constant_pool field.
21012         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
21013         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21014         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
21015         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21017         * constants.c (current_constant_pool_tags, current_constant_pool_data,
21018         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21019         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
21020         (set_constant_entry, find_constant1, find_constant2,
21021         find_class_constant, count_constant_pool_bytes, write_constant_pool,
21022         find_utf8_constant, find_class_or_string_constant):  New functions.
21024         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
21025         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
21026         (give_name_to_class, get_class_constant):  Likewise.
21027         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
21028         (get_name_and_type_constant, get_ref_constant):  Removed.
21029         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
21030         * parse.y:  Don't save/restore tree_constant_pool.
21031         * verify.c (verify_jvm_instructions):  Update for new approach.
21032         * expr.c (expand_invoke, expand_java_field_op): Likewise.
21034         * lang-options.h:  Added -femit-class-file, -femit-class-files.
21035         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
21036         (lang_f_options):  Added "emit-class-file(s)".
21038         * expr.c (build_java_arrayaccess):  Generate more efficient array
21039         bounds checking, by using unsigned compare.
21041         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
21043 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21045         * parse.h: New comment on the handling of unresolved type
21046         identifiers. JDEPs are now part of the jdep_code enum.
21047         (typedef struct jdep): Now use enum jdep_code or int, depending on
21048         availability. Both are narrowed down to an 8 bits bitfield.
21049         (CALL_EXPR_PRIMARY): Fixed comment.
21051 1998-06-10  Tom Tromey  <tromey@cygnus.com>
21053         * Make-lang.in (java): Added gjavac and jvgenmain.
21054         (java.start.encap): Depend on gjavac.
21055         (java.rest.encap): Depend on jvgenmain.
21057         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21058         (JAVA_CROSS_NAME): Likewise.
21059         (java.all.build): Depend on jvgenmain and gjavac.
21060         (java.all.cross): Depend on jvgenmain and gjavac-cross.
21061         (jvgenmain$(exeext)): New target.
21062         (java.install-common): Wrote.
21063         * config-lang.in (compilers, stagestuff): Added gjavac and
21064         jvgenmain.
21066 1998-06-10  Dave Brolley  <brolley@cygnus.com>
21068         * lang.c (lang_decode_option): New argc/argv interface.
21070 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21072         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21073         * decl.c (build_decl_no_layout): New function.
21074         * expr.c (java_lang_expand_expr): Layout declarations found in
21075         blocks before they're pushed.
21076         * jcf-parse.c (load_class): Save current line when parsing class
21077         file.
21078         (parse_source_file): Register class before expanding their
21079         methods.
21080         * lang.c (put_decl_node): Produce `null' when `void *' is
21081         processed.
21082         * lex.c (static tree wfl_op): New static global, for error report
21083         on casts.
21084         (java_init_lex): wfl_operator and wfl_op initialized
21085         here. Filename caching added for wfl_op. Return wfl_op when `(' is
21086         parsed.
21087         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21088         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21089         build_unresolved_array_type): New static function definitions.
21090         (build_decl_no_layout): New extern function declared.
21091         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21092         faulty modifier exists.
21093         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21094         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21095         (UNARY_PLUS_EXPR): New fake operator.
21096         (struct parser_ctxt): New field osb_number.
21097         * parse.y (static tree wfl_operator): New static WFL for operator
21098         bound error messages.
21099         (DECR_TK, INCR_TK): Moved.
21100         (OP_TK): Tagged <operator>.
21101         (array_type:): Now call build_unresolved_array_type.
21102         (dim_expr:): Count the number of '[' seen.
21103         (post_increment_expression, post_decrement_expression,
21104         pre_increment_expression, pre_decrement_expression,
21105         unary_expression_not_plus_minus, unary_expression:): Actions are
21106         now building the corresponding unary expressions.
21107         (cast_expression:): Actions are now building cast expressions.
21108         (build_unresolved_array_type): New function.
21109         (create_interface): Reset the number of declared interfaces.
21110         (create_class): Likewise.
21111         (method_header): Methods declared within the scope of an interface
21112         are now implicitly set public and abstract.
21113         (java_complete_class): Variable's and parameter's type are patched
21114         with a promoted type.
21115         (declare_local_variables): Resolved non builtin types are promoted
21116         before being used to build a variable decl. Removed type patch
21117         posted on variable initialization statement.
21118         (source_start_java_method): Use build_decl_no_layout to build the
21119         decl of a parameter of incomplete type.
21120         (java_register_parsed_class): Process interfaces too. Call
21121         rest_of_decl_compilation on each processed class declarations.
21122         (java_complete_expand_methods): Don't attempt to expand things in
21123         interfaces.
21124         (java_complete_tree): Process CONVERT_EXPR, even though it always
21125         has a type. Propagate error_mark_node to node's type too. Promote
21126         method's call argument type and return error_mark_node if
21127         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21128         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21129         handle unary operator nodes.
21130         (build_assignment): Added comment.
21131         (print_int_node): New function.
21132         (patch_assignment): New second argument. New error handling. Use
21133         print_int_node. Handle references. Use can_cast_to_p to issue
21134         different error message according to the context and check upon
21135         the initialization of the RHS.
21136         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21137         (operator_string): Handle more operators.
21138         (patch_binop): No longer use a function static
21139         wfl_operator. Improved error message on shift distance.
21140         (build_unaryop, build_incdec, build_cast, patch_unaryop,
21141         patch_cast): New functions.
21143 1998-06-05  Per Bothner  <bothner@cygnus.com>
21145         * jvspec.c:  New file.
21146         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
21148         * java-tree.h (identifier_subst):  Add declaration.
21150 1998-06-04  Tom Tromey  <tromey@cygnus.com>
21152         * jvgenmain.c (main): Generate call to JvRunMain.
21154         * class.c (make_class_data): Push value for "sync_info" field.
21155         * decl.c (init_decl_processing): Push "sync_info" field.
21157 1998-06-03  Per Bothner  <bothner@cygnus.com>
21159         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
21160         Java (source) name, not signature.
21161         Set TYPE_ALIGN to (at least) that of element_type.
21163 1998-06-02  Per Bothner  <bothner@cygnus.com>
21165         * class.c:  Moved classname-mangling-rekated code to ...
21166         * mangle.c:  ... this new file.
21167         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
21168         * Makefile.in:  Update for above changes.
21170 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21172         * expr.c (truthvalue_conversion): Convert integer and floating
21173         point value to their truth value.
21174         * lex.c (java_lex): Handle the `null' literal.
21175         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21176         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21177         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21178         New macros.
21180         * parse.y: Reorganization/documentation on token declaration.
21181         (binop_lookup[]): New added new tree codes.
21182         (relational_expression): Build corresponding binary operators.
21183         (equality_expression, conditional_and_expression,
21184         conditional_or_expression): Likewise.
21185         (java_complete_class): Fix crash in debug message.
21186         (java_complete_tree): Check initialization of method call
21187         arguments. Further bogus node evaluation to detect more error
21188         during assignments. Handles more binary operators.
21189         (patch_assignment): Use DECL_P.
21190         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21191         code.
21192         (operator_string): Handle more case. Compacted source.
21193         (patch_binop): Changed function comment. Checking for
21194         uninitialized first operand takes the compound assignment into
21195         account and uses DECL_P. Checking for uninitialized second operand
21196         delayed to routine's end. Use macros to issue type bound error
21197         messages and issue messages on both operands if their types are
21198         different. Force fixed type into node. Handle all binary
21199         operators.
21201 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21203         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21204         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21205         build operator node and return tokens.
21206         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21207         * parse.h (java_complete_tree): Changed returned type in prototype.
21208         (build_method_invocation, build_assignment, patch_assignment,
21209         patch_binop): New static function declarations.
21210         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21211         BUILD_EXPR_WFL): New macros.
21212         * parse.y (enum tree_code binop_lookup[]): New static for token to
21213         TREE_CODE lookup.
21214         (%union): Parser union has new sub-structure `operator'.
21215         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21216         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21217         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21218         ASSIGN_ANY_TK): Tokens tagged `operator'.
21219         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21220         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21221         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21222         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21223         (assignment_operator:): Rule tagged `operator'.
21224         (expression_statement:): Re-installed default rule.
21225         (method_invocation:): Sub rules call build_method_invocation.
21226         (postfix_expression:): Don't attempt to resolve name here. Just
21227         return an ID.
21228         (multiplicative_expression:): Sub-rules build corresponding binop
21229         expression node.
21230         (additive_expression:, shift_expression:, and_expression:,
21231         exclusive_or_expression:, inclusive_or_expression:): Likewise.
21232         (assignment:): Sub rule invoke build_assignment.
21233         (assignment_operator:): Default rules on sub rules.
21234         (force_error): Added documentation on this variable.
21235         (declare_local_variables): Build initialization calling
21236         build_assignment.
21237         (expand_start_java_method): Removed unused rtx declaration. Mark
21238         arguments as already initialized.
21239         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21240         (java_complete_expand_methods): Don't process next method if
21241         completion of the previous one triggered errors.
21242         (java_complete_expand_method): Call source_end_java_method if no
21243         error were found during completion.
21244         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21245         locals declaratilon. Handle names found within a class. Return
21246         error_mark_node when things aren't found.
21247         (patch_method_invocation_stmt): Return error_mark_node on failures.
21248         (patch_invoke): Removed unused local. Return the correct node.
21249         (java_complete_tree): Now returns a value. The BLOCK section binds
21250         local identifiers and the type of a BLOCK is now void. Assign the
21251         result of operand completion on COMPOUND_EXPR. Assign the
21252         encapsulated node of a WFL to the result of its completion, except
21253         when the node is an identifier. Now handle MODIFY_EXPR and several
21254         binary operators. Return error_mark_node on errors.
21255         (build_method_invocation, build_assignment, patch_assignment,
21256         build_binop, operator_string, patch_binop): New functions.
21257         * typeck.c (binary_numeric_promotion): New function.
21259 1998-05-21  Per Bothner  <bothner@cygnus.com>
21261         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
21262         Replace most uses of ident_subst by identifier_subst.
21264         * class.c (push_class_static_dummy_field):  Removed function.
21265         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
21266         instead of looking got "class" static field.  Create that decl here.
21267         (class_identifier_node):  Removed;  no longer needed.
21268         (init_class_processing):  Don't init class_identifier_node.
21269         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
21270         Do nreverse 0 times (instead of twice) for Object and Class.
21271         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21273 1998-05-20  Per Bothner  <bothner@cygnus.com>
21275         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
21276         while initializing linenumber_count and linenumber_table.
21277         Do it before init_function_start (which calls emit_line_note).
21278         * expr.c (expand_byte_code):  Don't need to clear lineno here.
21280 1998-05-18  Tom Tromey  <tromey@cygnus.com>
21282         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21283         then mangle number as _N_.
21285         * class.c (mangle_class_field): New function.
21286         (build_class_ref): Set assembler name of class reference using
21287         mangle_class_field.
21288         (push_class_static_dummy_field): Likewise.
21290 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
21292         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21293         of assigning to TREE_CODE.  The latter method exploits a feature
21294         of GCC that is not ANSI compliant.
21296 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21298         * decl.c (pushdecl_force_head): New function.
21299         (pushlevel): Removed conditional printf.
21300         (complete_start_java_method): Don't enter local variable scope if
21301         function is compiled from source code.
21302         * expr.c: parse.h now included
21303         (java_lang_expand_expr): New function.
21304         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21305         printf. Terminate buffer when doing directories.
21306         * jcf-parse.c (parse_source_file): Call lang_init_source before
21307         parsing and before code generation.
21308         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21309         use printf if the macro is defined.
21310         * lang.c (lang_init): Install lang_expand_expr hook on
21311         java_lang_expand_expr.
21312         (java_dummy_print): New function.
21313         (lang_init_source): New function.
21314         * lex.c (java_lex): Remember location of an opening brace at the
21315         second nesting level.
21316         (java_is_eol): Unget character seen after a CR if it is EOF.
21317         * parse.h: Now includes lex.h
21318         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21319         printf if the macro is defined.
21320         (expand_start_java_method, build_expr_block, enter_block,
21321         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21322         New static function declarations.
21323         (pushdecl_force_head): New extern function declaration.
21324         (INCOMPLETE_TYPE_P): New macro.
21325         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21326         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21327         BLOCK_EXPR_ORIGIN): New macros.
21328         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21329         DECL_SOURCE_LINE_LAST): New macros.
21330         (struct parser_ctxt): Removed field current_method_decl, redundant
21331         with the field current_function_decl. Added fields
21332         first_ccb_indent1 and pending_block.
21333         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21334         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21335         tagged <node>
21336         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21337         (compilation_unit:): Cosmetic on sub rule.
21338         (type_declaration:): Cosmetic on sub rules. Added an error rule.
21339         (variable_initializer:): Installed default rule on expression:.
21340         (method_declaration:): method_header: starts a new
21341         method. method_body: installs the function body, absorbs blocks
21342         emitted for temporary variable scopings, pops function's body block
21343         and merges function's last statement lineno in DECL_SOURCE_LINE.
21344         (method_body:): Installed default rules.
21345         (block:): Call enter_block when an opening brace is seen.  Absorb
21346         scoping blocks and call exit_block when a closing brace is seen.
21347         (block_statement:): Cosmetic changes.
21348         (method_invocation:): Create WFL around CALL_EXPR node.
21349         (patch_stage): Added comment around definition.
21350         (method_header): Try to use first_ccb_indent1 as the first line of
21351         the method, so BP debug info are emitted at the first opening
21352         brace of the function. If the function has no body, use the
21353         location of the function's name. Override currently defined method
21354         name with the matching WFL so we can point redefinition errors
21355         using the location where the function's name was declared.
21356         (check_abstract_method_header): Interprets DECL_NAME as an
21357         identifier or as a WFL, accordingly.
21358         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21359         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21360         location and name information out of it and reinstall DECL_NAME to
21361         its original identifier node value.
21362         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21363         function's source code).
21364         (read_import_dir): Test the value returned by find_class and issue
21365         a fatal accordingly.
21366         (declare_local_variables): Push a new block for the scope of the
21367         new variable(s) if code has been already generated at that nesting
21368         level. Pinpoint redefinition errors using the variable id
21369         WFLs. Generate initialization code if necessary. If the variable
21370         type is incomplete, register a patch on its decl.
21371         (source_start_java_method): Rewritten. Define a new block for the
21372         function's parameters. Build parameter decl out of function's
21373         arguments and register them for a patch if their types are
21374         incomplete.
21375         (expand_start_java_method): Includes the part of
21376         source_start_java_method that was pushing the parameter decls and
21377         completing the method start code.
21378         (source_end_java_method): Removed call the expand_end_bindings and
21379         poplevel (already taken care of). Reinstall function's arguments
21380         and get function's last line of code before calling
21381         expand_function_end.
21382         (java_method_add_stmt): New comment before the function's
21383         code. Complement the second operand of the current COMPOUND_EXPR
21384         if necessary.
21385         (java_complete_expand_methods): Don't generate debug info on line
21386         zero when expanding a generated constructor.
21387         (java_complete_expand_method): Set start and end line numbers for
21388         a artificially generated constructor to one and manually call
21389         enter_block and exit_block when defining it. For all methods:
21390         expand function's start calling the new expand_start_java_method
21391         and invoke java_complete_tree on the effective method's body, if
21392         any.
21393         (resolve_expression_name): Now use lookup_name_in_blocks to search
21394         local variable decls and print out an error when variables are
21395         undefined.
21396         (patch_method_invocation_stmt): Inserted comment before the
21397         function's code.
21398         (lookup_method_invoke): Chain method's arguments using chainon
21399         with the current arg list as a second argument. Inserted missing
21400         IDENTIFIER_POINTER when reporting an error on methods not found.
21401         (refine_accessible_methods_list): Don't retain constructors.
21402         (patch_arguments): Function removed.
21403         (java_complete_tree): Inserted comment before the function's
21404         code. New case for BLOCKs. Moved the WFL case a bit
21405         further. Complete function's arguments.
21406         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21407         maybe_absorb_scoping_blocks): New functions.
21409 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21411         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21412         previously set.
21413         * jcf-parse.c (parse_source_file, java_error_count): New forward
21414         and extern declarations.
21415         (java_parse_abort_on_error): Macro moved.
21416         (jcf_parse_source): fatal called if fopen fails. Now calls
21417         parse_source_file.
21418         (parse_source_file): New parse_only parameter. Reflects the
21419         elimination of the second pass.
21420         (yyparse): parse_source_file called with argument set to 0.
21421         * jcf.h (JCF_ZERO): Sets java_source to zero.
21422         * lex.c (java_init_lex): pass argument is gone. Function modified
21423         to be called once during the analysis of a file.
21424         (java_unget_unicode): Fixed typo in fatal message.
21425         (java_get_line_col): Likewise.
21426         (java_lval): Likewise. String literals no longer built during
21427         second pass.
21428         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21429         account.
21430         * parse.h (MODIFIER_WFL): New macro.
21431         (parse_check_super, parser_check_super_interface): Now return int.
21432         (parser_chain_incomplete_item, not_builtin_p,
21433         complete_method_decl): Declarations removed.
21434         (build_method_invocation_stmt, build_invoke): Renamed using the
21435         `patch' instead of `build'
21436         (register-incomplete_type, obtain_incomplete_type,
21437         java_complete_tree, java_complete_expand_method,
21438         unresolved_type_p, create_jdep_list): New function declarations.
21439         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21440         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21441         (jdep): New typedef on new struct _jdep.
21442         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21443         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21444         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21445         JDEP_RESOLVED_P): New macros.
21446         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21447         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21448         JDEP_VARIABLE): New enum values and jdep kinds.
21449         (jdeplist): New typedef on struct _jdeplist.
21450         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21451         macros.
21452         (CALL_EXPR_PRIMARY): New macro.
21453         (struct parser_ctxt): Fields java_pass, current_method_decl,
21454         method_decl_list deleted. New field jdeplist.
21455         (INCOMPLETE_P): Macro deleted.
21456         * parse.y (single_type_import_declaration:): Removed pass switch.
21457         (type_import_on_demand_declaration): Likewise.
21458         (field_declaration:): Removed pass switch on all sub rules.
21459         (class_declaration:): Call the complete_class_decl removed on
21460         class_body rules.
21461         (method_declaration:): Removed second pass switch. No longer chain
21462         methods decl when method_header reduced.
21463         (method_header:): Sub rules no longer depend on pass switch.
21464         (method_declarator:): Likewise.
21465         (method_body:): Likewise.
21466         (abstract_method_declaration:): Likewise.
21467         (block_statement:): Likewise.
21468         (local_variable_declaration:): Likewise.
21469         (argument_list:): Likewise.
21470         (method_invocation:): Likewise. Call to build_method_invocation_stmt
21471         removed. Partial CLASS_EXPR tree node built instead.
21472         (postfix_expression:): Removed pass switch on all sub rules.
21473         (java_pop_parser_context): Free classd_list content.
21474         (yyerror): Call obstrack_grow0 to finalize error message.
21475         (check_class_interface_creation): Comment modified to reflect new
21476         returned value meaning. Removed second pass switch. Return 1 if an
21477         error was found, 0 otherwise. Adjust pointer on filename if a
21478         leading path separator was found.
21479         (maybe_create_class_interface_decl): Removed first pass switch
21480         when linking the class decl to the class_list. Install a new
21481         jdep_list for the class.
21482         (add_superinterfaces): List of unresolved interfaces is
21483         gone. Unresolved interfaces are directly added to the current
21484         dependencies list.
21485         (create_interface): Second pass shortcut removed.
21486         ctpx->modifier_ctx access through MODIFIER_WFL.
21487         (create_class): Second pass shortcut removed. Call to
21488         register_incomplete_type replaces the call to
21489         parser_chain_incomplete_item.
21490         (complete_class_decl): Function removed.
21491         (duplicate_declaration_error): New way of retrieving redeclared
21492         item type.
21493         (register_fields): Call to lookup_modifier_cl replaced by
21494         MODIFIER_WFL. New way of handling unresolved type, using
21495         unresolved_type_p and obtain_incomplete_type.
21496         register_incomplete_type replaces call to parser_chain_incomplete_item.
21497         (patch_stage): New static global variable.
21498         (method_header): New way of handling unresolved type, using
21499         unresolved_type_p and obtain_incomplete_type. patch_stage used to
21500         indicates that the method decl needs to be patched.
21501         (check_abstract_method_header): Call to lookup_modifier_cl
21502         replaced by MODIFIER_WFL.
21503         (method_declarator): Incomplete argument type are registered
21504         calling register_incomplete_type. Patch on the declared method is
21505         issued in that case.
21506         (unresolved_type_p): New function.
21507         (parser_check_super_interface): New comment to reflect function's
21508         modified returned type (int). Function and has a new argument
21509         this_wfl. Call to parse_error_context uses this_wfl instead of
21510         relying on lookup_cl.
21511         (parser_check_super): Comment reflects function's new returned
21512         type (int). Function returns nonzero value on error.
21513         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21514         register_incomplete_type, jdep_resolve_class): New functions to
21515         handle incomplete types in declarations.
21516         (java_complete_class): Rewritten to work with the new incomplete
21517         type handling scheme.
21518         (complete_class_report_errors): Likewise.
21519         (complete_method_decl): Removed: it jobs is now handled by
21520         java_complete_class.
21521         (do_resolve_class): Class loaded in not already loaded and not
21522         found in Java source code.
21523         (java_check_regular_methods, java_check_abstract_methods): Don't
21524         call complete_method_decl anymore.
21525         (lookup_modifier_cl, not_builtin_p): Functions deleted.
21526         (read_import_dir): Got rid of the pass number dependency.
21527         (declare_local_variables): New handling of unresolved types (patch
21528         issued).
21529         (source_start_java_method): New parameter level. Function called
21530         with level set to 1 when argument types are potentially
21531         unresolved.  Called to complete the job with level set to 2 once
21532         types are complete.
21533         (source_end_java_method): Call to permanent_allocation
21534         removed. Waiting to be replaced by a more suitable obstack
21535         management.
21536         (java_complete_expand_methods, java_complete_expand_method,
21537         java_expand_finals): New functions.
21538         (build_method_invocation_stmt): Renamed
21539         patch_method_invocation_stmt. Extracts function call expression
21540         (wfl) and arguments (args) from CALL_EXPR tree operands.
21541         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21542         call. Patch the function and argument operand of the CALL_EXPR
21543         tree argument.
21544         (patch_argument, java_complete_tree): New functions.
21546 1998-04-20  Per Bothner  <bothner@cygnus.com>
21548         Recover from missing fields and methods (i.e. error instead of fatal).
21549         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
21550         * expr.c (expand_invoke):  Recover from missing method.
21551         (expand_java_field_op):  Recover from missing field.
21552         Inline references to java.lang.{Integer,Char,...}.TYPE.
21553         * typeck.c (get_type_from_signature), java-tree.h:  New function.
21554         * class.c (add_method):  Use get_type_from_signature.
21555         (build_class_ref):  Handle a class that was not found.
21556         * typeck.c (convert):  Handle conversion to pointers (for convenience).
21557         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
21558         instead of lookup_field to handle missing fields.
21560         * jcf-parse.c (process_zip_dir):  Set java_source.
21562 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
21564         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21566 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21568         * jcf-parse.c (load_class): Don't change input_filename before
21569         calling jcf_parse_source (but still do it before calling
21570         jcf_parse).
21571         (jcf_parse_source): Assign input_filename after having saved the
21572         parser context.
21573         * lex.c (java_init_lex): Chain a WFL node to the import on demand
21574         list. ctxp->modifier_ctx zeroed according to its new
21575         definition. ctxp->filename initialized. Removed
21576         JAVA_MODIFIER_CTX_UNMARK.
21577         (java_unget_unicode): Update the character based column position.
21578         (java_allocate_new_line): ref_count not used anymore. Always free
21579         ctxp->p_line. Initialize c_line->char_col to 0.
21580         (java_get_unicode): Update the character based column position.
21581         (java_lex): Use ctxp->elc to store current position in source
21582         file, at the beginning of the parsed token. Set modifier_ctx entry
21583         corresponding to the parse modifier to a WFL node. Return a WFL
21584         node when an identifier is parsed.
21585         (java_lex_error): Now uses ctxp->elc to store current position in
21586         source.
21587         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21588         * lex.h (build_wfl_node): New function definitions.
21589         (struct java_line): ref_count and next fields are gone. New field
21590         char_col.
21591         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21592         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21593         (JAVA_COLUMN_DELTA): New macro.
21594         (java_lc): New typedef on new struct _java_lc.
21595         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21596         (parse_error_context, parse_warning_context): Changed prototypes.
21597         (java_get_line_col): Added as an available global function.
21598         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21599         (IC_DECL): Replaced by macro IC_TYPE
21600         (DEPEND_WFL): New macro.
21601         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21602         wrong modifier.
21603         (exit_java_complete_class): Removed a commented out statement.
21604         (struct parser_ctxt): Added comments on fields. modifier_ctx is
21605         now an array of tree nodes. Deleted fields line_list and
21606         e_line. New field elc, to replace e_line.
21607         * parse.y (array_type:): Build WFL node.
21608         (qualified_name:): Build a single WFL node out of two. Retain
21609         the location information of the first node in the resulting node.
21610         (package_declaration:): Use package name as a WFL node
21611         (single_type_import_declaration:): Use imported name as a WFL node.
21612         (type_import_on_demand_declaration:): Use root of the imported
21613         packages as a WFL node.
21614         (field_declaration:): Removed unused local variable cl.
21615         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21616         (yyerror): New static elc. Removed static error_line, error_pos.
21617         New local code_from_source. Save ctxp->elc into elc at the first
21618         pass. Call java_get_line_col to get a string of the line where
21619         the error occurred.
21620         (debug_line): Removed static function.
21621         (parse_error_context, parse_warning_context): Parameter cl is now
21622         a WFL node. Use its value to initialize ctxp->elc.
21623         (redefinition_error): Parameter cl is now a WFL node.
21624         (parse_add_interface): New parameter wfl. No longer call
21625         lookup_cl, use wfl instead.
21626         (check_class_interface_creation): Parameter cl is now a WFL node.
21627         (maybe_create_class_interface_decl): Likewise.
21628         (add_superinterfaces): New function.
21629         (create_interface): Removed local cl, node, super_decl,
21630         super_decl_type.  Function now uses id as a WFL node. Better
21631         warning/error report on obsolete or forbidden mix of
21632         modifiers. Now calls add_superinterfaces to register interfaces.
21633         (create_class): Removed local cl, node. Local variable id is used
21634         as a WFL node. Better error report on forbidden modifier
21635         mix. Uses add_superinterfaces to register interfaces.
21636         (find_field): Argument cl is now a WFL node. Now store the WFL
21637         node of a fields that needs to be checked for their
21638         initialization.
21639         (method_header): Local variable node non longer used. Local
21640         variable id replaces cl.
21641         (check_modifiers_consistency): Local variable cl is now a WFL
21642         node.
21643         (method_declarator): Local variable cl replaced by parameter id.
21644         (parser_qualified_name): Now uses parameter name as a WFL node.
21645         (parser_check_super_interface): New parameter wfl, for achieve
21646         greater accuracy during error reports.
21647         (parser_chain_incomplete_item): New parameter named location. Used,
21648         along the decl, to construct the incomplete item node.
21649         (java_complete_class): resolve_class now uses WFL node extracted
21650         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21651         where appropriate.
21652         (complete_method_decl): Unresolved function's argument types are WFL.
21653         (resolve_class): Parameter cl is now a WFL node.
21654         (resolve_and_layout): Likewise.
21655         (do_resolve_class): Likewise. Try first to use cl and then do the
21656         lookup on the decl when calling check_pkg_class_access.
21657         (complete_class_report_errors): Use IC_TYPE in place of
21658         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21659         instead of doing a lookup over the decl.
21660         (java_check_final): Use WFL info from field tree list.
21661         (lookup_cl): Rewritten and returns a statically defined WFL node.
21662         (lookup_modifier_cl): Now uses information from WFL nodes.
21663         (process_imports): Likewise.
21664         (read_import_dir): name and cl arguments replaced by a single WFL
21665         node. Function modified accordingly.
21666         (find_in_imports_on_demand): Now uses WFL node.
21667         (check_pkg_class_access): cl argument is now a WFL node.
21668         (declare_local_variables): Fixed to use WFL nodes.
21669         (resolve_expression_name): Likewise.
21670         (build_method_invocation_stmt): name_combo argument renamed
21671         wfl. Function modified to use WFL nodes.
21672         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21673         (lookup_method_invoke): cl is now a WFL node. Added missing
21674         IDENTIFIER_POINTER to class type decl name.
21676 1998-04-14  Dave Brolley  <brolley@cygnus.com>
21678         * lang.c (init_parse): Now returns char* containing the filename.
21680 1998-04-10  Per Bothner  <bothner@cygnus.com>
21682         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
21684         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
21685         * class.c (make_class_data):  If flag_assume_compiled, initial class
21686         state is CSTATE_PREPARED; make superclass and interfaces direct
21687         references, rather than constant pool indexes.
21689 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21691         * parser.y: Include flags.h. Removed debug variable pl.
21692         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21693         (block:): Likewise.
21694         (labeled_statement_nsi:): Generate debug info when reducing
21695         expression_statement:.
21696         (check_pkg_class_access): get_access_flags_from_decl invocation
21697         fixed for new CLASS_* flags location.
21698         (source_end_java_method): Save/restore parser context when
21699         entering/leaving this routine. Restore lineno to its right value
21700         before calling expand_end_bindings.
21701         (build_method_invocation_stmt): build_invoke called with the
21702         current line information.
21703         (build_invoke): New argument cl. Wrap the function call around a
21704         wfl node.
21705         (refine_accessible_methods_list): Changed comment, removed
21706         unnecessary code.
21707         * parse.h: Fixed typo in comments.
21708         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21709         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21710         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21711         parser_ccb_indent.
21712         * lex.c (java_lex): Record the last closing curly bracket of a
21713         function.
21714         * jcf-parse.c (jcf_parse_source): Now calls
21715         java_check_methods. Clarified comment, fixed typo.
21717 1998-04-09  Dave Brolley  <brolley@cygnus.com>
21719         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21720         (finish_parse): Expose for non USE_CPPLIB builds.
21722 1998-04-08  Jeffrey A Law  (law@cygnus.com)
21724         * lang.c (lang_print_xnode): New function.
21726 1998-04-03  Per Bothner  <bothner@cygnus.com>
21728         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
21729         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
21730         used to build a class's dispatch table.
21731         (make_class_data):  Generate dispatch table if flag_assume_compiled.
21732         Set dtable of class object to address of class_dtable_decl.
21734         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
21735         be volatile and have side effects - generates better code.
21737         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
21738         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21740         * expr.c (expand_invoke):  If class is final, method is
21741         effectively final, so can call it directly.
21743         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
21745         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
21747 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21749         * parse.y (build_method_invocation_stmt): Removed extra argument
21750         to build_invoke.
21752 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21754         * expr.c (dtable_indent): Now static global.
21755         (expand_invoke): Now call invoke_build_dtable and
21756         build_invokevirtual.
21757         (invoke_build_dtable, build_invokevirtual): New functions.
21758         * jcf-io.c (find_class): Defer issuing a warning by setting
21759         jcf->outofsynch to 1.
21760         * jcf-parse.c (jcf_out_of_synch): New function.
21761         (load_class): Test this_jcf.outofsynch flag and call
21762         jcf_out_of_synch accordingly.
21763         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21764         comment indentation.
21765         * lex.c (java_get_unicode): Fixed code indentation.
21766         (java_lex): Create string literal. Fixed typo. Removed several
21767         premature obstack_free.
21768         * parse.h: New enums for name resolution and invocation mode.
21769         (struct qualification): New data structure.
21770         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21771         (do_resolve_class, build_method_invocation_stmt,
21772         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21773         debug_line, identical_subpath_p, invocation_mode,
21774         refine_accessible_methods_list, build_invoke,
21775         lookup_method_invoke): New functions declared.
21776         (build_invokevirtual, invoke_build_dtable, match_java_method,
21777         build_field_ref, jcf_out_of_synch): New references to external
21778         functions.
21779         (struct parse_ctxt): Removed artificial_constructor field.
21780         * parse.y: (array_type:): Type defined for this rule.
21781         (class_type:): Installed default rule for interface_type:.
21782         (array_type:): Now build Java array type.
21783         (qualified_name:): Now use obstack_grow0.
21784         (method_declaration:): Skip the artificial constructor added to
21785         the list, if any.
21786         (abstract_method_declaration:): Execute the code only during pass 1.
21787         (block:): Installed default rule in block_statements:.
21788         (block_statement:): Add the statement to the method during pass 2.
21789         (statement_expression): Installed default rule for
21790         method_invocation:.
21791         (argument_list:): Added code to build the argument list.
21792         (method_invocation:): Added call to create the method invocation
21793         node.
21794         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21795         (debug_line): New function for debug.
21796         (complete_class_decl): No longer do something during pass 1.
21797         (method_header): Use BUILD_PTR_FROM_NAME.
21798         (parser_qualified_classname): Use obstack_grow0. Removed bogus
21799         obstack_free.
21800         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21801         function's main comment.
21802         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21803         classes.
21804         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21805         (resolve_class): Now works with arrays.
21806         (do_resolve_class, resolve_and_layout): New functions.
21807         (java_check_regular_methods): Reverse method list before and after
21808         having processed it. No longer set ctxp->artificial_constructor.
21809         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21810         accordingly. Fixed typo in issued error message. Now use
21811         obstack_grow0.
21812         (find_in_imports_on_demand): Now use obstack_grow0.
21813         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21814         (source_end_java_method): Call expand_expr_stmt instead of
21815         expand_expr. Calls it before calling expand_function_end.
21816         (java_method_add_stmt): Do nothing if errors were found during
21817         parsing.
21818         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21819         (build_method_invocation_stmt, build_invoke, invocation_mode,
21820         lookup_method_invoke, refine_accessible_methods_list,
21821         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21822         New functions.
21823         * typeck.c (build_java_signature): Properly end method signature
21824         if return type skipped.
21825         (match_java_method): New function.
21827 1998-03-16  Per Bothner  <bothner@cygnus.com>
21829         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
21831 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21833         * expr.c (build_invoke_non_interface): New function.
21834         (methods_ident, ncode_ident): Now static globals.
21835         (expand_invoke): Use build_invoke_non_interface.
21836         * java-tree.h (struct lang_decl): New field function_decl_body.
21837         (DECL_FUNCTION_BODY): New macro.
21838         * jcf-parse.c (jcf_parse_source): Deeper check before setting
21839         CLASS_FROM_SOURCE_P.
21840         (parse_source_file): Fixed typos. Call java_layout_parsed_class
21841         before starting pass 2. Call to java_generate_parsed_class replaced
21842         by java_register_parsed_class.
21843         * lex.c: Fixed typo in header. Some line width related formating.
21844         * lex.h: Some line width related formating.
21845         * parse.h (source_end_java_method, resolve_expression_name,
21846         complete_class_decl, maybe_create_class_interface_decl,
21847         check_class_interface_creation): New static function declarations.
21848         (java_layout_parsed_class, java_method_add_stmt): New function
21849         declarations.
21850         (struct parser_ctxt): Field mark_class_generate removed. New
21851         fields class_list and artificial_constructor.
21852         * parse.y: Fixed typo in header.
21853         (class_declaration:): Call complete_class_decl when class body
21854         parsed.
21855         (method_declaration:): Call source_end_java_method in pass 2 when
21856         the method body is defined.
21857         (postfix_expression:): Do expression name resolution on sub-rule
21858         name during pass 2.
21859         (create_class, create_interface): Merged common pieces.
21860         (check_class_interface_creation, maybe_create_class_interface_decl):
21861         New functions.
21862         (complete_class_decl): New function.
21863         (register_fields): Fixed line width related typo.
21864         (method_header): Correctly skip first argument when fixing
21865         argument line. Changed the loop.
21866         (java_check_circular_reference): Now use ctxp->class_list.
21867         (java_complete_class): Removed start/stop marking.
21868         (java_check_regular_methods): Now takes a class decl as an
21869         argument.  Add default constructor if none were encountered.
21870         (java_check_methods): Now use ctxp->class_list. Changed call to
21871         java_check_regular_methods.
21872         (source_start_java_method): Set DECL_ARG_TYPE for each function
21873         arguments.
21874         (source_end_java_method, java_method_add_stmt): New functions.
21875         (java_generate_parsed_class): No longer exists.
21876         (java_layout_parsed_class, java_register_parsed_class): New functions.
21877         (resolve_expression_name): New function.
21879 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21881         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21882         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21883         until pass initializations are done. Call read_import_dir with
21884         pass set to 0.
21885         * parse.h: (lookup_modifier_cl): New function declared.
21886         (INTERFACE_FIELD_MODIFIERS): New macro.
21887         (OBSOLETE_MODIFIER_WARNING): New macro.
21888         * parse.y: (register_fields): Class type and current field name in
21889         local variables. Check modifier(s) if adding field(s) to an interface.
21890         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21891         and report errors using the faulty modifier line context.
21892         (lookup_modifier_cl): New function.
21893         (read_import_dir): Detect and report default import processing
21894         failure.
21896 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
21898         Add a pair of -fassume-compiled/-fno-assume-compiled options.
21899         * class.c (is_compiled_class): Return 1 after making sure it
21900         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21901         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21902         * java-tree.h (flag_assume_compiled): Add decl.
21903         * lang.c (lang_f_options): Add the flag.
21904         (flag_assume_compiled): Add decl, default to 0.
21906 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21908         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21909         (is_compiled_class): Likewise.
21910         (layout_class): Likewise.
21911         (layout_class): Detect and lay out classes defined in source code.
21912         (interface_of_p, add_interface_do, may_add_interface): New
21913         function.
21914         (add_interface): Now use add_interface_do.
21915         (add_method_1): New function.
21916         (add_method): Now use add_method_1.
21917         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21918         (complete_start_java_method): New function.
21919         (start_java_mehod): Now call complete_start_java_method.
21920         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21921         (expand_invoke): Likewise and fixed typo.
21922         *gjava.c: (print_super_field): Use new argument to find_class
21923         DO_CLASS_FILE.
21924         (main): Likewise.
21925         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21926         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21927         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21928         IDENTIFIER_NODE.
21929         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21930         (add_method_1, push_class): New prototypes.
21931         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21932         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21933         directory where the class was found.
21934         (find_class): New argument DO_CLASS_FILE. Function find_class
21935         modified accordingly.
21936         *jcf-parse.c: (fix_class_path): New function.
21937         (load_class): Use new VERBOSE argument. load_class now finds and
21938         loads/parses .class/.java files. Save read_state of current_jcf
21939         if necessary.
21940         (java_parser_abort_on_error): New macro.
21941         (jcf_parse_source, parse_source_file): New function.
21942         (jcf_parse): Fixed typo.
21943         (yyparse): Call parse_source_file () only.
21944         (process_zip_dir): Fixed typo, fix zdir->filename_length when
21945         writing the real class name back in the zip directory entry.
21946         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21947         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21948         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21949         (find_class): Prototype fixed.
21950         *lex.c: Added 1998 time stamp.
21951         Removed all static global variables, moved into the parser
21952         context data structure.. Now include unistd.h if SEEK_SET not
21953         defined.
21954         (java_init_lex): Rewritten.
21955         (java_sneak_unicode): Modified current unicode access in current line.
21956         (java_unget_unicode): Likewise.
21957         (java_allocate_new_line): New allocation management.
21958         (java_read_char): Modified access and storage of unget_utf8_value.
21959         New way of processing current unicode.
21960         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21961         (java_get_unicode): Now use the parser context.
21962         (java_lineterminator): Likewise.
21963         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21964         of the reentrant parser implementation. Function now use the
21965         parser context data structure and java_lval. Fixed production of
21966         the float and double constant "out of range" error message. Fixed
21967         obstack use. Return integer value when hitting a modifier. Now
21968         return type for TRUE, FALSE and other predefined types. Return
21969         identifier as a TREE_LIST list containing the current line context
21970         as the TREE_VALUE sub-node.
21971         (java_unicode_2_utf8): Fixed typo in declaration.
21972         (java_lex_error): Now use the parser context data structure.
21973         *lex.h: Added 1998 time stamp.
21974         (struct java_line): New fields ref_count and next.
21975         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21976         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21977         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21978         *parse.h: Added 1998 time stamp.
21979         (java_parse_source_file): Renamed from parse_source_file.
21980         (YYERROR_NOW, YYNOT_TWICE): Fixed.
21981         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21982         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21983         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21984         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21985         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21986         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21987         (struct parser_ctxt): New data structure to keep the parser context.
21988         *parse.y: Added 1998 time stamp, got rid of static global variables.
21989         (java_error_count, ctxp): New global variables.
21990         (%union): New value field.
21991         (numeric_type, integral_type): Rules removed.
21992         (primitive_type): Rule defined to handle integral, float, double and
21993         boolean types.
21994         (qualified_name, package_declaration,
21995         single_type_import_declaration, type_import_on_demand_declaration,
21996         modifiers, class_declaration, super, interfaces,
21997         interface_type_list, class_body, field_declaration,
21998         field_declaration, variable_declarators, variable_declarator,
21999         variable_declarator_id, method_declaration, method_header,
22000         formal_parameter_list, formal_parameter, method_body, block,
22001         static, interface_declaration, extends_interfaces,
22002         abstract_method_declaration, local_variable_declarators): Rules now
22003         define actions.
22004         (force_error, do_warning): New global statics.
22005         (push_parser_context, parser_context_save_global,
22006         parser_context_restore_global, pop_parser_context): New functions.
22007         (yyerror): Now uses the global parser context. Fixed use of obstack.
22008         (parse_error, parse_error_context, parse_warning_context,
22009         java_accstring_lookup, redefinition_error, check_modifiers,
22010         parser_add_interface, create_interface, create_class, find_field,
22011         duplicate_declaration_error, register_fields, method_header,
22012         check_modifiers_consistency, check_abstract_method_header,
22013         method_declarator, parser_qualified_classname,
22014         parser_check_super_interface, parser_check_super,
22015         parser_chain_incomplete_item, java_check_circular_reference,
22016         layout_class_from_source, java_complete_class,
22017         complete_method_decl, resolve_class, complete_class_report_errors,
22018         java_check_final, check_method_redefinition,
22019         java_check_regular_methods, java_check_abstract_methods,
22020         java_check_methods, lookup_java_interface_method2,
22021         lookup_java_method2, lookup_cl, find_name_in_single_imports,
22022         process_imports, find_in_imports, read_import_entry,
22023         read_import_dir, find_in_imports_on_demand,
22024         check_pkg_class_access, not_builtin_p, declare_local_variables,
22025         source_start_java_method, java_generate_parsed_class): New
22026         functions.
22027         *typeck.c: (signature_include_return): New global variable.
22028         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
22029         to add the function returned type in the signature.
22031 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
22033         * jcf-io.c (open_in_zip): Use strncmp and LEN.
22035 1998-01-29  Dave Brolley  <brolley@cygnus.com>
22037         * Make-lang.in (java.info): Added.
22038         (java.install-info): Added
22040 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
22042         * Makefile.in (clean): Also remove java/parse.c.
22044 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
22046         Add a pair of -fbounds-check/-fno-bounds-check options.
22047         * lang.c (lang_decode_option): Add code to grok arguments.
22048         (flag_bounds_check): Add decl.
22049         (lang_f_options): New array w/ the option in it.
22050         * java-tree.h (flag_bounds_check): Add decl.
22051         * lang-options.h: New file.
22052         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22053         of a static macro value.
22054         (JAVA_ARRAY_EXCEPTION): Delete macro.
22056 1998-01-23  Per Bothner  <bothner@cygnus.com>
22058         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
22059         * expr.c (build_anewarray):  Add missing promote_type.
22061 1998-01-22  Per Bothner  <bothner@cygnus.com>
22063         Add array types with known length to optimize bounds checking.
22064         * typeck.c (build_java_array_type):  Take length parameter.
22065         (java_array_type_length, build_prim_array_type):  New functions.
22066         * java-tree.h:  Update for new functions.
22067         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22068         * class.c:  Use build_prim_array_type.
22069         * expr.c (can_widen_reference_to):  Handle known-length array types.
22070         (verify_jvm_instructions):  Keep track of integer push instructions
22071         followed by newarray/anewarray, so we can build known-length arrays.
22072         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
22073         (java_array_data_offset):  New function.
22074         (build_java_array_length_access):  New function.  Optimize if constant.
22075         (build_java_arrayaccess):  Constant fold bounds check.
22076         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
22077         (build_newarray, build_anewarray):  New functions.
22078         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
22079         * verify.c (merge_types):  Handle known-lengh array types.
22081 1998-01-19  Per Bothner  <bothner@cygnus.com>
22083         * expr.c (expand_byte_code):  Fix performace bug, which caused
22084         searching linenumber_table to be linear rather than constant.
22086 1997-12-12  Per Bothner  <bothner@cygnus.com>
22088         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
22090         * decl.c, java-tree.h (soft_fmod_node):  New global.
22091         * decl.c (init_decl_processing):  Define __builtin_fmod.
22092         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
22093         using __builtin_fmod.
22095 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22097         * keyword.h: New file, output of keyword.gperf as processed by
22098         gperf.
22099         * lex.c (java_lex_init): Initialize java_error_flag.
22100         * parse.c (YYERROR_NOW): Uses java_error_flag.
22101         * parse.y: New static java_error_flag. Useless definition of
22102         buffer_error gone.
22103         * parse.y (java_error): Portable error recovery using
22104         java_error_flag (not yet completely tuned).
22106 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
22108         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22110 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22112         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22113         (parse.c, lex.c, keyword.h): New rules for Java source code
22114         front-end.
22115         * parse.c: Renamed into jcf-parse.c.
22116         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22117         * keyword.gperf: New file, Java keywords.
22118         * parse.y: New file, Java language grammar.
22119         * parse.h: New file, Java language grammar definitions.
22120         * lex.c: New file, Java language lexer.
22121         * lex.h: New file, Java language lexer definitions.
22123 1997-12-03  Per Bothner  <bothner@cygnus.com>
22125         * decl.c (clinit_identifier_node), java-tree.h:  New global.
22126         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
22127         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
22128         * expr.c (expand_java_field_op):  Check for invalid assignment
22129         to final field.
22131         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
22133 1997-10-27  Per Bothner  <bothner@cygnus.com>
22135         * verify.c (verify_jvm_instructions):  When processing a handler,
22136         attempt to set the current_subr to the right value.
22137         (More complicated code combines Sep 17 and Oct 22 versions.)
22139 1997-10-24  Per Bothner  <bothner@cygnus.com>
22141         * class.c (push_class):  Figure out (guess) name of source file.
22142         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
22143         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
22144         (parse_class_file):  Change return type from int to void.
22145         Call debug_start_source_file/debug_end_source_file.
22147         * expr.c (build_java_binop):  Fix masking 2nd operand.
22148         * decl.c (init_decl_processing):  Set sizetype first.
22150 1997-10-22  Per Bothner  <bothner@cygnus.com>
22152         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
22153         (Revert Sep 17 change.)
22155 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22157         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22158         .class extension in their name and fix thing so we don't process
22159         them parse_zip_file_entries().
22160         (parse_zip_file_entries): Cleaned unused local variables.
22162 1997-10-20  Per Bothner  <bothner@cygnus.com>
22164         * expr.c (can_widen_reference_to):  Allows equal array element types.
22165         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
22166         * jcf-dump.c (RET):  Get (and print) index.
22168         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22169         Promote element type to POINTER_TYPE.
22171 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22173         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22174         find_in_current_zip, jcf_figure_file_type): Moved from
22175         jcf-reader.c to parse.c.
22176         * zextract.c: (read_zip_archive): takes file_comment_length possible
22177         field into account.
22179 1997-10-20  Per Bothner  <bothner@cygnus.com>
22181         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
22183         * verify.c (merge_types):  Handle array types even better ...
22185 1997-10-17  Per Bothner  <bothner@cygnus.com>
22187         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
22189         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
22190         * class.c (make_class_data):  Don't build fields_decl if no fields.
22191         When building fields_decl, skip if DECL_ARTIFICIAL.
22193         * expr.c (java_stack_swap):  Update stack_type_map.
22194         * verify.c (merge_types):  Handle array types better.
22196 1997-10-15  Per Bothner  <bothner@cygnus.com>
22198         * class.c (add_field):  Don't promote short integral fields to
22199         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22200         * expr.c (push_value):  Promote and convert short integral values.
22202         * decl.c, java-tree.h (integer_two_node):  New constant node.
22203         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
22205 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22207         * class.c (append_gpp_mangled_type): Use function argument
22208         unpromoted type to generate mangled name.
22210 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22212         * constants.c (build_constant_data_ref): Now uses current_class
22213         instead of main_class.
22214         (build_constants_constructor): Now uses current_class instead of
22215         main_class.
22216         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22217         of the global variable SeepZipFiles done here.
22218         * zextract.c (read_zip_archive): extra_field optional field taken
22219         into account while computing the position of the class file in the
22220         archive.
22221         * verify.c (verify_jvm_instructions): Use current_jcf to search
22222         the constant pool.
22223         * parse.c (load_class): First search for the class to load in the
22224         current zip file. Saves current_jcf (restored before returning
22225         from that function). Don't call JCF_FINISH in the class was found
22226         in the current ZIP file.
22227         (jcf_parse): If the class was found in the current ZIP file, save
22228         its tree_constant_pool (for later reuse).
22229         (parse_class_file): New function. Process each method defined in
22230         the current class and record the class as to be later registered.
22231         (yyparse): Rewritten. Figure the type of the current file and switch
22232         accordingly.
22233         * lang.c: New global variable current_jcf.
22234         (lang_init): Removed compiling_from_source test (done later, in
22235         yyparse). Removed call the jcf_parse ().
22236         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22237         (typedef struct JCF): New fields seen_in_zip (to mark a class found
22238         in the current ZIP file) and zip_offset (offset to the class data in
22239         the current zip file).
22240         * jcf-reader.c: zipfile.h included.
22241         localToFile: New ZipFileCache static global variable
22242         (parse_zip_file_entries): New function. Browse the current ZIP
22243         file directory and process each class found.
22244         (process_zip_dir): New function. Register each class found in the
22245         ZIP file directory. The class aren't parsed but a valid JCF is
22246         link to each of them.
22247         (find_in_current_zip): New function. Search for a class in the
22248         current ZIP file directory. If found, prepare the class so that it
22249         can be loaded.
22250         (jcf_figure_file_type): New function. Examine the file structure
22251         to figure a class file, a ZIP file. If none of these categories are
22252         matched, a source file is assumed.
22253         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22254         SeenZipFile: New global variable.
22255         (open_in_zip): Use zipmember's length to accelerate the search for
22256         a member. If zipmember was NULL and zip file successfully read,
22257         return 0.
22258         * java-tree.h: New global variable current_jcf declared.  Added
22259         declaration for current_constant_pool_tags, current_constant_pool_data,
22260         current_constant_pool_length, current_constant_pool_data_ref.
22261         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22262         store the JCF of classes seen in a zip file) and tree *constant_pool
22263         (to save a loaded class constant pool). current_class declared here.
22264         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22265         retrieve method_ref_constant.
22266         (PUSHC): java_push_constant_from_pool now uses current_jcf.
22267         (OBJECT): get_class_constant now uses current_jcf.
22268         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22269         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22270         (expand_invoke): Now uses current_class instead of main_class
22271         (build_class_init): Now uses current_class instead of main_class
22272         * class.c: New static global variable registered_class.
22273         (register_class): New function.
22274         (emit_register_class): Modified to use registered_class instead of
22275         main_class
22276         (is_compiled_class): Now take into account class seen in the archive.
22278 1997-10-06  Per Bothner  <bothner@cygnus.com>
22280         * except.h:  Renamed to: java-except.h.
22281         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
22282         * except.c:  Add semi-working (commented out) implementation.
22284         * expr.c (expand_iinc):  Add needed flush_quick_stack.
22285         * parse.c (set_source_filename):  New function.
22286         (give_name_to_class):  Set input_filename from package.classname.java.
22288         * jcf-io.c (find_class):  Don't look first in ".".
22290 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22292         * zextract.c (read_zip_archive): Now takes into account the
22293         extra_field field.
22294         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22296 1997-09-20  Per Bothner  <bothner@cygnus.com>
22298         * constants.c, java-tree.h (build_internal_class_name):  New function.
22299         (alloc_class_constant):  Re-implement using build_internal_class_name.
22300         * class.c (make_class_data):  Likewise.
22301         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
22303 1997-09-17  Per Bothner  <bothner@cygnus.com>
22305         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
22306         to NULL before pushing an exception handler target.
22308         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
22309         (java_stack_swap, java_stack_dup):  Re-write to be safe from
22310         clobbering registers.
22311         (build_class_init):  New function.
22313 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22315         * typeck.c (build_java_array_type): Temporary use
22316         permanent_obstack to create the array 'length' field.
22317         * expr.c (lookup_label): Temporay use permanent_obstack to create
22318         label if not found.
22319         * class.c (push_super_field): Tempory use permanent_obstack.
22321 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22323         * typeck.c (type_for_mode): Now handles double_type_node and
22324         float_type_node.
22325         * verify.c (verify_jvm_instructions): The instruction following
22326         the wide bytecode is checked. OPCODE_ret added to the list of
22327         wide.
22329 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22331         * class.c (make_class): Temporary use permanent_obstack. Set the
22332         class CLASS_P field to 1.
22333         (push_class): Temporary use permanent_obstack.
22334         (set_super_info): Temporary use permanent_obstack.
22335         (add_method): Temporary use permanent_obstack, set
22336         METHOD_TRANSIENT().
22337         (add_field): Temporary use permanent_obstack. Sets
22338         FIELD_VOLATILE() and FIELD_TRANSIENT().
22339         (build_class_ref): Temporary use permanent_obstack if the class
22340         isn't compiled.
22341         (build_static_field_ref): Temporary use permanent_obstack when
22342         creating field's rtl.
22343         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22344         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22345         and fields. Function finalized, as far as flag handling.
22346         (push_class_static_dummy_field): Temporary use permanent_obstack.
22347         (emit_register_class): Force generation of class registration at
22348         -O3 or deeper.
22349         * decl.c (end_java_method): Call permanent_allocation() before
22350         returning.
22351         * expr.c (can_widen_reference_to): Added comment to interface
22352         handling, fixed typo.
22353         (lookup_field): Now uses CLASS_P() to correct FIXME
22354         (expand_invoke): Verification on public && !static &&
22355         !abstract moved into soft_lookupinterfacemethod (kaffe).
22356         Use Object class dtable if objectref is an array when expanding
22357         invokeinterface.
22358         (java_push_constant_from_pool): Temporary use permanent_obstack
22359         for CONSTANT_string
22360         * parse.c (get_ref_constant): Temporary use permanent_obstack to
22361         create constant references.
22362         (get_constant): Temporary use permanent_obstack to create constant.
22363         (load_class): Temporary use permanent_obstack to load class.
22364         (jcf_parse): Temporary use permanent_obstack to perform class
22365         layout.
22366         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22367         (build_java_signature): Temporary use permanent_obstack.
22368         * verify.c: (verify_jvm_instruction): removed unnecessary verification
22369         on ACC_SUPER flag.
22370         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22371         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22372         (CLASS_P): Defined
22374 1997-09-11  Per Bothner  <bothner@cygnus.com>
22376         * class.c (append_gpp_mangled_type):  Fix typo.
22377         (emit_register_class):  Use main_class to get class object, rather
22378         than looking for no-longer-existing static decl starting with _CL.
22379         * typeck.c (parse_signature_type):  Promote array element type
22380         if it is a RECORD_TYPE.
22382 1997-09-10  Per Bothner  <bothner@cygnus.com>
22384         * class.c (push_class_static_dummy_field):  New function.
22385         (mangle_static_field):  New. Do G++-style mangling of static fields.
22386         (layout_class):  Mandle static fields here, not in add_field.
22387         (build_class_ref):  The class object is now a dummy static field.
22388         * decl.c (find_local_variable):  Look for best, instead of first match.
22389         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
22390         (build_java_athrow):  Don't check here if exception is Throwable.
22391         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
22392         (TYPE_USED):  Removed.  No longer used ...
22393         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
22394         * verify.c (push_pending_label):  New function.
22395         (push_pending_block):  Renamed to check_pending_block.
22396         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
22397         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
22398         re-checking possible handlers) after a store (less wasted work).
22399         Check for null handler (finally) before calling add_handler.
22400         Various changes to (finally?) correctly handle try/finally.
22402 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
22404         * class.c: Include stdio.h.
22406 1997-09-04  Per Bothner  <bothner@cygnus.com>
22408         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22409         to make sure class is initialized before static/special invoke.
22411         * verify.c (verify_jvm_instructions):  On a store instruction,
22412         call find_local_variable to force pre-allocation of decl and rtx.
22413         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
22415 1997-09-03  Per Bothner  <bothner@cygnus.com>
22417         * class.c (build_class_ref):   Strip off "promoted_" if need be.
22418         (make_field_value): Call build_java_signature when needed.
22419         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
22420         * expr.c (build_java_athrow):  Don't push_value of exception.
22421         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22422         match specification of [fd]cmp[lg] for NaNs.
22423         (expand_byte_code):  Add support for exception handler ranges.
22424         * except.c:  Add skeleton for EH code-generation.
22425         * verify.c (merge_types):  Treat all promoted integral types as equal.
22426         * constants.c (build_constants_constructor):  To force creation of
22427         current_constant_pool_data_ref, call build_constant_data_ref.
22429         * javaop.def (lload):  Fix typo.
22430         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
22432 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
22434         * parse.c: Don't include function.h.
22436 1997-08-27  Per Bothner  <bothner@cygnus.com>
22438         * except.[ch]:  New files.
22439         * Makefile.in (JAVA_OBJS):  Add except.o
22440         * expr.c:  Temporary warning about unimplemented exceptions.
22441         * verify.c:  Verify exception handlers.
22443         * jcf-dump.c (disassemble_method):  Print exception table.
22445 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22447         * expr.c (verify_jvm_instructions): Started a thorough
22448         verification of invoke* bytecodes.
22449         (expand_byte_code): flush quick stack if PC is the target of a
22450         branch.  and undef RET (conflicting with config/i386/i386.h).
22451         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22452         used.
22453         (expand_invoke): Now handles invokeinterface and do more
22454         verification according to the bytecode.
22455         (lookup_field): Don't try to load the class if processing
22456         dtable_type.
22457         (can_widen_reference_to): Now handles interfaces.
22458         * decl.c (init_decl_processing): New global variable
22459         soft_lookupinterfacemethod_node, declared in java-tree.h.
22460         Call set_super_info on string_type_node.
22461         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22462         defined.
22463         * class.c (set_super_info): Fills the CLASS_* flags according to
22464         access_flags.
22465         (get_access_flags_from_decl): Handles all class flags.
22467 1997-08-26  Per Bothner  <bothner@cygnus.com>
22469         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
22470         * parse.c (yyparse):  Check for abstract method, and missing code.
22471         * expr.c (expand_byte_code):  Change interface.
22472         * lang.c (put_decl_node):  Print promoted types prettier.
22473         * verify.c (verify_jvm_instruction):  Change interface.
22474         Partial support for scanning exception table.
22475         For load instructions, handle promoted integral types.
22477 1997-08-21  Per Bothner  <bothner@cygnus.com>
22479         * verify.c:  New file, with contents moved from expr.c.
22480         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
22481         * typeck.c (is_array_type_p):  Moved here from expr.c.
22482         * java-tree.h:  Add some now-needed function declarations.
22483         * Makefile.in (JAVA_OBJS): Added verify.o.
22485 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22487         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22488         METHOD_ABSTRACT flag.
22490         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22491         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22492         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22494         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22495         variables.
22496         (start_java_method): Hook for SYNCHRONIZED methods.
22498         * expr.c (build_java_jsr, build_java_ret): New functions
22499         (JSR,PRE): New macros
22500         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22501         (verify_jvm_instructions): tableswitch, lookupswitch,
22502         monitorenter, monitorexit, goto_w: verified.
22503         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22504         (build_java_monitor): New function.
22505         (MONITOR_OPERATION): Modified to call build_java_monitor()
22506         (verify_jvm_instructions): Started a thorough verification of
22507         invoke* bytecodes.
22509 1997-08-19  Per Bothner  <bothner@cygnus.com>
22511         Support verification of jsr/ret subroutines (used for try/finally).
22512         * decl.c (return_address_type_node):  New type node.
22513         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22514         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22515         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
22516         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22517         TYPE_USED):  New macros for special types in type_map.
22519         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
22520         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
22521         BCODE_JUMP_TARGET.
22522         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
22524         * expr.c (can_widen_reference_to):  New function.
22525         (pop_type):  Use it.
22526         (merge_type_state):  Support handling start of subroutine.
22527         (push_pending_block):  Return char* error message, instead of calling
22528         fatal on an error.  Also handle subroutines.
22529         (verify_jvm_instructions):  Handle errors from push_poending_block.
22530         Support jsr and ret instructions.
22532 1997-08-19  Per Bothner  <bothner@cygnus.com>
22534         * jcf-io.c (find_classfile):  Fix thinko.
22535         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
22537 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
22539         * Makefile.in (BISON): Remove.
22541 1997-08-07  Per Bothner  <bothner@cygnus.com>
22543         * Makefile.in:  Convert to autoconf.
22544         * config-lang.in (outputs):  Added java/Makefile.
22546         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22547         Rename cc1java to jc1.
22549         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
22550         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
22552         * class.c (class_depth):  Do load_class if needed.
22554         Mostly better verification.
22555         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
22556         (init_decl_processing):  Change return type of soft_checkcast.
22557         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
22558         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22559         lang_print_error):  New functions.
22560         (lang_init):  Set global hook print_error_function to lang_print_error.
22561         * expr.c:  In the type_map ptr_type_node is only used for null now.
22562         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
22563         (merge_types):  Dererence pointer to record types before comparing.
22564         (decode_newarray_type, merge_types):  On error just return NULL.
22565         (build_java_binop):  Add preliminary implementation (with warning)
22566         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22567         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
22568         (expand_compare, expand_java_goto, expand_java_call):  Don't
22569         push_pending_block, since that only makes sense when verifying.
22570         (merge_type_state):  Different return codes.
22571         (push_pending_block):  A block may need to be verified more than once.
22572         (expand_byte_code):  Warn about unused code at code generation time.
22573         (verify_jvm_instruction):  Changed logic, since code may need to be
22574         re-verified if type-state has changed.  Also, better error handling.
22575         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22576         Improve newarray, anewarray, ?aload, athrow,
22577         * java-tree.h (LABEL_CHANGED):  New macro.
22579 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22581         * decl.c (soft_athrow_node): New global variable initialized.
22582         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22583         * typeck.c (convert): Added support for REAL_TYPE.
22584         (convert_to_char): New function.
22585         (convert): Handle CHAR_TYPE.
22586         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22587         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22588         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22589         promoted type.
22590         (verify_jvm_instructions): Added break a the end of bogus unop: label.
22591         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22592         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22593         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22594         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22595         to Use The Right Things.
22596         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22597         compatible with INT. BOOLEAN is made equivalent to BYTE.
22598         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22599         OPCODE_ifnonnull): Now supported.
22600         (build_java_athrow): New function.
22602 1997-08-04  Per Bothner  <bothner@cygnus.com>
22604         Rename method name <init> to match G++ (and fix mangling).
22605         * class.c (layout_class):  Replace method name of <init> by class name.
22606         (make_method_value):  Do inverse renaming of constructor from <init>.
22607         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
22608         * typeck.c (lookup_java_constructor):  New function.
22609         * expr.c (expand_invoke):  If method_name is <init>, call
22610         lookup_java_constructor to find constructor.
22612         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
22614 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22616         * parse.c (get_class_constant): Modified to handle array "classes"
22617         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22618         wide type.
22619         (convert): Modified to handle real type.
22620         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22621         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22622         variables declared.
22623         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22624         soft_multianewarray, soft_newarray_node, soft_throw_node): New
22625         global variables initialized.
22626         (find_local_variable): Handles the case of a pointer
22627         (end_java_method): Restore the use of one more scope
22628         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22629         build_java_array_length_access, expand_java_arrayload,
22630         expand_java_arraystore, expand_java_array_length,
22631         expand_java_multianewarray, expand_java_anewarray,
22632         build_java_check_indexed_type, is_array_type_p,
22633         build_java_throw_out_of_bound_exception): New functions.
22634         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22635         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22636         OPCODE_<t>aload): Implemented code for verification.
22637         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22638         ARRAY_NEW_MULTI): Macro defined.
22639         (CONVERT): Modified to invoke convert().
22640         (case OPCODE_aload2): Fixed index typo from 2 to 1.
22642 1997-07-31  Per Bothner  <bothner@cygnus.com>
22644         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
22645         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
22646         (make_class_data):  Field name needs '/' as package prefix.
22647         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
22649 1997-07-25  Per Bothner  <bothner@cygnus.com>
22651         Implement debug information for local variables.
22652         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22653         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22654         DECL_LOCAL_SLOT_CHAIN):  New macros.
22655         (struct lang_decl_var):  New type.
22656         * parse.c (give_name_to_locals):  Move to decl.c.
22657         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
22658         (start_java_method):  Re-write parameter handling.
22659         (pending_local_decls):  New global variable.
22660         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
22661         (find_local_variable):  Accept pc so we can skips decls not in range.
22662         (struct binding_level):  Add end_pc field.
22663         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22664         (various):  Change so current pc gets passed to find_local_variable.
22666         * decl.c (init_decl_processing):  Re-arrange fields in
22667         class_type_node and and method_type_node to match kaffe 0.9.1.
22668         * class.c (make_method_value, make_class_data):  Update
22669         initializations to match.
22671 1997-07-16  Per Bothner  <bothner@cygnus.com>
22673         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22674         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
22675         (push_super_field):  New function.
22676         (make_class_data):  Handle inheritance of class static initializer.
22677         (layout_class):  New name mangling.
22678         * constants.c (build_constant_data_ref):  Init type of data array
22679         to a one-element array.
22680         (build_constants_constructor):  Set DECL_SIZE from complete array type.
22681         * decl.c:  Rename class_type, object_type etc to class_type_node,
22682         object_type_node etc.  Make former inherit from latter.
22683         * expr.c (expand_invoke):  Add cast of function address.
22684         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
22685         * parse.c (yyparse):  Don't call layout_class here.
22686         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
22688 1997-06-14  Per Bothner  <bothner@cygnus.com>
22690         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
22691         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
22692         (alloc_class_constant):  New.
22693         * expr.c (expand_invoke):  Make sure method's class is initialized.
22694         * class.c (interits_from_p, emit_register_class):  New functions.
22695         * parse.c (yyparse):  Call emit_register_class.
22697 1997-06-09  Per Bothner  <bothner@cygnus.com>
22699         * constants.c:  New file, to handle constant pool.
22700         * Makefile.in (JAVA_OBJS):  Add constants.o.
22701         * decl.c (init_decl_processing):  Update, fix, finish various structs.
22702         (pushdecl_top_level):  New.
22703         * parse.c (layout_class):  Moved to class.c.
22704         * expr.c (java_push_constant_from_pool):  New function.
22705         * class.c (build_class_ref):  Make work fully
22706         (make_class_data):  Emit super-class, constant pool, interface vector.
22708 1997-06-03  Per Bothner  <bothner@cygnus.com>
22710         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
22711         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
22712         * class.c (class_depth):  New function.
22713         (lookup_named_class):  Replaced by new function lookup_class.
22714         * decl.c (object_type_node, string_type_node):  New.
22715         Remove various types that we no longer need.
22716         * expr.c (verify_jvm_instructions):  New separate verifier pass.
22717         (push_type, pop_type):  New functions for verifier.
22718         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
22719         (expand_byte_code):  Simplify, since we assume already verified.
22720         (expand_invoke):  Now mostly works.
22721         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22722         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
22723         * parse.c:  Wait to allocate class object until we know its name.
22724         (layout_class):  Calculate DECL_VINDEX for each virtual method.
22725         * typeck.c (get_array_type):  Rename to ...
22726         (build_java_array_type):  ... and provide working implementation.
22727         (build_java_signature):  New function - build Java signature of type.
22728         (set_java_signature):  New function - cache signature with type.
22729         (lookup_java_method):  New function.
22731 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
22733         * class.c (ident_subst):  Take extra SUFFIX parameter.
22734         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
22735         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
22736         (build_class_ref):  Actually implement.
22737         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
22738         * decl.c (builtin_function):  New.
22739         (init_decl_processing):  Update for current Kaffe.  Declare some
22740         builtin Kaffe functions.
22741         * expr.c (build_address_of):  New.
22742         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22743         Renamed (from expand_java_new etc), and added working implementations.
22744         (build_field_ref):  Now also handle static fields.
22745         (expand_invoke):  Implement invokestatic, and start implement rest.
22746         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
22747         * javaop.def:  Rename invokevirt -> invokevirtual.
22748         * lang.c (use_handles):  Removed.
22749         * parse.c:  Add support for ConstantValue attribute.
22750         Handle nested loading of a class.  (JPOOL_UTF):  New.
22752 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
22754         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
22756 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
22758         * Make-lang.in (java.install-man):  New empty rule.
22759         * typeck.c (set_local_type):  New function.
22760         * expr.c (STORE_INTERNAL):  Call find_local_variable,
22761         not find_stack_slot.  Call set_local_type.
22763 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
22765         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
22766         and building RECORD_TYPE CONSTRUCTORs.
22767         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22769         * lang.c (use_handles):  Change the default to 0.
22770         * decl.c:  Define and build class_type, field_type, utf8const_type.
22771         * class.c (make_class_data, make_field_value,
22772         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22773         hashUtf8String, strLengthUtf8, mangled_classname:
22774         Functions to build reflective data structures.
22775         * parse.c (yyparse):  Call make_class_data.
22777         * jcf-io.c (open_class, find_classfile):  New functions.
22778         * jcf-dump.c:  Support reading classfile from explicitly-named
22779         class file (without CLASSPATH searching).
22781 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22783         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
22784         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22785         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22786         (get_constant):  Now trivial for CONSTANT_Utf8.
22788         * jcf.h:  Make NEW_CPOOL the default.
22789         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
22791 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22793         New directory.
22796 Copyright (C) 1996-2013 Free Software Foundation, Inc.
22798 Copying and distribution of this file, with or without modification,
22799 are permitted in any medium without royalty provided the copyright
22800 notice and this notice are preserved.