1 2014-04-22 Release Manager
5 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9 2014-01-02 Tobias Burnus <burnus@net-b.de>
11 * jcf-dump.c (version): Update copyright notice dates.
12 * gcj.texi: Bump @copying's copyright year.
14 2013-12-19 Jakub Jelinek <jakub@redhat.com>
17 * class.c (hashUtf8String): Compute hash in unsigned type.
18 * javaop.h (WORD_TO_INT): Avoid signed integer overflow.
20 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
22 * java-gimplify.c: Add required include files from gimple.h.
24 2013-11-22 David Malcolm <dmalcolm@redhat.com>
26 * class.c (maybe_layout_super_class): Update comment.
27 * decl.c (java_add_stmt): Remove use of input_filename macro.
28 * jcf-parse.c (set_source_filename): Remove use of
30 (parse_class_file): Remove use of input_line and input_filename
32 (java_parse_file): Remove use of input_filename macro.
34 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
36 * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
39 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
41 * class.c, expr.c: Replace host_integerp (..., 0) with
42 tree_fits_shwi_p throughout.
44 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
46 * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
48 2013-11-14 Diego Novillo <dnovillo@google.com>
50 * builtins.c: Include stor-layout.h.
52 * class.c: Include stringpool.h.
53 Include stor-layout.h.
55 * constants.c: Include stringpool.h.
56 Include stor-layout.h.
57 * decl.c: Include stor-layout.h.
60 * except.c: Include stringpool.h.
61 Include stor-layout.h.
62 * expr.c: Include stringpool.h.
63 Include stor-layout.h.
64 * jcf-parse.c: Include stringpool.h.
65 * mangle.c: Include stringpool.h.
66 * resource.c: Include stringpool.h.
67 Include stor-layout.h.
68 * typeck.c: Include stor-layout.h.
70 * verify-glue.c: Include stringpool.h.
72 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
74 * java-gimplify.c: Include gimplify.h.
76 2013-11-07 Jeff Law <law@redhat.com>
78 * builtins.c (initialize_builtins): Provide __builtin_trap.
80 2013-10-29 David Malcolm <dmalcolm@redhat.com>
82 Patch autogenerated by refactor_symtab.py from
83 https://github.com/davidmalcolm/gcc-refactoring-scripts
84 revision 58bb219cc090b2f4516a9297d868c245495ee622
86 * decl.c (java_mark_decl_local): Update for conversion of symtab types
87 to a true class hierarchy.
89 2013-10-14 David Malcolm <dmalcolm@redhat.com>
91 * lang.c (java_handle_option): Update for introduction of
94 2013-09-25 Tom Tromey <tromey@redhat.com>
96 * Make-lang.in (jvspec.o): Remove.
97 (CFLAGS-java/jvspec.o): New variable.
98 ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o
99 (java/jvspec.o-warn): Rename from jvspec.o-warn.
100 (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o)
101 (java/class.o, java/constants.o, java/decl.o, java/except.o)
102 (java/expr.o, java/jcf-depend.o, java/jcf-parse.o)
103 (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o)
104 (java/resource.o java/typeck.o, java/win32-host.o)
105 (java/verify-glue.o, java/verify-impl.o, java/zextract.o)
106 (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove.
108 2013-09-25 Tom Tromey <tromey@redhat.com>
110 * Make-lang.in (jvspec.o): Don't use subshell.
112 2013-06-05 Jan Hubicka <jh@suse.cz>
114 * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
115 instead of mark_decl_referenced.
117 2013-05-29 Jan Hubicka <jh@suse.cz>
119 * decl.c (java_mark_decl_local): Update for new symtab flags.
121 2013-05-22 Matthias Klose <doko@ubuntu.com>
123 * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
125 2013-05-16 Jason Merrill <jason@redhat.com>
127 * Make-lang.in (jc1$(exeext)): Use link mutex.
129 2013-05-06 Jakub Jelinek <jakub@redhat.com>
132 * class.c (emit_symbol_table): Use array type of the
133 right size for the_syms_decl and its DECL_INITIAL, instead
134 of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it.
135 (emit_assertion_table): Use array type of the right size
136 for table_decl and its DECL_INITIAL.
138 2013-04-15 Gerald Pfeifer <gerald@pfeifer.com>
140 * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
141 (Resources): Adjust reference to Mauve.
142 Remove link to java.sun.com.
143 Refer to GCC, not gcc.
145 2013-04-09 Richard Biener <rguenther@suse.de>
147 * expr.c (build_java_binop): Pass a type to build_int_cst.
149 2013-03-22 Kai Tietz <ktietz@redhat.com>
151 * lang.c (put_decl_node): Don't iterate over end_params_node.
153 2013-01-03 Jakub Jelinek <jakub@redhat.com>
155 * jcf-dump.c (version): Update copyright notice dates.
157 2012-11-16 Diego Novillo <dnovillo@google.com>
159 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
161 * boehm.c: Use new vec API in vec.h.
163 * constants.c: Likewise.
166 * java-tree.h: Likewise.
167 * jcf-parse.c: Likewise.
168 * resource.c: Likewise.
169 * verify-glue.c: Likewise.
171 2012-11-15 Jan Hubicka <jh@suse.cz>
173 * builtins.c (define_builtin): Accept ECF flags and
174 use set_call_expr_flags.
175 (initialize_builtins): Update.
177 2012-10-01 Lawrence Crowl <crowl@google.com>
179 * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
180 (JCFDUMP_OBJS): Add dependence on hash-table.o.
181 (jcf-io.o): Add dependence on hash-table.h.
182 * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
184 2012-09-24 Lawrence Crowl <crowl@google.com>
186 * decl.c (java_init_decl_processing): Change to new double_int API.
187 * jcf-parse.c (get_constant): Likewise.
188 * boehm.c (mark_reference_fields): Likewise.
189 (get_boehm_type_descriptor): Likewise.
191 2012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
193 * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
194 (bootstrap_method): Likewise for the bootstrap_arguments field.
196 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
198 * java-gimplify.c: Include dumpfile.h instead of tree-dump.h
199 * Make-lang.in: Fix dependencies.
201 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
203 * java-tree.h (force_evaluation_order): Remove prototype.
204 * expr.c (force_evaluation_order): Remove unused function.
206 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
208 * decl.c: Do not include libfuncs.h.
209 * class.c: Do not include defaults.h.
210 * jvgenmain.c: Likewise.
211 * magnle.c: Likewise.
212 * Make-lang.in (decl.o): Fix dependencies.
214 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
216 * verify.h: Do not include system.h and coretypes.h here.
217 * verify-impl.c: Include them here instead.
219 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
221 * jcf-io.c (read_zip_member): Initialize d_stream.
223 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
225 * resource.c: Do not include output.h.
227 2012-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
230 * class.c (emit_register_classes_in_jcr_section): Revise placement
231 of #ifdef JCR_SECTION_NAME.
233 2012-04-22 Jan Hubicka <jh@suse.cz>
235 * class.c (build_utf8_ref): Do not mark varpool node as needed.
237 2012-04-20 Jan Hubicka <jh@suse.cz>
239 * class.c (make_local_function_alias): Do not mark symbol referenced.
241 2012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
243 * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
244 results to long to match formats.
246 2012-04-11 Andrew Haley <aph@redhat.com>
248 * jcf-reader.c (jcf_parse_bootstrap_methods): Add
251 2012-04-11 Andrew Haley <aph@redhat.com>
253 * jcf.h (bootstrap_method): New.
254 (BootstrapMethods): New.
255 (JCF): Add BootstrapMethods.
256 (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
257 * jcf-reader.c (jcf_parse_bootstrap_methods): New.
258 (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
260 (jcf_parse_bootstrap_methods): New.
261 * javaop.def (invokedynamic): New opcode.
262 * jcf-parse.c (get_constant): An unknown constant type should not
263 be an internal error, but a fatal one. Make it so.
264 * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
265 (HANDLE_END_BOOTSTRAP_METHODS): New.
266 (print_constant): Handlers for MethodHandle, MethodType, and
269 2012-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
271 * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
274 2012-03-29 Steven Bosscher <steven@gcc.gnu.org>
277 * class.c (emit_register_classes_in_jcr_section): New function.
278 (emit_Jv_RegisterClass_calls): New function, split out from ...
279 (emit_register_classes): ... here. Reorganize. Do not call
282 2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
284 * lang.c (java_init_options_struct): Set
285 frontend_set_flag_trapping_math.
287 2012-01-01 Jakub Jelinek <jakub@redhat.com>
289 * jcf-dump.c (version): Update copyright notice dates.
291 2011-12-03 Matthias Klose <doko@ubuntu.com>
293 * expr.c (SPECIAL_WIDE): Fix typo in message.
295 2011-11-23 Jeffrey A Law (law@cygnus.com)
297 * lang.c (java_init_options_struct): Disable optimizations
298 which assume a NULL pointer dereference will cause a fault.
300 2011-11-07 Richard Henderson <rth@redhat.com>
302 * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
303 (compareAndSwapLong_builtin): Likewise.
304 (compareAndSwapObject_builtin): Likewise.
305 (VMSupportsCS8_builtin): Likewise.
307 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
309 * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
311 2011-10-15 Tom Tromey <tromey@redhat.com>
312 Dodji Seketeli <dodji@redhat.com>
314 * jcf-parse.c (set_source_filename): Adjust to the new map API.
316 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
318 * class.c (build_static_field_ref): Delete old interface with two
319 parallel arrays to hold standard builtin declarations, and replace
320 it with a function based interface that can support creating
321 builtins on the fly in the future. Change all uses, and poison
322 the old names. Make sure 0 is not a legitimate builtin index.
323 * decl.c (java_init_decl_processing): Ditto.
324 * except.c (compareAndSwapLong_builtin): Ditto.
325 (compareAndSwapObject_builtin): Ditto.
326 (putVolatile_builtin): Ditto.
327 (define_builtin): Ditto.
328 (check_for_builtin): Ditto.
329 * expr.c (rewrite_arglist_getcaller): Ditto.
330 (expand_java_field_op): Ditto.
332 2011-08-24 Joseph Myers <joseph@codesourcery.com>
334 * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
336 (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
339 2011-08-18 Peter Collingbourne <peter@pcc.me.uk>
341 * expr.c (expand_invoke) Use the type of the method rewrite
344 2011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
346 * jcf-dump.c (print_constant): Cast first frexp arg.
348 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
350 * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
352 2011-07-19 Richard Guenther <rguenther@suse.de>
354 * builtins.c (static): Use fold_build_pointer_plus.
355 * class.c (make_class_data): Likewise.
356 (build_symbol_entry): Likewise.
357 * except.c (build_exception_object_ref): Likewise.
358 * expr.c (build_java_arrayaccess): Likewise.
359 (build_field_ref): Likewise.
360 (build_known_method_ref): Likewise.
361 (build_invokevirtual): Likewise.
363 2011-07-06 Richard Guenther <rguenther@suse.de>
365 * decl.c (java_init_decl_processing):
366 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
368 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
370 * builtins.c: Add sync_ or SYNC__ to builtin names.
371 * expr.c: Add sync_ or SYNC__ to builtin names.
373 2011-06-07 Richard Guenther <rguenther@suse.de>
375 * decl.c (java_init_decl_processing): Call build_common_nodes,
376 build_common_nodes_2 at the beginning. Remove then duplicate
379 2011-06-07 Richard Guenther <rguenther@suse.de>
381 * decl.c (java_init_decl_processing): Properly initialize
384 2011-05-30 Joern Rennecke <joern.rennecke@embecosm.com>
387 * expr.c: Include "tm.h" .
389 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
391 * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
392 * expr.c (build_jni_stub): Likewise.
394 2011-05-24 Joseph Myers <joseph@codesourcery.com>
396 * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
399 2011-05-20 Joseph Myers <joseph@codesourcery.com>
401 * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
403 (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
404 (JVGENMAIN_OBJS): Remove errors.o and intl.o.
405 (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
406 * jcf-dump.c: Include diagnostic.h.
407 (main): Initialize diagnostics.
408 * jvgenmain.c: Include diagnostic.h.
409 (main): Initialize diagnostics.
411 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
413 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
415 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
417 * java-tree.h (global_bindings_p): Adjust prototype.
418 * decl.c (global_bindings_p): Return bool.
420 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
422 * expr.c (expand_java_switch): Call build_case_label.
423 (expand_java_add_case): Likewise.
425 2011-04-29 Richard Guenther <rguenther@suse.de>
428 * constants.c (build_constants_constructor): Use ptr_type_node for
431 2011-04-20 Jim Meyering <meyering@redhat.com>
433 * jcf-parse.c (java_parse_file): Remove useless if-before-free.
435 2011-04-18 Jim Meyering <meyering@redhat.com>
437 * jcf-parse.c: Fix typo in comment.
439 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
441 * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
443 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
445 * java-tree.h (union lang_tree_node): Check for TS_COMMON before
448 2011-04-11 Martin Jambor <mjambor@suse.cz>
450 * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
451 cgraph_node and handle returned NULL.
453 2011-03-25 Kai Tietz <ktietz@redhat.com>
455 * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
457 (set_source_filename): Likewise.
458 * win32-host.c (jcf_open_exact_case): Likewise.
460 2011-03-21 Kai Tietz <ktietz@redhat.com>
463 * lang.c (java_attribute_table): Adjust table.
465 2011-02-13 Joseph Myers <joseph@codesourcery.com>
467 * jvspec.c (jvgenmain_spec): Remove %{a*}.
469 2011-01-21 Kai Tietz <kai.tietz@onevision.com>
472 * decl.c (java_init_decl_processing): Remove
473 va_list_type_node related type initializations.
475 2011-01-11 Kai Tietz <kai.tietz@onevision.com>
478 * decl.c (java_init_decl_processing): Initialize
479 long_integer_type_node.
481 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
484 * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
486 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
488 * decl.c (java_init_decl_processing): Setup va_list_type_node.
490 2011-01-03 Jakub Jelinek <jakub@redhat.com>
492 * jcf-dump.c (version): Update copyright notice dates.
494 2010-12-15 Dave Korn <dave.korn.cygwin@gmail.com>
496 * decl.c (java_init_decl_processing): Initialise integer_three_node.
497 * lang.c (put_decl_node): Handle nested function decls.
499 2010-12-07 Joseph Myers <joseph@codesourcery.com>
501 * jcf-parse.c: Don't include assert.h.
502 (java_parse_file): Use gcc_assert.
504 2010-12-03 Joseph Myers <joseph@codesourcery.com>
506 * lang.opt (static-libgcj): New option.
508 2010-12-01 Joseph Myers <joseph@codesourcery.com>
510 * jcf-parse.c: Don't include toplev.h.
511 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
513 2010-11-30 Joseph Myers <joseph@codesourcery.com>
515 * boehm.c: Don't include toplev.h.
516 * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
518 2010-11-30 Joseph Myers <joseph@codesourcery.com>
520 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
521 verify-glue.c: Don't include toplev.h.
522 * Make-lang.in: Dependencies for above files changed to remove
525 2010-11-29 Joseph Myers <joseph@codesourcery.com>
527 * boehm.c: Include "config.h" instead of <config.h>.
528 * builtins.c: Don't include <stdarg.h>.
529 * class.c: Don't include "stdio.h".
530 (O_BINARY): Don't define here.
531 * jcf-depend.c: Don't include <assert.h>.
532 (jcf_dependency_set_dep_file, jcf_dependency_init,
533 jcf_dependency_write): Use gcc_assert.
534 * jcf-io.c (O_BINARY): Don't define here.
535 * jcf-path.c: Don't include "tm.h".
536 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
537 * resource.c: Don't include "stdio.h".
538 (O_BINARY): Don't define here.
539 * verify-impl.c: Don't include <stdio.h>.
541 2010-11-17 Joseph Myers <joseph@codesourcery.com>
543 * jcf-parse.c (java_parse_file): Take no arguments.
544 * java-tree.h (java_parse_file): Update prototype.
546 2010-11-09 Joern Rennecke <amylaar@spamcop.net>
547 Andrew Haley <aph@redhat.com>
550 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
552 2010-11-12 Joseph Myers <joseph@codesourcery.com>
554 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
555 * lang.c (java_handle_option): Take location_t parameter.
557 2010-11-10 Joseph Myers <joseph@codesourcery.com>
559 * expr.c (expand_java_field_op): Use %' in diagnostic.
560 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
561 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
562 * lang.c (java_post_options): Use %' in diagnostics.
564 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
567 * class.c: Include target.h.
568 (make_local_function_alias):
569 Use targetm.asm_out.generate_internal_label.
570 * expr.c (lookup_label, generate_name): Likewise.
572 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
575 * jfc-parse.c (target.h): Include.
576 (handle_constant): Use targetm.words_big_endian and
577 targetm.float_words_big_endian.
578 (get_constant): Use targetm.float_words_big_endian.
580 2010-10-13 Richard Henderson <rth@redhat.com>
582 * lang.c (java_eh_personality): Update call to
583 build_personality_function.
585 2010-10-12 Joseph Myers <joseph@codesourcery.com>
587 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
590 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
592 * decl.c (java_init_decl_processing): Use build_function_type_list
593 instead of build_function_type.
594 * jcf-parse.c (java_emit_static_constructor): Likewise.
595 * builtins.c (initialize_builtins): Likewise.
597 2010-10-08 Joseph Myers <joseph@codesourcery.com>
599 * lang.c (java_init_options_struct): New. Split out from
601 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
603 2010-10-04 Andi Kleen <ak@linux.intel.com>
605 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
608 2010-09-29 Joseph Myers <joseph@codesourcery.com>
610 * lang.opt: Don't use VarExists.
612 2010-09-29 Joseph Myers <joseph@codesourcery.com>
614 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
615 flag_force_classes_archive_check, flag_redundant, flag_newer,
616 flag_use_divide_subroutine, flag_use_atomic_builtins,
617 flag_use_boehm_gc, flag_hash_synchronization,
618 flag_check_references, flag_optimize_sci, flag_indirect_classes,
619 flag_indirect_dispatch, flag_store_check,
620 flag_reduced_reflection): Remove.
621 * jcf-dump.c (flag_newer): Remove.
622 * jcf.h (quiet_flag): Remove.
623 * parse.h (quiet_flag): Remove.
625 2010-09-28 Richard Henderson <rth@redhat.com>
627 * lang.c: Include "target.h".
628 (java_eh_personality): Use targetm.except_unwind_info.
629 * Make-lang.in (lang.o): Update deps.
631 2010-09-27 Andrew Haley <aph@redhat.com>
634 * jvgenmain.c (main): Fix arg processing.
636 2010-09-22 Joseph Myers <joseph@codesourcery.com>
638 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
640 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
641 -dependencies, -encoding, -extdirs, -include-directory,
642 -include-directory=, -output-class-directory,
643 -output-class-directory=, -resource, -resource=,
644 -user-dependencies): New.
646 2010-09-16 Richard Guenther <rguenther@suse.de>
648 * jcf-parse.c (current_file_list): Remove.
649 (java_parse_file): Use build_translation_unit_decl. Adjust.
651 2010-09-03 Joseph Myers <joseph@codesourcery.com>
655 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
658 * jvgenmain.c (main): Check "-D XXX=YYY".
660 2010-09-02 Joseph Myers <joseph@codesourcery.com>
662 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
664 2010-09-02 Joseph Myers <joseph@codesourcery.com>
666 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
667 fCLASSPATH=): Mark as Java options and as aliases.
668 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
669 (lang_specific_driver): Don't handle options marked as aliases.
670 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
672 2010-08-22 Joseph Myers <joseph@codesourcery.com>
674 * Make-lang.in (jvspec.o): Update dependencies.
675 * jvspec.c: Include opts.h.
677 (find_spec_file): Do not add leading -specs=.
678 (lang_specific_driver): Use cl_decoded_option structures.
679 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
680 extdirs, fmain=, s-bc-abi): New options.
682 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
684 * class.c: Use FOR_EACH_VEC_ELT.
686 * jcf-parse.c: Likewise.
687 * resource.c: Likewise.
689 2010-08-16 Joseph Myers <joseph@codesourcery.com>
691 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
693 2010-08-05 David Daney <ddaney@caviumnetworks.com>
695 * class.c (build_utf8_ref): Fix code formatting from previous commit.
697 2010-08-05 David Daney <ddaney@caviumnetworks.com>
699 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
701 2010-07-27 Joseph Myers <joseph@codesourcery.com>
703 * lang.c (java_handle_option): Update prototype and return value
706 2010-07-27 Joseph Myers <joseph@codesourcery.com>
708 * lang.c (java_option_lang_mask): New.
709 (java_init_options): Update prototype.
710 (LANG_HOOKS_OPTION_LANG_MASK): Define.
712 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
714 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
719 * jcf-parse.c: Likewise.
720 * typeck.c: Likewise.
721 * verify-glue.c: Likewise.
723 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
725 * boehm.c: Include diagnostic-core.h in every file that includes
728 * constants.c: Likewise.
730 * except.c: Likewise.
732 * jcf-parse.c: Likewise.
733 * mangle.c: Likewise.
734 * mangle_name.c: Likewise.
735 * resource.c: Likewise.
736 * typeck.c: Likewise.
737 * verify-glue.c: Likewise.
739 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
742 * class.c (make_class_data): Cast result of VEC_length calls to int.
744 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
746 * constants.c (build_constants_constructor): Use build_constructor
747 instead of build_constructor_from_list.
748 * class.c (make_method_value): Likewise.
749 (get_dispatch_table): Likewise.
750 (make_class_data): Likewise.
751 (emit_indirect_register_classes): Likewise.
752 (emit_symbol_table): Likewise.
753 (add_assertion_table_entry): Likewise.
754 (emit_assertion_table): Likewise.
755 (make_field_value): Use build_constructor_single instead of
756 build_constructor_from_list.
758 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
760 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
762 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
763 instead of tree_cons.
764 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
765 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
767 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
769 * lang.c: Do not include except.h
770 * except.c: Likewise.
771 (doing_eh): New, moved from except.c (in gcc/) but removed the
773 (maybe_start_try): Update doing_eh call.
774 * Make-lang.in: Update dependencies.
776 2010-06-23 Anatoly Sokolov <aesok@post.ru>
778 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
779 of build_int_cst_wide.
780 * boehm.c (set_bit): Remove.
781 (mark_reference_fields): Use double_int type for 'mask' argument.
782 Use double_int_setbit instead of set_bit.
783 (get_boehm_type_descriptor): Use double_int_setbit instead of
784 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
786 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
788 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
790 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
792 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
794 * jcf-parse.c (java_parse_file): Likewise.
795 (process_zip_dir): Likewise.
797 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
798 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
800 * expr.c (add_type_assertion): Likewise.
802 * decl.c (make_binding_level): Likewise.
803 (java_dup_lang_specific_decl): Likewise.
805 * constants.c (set_constant_entry): Likewise.
806 (cpool_for_class): Likewise.
808 * class.c (add_method_1): Likewise.
809 (java_treetreehash_new): Likewise.
811 * java-tree.h (struct lang_type): Add variable_size GTY option.
812 (struct lang_decl): Likewise.
814 * jch.h (struct cpool_entry): Likewise.
816 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
818 * except.c (prepare_eh_table_type): Update
819 java_treetreehash_create call.
821 * class.c (add_method_1): Update java_treetreehash_create call.
822 (java_treetreehash_create): Remove parameter gc. Use
825 2010-06-04 Joseph Myers <joseph@codesourcery.com>
827 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
830 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
832 * except.c: Include tm.h.
834 2010-05-28 Joseph Myers <joseph@codesourcery.com>
836 * jvspec.c (lang_specific_driver): Use fatal_error instead of
837 fatal. Use warning instead of error for warnings.
839 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
841 * expr.c (get_symbol_table_index): Add spaces in expression.
843 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
845 * java-tree.h (method_entry): Declare. Declare VECs containing it.
846 (struct lang_type): Change type of otable_methods, atable_methods, and
847 itable_methods to VECs. Fix comment for atable_methods.
848 (emit_symbol_table): Take a VEC instead of a tree.
849 (get_symbol_table_index): Take a VEC * instead of a tree *.
850 * class.c (add_table_and_syms): Take a VEC instead of a tree.
851 (emit_symbol_table): Update for changed parameter type.
852 * expr.c (get_symbol_table_index): Likewise.
854 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
856 * buildings.c: Pretend to be a backend file by undefining
857 IN_GCC_FRONTEND (still need rtl.h here).
859 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
861 * java-tree.h (struct lang_decl_func): Change type of throws_list
863 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
864 of DECL_FUNCTION_THROWS.
865 * class.c (make_method_value): Likewise.
867 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
869 * class.c (utf8_decl_list): Delete.
870 (build_utf8_ref): Remove references to it.
871 * java-tree.h (all_class_list): Delete.
872 (predef_filenames): Delete.
873 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
875 * jcf-parse.c (parse_roots): Decrease size to 2.
876 (current_file_list): Convert to a VEC.
877 (all_class_list): Declare.
878 (jcf_parse): Adjust for new type of all_class_list.
879 (java_layout_seen_class_methods): Likewise.
880 (predefined_filenames): Declare.
881 (add_predefined_file): Use it.
882 (predefined_filename_p): Likewise.
883 (java_parse_file): Adjust for new type of current_file_list.
885 2010-05-25 Jakub Jelinek <jakub@redhat.com>
887 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
891 * java-tree.h (pending_static_fields): New extern declaration.
892 (java_write_globals): New prototype.
893 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
894 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
895 of a static field push it into pending_static_fields vector.
896 * class.c (pending_static_fields): New variable.
897 (add_field): If static field is not DECL_EXTERNAL, push it into
898 pending_static_fields vector.
899 (java_write_globals): New function.
901 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
903 * expr.c (quick_stack): Change type to a VEC. Update comment.
904 (tree_list_free_list): Delete.
905 (flush_quick_stack): Update for quick_stack type change.
906 (push_value): Likewise.
907 (pop_value): Likewise.
909 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
911 * java-gimplify.c: Do not include tm.h, toplev.h.
912 * typeck.c: Do not include tm.h.
913 * mangle_name.c: Do not include tm.h.
914 * jcf-dump.c: Do not include tm.h, ggc.h.
915 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
916 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
918 * jcf-parse.c: Do not include tm.h and tm_p.h.
919 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
920 target.h, and expr.h.
921 * except.c: Do not include tm.h, rtl.h, function.h.
922 * builtins.c: Do not include convert.h. Explain why RTL headers
923 have to be included here.
924 * verify-glue.c: Do not include tm.h.
925 * jcf-depend.c: Do not include tm.h.
926 * jcf-reader.c: Include ggc.h.
927 * jcf-io.c: Do not include tm.h, toplev.h.
928 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
930 * lang.c: Do not include rtl.h, expr.h.
931 * Make-lang.in: Update dependencies.
933 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
935 * jcf-parse.c: Include bitmap.h.
936 * Make-lang.in: Update dependencies.
938 2010-05-20 Jakub Jelinek <jakub@redhat.com>
941 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
944 2010-05-19 Anatoly Sokolov <aesok@post.ru>
946 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
947 build_int_cst_wide_type.
949 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
951 * expr.c (pop_arguments): Fix use of undeclared variable.
953 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
955 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
957 (pop_arguments): Return a VEC instead of a tree. Take a method type
958 rather than a list of argument types.
959 (rewrite_rule): Change signature. of rewrite_arglist member.
960 (rewrite_arglist_getcaller): Update signature.
961 (rewrite_arglist_getclass): Likewise.
962 (maybe_rewrite_invocation): Update for rewrite_arglist change.
963 (build_known_method_ref): Take a VEC instead of a tree.
964 (invoke_build_dtable): Likewise.
965 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
966 instead of build_call_list.
967 (build_jni_stub): Use build_call_vec instead of build_call_list.
968 * java-tree.h (maybe_rewrite_invocation): Update declaration.
969 (build_known_method_ref): Likewise.
970 (invoke_build_dtable): Likewise.
972 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
975 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
976 vector. Move call to build_constructor...
977 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
978 TREE_CONSTANT on the constructor.
979 (PUSH_SUPER_VALUE): Change first argument to a vector.
980 (PUSH_FIELD_VALUE): Likewise.
981 * resource.c (compile_resource_data): Update calls to above macros.
982 * constants.c (build_constants_constructor): Likewise.
983 * class.c (build_utf8_ref): Likewise.
984 (make_field_value): Likewise.
985 (make_method_value): Likewise.
986 (add_table_and_syms): New function.
987 (make_class_data): Call it. Update calls to above macros.
988 (build_symbol_table_entry): New function.
989 (build_symbol_entry): Call it. Update calls to above macros.
990 (emit_symbol_table): Likewise.
991 (make_catch_class_record): Update calls to above macros.
992 (build_assertion_table_entry): New function.
993 (add_assertion_table_entry): Call it.
994 (emit_assertion_table): Likewise.
996 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
999 * lang.c (java_handle_option): Add argument kind.
1001 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1003 * decl.c (java_init_decl_processing): Remove argument in call to
1004 initialize_sizetypes
1006 2010-04-07 Jakub Jelinek <jakub@redhat.com>
1008 * exception.cc (_Jv_Throw): Avoid set but not used warning.
1009 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
1010 sizeof to avoid set but not used warnings.
1012 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
1014 * lang.c (java_post_options): Constify variable "dot".
1016 * jcf-parse.c (set_source_filename): Constify variable "dot".
1017 (load_class): Constify variable "separator".
1018 Use get_identifier_with_length.
1020 * jvspec.c (lang_specific_driver): Constify two variables named "p".
1022 2010-01-09 Jakub Jelinek <jakub@redhat.com>
1024 * jcf-dump.c (version): Update copyright notice dates.
1026 2009-11-28 Jakub Jelinek <jakub@redhat.com>
1028 * jvspec.c (lang_specific_driver): Remove unused
1029 saw_verbose_flag variable.
1030 * jcf-dump.c (main): Remove unused general_purpose_bits
1032 * builtins.c (initialize_builtins): Remove unused float_ftype_float
1034 * expr.c (java_stack_pop): Remove unused val variable.
1035 (build_jni_stub): Remove unused res_type variable.
1036 * verify-impl.c (check_field_constant): Remove unused len variable.
1038 2009-10-20 Joel Dice <dicej@mailsnare.net>
1041 * mangle_name.c (append_unicode_mangled_name): Fix mangling
1042 of names with multiple underscores and "U".
1043 (unicode_mangling_length): Likewise.
1045 2009-10-03 Simon Baldwin <simonb@google.com>
1047 * config-lang.in (lang_dirs): Remove zlib.
1049 2009-09-28 Richard Henderson <rth@redhat.com>
1051 * builtins.c (initialize_builtins): Update call to
1052 build_common_builtin_nodes.
1053 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
1055 2009-09-14 Richard Henderson <rth@redhat.com>
1057 * builtins.c (initialize_builtins): Update call to
1058 build_common_builtin_nodes.
1059 * decl.c (java_init_decl_processing): Don't call
1060 default_init_unwind_resume_libfunc.
1061 * except.c: Include tree-iterator.h.
1062 (build_exception_object_var): New.
1063 (build_exception_object_ref): Use it.
1064 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
1065 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
1066 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
1068 2009-09-13 Richard Guenther <rguenther@suse.de>
1069 Rafael Avila de Espindola <espindola@google.com>
1071 * decl.c (do_nothing): Remove.
1072 (java_init_decl_processing): Do not set lang_eh_runtime_type.
1073 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
1074 * lang.c (java_eh_personality): New.
1075 (java_eh_personality_decl): Likewise.
1076 (LANG_HOOKS_EH_PERSONALITY): Define.
1078 2009-09-03 Diego Novillo <dnovillo@google.com>
1080 * lang.c (lang_hooks): Remove const qualifier.
1082 2009-09-01 Jakub Jelinek <jakub@redhat.com>
1084 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
1087 2009-09-01 Richard Guenther <rguenther@suse.de>
1089 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
1090 * java-tree.h (java_mark_addressable): Likewise.
1091 * typeck.c (java_mark_addressable): Likewise.
1093 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1095 * Make-lang.in (java.install-pdf): Install gcj.pdf in
1096 $(pdfdir)/gcc, alongside the other manuals.
1098 2009-08-12 Andrew Haley <aph@redhat.com>
1100 * builtins.c (compareAndSwapInt_builtin): Use
1101 flag_use_atomic_builtins.
1102 (compareAndSwapLong_builtin): Likewise.
1103 (compareAndSwapObject_builtin): Likewise.
1104 * jvspec.c: Add flag_use_atomic_builtins.
1105 * gcj.texi: Likewise.
1106 * java-tree.h: Likewise.
1107 * lang.opt: Likewise.
1109 2009-08-11 Dodji Seketeli <dodji@redhat.com>
1112 * lang.c (put_decl_node): Outputs different level of information
1113 depending on the verbosity level.
1115 2009-07-31 Andrew Haley <aph@redhat.com>
1118 * decl.c (java_replace_references): Set EXPR_LOCATION on all
1119 generated expressions.
1120 (binding_level.loc): new field.
1121 (clear_binding_level): Initialize loc.
1122 (set_input_location): New function.
1123 (pushlevel): Set new binding_level.loc.
1124 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1125 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1126 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1128 2009-07-17 Richard Guenther <rguenther@suse.de>
1131 * java-gimplify.c (java_genericize): Do not gimplify here.
1132 But replace all local references.
1133 (java_gimplify_expr): Do not replace local references here.
1134 (java_gimplify_modify_expr): Likewise.
1135 * jcf-parse.c (java_parse_file): Do not finalize the CU or
1136 optimize the cgraph here.
1137 * decl.c (java_replace_reference): Make static.
1138 (java_replace_references): New function.
1139 (end_java_method): Clear base_decl_map.
1140 * java-tree.h (java_replace_references): Declare.
1141 (java_replace_reference): Remove.
1143 2009-07-14 Taras Glek <tglek@mozilla.com>
1144 Rafael Espindola <espindola@google.com>
1146 * Make-lang.in (java.install-plugin): New target for
1147 installing plugin headers.
1149 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1151 * class.c: Replace %J by an explicit location. Update all calls.
1153 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1155 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1157 2009-06-29 Andrew Haley <aph@redhat.com>
1160 * java-tree.h (cxx_keyword_p): New declaration.
1161 * mangle_name.c (utf8_cmp): Move here from mangle.c.
1162 (cxx_keywords): Likewise.
1163 (cxx_keyword_p): Likewise.
1164 (MANGLE_CXX_KEYWORDS): New macro.
1165 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1166 (append_gpp_mangled_name): Likewise.
1167 * mangle.c: Move code to mangle_name.c.
1168 (mangle_member_name): Don't call cxx_keyword_p.
1170 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1172 * java-gimplify.c (java_gimplify_block): New argument to
1174 * expr.c (force_evaluation_order): Same.
1175 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1178 * jcf-parse.c: Same.
1179 * constants.c: Same.
1184 * java-tree.h (PUSH_FIELD): Add location field.
1186 2009-06-09 Ian Lance Taylor <iant@google.com>
1188 * verify.h: Remove extern "C".
1190 2009-06-07 Ian Lance Taylor <iant@google.com>
1192 * jcf-parse.c (handle_constant): Change local variable 'kind' to
1195 2009-06-01 Ian Lance Taylor <iant@google.com>
1197 * jcf-io.c (find_class): Use CONST_CAST.
1199 2009-05-27 Ian Lance Taylor <iant@google.com>
1201 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1203 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1205 2009-05-26 Ian Lance Taylor <iant@google.com>
1207 * Make-lang.in (jvspec.o): Use $(COMPILER).
1208 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1209 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1211 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
1213 * Make-lang.in (GCJ): Renamed to...
1216 2009-04-27 Ian Lance Taylor <iant@google.com>
1218 * builtins.c (java_builtins): Add casts to enum type.
1219 * verify-impl.c (check_class_constant): Add cast to enum type.
1220 (check_constant, check_wide_constant): Likewise.
1222 2009-04-27 Richard Guenther <rguenther@suse.de>
1225 * constants.c (build_constants_constructor): Retain the old
1226 pointer type as valid TYPE_POINTER_TO after patching the
1227 type of the constant pool decl.
1229 2009-04-24 Ian Lance Taylor <iant@google.com>
1231 * jcf-parse.c (handle_constant): Add cast to enum type.
1233 2009-04-21 Taras Glek <tglek@mozilla.com>
1235 * builtins.c: Update GTY annotations to new syntax
1237 * java-tree.h: Likewise
1241 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1243 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1246 2009-04-18 Ian Lance Taylor <iant@google.com>
1248 * verify-impl.c (verify_instructions_0): Add cast to enum type.
1250 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
1252 * builtins.c (compareAndSwapLong_builtin,
1253 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1254 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1256 2009-03-31 Richard Guenther <rguenther@suse.de>
1258 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1259 the first operand of binary and comaprison expressions.
1261 2009-03-30 Joseph Myers <joseph@codesourcery.com>
1263 PR rtl-optimization/323
1264 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1265 Give an error for -fexcess-precision=standard for processors where
1266 the option is significant.
1268 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1270 * lang.opt: Unify help text for -Wdeprecated.
1272 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1274 * jcf-dump.c (version): Update copyright notice dates.
1276 2009-01-16 Richard Guenther <rguenther@suse.de>
1278 PR tree-optimization/38835
1280 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1282 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
1285 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1287 2008-11-04 Andrew Haley <aph@redhat.com>
1290 * jcf-parse.c (java_emit_static_constructor): Don't call
1291 cgraph_build_static_cdtor. Rewrite.
1293 2008-10-24 Jakub Jelinek <jakub@redhat.com>
1295 * Make-lang.in (check-java-subtargets): New target.
1297 2008-10-16 David Edelsohn <edelsohn@gnu.org>
1300 * Make-lang.in (class.o): Depend on $(TM_P_H).
1302 * class.c: Include tm_p.h.
1303 * expr.c: Include tm_p.h.
1305 2008-10-14 Andrew Haley <aph@redhat.com>
1307 * constants.c (build_constant_data_ref): Make sure we only build
1308 one copy of the decl for the constant pool.
1310 2008-09-22 Andrew Haley <aph@redhat.com>
1312 * expr.c (rules): Add new rule for
1313 gnu.java.lang.VMCPStringBuilder.toString.
1314 (rewrite_rule.new_classname): New field.
1315 (maybe_rewrite_invocation): Use new_classname field instead of
1316 DECL_CONTEXT (*method_p).
1317 Allow rewrite_arglist to be NULL.
1319 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1321 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1322 (java_get_callee_fndecl): Kill.
1324 2008-09-17 Jan Hubicka <jh@suse.cz>
1327 * class.c (add_method_1): Do not initialize DECL_INLINE.
1328 (make_local_function_alias): Likewise.
1329 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1330 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1332 2008-09-09 Richard Guenther <rguenther@suse.de>
1334 * decl.c (build_result_decl): Remove no longer applicable
1337 2008-09-05 David Daney <ddaney@avtrex.com>
1339 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1341 2008-08-21 David Daney <ddaney@avtrex.com>
1343 * class.c (make_class_data): Don't add field_index when
1344 flag_reduced_reflection set.
1346 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
1348 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1350 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1353 * lang.c (java_handle_option): Replace set_Wunused with
1356 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1358 * gcj.texi: Update copyright years. Do not list GPL as
1361 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1363 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1366 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1369 2008-07-29 Jan Hubicka <jh@suse.cz>
1371 * lang.c (java_post_options): Remove handling of flag_no_inline.
1373 2008-07-28 Richard Guenther <rguenther@suse.de>
1375 Merge from gimple-tuples-branch.
1377 2008-07-18 Richard Guenther <rguenther@suse.de>
1379 * expr.c: Include tree-iterator.h.
1380 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1382 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1384 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1387 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1389 * java-gimplify.c (java_gimplify_expr): Same.
1390 (java_gimplify_modify_expr): Same.
1391 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1393 2008-05-02 Diego Novillo <dnovillo@google.com>
1395 * expr.c (build_java_throw_out_of_bounds_exception): Fix
1396 mixed declarations and code.
1398 2008-05-02 Doug Kwan <dougkwan@google.com>
1400 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1401 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1403 2008-02-19 Diego Novillo <dnovillo@google.com>
1405 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1407 * java-gimplify.c (java_gimplify_self_mod_expr): Change
1408 gimple_seq arguments to gimple_seq *. Update all users.
1410 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
1412 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1414 (java_gimplify_self_mod_expr): Same.
1415 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1418 2008-07-24 Jan Hubicka <jh@suse.cz>
1420 * java/decl.c: Include cgraph.h
1421 (end_java_method): Remove non-unit-at-a-time code.
1422 (java_mark_decl_local): Likewise; sanity check that we don't touch
1425 2008-07-15 Jan Hubicka <jh@suse.cz>
1427 * lang.c (java_init_options): Enable unit-at-a-time by default.
1429 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1431 * Make-lang.in (jvspec.o): Fix dependencies.
1433 2008-07-06 Tom Tromey <tromey@redhat.com>
1435 * Make-lang.in (java/parse.o-warn): Remove.
1436 (java/jcf-io.o-warn): Remove.
1438 2008-07-05 Tom Tromey <tromey@redhat.com>
1440 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
1441 (compare_path): Remove.
1442 (java_or_class_file): Likewise.
1443 (memoized_dirlist_entry): Likewise.
1444 (memoized_dirlist_hash): Likewise.
1445 (memoized_dirlist_lookup_eq): Likewise.
1446 (memoized_dirlists): Likewise.
1447 (caching_stat): Likewise.
1448 (find_class): Use stat.
1449 * jcf.h (JCF_USE_SCANDIR): Remove.
1451 2008-06-30 Joshua Sumali <jsumali@redhat.com>
1453 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1454 doc/rebuild-gcj-db.1
1455 (java.uninstall): Likewise.
1456 (java.maintainer-clean): Likewise.
1457 (aot-compile.pod): New rule.
1458 (rebuild-gcj-db.pod): New rule.
1459 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1460 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1462 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1464 * Make-lang.in (java/jcf-io.o-warn): New.
1466 2008-06-24 Tom Tromey <tromey@redhat.com>
1468 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1469 * expr.c (add_type_assertion): Rename argument.
1470 (build_java_arrayaccess): Don't name variable 'throw'.
1471 (ARRAY_NEW_MULTI): Don't name variable 'class'.
1472 * jcf-io.c (find_class): Don't name variable 'class'.
1473 * mangle.c (compression_table_add): Don't name variable 'new'.
1474 * constants.c (cpool_for_class): Rename argument.
1475 (alloc_constant_fieldref): Likewise.
1476 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1478 (read_class): Likewise.
1479 (parse_zip_file_entries): Likewise.
1480 (process_zip_dir): Likewise.
1481 * decl.c (java_mark_class_local): Rename argument.
1482 * class.c (GEN_TABLE): Use type_name, not typename.
1483 (gen_indirect_dispatch_tables): Likewise.
1484 (add_field): Rename argument.
1485 (is_compiled_class): Likewise.
1486 (safe_layout_class): Likewise.
1487 (emit_assertion_table): Likewise.
1488 * typeck.c (has_method): Rename argument.
1490 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1492 * class.c (ident_subst, mangled_classname, unmangle_classname,
1493 gen_indirect_dispatch_tables, add_method_1,
1494 build_fieldref_cache_entry, make_local_function_alias,
1495 layout_class, java_treetreehash_find, java_treetreehash_new,
1496 split_qualified_name): Fix for -Wc++-compat.
1497 * constants.c (set_constant_entry, cpool_for_class): Likewise.
1498 * decl.c (make_binding_level, java_dup_lang_specific_decl,
1499 start_java_method): Likewise.
1500 * except.c (prepare_eh_table_type): Likewise.
1501 * expr.c (type_assertion_hash, note_instructions): Likewise.
1502 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1503 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1504 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1506 * jcf-parse.c (reverse, java_read_sourcefilenames,
1507 annotation_grow, rewrite_reflection_indexes, java_parse_file,
1508 process_zip_dir): Likewise.
1509 * jcf-path.c (add_entry, add_path, jcf_path_init,
1510 jcf_path_extdirs_arg): Likewise.
1511 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1512 * jvgenmain.c (do_mangle_classname): Likewise.
1513 * lang.c (put_decl_string): Likewise.
1514 * verify-impl.c (make_state_copy, make_state, add_new_state):
1517 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1519 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1521 2008-06-14 Tom Tromey <tromey@redhat.com>
1524 * class.c (build_class_ref): Initialize this_classdollar when
1527 2008-05-23 Andrew Haley <aph@redhat.com>
1529 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1530 pathname of source file.
1532 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1534 * jcf-dump.c (print_constant): Use
1535 HOST_LONG_LONG_FORMAT.
1537 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1539 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1542 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1544 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1545 (build_classdollar_field): Don't set TREE_INVARIANT.
1546 (get_dispatch_table): Don't set TREE_INVARIANT.
1547 (make_class_data): Don't set TREE_INVARIANT.
1548 (build_symbol_entry): Don't set TREE_INVARIANT.
1549 (emit_symbol_table): Don't set TREE_INVARIANT.
1550 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1551 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1552 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1553 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1555 2008-04-03 Tom Tromey <tromey@redhat.com>
1557 * Make-lang.in (java_OBJS): New variable.
1559 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1561 * java-tree.h (insert_block): Kill.
1562 * decl.c (insert_block): Kill.
1564 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1566 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1567 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1570 2008-03-27 Tom Tromey <tromey@redhat.com>
1572 * Make-lang.in: Revert automatic dependency patch.
1574 2008-03-25 Tom Tromey <tromey@redhat.com>
1576 * Make-lang.in: Removed most explicit .o targets.
1577 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1578 ($(GCJ)$(exeext)): Update.
1579 (JAVA_OBJS): New variable.
1580 (JCFDUMP_OBJS): Reformat.
1581 (java_OBJS): New variable.
1582 (java/jvspec.o-warn): Update.
1583 (java/parse.o-warn): Remove.
1584 (JAVA_TREE_H): Remove.
1585 (java/jcf-io.o): Reduce to variable setting.
1586 (ALL_CPPFLAGS): Likewise.
1588 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1590 * mangle.c (java_mangle_decl): Remove dead check.
1592 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1594 * jcf-parse.c (java_parse_file): Assert binding levels are
1596 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1599 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1601 * jcf-dump.c (version): Update copyright notice dates.
1603 2008-02-29 Tom Tromey <tromey@redhat.com>
1605 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1607 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1609 2008-02-26 Tom Tromey <tromey@redhat.com>
1611 * lang.c (java_post_options): Remove conditional.
1612 * expr.c (expand_byte_code): Remove old location code.
1613 * jcf-parse.c (set_source_filename): Remove old location code.
1614 (give_name_to_class): Likewise.
1615 (jcf_parse): Likewise.
1616 (duplicate_class_warning): Likewise.
1617 (parse_class_file): Likewise.
1618 (java_parse_file): Likewise.
1619 * decl.c (finish_method): Remove old location code.
1620 * class.c (push_class): Remove old location code.
1622 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1625 * Make-lang.in (jc1): Add $(GMPLIBS).
1627 2008-01-23 David Daney <ddaney@avtrex.com>
1629 * class.c (hide) Rename to...
1630 (java_hide_decl) ... this throughout, and make public.
1631 * resource.c (Jr_count): Remove.
1632 (compile_resource_data): Call java_mangle_resource_name to generate
1633 decl name. Make resource decl public and hidden.
1634 * mangle.c (java_mangle_resource_name): New function.
1635 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1638 2008-01-04 Andrew Haley <aph@redhat.com>
1641 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1644 2008-01-03 Andrew Haley <aph@redhat.com>
1647 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1648 we're about to re-layout the type.
1650 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1652 * lang.c (java_classify_record): Don't return
1653 RECORD_IS_INTERFACE for now.
1655 2007-12-18 Andrew Haley <aph@redhat.com>
1658 * jcf-parse.c (java_parse_file): Remove call to
1659 java_mark_class_local.
1660 (parse_class_file): Reinstate call to java_mark_class_local here.
1661 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1662 already set, call java_mangle_decl() and make_decl_rtl() to
1663 rewrite its name as a hidden alias.
1665 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1668 * lang.c (java_classify_record): New.
1669 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1671 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1674 * decl.c (finish_method): Pass 'false' for the new
1675 allocate_struct_function parameter.
1677 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1679 * expr.c (build_jni_stub): Use the computed jni func type for
1682 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1684 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1686 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1688 * expr.c (type_assertion_hash): Hash type uids rather than
1691 2007-11-17 David Daney <ddaney@avtrex.com>
1692 Andrew Haley <aph@redhat.com>
1694 * constants.c (build_constants_constructor): Use POINTER_SIZE
1695 insead of BITS_PER_WORD in big-endian work around.
1697 2007-11-07 Tom Tromey <tromey@redhat.com>
1700 * gcj.texi (Input Options): Add missing noun.
1702 2007-11-02 Tom Tromey <tromey@redhat.com>
1705 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1706 * zipfile.h (ZIPEMPTYMAGIC): New define.
1708 2007-11-01 Tom Tromey <tromey@redhat.com>
1710 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1711 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1712 (java/jcf-io.o): Depend on zipfile.h.
1714 2007-10-17 Richard Guenther <rguenther@suse.de>
1716 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1719 2007-10-03 Andrew Haley <aph@redhat.com>
1722 * class.c (mangled_classname): Detect and replace illegal
1723 characters in assembly language symbols.
1724 (gen_indirect_dispatch_tables): Call mangled_classname() on
1727 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1729 * lang.c (java_print_error_function): Add third argument.
1731 2007-09-15 Tom Tromey <tromey@redhat.com>
1733 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1735 <init_final>: Likewise.
1736 * lang.c (java_dump_tree): Update.
1737 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1739 2007-09-11 Jan Hubicka <jh@suse.cz>
1741 * decl.c (java_expand_body): Kill.
1742 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1744 2007-09-06 Tom Tromey <tromey@redhat.com>
1746 * jcf-parse.c (parse_class_file): Re-enter the current file.
1748 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1750 * boehm.c (mark_reference_fields): Move misaligned pointer check
1751 after JREFERENCE_TYPE_P test
1753 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1755 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1756 if pointer is misaligned.
1758 2007-09-06 Tom Tromey <tromey@redhat.com>
1760 * lang.c (java_post_options): Update.
1761 * jcf-parse.c (set_source_filename): Update.
1762 (give_name_to_class): Update.
1763 (jcf_parse): Update.
1764 (duplicate_class_warning): Update.
1765 (parse_class_file): Update.
1766 (java_parse_file): Update.
1767 * expr.c (expand_byte_code): Update.
1769 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1771 * decl.c (finish_method): Use set_cfun.
1773 2007-09-04 Andrew Haley <aph@redhat.com>
1775 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1776 when using the ARM EABI.
1778 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1780 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1782 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1784 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1786 * jcf.h (JCF_FINISH): Likewise.
1788 2007-08-28 Tom Tromey <tromey@redhat.com>
1790 * Make-lang.in (java.tags): Don't tag '*.y' files.
1792 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1794 * lang.c (java_decl_ok_for_sibcall): Likewise.
1796 2007-08-21 Paul Brook <paul@codesourcery.com>
1797 Nathan Sidwell <nathan@codesourcery.com>
1798 Mark Mitchell <mark@codesourcery.com>
1799 Joseph Myers <joseph@codesourcery.com>
1801 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1804 2007-08-20 Richard Guenther <rguenther@suse.de>
1806 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1807 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1809 2007-08-17 Tom Tromey <tromey@redhat.com>
1811 * typeck.c (find_method_in_interfaces): Update.
1812 * jcf-parse.c (load_class): Update.
1813 * java-gimplify.c (java_gimplify_component_ref): Removed.
1814 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1816 (java_gimplify_expr): Update.
1817 * decl.c (java_init_decl_processing): Update.
1818 * class.c (set_constant_value): Update.
1819 (make_class_data): Update.
1820 (finish_class): Update.
1821 (build_static_field_ref): Update.
1822 (is_compiled_class): Update.
1823 (maybe_layout_super_class): Update.
1824 (layout_class): Update.
1825 (layout_class_method): Update.
1826 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1827 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1828 (lang_decl_func) <init_calls_this>: Removed field.
1829 (lang_type) <dot_class, verify_method>: Removed fields.
1830 (FIELD_NESTED_ACCESS): Removed.
1831 (FIELD_NESTED_ACCESS_P): Removed.
1832 (DECL_FIELD_FINAL_IUD): Removed.
1833 (DECL_LOCAL_FINAL_IUD): Removed
1834 (LOCAL_FINAL_P): Removed.
1835 (FINAL_VARIABLE_P): Removed.
1836 (CLASS_FINAL_VARIABLE_P): Removed.
1837 (DECL_BIT_INDEX): Removed.
1838 (DECL_INIT_CALLS_THIS): Removed.
1839 (FIELD_LOCAL_ALIAS): Removed.
1840 (FIELD_LOCAL_ALIAS_USED): Removed.
1841 (FIELD_THISN): Removed.
1842 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1843 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1844 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1845 (TYPE_DOT_CLASS): Removed.
1846 (TYPE_VERIFY_METHOD): Removed.
1847 (ID_CLASSDOLLAR_P): Removed.
1848 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1850 (classdollar_identifier_node): Removed.
1851 (TYPE_UNKNOWN): Removed.
1852 (CLASS_FROM_SOURCE_P): Removed.
1853 * expr.c (build_jni_stub): Update.
1854 (force_evaluation_order): Update.
1855 (build_java_empty_stmt): Update.
1856 (build_class_init): Update.
1857 (java_stack_swap): Update.
1858 (build_jni_stub): Update.
1860 2007-08-17 Tom Tromey <tromey@redhat.com>
1862 * java-tree.h (LABEL_TYPE_STATE): Removed.
1863 (load_type_state): Removed.
1864 (LABEL_PC): Removed.
1865 (LABEL_VERIFIED): Removed.
1866 (type_states): Declare.
1867 * expr.c (type_states): New global.
1868 (load_type_state): Now static. Use type_states. Changed
1870 (lookup_label): Don't set LABEL_PC.
1871 (expand_byte_code): Don't use LABEL_VERIFIED.
1872 (note_instructions): Initialize type_states.
1873 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1874 (vfy_note_stack_type): Use type_states.
1875 (vfy_note_local_type): Likewise.
1877 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1879 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1880 * jcf.h (JCF_FINISH): Likewise.
1882 2007-07-31 Nick Clifton <nickc@redhat.com>
1884 * java-gimplify.c: Change copyright header to refer to version 3
1885 of the GNU General Public License and to point readers at the
1886 COPYING3 file and the FSF's license web page.
1887 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1888 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1889 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1890 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1891 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1892 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1893 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1895 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1897 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1899 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1901 * lang.c (java_get_callee_fndecl): Constify.
1903 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1905 * mangle.c (set_type_package_list): Constify.
1906 * verify-glue.c (vfy_make_string): Delete.
1907 * verify.h (vfy_make_string): Likewise.
1909 2007-07-26 Tom Tromey <tromey@redhat.com>
1911 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1912 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1913 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1914 * lang.c (java_tree_inlining_walk_subtrees): Update.
1915 (java_dump_tree): Likewise.
1916 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1918 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1919 * java-gimplify.c (java_gimplify_labeled_block_expr,
1920 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1921 (java_gimplify_expr): Update.
1923 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1925 * class.c (java_treetreehash_hash, java_treetreehash_compare):
1927 * expr.c (type_assertion_eq): Likewise.
1928 * jcf-io.c (compare_path): Likewise.
1929 * jcf-parse.c (cmpstringp): Likewise.
1930 * verify-impl.c (get_one_type, compute_argument_types,
1931 compute_return_type): Likewise.
1933 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1937 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1939 2007-07-12 Richard Guenther <rguenther@suse.de>
1941 * expr.c (expand_java_return): RETURN_EXPR has void type.
1942 (build_jni_stub): Likewise. Use a comparison against zero
1943 for null-pointer test in COND_EXPR.
1944 (build_field_ref): Build POINTER_PLUS_EXPR with correct
1945 type. Convert result instead.
1946 (build_invokevirtual): Likewise.
1948 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1951 * lang.c (java_init): Remove setting of force_align_functions_log.
1952 * class.c (add_method_1): Set DECL_ALIGN of non-static method
1953 to cope with ptrmemfunc_vbit_in_pfn.
1955 2007-07-03 David Daney <ddaney@avtrex.com>
1957 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
1959 (doc/gcj.dvi): Same.
1960 (doc/gcj.pdf): Same.
1961 (java/index.html): Same.
1963 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1965 * class.c (make_class_data): Build the index in sizetype.
1966 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1967 adding to a pointer type.
1968 (build_symbol_entry): Likewise.
1969 * expr.c (build_java_arrayaccess): Likewise.
1970 (build_field_ref): Likewise.
1971 (build_known_method_ref): Likewise.
1972 (build_invokevirtual): Likewise.
1973 * except.c (build_exception_object_ref): Do a
1974 NEGATIVE and then a POINTER_PLUS_EXPR instead
1977 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
1979 * typeck.c (java_signed_type): Remove.
1980 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1981 * java-tree.h (java_signed_type): Remove.
1983 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1985 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1986 (print_constant): Likewise.
1988 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
1990 * expr.c (build_java_binop): Use unsigned_type_for instead of
1992 * java-tree.h (java_unsigned_type): Remove.
1993 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1994 * typeck.c (java_unsigned_type): Remove.
1996 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1998 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1999 instead of checking GIMPLE_STMT_P in chain_next.
2001 2007-04-06 Colin Walters <walters@redhat.com>
2003 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
2004 * jcf-io.c (open_class): Copy 'filename'.
2006 2007-04-03 Andrew Haley <aph@redhat.com>
2008 * jvgenmain.c (main): Change main to use class$, not class$$.
2009 (do_mangle_classname): Likewise.
2010 * class.c (hide): New function.
2011 (add_field): Hide everything that shouldn't be visible outside a
2013 (build_static_class_ref): Likewise.
2014 (build_classdollar_field): Likewise.
2015 (make_class_data): Likewise.
2016 (layout_class_method): Likewise.
2017 * expr.c (special_method_p): New function.
2019 * class.c (push_class): Don't bogusly guess the source filename.
2020 * jcf-parse.c (give_name_to_class): Don't set input_location from
2021 DECL_ARTIFICIAL decls.
2023 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
2025 * typeck.c (java_signed_or_unsigned_type): Removed.
2026 (java_signed_type): use get_signed_or_unsigned_type instead of
2027 java_signed_or_unsigned_type.
2028 (java_unsigned_type): Ditto.
2029 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
2030 * java-tree.h (java_signed_or_unsigned_type): Removed.
2032 2007-03-26 Tom Tromey <tromey@redhat.com>
2034 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
2035 (java.maintainer-clean): Likewise.
2036 (java.install-man): Likewise.
2037 (.INTERMEDIATE): Removed grmiregistry.pod.
2038 (grmiregistry.pod): Removed.
2039 * gcj.texi (Invoking gcjh): Removed.
2040 (Invoking gjnih): Likewise.
2041 (Invoking grmiregistry): Likewise.
2042 (direntry): Updated.
2044 (which-gcj): Removed.
2046 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2048 * Make-lang.in: Add install-pdf target as copied from
2049 automake v1.10 rules.
2051 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
2053 * gcj.texi: Standardize title page.
2055 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2057 * class.c: Fix a comment typo.
2059 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2060 Brooks Moses <brooks.moses@codesourcery.com>
2061 Lee Millward <lee.millward@codesourcery.com>
2063 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
2065 (BUILD_MONITOR_EXIT): Likewise.
2067 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
2068 (java_gimplify_modify_expr): Likewise.
2070 * class.c (cache_this_class_ref): Use build_call_expr.
2071 (build_static_field_ref): Likewise.
2072 (emit_indirect_register_classes): Likewise.
2073 (emit_register_classes): Likewise.
2075 * resource.c (write_resource_constructor): Use build_call_expr.
2077 * builtins.c (builtin_creator_function): Change interpretation of
2078 the second parameter to be the whole CALL_EXPR instead of the arglist.
2079 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
2080 (min_builtin): Likewise.
2081 (abs_builtin): Likewise.
2082 (java_build_function_call_expr): Likewise.
2083 (convert_real): Likewise.
2084 (UNMARSHAL3): Likewise.
2085 (UNMARSHAL4): Likewise.
2086 (UNMARSHAL5): Likewise.
2087 (build_arglist_for_builtin): Delete. Fix callers to use
2088 build_call_expr instead.
2089 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
2091 (compareAndSwapInt_builtin): Likewise.
2092 (compareAndSwapLong_builtin): Likewise.
2093 (compareAndSwapObject_builtin): Likewise.
2094 (putVolatile_builtin): Likewise.
2095 (getVolatile_builtin): Likewise.
2096 (VMSupportsCS8_builtin): Likewise.
2097 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
2100 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
2101 (build_java_throw_out_of_bounds_exception): Likewise.
2102 (java_check_reference): Likewise.
2103 (build_java_arraystore_check): Likewise.
2104 (build_newarray): Likewise.
2105 (build_anewarray): Likewise.
2106 (expand_java_multinewarray): Use build_call_list instead of build3.
2107 (build_java_monitor): Use build_call_nary instead of build3.
2108 (java_create_object): Likewise.
2109 (expand_java_NEW): Likewise.
2110 (build_instanceof): Likewise.
2111 (expand_java_CHECKCAST): Likewise.
2112 (build_java_soft_divmod): Likewise.
2113 (build_java_binop): Likewise.
2114 (build_field_ref): Likewise.
2115 (build_class_init): Likewise.
2116 (rewrite_arglist_getcaller): Use build_call_expr.
2117 (build_invokeinterface): Use build_call_nary instead of build3.
2118 (expand_invoke): Use build_call_list instead of build3.
2119 (build_jni_stub): Use build_call_nary, build_call_list, or
2120 build_call_expr instead of build3.
2121 (expand_java_field_op): Use build_call_expr instead of build3.
2122 (force_evaluation_order): Use new CALL_EXPR accessors.
2124 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2126 2007-02-15 David Daney <ddaney@avtrex.com>
2128 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2129 (java.maintainer-clean):Add gc-analyze.1.
2130 (.INTERMEDIATE): Add gc-analyze.pod.
2131 (gc-analyze.pod): New rule.
2132 (java.install-man): Install gc-analyze.1
2133 * gcj.texi: Add new section for the gc-analyze program.
2135 2007-02-07 Andrew Haley <aph@redhat.com>
2137 * class.c (uncache_this_class_ref): New.
2138 * expr.c (build_jni_stub): Initialize the class.
2139 (expand_byte_code): Call uncache_this_class_ref after generating
2142 2007-02-06 Tom Tromey <tromey@redhat.com>
2145 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2147 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2149 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2151 2007-02-02 Andrew Haley <aph@redhat.com>
2153 * expr.c (expand_byte_code): Call cache_this_class_ref() and
2154 cache_cpool_data_ref().
2155 Set TYPE_CPOOL_DATA_REF.
2156 (cache_cpool_data_ref): New function.
2157 * constants.c (build_ref_from_constant_pool): Remove special-case
2158 code for flag_indirect_classes.
2159 (build_constant_data_ref): Move special-case code for
2160 flag_indirect_classes here from build_ref_from_constant_pool.
2161 * decl.c (finish_method): Move class initialization from here to
2162 cache_this_class_ref.
2163 * class.c (cache_this_class_ref): New function.
2164 (build_class_ref): Use this_classdollar for the ouput class.
2166 2007-02-02 David Daney <ddaney@avtrex.com>
2168 * class.c (is_compiled_class): Move check to avoid reloading
2170 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2173 2007-02-01 Andrew Haley <aph@redhat.com>
2176 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2178 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2180 * class.c, jcf-parse.c: Fix comment typos.
2182 2007-01-30 Tom Tromey <tromey@redhat.com>
2184 * gcj.texi (Strings): Fix documentation for JvNewString.
2186 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2188 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2191 2007-01-30 Ben Elliston <bje@au.ibm.com>
2193 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2195 2007-01-29 Tom Tromey <tromey@redhat.com>
2198 * jvspec.c (lang_specific_driver): Handle separate -I argument.
2199 * lang.opt (-I): Add 'Separate'.
2201 2007-01-29 Andrew Haley <aph@redhat.com>
2203 * class.c (add_method_1): Mark fndecl as external unless we are
2204 compiling it into this object file.
2206 2007-01-24 Andrew Haley <aph@redhat.com>
2208 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2209 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2211 2007-01-22 Andrew Haley <aph@redhat.com>
2213 * builtins.c (VMSupportsCS8_builtin): New function.
2215 2007-01-23 Andrew Pinski <pinskia@gmail.com>
2218 * jcf-io.c (opendir_in_zip): Close the file
2219 and free zipf before returning after an error.
2221 2007-01-16 Tom Tromey <tromey@redhat.com>
2223 * java-tree.def: Added copyright header.
2225 2007-01-15 Tom Tromey <tromey@redhat.com>
2227 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2229 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2231 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2232 (EXPR_WFL_NODE): Likewise.
2233 (EXPR_WFL_LINECOL): Likewise.
2234 (EXPR_WFL_FILENAME): Likewise.
2235 (EXPR_WFL_LINENO): Likewise.
2236 (build_expr_wfl, expr_add_location): Don't declare.
2237 (build_unknown_wfl): Removed.
2238 (EXPR_WFL_FILENAME_NODE): Removed.
2239 (EXPR_WFL_COLNO): Removed.
2240 (EXPR_WFL_SET_LINECOL): Removed.
2241 (DECL_FUNCTION_WFL): Removed.
2242 (DECL_FIELD_FINAL_WFL): Removed.
2243 (struct lang_decl_func) <wfl>: Removed field.
2244 <called_constructor>: Likewise.
2245 <inner_access>: Likewise.
2246 (struct lang_decl_var) <wfl>: Removed field.
2247 (DECL_CONSTRUCTOR_CALLS): Removed.
2248 (DECL_FUNCTION_ACCESS_DECL): Likewise.
2249 (DECL_FUNCTION_INNER_ACCESS): Likewise.
2250 (DECL_SPECIFIC_COUNT): Likewise.
2251 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2252 * expr.c (build_expr_wfl): Removed.
2253 (expr_add_location): Likewise.
2255 2007-01-12 Tom Tromey <tromey@redhat.com>
2257 * jcf-dump.c (main): Updated call to find_class.
2258 * lang.c (java_init): Removed dead code.
2259 * jcf-parse.c (read_class): Don't use java_source field. Removed
2261 (parse_zip_file_entries): Don't use java_source field.
2262 (process_zip_dir): Likewise.
2263 (jcf_parse): Removed dead code.
2264 (java_parse_file): Likewise.
2265 (read_class): Updated call to find_class.
2266 * jcf-io.c (find_class): Don't use java_source field. Removed
2267 'source_ok' argument, .java logic.
2268 * jcf.h (JCF) <java_source>: Removed field.
2269 (JCF_ZERO): Updated. (find_class): Updated.
2270 * decl.c: Removed dead code.
2271 * class.c: Removed dead code.
2273 2007-01-11 Tom Tromey <tromey@redhat.com>
2275 * typeck.c (convert): Don't use flag_emit_class_files.
2276 * lang.c (java_post_options): Don't use flag_emit_class_files.
2277 (java_handle_option): Don't use flag_extraneous_semicolon or
2279 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2280 flag_emit_class_files.
2281 (load_class): Likewise.
2282 * java-tree.h (flag_emit_class_files): Don't declare.
2283 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2284 (flag_extraneous_semicolon): Don't declare.
2285 (flag_not_overriding): Likewise.
2286 (flag_static_local_jdk1_1): Likewise.
2287 (flag_redundant): Likewise.
2288 * expr.c (build_newarray): Don't use flag_emit_class_files.
2289 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2290 flag_emit_class_files.
2291 (build_class_ref): Likewise.
2292 * builtins.c (check_for_builtin): Don't use
2293 flag_emit_class_files.
2295 2007-01-10 Tom Tromey <tromey@redhat.com>
2297 * lang.c (java_can_use_bit_fields_p): Removed.
2298 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2300 2007-01-09 Andrew Haley <aph@redhat.com>
2302 * expr.c (build_java_arrayaccess): Rewrite to generate array
2303 access in canonical form.
2304 (expand_java_arraystore): Use build_fold_addr_expr() on address of
2307 2007-01-03 Andrew Haley <aph@redhat.com>
2310 * expr.c (expand_java_field_op): If we're initializing a field's
2311 declaring interface we should not also initialize the class
2312 context in which it was referenced.
2314 2007-01-02 Tom Tromey <tromey@redhat.com>
2316 * java-tree.h (compiling_from_source, current_encoding,
2317 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2318 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2319 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2320 JTI_WFL_OPERATOR): Removed
2321 (finit_identifier_node, instinit_identifier_node,
2322 length_identifier_node, super_identifier_node,
2323 continue_identifier_node, access0_identifier_node, wfl_operator):
2325 (cyclic_inheritance_report,
2326 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2327 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2328 DECL_FIXED_CONSTRUCTOR_P): Removed.
2329 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2331 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2332 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2333 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2334 import_list, import_demand_list>: Removed.
2335 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2336 cxx_keyword_p): Removed.
2337 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2338 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2339 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2340 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2341 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2342 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2343 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2344 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2345 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2346 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2347 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2348 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2349 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2350 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2351 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2352 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2353 java_parse_abort_on_error, extract_field_decl): Removed.
2355 * lang.c: (compiling_from_source, current_encoding): Removed.
2356 (java_handle_option): Ignore -fencoding.
2357 * parse.h: Don't include lex.h.
2358 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2359 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2360 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2361 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2362 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2363 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2364 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2365 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2366 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2367 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2368 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2369 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2370 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2371 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2372 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2373 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2374 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2375 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2376 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2377 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2378 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2379 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2380 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2381 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2382 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2383 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2384 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2385 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2386 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2387 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2388 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2389 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2390 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2391 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2392 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2393 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2394 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2395 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2396 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2397 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2398 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2399 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2400 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2401 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2402 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2403 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2404 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2405 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2406 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2407 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2408 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2409 SET_CPC_STATIC_INITIALIZER_STMT,
2410 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2411 java_complete_class, java_check_circular_reference,
2412 java_fix_constructors, java_layout_classes, java_reorder_fields,
2413 java_method_add_stmt, java_get_line_col, reset_report,
2414 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2415 java_finish_classes, ctxp, ctxp_for_generation,
2416 ctxp_for_generation_last): Removed.
2417 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2418 * mangle.c (utf8_cmp): New function.
2419 (cxx_keywords): New global.
2420 (cxx_keyword_p): New function.
2421 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2422 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2423 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2424 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2425 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2426 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2427 * Make-lang.in (java.srcextra): Do nothing.
2428 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2429 (JAVA_OBJS): Don't mention deleted files.
2430 (java.mostlyclean): Likewise.
2431 (java.clean): Likewise.
2432 (JAVA_LEX_C): Removed.
2433 (buffer.o, check-init.o, parse.o): Remove unused targets.
2434 (typeck.o): Updated.
2435 * jcf-parse.c (read_class): Comment out unused code.
2436 (java_layout_seen_class_methods): New function.
2437 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2439 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
2440 (init_jcf_parse): Removed.
2441 * config-lang.in (gtfiles): Remove deleted files.
2442 * decl.c (java_init_decl_processing): Don't initialize
2443 finit_identifier_node, instinit_identifier_node,
2444 length_identifier_node, super_identifier_node,
2445 continue_identifier_node, access0_identifier_node. Don't call
2447 * class.c (cyclic_inheritance_report): New global.
2448 (add_method_1): Don't use
2449 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2450 (maybe_layout_super_class): Comment out code.
2451 (safe_layout_class): New function.
2452 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2453 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2454 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2455 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2456 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2457 (java_gimplify_case_expr): Removed.
2458 (java_gimplify_default_expr): Likewise.
2459 (java_gimplify_new_array_init): Likewise.
2461 * keyword.gperf, keyword.h: Removed.
2462 * chartables.h: Removed.
2463 * check-init.c: Removed.
2464 * buffer.c, buffer.h: Removed.
2465 * convert.h: Removed.
2466 * gen-table.pl: Removed.
2467 * lex.c, lex.h: Removed.
2469 2007-01-02 Andrew Haley <aph@redhat.com>
2471 * expr.c (expand_java_arraystore): Make sure we perform a bounds
2472 check at runtime before we perform a type check.
2474 2006-12-19 Andrew Haley <aph@redhat.com>
2476 * decl.c: Bump minor BC ABI version.
2478 2006-12-13 Gary Benson <gbenson@redhat.com>
2480 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2482 2006-12-12 Tom Tromey <tromey@redhat.com>
2484 * lang-specs.h: Pass -M options to jc1.
2485 * jcf-depend.c (jcf_dependency_add_file): Don't emit
2488 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
2490 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2492 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
2494 * lang-specs.h: Pass '%U'-based options as separate arguments.
2496 2006-12-05 Tom Tromey <tromey@redhat.com>
2499 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2501 * class.c (add_field): Handle ACC_SYNTHETIC.
2502 (add_method_1): Likewise. Handle bridge and varargs.
2503 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2505 (set_class_decl_access_flags): Handle synthetic and annotation.
2506 * java-tree.h (METHOD_BRIDGE): New macro.
2507 (METHOD_VARARGS): Likewise.
2508 (TYPE_SYNTHETIC): Likewise.
2509 (TYPE_ANNOTATION): Likewise.
2510 (lang_type): New fields 'synthetic' and 'annotation'.
2511 (lang_decl_func): New fields 'varargs' and 'bridge'.
2513 2006-12-04 Andrew Haley <aph@redhat.com>
2515 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2518 2006-11-29 Gary Benson <gbenson@redhat.com>
2520 * expr.c (rewrite_arglist_getcaller): Reorder.
2522 2006-11-29 Andrew Haley <aph@redhat.com>
2524 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2525 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2527 2006-11-23 Andrew Haley <aph@redhat.com>
2529 * expr.c (rewrite_arglist_getcaller): New.
2530 (rewrite_arglist_getclass): Fix indentation.
2531 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2532 gnu.classpath.VMStackWalker.getCallingClassLoader().
2533 * builtins.c (initialize_builtins): Remove duplicate def'n of
2535 Add __builtin_return_address.
2537 2006-11-22 Andrew Haley <aph@redhat.com>
2539 * jcf-reader.c (get_attribute): Mark attr_type unused.
2541 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2543 2007-01-08 Richard Guenther <rguenther@suse.de>
2545 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2546 * jcf-parse.c (get_constant): Likewise.
2548 2006-11-12 Jan Hubicka <jh@suse.cz>
2550 * resource.c (compile_resource_data): Update for new varpool names.
2551 * java/class.c (build_utf8_ref): Likewise.
2553 2006-11-12 David Daney <ddaney@avtrex.com>
2556 * typeck.c (build_java_array_type): Increase buffer sizes.
2558 2006-11-11 Richard Guenther <rguenther@suse.de>
2560 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2561 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2563 2006-11-06 Andrew Haley <aph@redhat.com>
2565 * java-tree.h (CONSTANT_LazyFlag): New.
2566 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2567 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2569 (handle_constant): Return 0 for dummy cpool entries.
2570 Handle constants of kind Class.
2571 Handle constants of kind NameAndType.
2572 (handle_enclosingmethod_attribute): New.
2573 (handle_signature_attribute): New.
2574 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2575 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2576 (handle_constant): Use unmangle_classname()rather than calling
2577 identifier_subst() directly.
2579 2006-11-02 Andrew Haley <aph@redhat.com>
2581 * java-tree.h (FIELD_ENUM): New.
2582 (lang_decl_var.field_enum): New.
2583 (lang_type.enum_class): New.
2585 * class.c (set_class_decl_access_flags): Handle enum types.
2586 (add_field): Handle enum fields.
2587 (get_access_flags_from_decl): Likewise.
2589 * class.c (make_class_data): Put reflection_data into rodata.
2591 2006-11-01 Andrew Haley <aph@redhat.com>
2593 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2594 (jcf_parse): Write end marker to annotation_data.
2595 (java_parse_file): Create field_offsets bitmap. Destroy it.
2596 (annotation_grow, annotation_rewrite_byte)
2597 (annotation_rewrite_short, annotation_rewrite_int)
2598 (annotation_read_short, annotation_write_byte)
2599 (annotation_write_short, annotation_write_int)
2600 (handle_long_constant, handle_constant, handle_element_value)
2601 (handle_annotation, handle_annotations)
2602 (handle_annotation_attribute, rewrite_reflection_indexes)
2603 (handle_member_annotations, handle_parameter_annotations)
2604 (handle_default_annotation): New functions.
2605 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2606 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2607 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2608 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2609 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2610 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2611 (TYPE_REFLECTION_DATA): New.
2612 (TYPE_REFLECTION_DATASIZE): New.
2613 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2615 * jcf-reader.c (get_attribute): Pass field/method index and
2616 attribute type to get_attribute().
2617 * constants.c (find_class_or_string_constant): Make nonstatic.
2618 (cpool_for_class): Likewise.
2619 (build_constants_constructor): Separate string and scalar types.
2620 * class.c (make_class_data): Generate field_indexes permutation.
2621 Pass it to rewrite_reflection_indexes().
2622 (make_class_data): Generate constructor for reflection_data field.
2624 2006-10-20 Tom Tromey <tromey@redhat.com>
2626 * gcj.texi (Top): Don't mention jv-scan.
2627 (Invoking gcj): Likewise.
2628 (Invoking gcjh): Likewise.
2629 (Invoking gjnih): Likewise.
2630 (Invoking gij): Likewise.
2631 (Invoking gcj-dbtool): Likewise.
2632 (Invoking jv-scan): Removed.
2633 * parse-scan.y: Removed.
2634 * jv-scan.c: Removed.
2635 * config-lang.in (stagestuff): Don't mention jv-scan.
2636 * Make-lang.in (java): Removed jv-scan.
2637 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2638 (JVSCAN_OBJS): Removed.
2639 (jv-scan$(exeext)): Likewise.
2640 (JAVA_MANFILES): Removed jv-scan.1.
2641 (java.uninstall): Don't mention jv-scan.
2642 (java.mostlyclean): Likewise.
2643 (java.maintainer-clean): Likewise.
2644 (.INTERMEDIATE): Likewise.
2645 (java/jv-scan.o): Removed.
2646 (jv-scan.pod): Likewise.
2647 (java.srcextra): Don't mention parse-scan.c.
2648 (java.mostlyclean): Likewise.
2649 (java/parse-scan.c): Removed.
2650 (java/parse-scan.o-warn): Removed.
2651 (java/parse-scan.o): Removed.
2653 2006-10-20 Tom Tromey <tromey@redhat.com>
2655 * lang.c (java_handle_option): Don't use
2656 jcf_write_base_directory.
2657 * jcf.h (jcf_write_base_directory): Removed.
2658 * parse.y (java_expand_classes): Don't call write_classfile.
2659 * config-lang.in (gtfiles): Removed jcf-write.c.
2660 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2661 (java/jcf-write.o): Removed.
2662 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2663 * java-tree.h (write_classfile): Removed declaration.
2664 * jcf-write.c: Removed.
2666 2006-10-20 Tom Tromey <tromey@redhat.com>
2668 * Make-lang.in (java): Removed gjnih, gcjh.
2669 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2670 (GCJH_OBJS): Removed.
2671 (GJNIH_OBJS): Likewise.
2672 (gjnih$(exeext)): Likewise.
2673 (gcjh$(exeext)): Likewise.
2674 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2675 (java.install-common): Don't special case gcjh.
2676 (java.uninstall): Don't mention gcjh, gjnih.
2677 (java.mostlyclean): Likewise.
2678 (java.maintainer-clean): Likewise.
2679 (.INTERMEDIATE): Likewise.
2680 (gcjh.pod): Removed.
2681 (gjnih.pod): Likewise.
2682 (GCJH_TARGET_INSTALL_NAME): Removed.
2683 (java/gjavah-jni.o): Removed.
2684 (java/gjavah.o): Likewise.
2685 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2686 * gjavah.c: Removed.
2688 2006-10-17 Tom Tromey <tromey@redhat.com>
2690 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2693 2006-10-17 Tom Tromey <tromey@redhat.com>
2695 * jvgenmain.c (main): Handle -findirect-dispatch.
2696 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2699 2006-10-06 Andrew Haley <aph@redhat.com>
2701 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2702 have a compare_and_swap builtin.
2703 (compareAndSwapLong_builtin): Likewise.
2704 (compareAndSwapObject_builtin): Likewise.
2706 2006-10-04 Andrew Haley <aph@redhat.com>
2708 * builtins.c (java_builtins): Add compareAndSwapInt,
2709 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2710 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2711 putObjectVolatile, getObjectVolatile, getIntVolatile,
2712 getLongVolatile, getLong.
2713 (UNMARSHAL3): New macro.
2714 (UNMARSHAL4): Likewise.
2715 (UNMARSHAL5): Likewise.
2716 (build_arglist_for_builtin): New function.
2717 (build_addr_sum, build_check_this): New functions.
2718 (putObject_builtin. compareAndSwapInt_builtin,
2719 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2720 putVolatile_builtin, getVolatile_builtin): New builtins.
2722 2006-06-08 Andrew Haley <aph@redhat.com>
2724 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2725 get_symbol_table_index().
2726 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2728 (build_known_method_ref): New arg: special. Pass it to
2729 get_symbol_table_index.
2730 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2732 (build_invokevirtual): New arg: special. Pass it to
2733 get_symbol_table_index.
2734 (expand_invoke): New variable: special.
2735 Pass it to maybe_rewrite_invocation().
2736 Pass it to build_known_method_ref().
2737 * class.c (build_symbol_entry): Add new arg: special. Use it to
2738 build the symbol table conbstructor.
2739 (emit_symbol_table): Extract SPECIAL from the method list and pass
2740 it to build_symbol_entry().
2741 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2742 special accordingly.
2744 2006-09-08 Andrew Haley <aph@redhat.com>
2746 * class.c (layout_class_method): Use build_java_signature, not
2747 build_java_argument_signature. Use lookup_java_method, not
2748 lookup_argument_method.
2750 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2751 Bryce McKinlay <bryce@mckinlay.net.nz>
2753 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2755 2006-07-18 Tom Tromey <tromey@redhat.com>
2757 * lang.opt: Added missing -W options.
2759 2006-07-12 Tom Tromey <tromey@redhat.com>
2762 * lang-specs.h: Pass '%U'-based options as separate arguments.
2763 Use -faux-classpath.
2764 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2765 * lang.opt (faux-classpath): New option.
2767 2006-07-07 Tom Tromey <tromey@redhat.com>
2769 * class.c (make_class_data): Set value for reflection_data field.
2770 * decl.c (java_init_decl_processing): Add reflection_data field.
2772 2006-07-07 Tom Tromey <tromey@redhat.com>
2774 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2776 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2778 2006-07-07 Andrew Haley <aph@redhat.com>
2780 * jcf-parse.c (set_source_filename): Don't check for
2781 CLASS_FROM_CURRENTLY_COMPILED_P.
2784 2006-07-07 Andrew Haley <aph@redhat.com>
2786 * java-tree.h (java_read_sourcefilenames): Declare.
2787 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2788 * lang.opt (fsource-filename): New opt.
2789 * lang-specs.h: Add -fsource-filename.
2790 * jcf-parse.c (num_files, filenames): New variables.
2791 (reverse, cmpstringp, java_read_sourcefilenames,
2792 find_sourcefile): New.
2793 (set_source_filename): Call find_sourcefile to find the real name
2796 2006-06-27 Tom Tromey <tromey@redhat.com>
2798 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2799 Signature, LocalVariableTypeTable, annotation attributes.
2800 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2801 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2802 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2803 (HANDLE_METHOD): Likewise.
2804 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2805 (print_annotation): New function.
2806 (print_element_value): Likewise.
2808 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2809 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2810 (print_parameter_annotations): New function.
2811 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2812 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2814 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2815 (print_annotations): New function.
2817 2006-06-23 Tom Tromey <tromey@redhat.com>
2819 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2820 emitting class files, always use 1.5.
2821 * gcj.texi (Input Options): Document -fsource.
2822 (Code Generation): Document -ftarget.
2824 2006-06-21 Tom Tromey <tromey@redhat.com>
2827 * expr.c (expand_java_field_op): Initialize field's declaring
2830 2006-06-20 Tom Tromey <tromey@redhat.com>
2832 * expr.c (push_value): Always flush quick stack.
2834 2006-06-19 Tom Tromey <tromey@redhat.com>
2836 * expr.c (push_value): Also flush quick stack if value is a
2839 2006-06-19 Tom Tromey <tromey@redhat.com>
2841 * expr.c (push_value): Flush quick stack if value has side
2844 2006-06-13 Tom Tromey <tromey@redhat.com>
2846 * class.c (is_compiled_class): Explicitly check for current
2849 2006-06-09 Tom Tromey <tromey@redhat.com>
2851 * gjavah.c (decompile_method): Don't decompile a static field
2854 2006-06-06 Tom Tromey <tromey@redhat.com>
2856 * lang-specs.h <jc1>: Add .jar file to command line if
2857 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2859 2006-06-05 Tom Tromey <tromey@redhat.com>
2861 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2862 synthetic, enum, annotation.
2863 * jcf.h (ACC_BRIDGE): New macro.
2864 (ACC_VARARGS): Likewise.
2865 (ACC_SYNTHETIC): Likewise.
2866 (ACC_ENUM): Likewise.
2867 (ACC_ANNOTATION): Likewise.
2869 2006-06-04 Tom Tromey <tromey@redhat.com>
2871 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2872 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2874 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2875 when needed. Handle classpath-setting.
2876 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2877 * lang-specs.h: Rewrote.
2879 2006-06-04 Tom Tromey <tromey@redhat.com>
2881 * jcf-io.c (find_class): Set source_ok to 0.
2882 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2883 (parse_class_file): Don't call java_mark_class_local.
2884 (java_parse_file): Skip .java files. Call java_mark_class_local
2885 before lowering any code.
2886 (parse_zip_file_entries): Don't call duplicate_class_warning
2888 (process_zip_dir): ... call it here.
2889 * class.c (add_field): Don't mark field external if it is being
2890 compiled into this object.
2891 (make_class_data): Handle situation where class_dtable_decl is
2892 created before Class is compiled.
2893 (is_compiled_class): Don't assume files in zip are compiled into
2895 (layout_class_method): Don't mark method external if it is being
2896 compiled into this object.
2898 2006-06-04 Tom Tromey <tromey@redhat.com>
2900 * jcf-path.c (jcf_path_compute): New function.
2901 * jcf.h (jcf_path_compute): Declare.
2903 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2905 * decl.c: Include langhooks.h.
2906 (builtin_function): Remove.
2907 (java_init_decl_processing): Replace calls to builtin_function
2908 with add_builtin_function.
2909 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2910 (java/decl.o): Depend on langhooks.h.
2911 * java-tree.h (builtin_function): Remove.
2913 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2915 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2917 2006-09-12 Tom Tromey <tromey@redhat.com>
2919 * expr.c (push_value): Always flush quick stack.
2921 2006-09-12 Tom Tromey <tromey@redhat.com>
2924 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2925 the push of the called method's return result.
2927 2006-09-12 Tom Tromey <tromey@redhat.com>
2929 * jvspec.c (lang_specific_driver): Read spec file even if
2932 2006-09-12 Tom Tromey <tromey@redhat.com>
2935 * expr.c (expand_java_field_op): Initialize field's declaring
2936 interface if necessary.
2938 2006-09-12 Tom Tromey <tromey@redhat.com>
2941 * expr.c (expand_java_field_op): No error for assignments not in
2942 class initializer or constructor.
2944 2006-08-22 Andrew Haley <aph@redhat.com>
2946 * decl.c (java_add_stmt): Give the statement list a type.
2948 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2949 Bryce McKinlay <bryce@mckinlay.net.nz>
2951 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2953 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
2956 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2957 or '--' is used with a constant operand.
2958 (java_complete_lhs): When processing a '++' or '--' expression,
2959 don't call java_complete_tree but java_complete_lhs, so that a
2960 static final variable operand is never replaced by its value. This
2961 avoids an ICE later on.
2962 (patch_unaryop): Fixed typo in comment.
2964 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2966 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2968 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2970 * builtins.c (check_for_builtin): If a builtin could result in a
2971 direct call being generated, don't use it if flag_indirect_dispatch
2974 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2976 * gcj.texi (Invocation): Corrections for Invocation API example.
2978 2006-07-04 Andrew Haley <aph@redhat.com>
2980 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2983 2006-06-21 Andrew Haley <aph@redhat.com>
2985 * java-tree.h (update_aliases): Remove
2986 * expr.c (expand_iinc): Remove call to update_aliases().
2987 (STORE_INTERNAL): Likewise.
2988 * decl.c (update_aliases, initialize_local_variable)
2989 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2991 2006-06-19 Andrew Haley <aph@redhat.com>
2995 * expr.c (java_modify_addr_for_volatile): New function.
2996 (expand_java_field_op): Handle volatile fields.
2997 * java-gimplify.c (java_gimplify_component_ref): Call
2998 java_modify_addr_for_volatile to give the field_ref the correct
3000 (java_gimplify_modify_expr): Likewise.
3001 * java-tree.h (java_modify_addr_for_volatile): New decl.
3003 2006-06-17 Karl Berry <karl@gnu.org>
3005 * gcj.texi (@dircategory): Use "Software development" instead
3006 of "Programming", following the Free Software Directory.
3008 2006-06-16 Andrew Haley <aph@redhat.com>
3010 * class.c (make_class_data): When using flag_indirect_classes,
3011 don't initialize the vtable of Class instances.
3013 2006-06-09 Andrew Haley <aph@redhat.com>
3017 * builtins.c (initialize_builtins): Add __sync_synchronize().
3018 * class.c (add_field): Mark volatile fields.
3019 * java-gimplify.c (java_gimplify_expr): Call new functions to
3020 handle self-modifying exprs and COMPONENT_REFs.
3021 (java_gimplify_component_ref): New.
3022 (java_gimplify_modify_expr): Add handling for volatiles.
3024 2006-06-08 Tom Tromey <tromey@redhat.com>
3026 * gcj.texi (libgcj Runtime Properties): Document
3027 gnu.gcj.user.realname.
3029 2006-06-08 Andrew Haley <aph@redhat.com>
3031 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
3032 get_symbol_table_index().
3033 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
3035 (build_known_method_ref): New arg: special. Pass it to
3036 get_symbol_table_index.
3037 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
3039 (build_invokevirtual): New arg: special. Pass it to
3040 get_symbol_table_index.
3041 (expand_invoke): New variable: special.
3042 Pass it to maybe_rewrite_invocation().
3043 Pass it to build_known_method_ref().
3044 * class.c (build_symbol_entry): Add new arg: special. Use it to
3045 build the symbol table conbstructor.
3046 (emit_symbol_table): Extract SPECIAL from the method list and pass
3047 it to build_symbol_entry().
3048 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
3049 special accordingly.
3051 2006-06-06 David Daney <ddaney@avtrex.com>
3053 * gcj.texi (libgcj Runtime Properties): Document
3054 gnu.gcj.runtime.NameFinder.show_raw and
3055 gnu.gcj.runtime.NameFinder.remove_unknown.
3057 2006-06-06 Tom Tromey <tromey@redhat.com>
3059 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3060 synthetic, enum, annotation.
3061 * jcf.h (ACC_BRIDGE): New macro.
3062 (ACC_VARARGS): Likewise.
3063 (ACC_SYNTHETIC): Likewise.
3064 (ACC_ENUM): Likewise.
3065 (ACC_ANNOTATION): Likewise.
3067 2006-06-06 Mike Stump <mrs@apple.com>
3069 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
3070 installing during build.
3072 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
3074 * gcj.texi (Extensions): Document the new gcj-dbtool-based
3075 classname-to-library resolution mechanism.
3076 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
3077 mechanism deprecated.
3078 (libgcj Runtime Properties): Document
3079 gnu.gcj.runtime.VMClassLoader.library_control's new default.
3081 2006-05-29 Jakub Jelinek <jakub@redhat.com>
3083 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
3085 (jword): Define to uint64 on 64-bit arches.
3086 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
3088 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
3090 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
3093 2006-05-26 Tom Tromey <tromey@redhat.com>
3095 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
3096 * verify-glue.c (vfy_class_type): New function.
3097 * verify-impl.c (check_constant): Allow 'ldc class'.
3098 * verify.h (vfy_class_type): Declare.
3100 2006-05-25 Andrew Haley <aph@redhat.com>
3103 * decl.c (maybe_pushlevels): When variable ranges are non-nested
3104 update all lifetimes, not just the first one.
3106 2006-05-24 Tom Tromey <tromey@redhat.com>
3108 * java-tree.h: Fixed flag documentation.
3110 2006-05-24 Tom Tromey <tromey@redhat.com>
3113 * jcf.h (ACC_INVISIBLE): Changed value.
3115 2006-05-24 Andrew Haley <aph@redhat.com>
3118 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3121 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3123 * lang.opt (femit-class-file): Remove VarExists.
3125 2006-05-16 Tom Tromey <tromey@redhat.com>
3127 * verify-impl.c (verify_instructions_0) <op_return>: Special case
3130 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3133 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3136 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3138 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3139 (java/expr.o): Replace target.h with $(TARGET_H).
3140 (java/parse.o): Likewise.
3142 2006-05-10 Andrew Haley <aph@redhat.com>
3144 * class.c (emit_indirect_register_classes): Fix comment.
3146 2006-05-04 Tom Tromey <tromey@redhat.com>
3148 * java-tree.h (uses_jv_markobj_p): Declare.
3149 * class.c (uses_jv_markobj_p): Removed.
3150 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3151 (get_boehm_type_descriptor): Use it.
3152 (uses_jv_markobj_p): Moved from class.c. Return bool.
3154 2006-05-04 Tom Tromey <tromey@redhat.com>
3156 * java-tree.def (THIS_EXPR): Now a tcc_expression.
3158 2006-05-04 Andrew Haley <aph@redhat.com>
3160 * class.c (make_field_value): Always build_address_of fdecl if
3161 there is an initializer.
3163 2006-05-03 Andrew Haley <aph@redhat.com>
3166 * expr.c (maybe_rewrite_invocation): New function.
3167 (rewrite_arglist_getclass): Likewise.
3169 (expand_invoke): Call maybe_rewrite_invocation.
3170 * parse.y (patch_invoke): Likewise.
3171 * java-tree.h: (maybe_rewrite_invocation): New function.
3173 2006-04-21 Andrew Haley <aph@redhat.com>
3175 * lang.c (java_init): Handle flag_indirect_classes.
3176 * jvgenmain.c: Use "class$$" instead of "class$".
3177 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3179 (mangle_class_field): Special case "class$$" as well as "class$".
3180 * constants.c (build_ref_from_constant_pool): If
3181 flag_indirect_classes, generate a ref into the heap.
3182 * decl.c (constants_field_decl_node,
3183 constants_data_field_decl_node): New.
3184 * class.c (build_static_class_ref): New.
3185 (build_classdollar_field): Factor out from build_class_ref().
3186 (make_field_value): Handle static fields in heap.
3187 (make_class_data): Make sure we get a static ref to class.
3188 Make class initializer const if flag_indirect_classes.
3189 (register_class): Build a class_ref for initialization if
3190 flag_indirect_classes.
3191 (emit_indirect_register_classes): New.
3193 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3195 * expr.c, gjavah.c: Fix comment typos.
3197 2006-04-03 Andrew Haley <aph@redhat.com>
3200 * expr.c (build_field_ref): Don't check the field offset if
3203 2006-03-30 Andrew Haley <aph@redhat.com>
3206 * lang.c (java_attribute_table): New.
3207 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3208 * expr.c (build_field_ref): Add a null pointer check for all
3209 fields of offset > 4k. Don't do so for accesses via the this
3210 pointer, which we know can never be null.
3211 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3214 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
3216 * Make-lang.in: Rename docdir to gcc_docdir.
3218 2006-03-30 Tom Tromey <tromey@redhat.com>
3221 * parse.y (java_reorder_fields): Reset superclass field's size as
3224 2006-03-28 Tom Tromey <tromey@redhat.com>
3227 * parse.y (find_most_specific_methods_list): Added 'class'
3229 (lookup_method_invoke): Updated.
3231 2006-03-15 Tom Tromey <tromey@redhat.com>
3233 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3234 non-static method calls.
3236 2006-03-15 David Daney <ddaney@avtrex.com>
3238 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3241 2006-03-15 David Daney <ddaney@avtrex.com>
3243 * lang.opt (-freduced-reflection): New option.
3244 * lang.c (java_post_options): Generate an error if
3245 -freduced-reflection used with -fjni or -findirect-dispatch.
3246 * java-tree.h (flag_reduced_reflection): Declare new variable.
3247 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3248 if bitmap overflows and flag_reduced_reflection set.
3249 * class.c (uses_jv_markobj_p): New function.
3250 (make_class_data): Moved generation of vtable to before
3251 reflection data, generate less reflection data if
3252 flag_reduced_reflection set.
3253 * gcj.texi: Document -freduced-reflection.
3255 2006-03-15 Tom Tromey <tromey@redhat.com>
3258 * class.c (get_interface_method_index): Don't put <clinit> into
3261 2006-03-15 Tom Tromey <tromey@redhat.com>
3263 * parse.y (analyze_clinit_body): Ignore empty statements.
3265 2006-03-08 David Daney <ddaney@avtrex.com>
3267 * gcj.texi: Document -static-libgcj option.
3269 2006-02-20 Andrew Haley <aph@redhat.com>
3271 * jcf-parse.c (parse_class_file): Set input_location from
3274 2006-02-15 Andrew Haley <aph@redhat.com>
3276 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3277 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3278 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3280 2006-02-09 Andrew Haley <aph@redhat.com>
3283 * expr.c (expand_invoke): Allow methods in arrays to be resolved
3284 in their superclass.
3286 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3289 2006-02-08 Tom Tromey <tromey@redhat.com>
3292 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3293 * builtins.c (convert_real): New function.
3294 (java_builtins): Handle Float.intBitsToFloat,
3295 Float.floatToRawIntBits, Double.longBitsToDouble,
3296 Double.doubleToRawLongBits.
3298 2006-02-07 Andrew Haley <aph@redhat.com>
3300 * expr.c (expand_invoke): (BC mode.) If we find a method in a
3301 class other than the one in which we expected to find it, ignore
3305 * constants.c (build_constants_constructor): move initializer into
3306 first halfword on a 64-bit big-endian machine.
3308 2006-02-04 Tom Tromey <tromey@redhat.com>
3311 * builtins.c (max_builtin): Skip floating point 'max'.
3312 (min_builtin): Skip floating point 'min'.
3313 (check_for_builtin): Never return NULL_TREE.
3315 2006-02-04 Tom Tromey <tromey@redhat.com>
3318 * expr.c (push_type): Avoid side effect in gcc_assert.
3320 2006-02-04 Roger Sayle <roger@eyesopen.com>
3322 * decl.c (java_init_decl_processing): Create char_type_node as a
3323 regular INTEGER_TYPE node.
3324 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3325 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3326 test for char_type_node and promoted_char_type_node as special
3327 instances of INTEGER_TYPE tree codes.
3328 (promote_type,build_java_signature): Likewise.
3329 * jcf-write.c (adjust_typed_op): Likewise.
3330 * mangle.c (mangle_type): Likewise.
3331 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3332 * parse.h (JINTEGRAL_TYPE_P): Likewise.
3334 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
3336 * expr.c (java_stack_swap): Revert gcc_assert patch.
3338 2006-02-03 Ben Elliston <bje@au.ibm.com>
3340 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3341 * typeck.c: Likewise.
3342 * verify-impl.c: Likewise.
3343 * class.c: Likewise.
3345 * jcf-parse.c: Likewise.
3346 * constants.c: Likewise.
3347 * check-init.c: Likewise.
3348 * jcf-write.c: Likewise.
3349 * verify-glue.c: Likewise.
3350 * mangle.c: Likewise.
3353 * boehm.c: Likewise.
3355 2006-02-01 Jan Hubicka <jh@suse.cz>
3357 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3358 * lang.c (java_init_options): Set no_unit_at_a_time_default.
3360 2006-01-30 Andrew Haley <aph@redhat.com>
3363 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3365 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
3367 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3368 Update copyright notice dates.
3370 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3372 * jvspec.c (lang_specific_spec_functions): Remove.
3374 2006-01-06 Tom Tromey <tromey@redhat.com>
3376 * gcj.texi (Arrays): Added more documentation for
3378 (Primitive types): Correct information about primitive classes.
3379 (Reference types): New node.
3382 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
3384 * jcf-parse.c (set_source_filename): Set the decl source location
3385 even when returning early.
3387 2005-12-15 Tom Tromey <tromey@redhat.com>
3388 Andrew Haley <aph@redhat.com>
3391 * parse.y (resolve_expression_name): Don't generate accessor
3392 methods for constant fields.
3394 2005-12-13 Andrew Haley <aph@redhat.com>
3398 * class.c (maybe_layout_super_class): Update current_class before
3399 calling do_resolve_class.
3401 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
3404 * jcf-write.c (write_classfile): Use PID in temporary class
3405 file. Save/restore errno when reporting error.
3407 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3410 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3411 to bare_function_type and including the return type
3412 * builtins.c (initialize_builtins) : Change builtin mangled name
3413 constants to conform to new mangling scheme
3415 2005-12-08 Andrew Haley <aph@redhat.com>
3418 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3419 (soft_abstractmethod_node): New.
3420 * expr.c (build_field_ref): Add in-line check for missing field.
3421 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3423 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3425 * Make-lang.in (java.all.build, java.install-normal): Remove.
3427 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3429 * Make-lang.in: Remove all dependencies on s-gtype, except for
3432 2005-12-07 Richard Sandiford <richard@codesourcery.com>
3434 * class.c (build_utf8_ref, emit_register_classes): Use
3435 switch_to_section and get_section.
3437 2005-12-06 Tom Tromey <tromey@redhat.com>
3440 * parse.y (patch_new_array_init): Revert previous patch.
3441 (lookup_method_invoke): Use size-less array type when creating an
3442 anonymous constructor.
3444 2005-12-05 Tom Tromey <tromey@redhat.com>
3446 * parse.y (patch_new_array_init): Don't set length on array.
3448 2005-12-02 Richard Guenther <rguenther@suse.de>
3450 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3451 buildN instead of build.
3452 * class.c (finish_class): Likewise.
3453 * expr.c (java_create_object): Likewise.
3455 2005-11-28 Tom Tromey <tromey@redhat.com>
3458 * expr.c (build_jni_stub): Unwrap the return value.
3459 * java-tree.h (soft_unwrapjni_node): New define.
3460 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3461 * decl.c (java_init_decl_processing): Initialize
3462 soft_unwrapjni_node.
3464 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
3466 * gcj.texi (gij options): Add -Xss documentation.
3468 2005-11-08 Wil Mahan <wmahan@gmail.com>
3471 * zextract.c (read_zip_archive): Fix out of memory error when
3472 reading jar files with zip-style comments.
3474 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
3476 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3478 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3480 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3481 Wil Mahan <wmahan@gmail.com>
3484 * class.c (make_class): Create empty binfo here.
3485 (set_super_info): Only create binfo if we have superclasses.
3487 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
3490 * parse.y (method_header): Make the result of the rule a NULL_TREE
3491 when a parsing error occurs.
3493 2005-09-29 Tom Tromey <tromey@redhat.com>
3496 * jcf-io.c (memoized_dirlist_hash): New function.
3497 (caching_stat): Use it.
3499 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
3502 * class.c (inherits_from_p): Try to lay out super class
3503 if it is not already laid out.
3504 (maybe_layout_super_class): Handle the case where SUPER_CLASS
3507 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
3509 * builtins.c (max_builtin, min_builtin, abs_builtin,
3510 java_build_function_call_expr): Use fold_buildN.
3511 * class.c (layout_class_method): Likewise.
3512 * expr.c (java_truthvalue_conversion, build_java_jsr,
3513 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3514 build_java_binop, build_field_ref, expand_compare,
3515 build_known_method_ref, build_invokevirtual,
3516 process_jvm_instruction): Likewise.
3517 * parse.y (patch_binop, patch_exit_expr): Likewise.
3518 * typeck.c (convert_ieee_real_to_integer): Likewise.
3519 (convert): Don't call fold after convert_ieee_real_to_integer.
3521 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3524 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3525 the newly created type. Set import lists here, not in create_class.
3526 (jdep_resolve_class): Set current_class.
3527 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3528 the current package context, not ctxp->package.
3529 (cicp_cache): Removed.
3530 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3531 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3532 * java-tree.h (TYPE_PACKAGE): New macro.
3533 (struct lang_type): New member 'package'.
3535 2005-09-09 Andrew Haley <aph@redhat.com>
3538 * expr.c (pop_type_0): If the expected type is object or ptr
3539 (i.e. void*), return the type of the object we just popped from
3542 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3544 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3545 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3547 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3549 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3550 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3551 typos. Follow spelling conventions.
3553 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3556 * typeck.c (lookup_do): Look up interfaces for the original class,
3558 * parse.y (java_check_regular_methods): Fix diagnostic message for
3559 more restrictive overriding of a method from an interface.
3561 2005-08-16 Tom Tromey <tromey@redhat.com>
3563 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3564 class' initial state.
3566 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3569 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3570 `literal_token' for large numeric input tokens.
3572 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3575 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3576 and expand to handle method accesses across nested classes.
3577 (build_outer_method_access_method): Rename to
3578 build_nested_method_access_method. Minor adjustments to comments.
3579 (resolve_expression_name): Use the newly-renamed
3580 nested_member_access_p method.
3581 (resolve_qualified_expression_name): Likewise.
3582 (patch_method_invocation): Also consider static methods for access
3583 method generation. Minor adjustments to comments.
3584 (maybe_use_access_method): Use the more general
3585 nested_memeber_access_p to determine access across nested class
3586 boundaries. Allow THIS_ARG to be NULL (for static methods).
3588 2005-08-15 Tom Tromey <tromey@redhat.com>
3591 * expr.c (build_field_ref): Don't generate otable reference when
3592 DECL_FIELD_OFFSET is 0.
3593 * class.c (maybe_layout_super_class): Pass outer class to
3596 2005-08-15 Tom Tromey <tromey@redhat.com>
3598 * java-tree.h (LABEL_IN_SUBR): Removed.
3599 (LABEL_IN_SUBR): Likewise.
3600 (LABEL_IS_SUBR_START): Likewise.
3601 (LABEL_SUBR_START): Likewise.
3602 (LABEL_SUBR_CONTEXT): Likewise.
3603 (LABEL_CHANGED): Likewise.
3604 (LABEL_RETURN_LABEL): Likewise.
3605 (LABEL_RETURN_TYPE_STATE): Likewise.
3606 (LABEL_RETURN_LABELS): Likewise.
3607 (RETURN_MAP_ADJUSTED): Likewise.
3608 (LABEL_PENDING_CHAIN): Likewise.
3610 2005-08-15 Tom Tromey <tromey@redhat.com>
3612 * Make-lang.in (JAVA_OBJS): Removed verify.o
3613 (java/verify.o): Removed.
3614 * verify.c: Removed.
3615 * lang.c (flag_new_verifier): Removed.
3616 (java_post_options): Updated.
3617 * java-tree.h (flag_new_verifier): Removed.
3618 (verify_jvm_instructions): Removed.
3619 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3620 (build_java_check_indexed_type): Likewise.
3621 (expand_java_arraystore): Likewise.
3622 (expand_java_arrayload): Likewise.
3623 (pop_arguments): Likewise.
3624 (expand_byte_code): Likewise.
3625 (process_jvm_instruction): Likewise.
3627 2005-08-10 Andrew Haley <aph@redhat.com>
3629 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3630 type mismatches to make legal GIMPLE.
3632 2005-08-10 Robin Green <greenrd@greenrd.org>
3635 * parse.y (maybe_use_access_method): Generalize check from
3636 java.lang.Object to any superclass of current_class
3638 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3640 * class.c (build_class_ref): Wrap the primary class type in a
3642 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3643 primary class type from the NOP_EXPR in which it was placed.
3645 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3647 * expr.c (expand_load_internal): Fix missing parens in
3650 2005-07-28 Andrew Haley <aph@redhat.com>
3652 * expr.c (expand_load_internal): Convert to destination type.
3654 2005-07-22 Manfred Hollstein <mh@suse.com>
3656 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3657 (check_constant): Likewise.
3658 (check_wide_constant): Likewise.
3660 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3662 Make CONSTRUCTOR use VEC to store initializers.
3663 * check-init.c (check_init): Update to cope with VEC in
3665 * class.c (make_field_value, make_method_value, get_dispatch_table,
3666 make_class_data, emit_symbol_table, emit_catch_table,
3667 emit_assertion_table): Use build_constructor_from_list instead of
3669 * constants.c (build_constants_constructor): Likewise.
3670 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3671 VEC in CONSTRUCTOR_ELTS.
3672 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3673 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3675 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3677 * parse.y (build_new_array_init): Use build_constructor_from_list
3678 instead of build_constructor.
3679 (patch_new_array_init): Update to cope with VEC in
3681 (array_constructor_check_entry): Likewise.
3683 2005-07-12 Tom Tromey <tromey@redhat.com>
3685 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3688 2005-07-12 Tom Tromey <tromey@redhat.com>
3691 * parse-scan.y (interface_member_declaration): Added
3694 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3696 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3697 (LABEL_PENDING_CHAIN): Ditto.
3699 (DECL_BIT_INDEX): Ditto.
3701 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3704 * parse.y (inner_class_accessible): New function. Logic moved from
3705 check_inner_class_access.
3706 (check_inner_class_access): Use inner_class_accessible.
3707 (resolve_inner_class): Simplify arguments. Create circularity hash
3708 here. Keep looking for classes if we found one that was inaccessible.
3709 Return the inaccessible class only if there is no other match.
3710 (do_resolve_class): Update for new resolve_inner_class arguments.
3711 Don't create circularity_hash here.
3713 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3716 * parse.y (add_exception_to_throws): New function.
3717 (purge_unchecked_exceptions): Removed.
3718 (get_constructor_super): Renamed from verify_constructor_super. Now
3719 returns the super constructor after verification.
3720 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3721 or save/restore the exception list.
3722 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3723 class initializers and constructors to the throws clause of the method.
3725 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3728 * parse.y (interface_member_declaration): Allow empty statements in
3729 interface declarations.
3731 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
3733 * Makefile.in (parse.o): Adjust dependencies.
3734 * parse.y: Include tree-dump.h.
3736 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3738 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3741 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3743 * parse.y (issue_warning_error_from_context): Call
3744 pp_output_formatted_text to be able to get the buffer.
3746 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3748 * parse.y (issue_warning_error_from_context): Update for the
3749 renaming of pp_format_text to pp_format.
3751 2005-06-28 Paul Brook <paul@codesourcery.com>
3753 * decl.c (java_init_decl_processing): Call
3754 default_init_unwind_resume_libfunc.
3756 2005-06-27 Tom Tromey <tromey@redhat.com>
3758 PR java/21540, PR java/13788:
3759 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3760 fold_constant_for_init.
3761 (patch_binop): Added 'folding' argument. Updated all callers.
3762 (patch_unaryop) <NOP_EXPR>: New case.
3763 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3764 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3766 2005-06-25 Jan Hubicka <jh@suse.cz>
3768 * builtins.c (define_builtin): Accept new flags parameter.
3769 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3771 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3773 * all files: Update FSF address in copyright headers.
3775 2005-06-24 Tom Tromey <tromey@redhat.com>
3777 * verify-impl.c (verify_instructions_0): Correctly handle
3778 situation where PC falls off end.
3780 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3783 * parse.y (find_most_specific_methods_list): Remove special case for
3786 2005-06-15 Tom Tromey <tromey@redhat.com>
3789 * class.c (make_method_value): Use soft_abstractmethod_node for
3791 * java-tree.h (soft_abstractmethod_node): New define.
3792 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3793 * decl.c (java_init_decl_processing): Initialize
3794 soft_abstractmethod_node.
3796 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3798 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3800 2005-06-13 Per Bothner <per@bothner.com>
3802 * expr.c (int highest_label_pc_this_method,
3803 start_label_pc_this_method): New globals.
3804 (lookup_label): Add start_label_pc_this_method to pc for label, and
3805 update highest_label_pc_this_method. This prevents conflicts between
3806 labels from different methods.
3807 * java-tree.h: Declare new globals.
3808 * jcf-parse.c (parse_class_file): If needed bump
3809 start_label_pc_this_method and reset highest_label_pc_this_method.
3811 2005-06-13 Tom Tromey <tromey@redhat.com>
3814 * parse.y (nested_field_access_p): Handle case where outer field
3815 is inherited by enclosing class.
3817 2005-06-12 Per Bothner <per@bothner.com>
3819 * class.c (inherits_from_p): Do load_class if needed.
3821 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3823 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3824 * java-tree.h (parse_error_context): Move...
3825 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3826 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3827 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3829 2005-06-08 Roger Sayle <roger@eyesopen.com>
3831 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3833 2005-06-06 Jakub Jelinek <jakub@redhat.com>
3835 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3836 msgid for argument name.
3837 * gjavah.c (error): Likewise.
3838 * java-tree.h (parse_error_context): Likewise.
3839 * parse.y (parse_error_context, parse_warning_context,
3840 issue_warning_error_from_context): Likewise.
3842 2005-06-01 Tom Tromey <tromey@redhat.com>
3845 * class.c (build_static_field_ref): Don't fold constant fields if
3846 current class is from a .class file and we're using indirect
3849 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3851 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3852 * java/Make-lang.in: Updates dependencies.
3854 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3857 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3858 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3859 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3860 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3861 * jcf-write.c (generate_classfile): Use
3862 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3863 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3864 * parse.y (build_outer_field_access): Rename to
3865 build_nested_field_access. Support static fields and outer-to-inner
3867 (outer_field_access_p): Rename to nested_field_access_p. Support
3868 static fields and generalise to outer-to-inner class and sibling
3869 inner class accesses.
3870 (outer_field_expanded_access_p): Rename to
3871 nested_field_expanded_access_p and support static fields.
3872 (outer_field_access_fix): Rename to nested_field_access_fix and
3873 support static fields.
3874 (build_outer_field_access_expr): Rename to
3875 build_nested_field_access_expr and support static fields.
3876 (build_outer_field_access_methods): Rename to
3877 build_nested_field_access_methods and support static fields. For
3878 static fields, generate accessors without class instance parameters.
3879 (build_outer_field_access_method): Rename to
3880 build_nested_field_access_method and support static fields.
3881 (build_outer_method_access_method): Use
3882 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3883 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3884 (resolve_expression_name): Consider static field accesses across
3886 (resolve_qualified_expression_name): Likewise.
3887 (java_complete_lhs): Use nested_field_access_fix instead of
3888 outer_field_access_fix.
3889 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3890 Use nested_field_expanded_access_p instead of
3891 outer_field_expanded_access_p. Use nested_field_access_fix instead
3892 of outer_field_access_fix.
3893 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3894 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3896 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3898 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3899 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3900 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3901 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3902 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3903 (parse_version): Calculate version ID using new method. Use bit-flags
3904 for flag_indirect_dispatch and flag_bootstrap_classes.
3906 2005-05-25 Richard Henderson <rth@redhat.com>
3909 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3910 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3911 DECL_CONTEXT; avoid pushdecl_top_level.
3912 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3913 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3914 (layout_class_method): Likewise.
3915 * decl.c (java_mark_cni_decl_local): New.
3916 (java_mark_class_local): Use it.
3917 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3918 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3919 (struct lang_decl_func): Add local_cni;
3920 (struct lang_decl_var): Add class_field, vtable.
3921 (java_mangle_decl): Declare.
3922 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3923 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3924 (mangle_obstack_1): New.
3925 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
3926 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
3927 lhd_set_decl_assembler_name for things that don't need mangling.
3928 (mangle_class_field): Rename from java_mangle_class_field, make
3929 static, don't call init_mangling or finish_mangling.
3930 (mangle_vtable): Similarly.
3931 (mangle_local_cni_method_decl): New.
3932 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
3933 gcc_assert, and MANGLE_RAW_STRING.
3934 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3936 2005-05-25 DJ Delorie <dj@redhat.com>
3938 * class.c (set_constant_value): Move warning control from if() to
3941 2005-05-24 Richard Henderson <rth@redhat.com>
3943 * builtins.c (define_builtin): Don't call make_decl_rtl.
3944 * constants.c (build_constant_data_ref): Likewise.
3945 * class.c (build_utf8_ref): Likewise.
3946 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3947 (get_dispatch_table, layout_class_method): Likewise.
3948 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3950 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3951 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3952 to determine if we need a non-zero address.
3953 * decl.c (builtin_function): Don't call make_decl_rtl.
3954 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3955 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3956 * resource.c (compile_resource_data): Likewise.
3957 * parse.y (resolve_field_access): Re-word comment to avoid
3960 2005-05-24 Richard Henderson <rth@redhat.com>
3962 * class.c (registered_class): Take it out of class_roots; turn into
3964 (register_class): Make static. Don't duplicate decl node. Use
3966 (emit_register_classes): Use VEC_iterate. Use output_constant
3967 instead of assemble_integer. Don't call mark_decl_referenced
3969 * java-tree.h (register_class): Remove decl.
3971 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
3975 * parse.y (register_package, package_list): Remove.
3976 (package_declaration): Do not call register_package.
3977 (do_resolve_class): Do not use package_list.
3979 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
3981 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3984 2005-05-15 Tom Tromey <tromey@redhat.com>
3987 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3990 2005-05-12 Aaron Luchko <aluchko@redhat.com>
3992 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3994 2005-05-11 Tom Tromey <tromey@redhat.com>
3996 * gcj.texi (Code Generation): Document -fbootstrap-classes.
3997 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3998 (parse_version): Use it.
3999 * lang.opt (-fbootstrap-classes): New option.
4001 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
4004 * class.c (maybe_layout_super_class): Look for imports in this_class.
4005 * parse.h (ctxp_for_generation_last): New.
4006 (do_resolve_class): Add a parameter.
4007 * parse.y (ctxp_for_generation_last): New.
4008 (java_pop_parser_context): Add at end of list.
4009 (find_in_imports, find_in_imports_on_demand): Look in ctxp
4010 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
4011 the given type are NULL.
4012 (do_resolve_class): Look into the imports of the new second parameter.
4013 Adjust recursive calls.
4014 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
4015 calls to do_resolve_class.
4016 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
4017 (java_complete_class): Do not do that here.
4019 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
4022 * Make-lang.in (java): Add gjnih.
4023 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
4024 (GJNIH_OBJS): New variable.
4025 (gjnih$(exeext)): New target.
4026 (JAVA_MANFILES): Add gjnih.1.
4027 (java.uninstall): Add gjnih.1.
4028 (java.mostlyclean): Add gjnih.
4029 (java.maintainer-clean): Add gjnih.1.
4030 (java/gjavah-jni.o): New target.
4031 (.INTERMEDIATE): Add gjnih.pod.
4032 (gjnih.pod): New target.
4033 * config-lang.in (stagestuff): Add gjnih.
4034 * gcj.texi (Top): Add gjnih node.
4035 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
4036 -bootclasspath options.
4037 (Invoking gjnih): New node.
4038 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
4039 (TOOLNAME): New macro.
4040 (error): Replace hard-coded gcjh with TOOLNAME.
4041 (process_file): Likewise.
4043 (version): Likewise.
4044 (help): Likewise. Add help output for -force, -old, -trace and -J
4046 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
4047 (options): Add force, old, trace and J fields.
4048 (main): Handle -force, -old, -trace and -J options.
4050 2005-05-03 Tom Tromey <tromey@redhat.com>
4053 * gjavah.c (main): Unlink output file on error.
4055 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
4057 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
4060 2005-04-29 Tom Tromey <tromey@redhat.com>
4062 * expr.c (build_jni_stub): Updated for change to build_block.
4064 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
4066 * expr.c (force_evaluation_order): Declare 'saved' earlier.
4068 2005-04-28 Andrew Haley <aph@redhat.com>
4071 * java-tree.h (soft_resolvepoolentry_node): New.
4072 (alloc_constant_fieldref): Declare.
4073 * expr.c (expand_java_field_op): Don't call class_init for
4074 accesses to static fields with indirect dispatch.
4075 * builtins.c (initialize_builtins): Add "__builtin_expect".
4076 * decl.c (soft_resolvepoolentry_node): New variable.
4077 (java_init_decl_processing): Create a decl for
4078 "_Jv_ResolvePoolEntry".
4079 * class.c (build_fieldref_cache_entry): New function.
4080 (build_static_field_ref): Rewrite for indirect dispatch.
4081 * constants.c (find_name_and_type_constant_tree): New function.
4082 (alloc_constant_fieldref): Likewise.
4083 (build_constants_constructor): Handle CONSTANT_Fieldref and
4084 CONSTANT_NameAndType.
4087 * expr.c (force_evaluation_order): Convert outgoing args smaller
4090 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
4092 * gcj.texi (libgcj Runtime Properties): Remove obsolete
4093 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
4094 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
4096 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4098 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4099 to `unlock_stream' with `unlock_std_streams'.
4101 2005-04-25 Jakub Jelinek <jakub@redhat.com>
4103 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
4104 instead of just expr.h.
4106 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4108 * gjavah.c (main): Unlock the stdio streams.
4109 * jcf-dump.c (main): Likewise.
4110 * jv-scan.c (main): Likewise.
4111 * jvgenmain.c (main): Likewise.
4113 2005-04-23 DJ Delorie <dj@redhat.com>
4115 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4116 parse.y: Adjust warning() callers.
4118 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
4120 * gcj.texi (Object fields): Change "Integer" to "Int" in example
4123 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
4125 * gcj.texi: Fix typos and bogus example.
4127 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
4129 * except.c: Fix a comment typo.
4131 2005-04-19 Julian Brown <julian@codesourcery.com>
4133 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4134 indirect dispatch with PIC.
4136 2005-04-18 Andrew Haley <aph@redhat.com>
4138 * java-except.h (struct eh_range.handler): Remove unused field.
4139 (handle_nested_ranges): Remove function declaration.
4140 (sanity_check_exception_range): Add function declaration.
4141 * verify.c (verify_jvm_instructions): Remove call to
4142 handle_nested_ranges.
4143 * verify-glue.c (verify_jvm_instructions_new): Call
4144 sanity_check_exception_range.
4145 * except.c (link_handler, eh_range_freelist, link_handler,
4146 handle_nested_ranges): Remove.
4147 (add_handler): Rewrite.
4148 (sanity_check_exception_range): New function.
4149 (print_ranges): New function.
4151 2005-04-13 Julian Brown <julian@codesourcery.com>
4153 * decl.c (finish_method): Give methods once-only linkage.
4155 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
4157 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4159 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4161 * java-tree.h: Don't use PARAMS().
4163 2005-04-07 Per Bothner <per@bothner.com>
4165 * class.c (push_class): By default, suppress debug output.
4166 (finish_class): Enable debug output for classes we're emitting.
4168 2005-04-07 Andrew Haley <aph@redhat.com>
4170 * gcj.texi: Correct gcj-dbtool instructions.
4172 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
4174 * gcj.texi: Fix a typo.
4175 * lang.c: Fix a comment typo.
4177 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
4179 * gcj.texi (Invoking gij): Add descriptions of new -X options.
4180 Mention recognized-and-ignored compatibility options.
4181 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4183 (About CNI): Add Memory allocation section.
4185 2005-04-01 Tom Tromey <tromey@redhat.com>
4187 * decl.c (java_init_decl_processing): Fix types of
4188 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4189 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4190 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4192 2005-03-31 Jan Hubicka <jh@suse.cz>
4194 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4195 * class.c: Include cgraph.h
4196 (make_local_functoin_alias): Mark aslias as needed.
4197 * resource.c: Include cgraph.h
4198 (compile_resource_data): Go via cgraph interface.
4200 2005-03-30 Ian Lance Taylor <ian@airs.com>
4202 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4204 2005-03-30 Tom Tromey <tromey@redhat.com>
4206 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4207 inner_class_info_index==0 or outer_class_info_index==0.
4209 2005-03-29 Tom Tromey <tromey@redhat.com>
4211 * gcj.texi (libgcj Runtime Properties): Document
4212 gnu.gcj.runtime.endorsed.dirs.
4214 2005-03-24 Anthony Green <green@redhat.com>
4216 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4219 2005-03-23 Tom Tromey <tromey@redhat.com>
4221 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4222 (parse_version): Use it.
4224 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
4226 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4228 2005-03-18 Andrew Haley <aph@redhat.com>
4231 * decl.c (update_aliases): Don't update variables that are about
4233 (maybe_poplevels): Add comment.
4235 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
4238 * jcf-parse.c (duplicate_class_warning): New function.
4239 (java_parse_file): Call duplicate_class_warning if
4240 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4241 (parse_zip_file_entries): Likewise. Also set
4242 CLASS_FROM_CURRENTLY_COMPILED_P.
4244 2005-03-16 Andrew Haley <aph@redhat.com>
4246 * expr.c (expand_java_arrayload): Don't generate a
4247 NullPointerException based on the type of the node.
4248 (build_java_array_length_access): Likewise.
4250 2005-03-15 Zack Weinberg <zack@codesourcery.com>
4252 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4254 2005-03-11 Tom Tromey <tromey@redhat.com>
4256 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4257 (libgcj Runtime Properties): Document the default .db.
4259 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
4262 * parse.y (checks_throws_clauses): Check exceptions list even when
4263 the base class does not come from a source file being compiled.
4264 (java_complete_lhs): Remove unused variable 'wfl'.
4266 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
4269 * decl.c (finish_method): Emit _Jv_InitClass for private static
4270 methods inside inner classes as well.
4272 2005-03-08 Julian Brown <julian@codesourcery.com>
4273 * Revert patch from 2005-03-08 for causing bootstrap failure on
4276 2005-03-08 Julian Brown <julian@codesourcery.com>
4278 * decl.c (finish_method): Give methods once-only linkage.
4280 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4282 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4284 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
4286 * verify-glue.c (vfy_is_assignable_from): Perform static check using
4287 can_widen_reference_to if the C++ ABI is in use.
4288 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4289 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4290 type_isresolved, init_state, set_pc, state_get_pc,
4291 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4292 (verify_fail): Report the current PC from the verifier context.
4293 (free_state): Remove #if 0 block to enable this function.
4294 (free_verifier_context): Call free_state on state_list iterator
4295 values before freeing them.
4296 * expr.c (pop_type_0): Pop correct type for error message when stack
4297 contains a multi-word type.
4299 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4301 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4302 for known NULL array length access.
4304 2005-03-07 Tom Tromey <tromey@redhat.com>
4306 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4308 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
4310 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4311 typeck.c: Update copyright.
4313 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
4316 * xref.c, xref.h: Remove file.
4317 * Make-lang.in (java/xref.o): Remove.
4318 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4319 * lang.c (flag_emit_xref): Remove definition.
4320 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4321 * typeck.c (convert): Remove use of do_not_fold.
4322 * parse.y (do_not_fold): Remove definition.
4323 (parser grammar): Remove xref code.
4324 (maybe_create_class_interface_decl, create_class): Likewise.
4325 (register_fields, method_header, finish_method_declaration): Likewise.
4326 (declare_local_variables, source_end_java_method): Likewise.
4327 (java_complete_expand_classes): Do not set do_not_fold.
4328 (java_complete_expand_method): Remove xref code.
4329 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4330 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4331 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4332 (patch_synchronized_statement, patch_throw_statement): Likewise.
4333 (maybe_build_class_init_for_field): Likewise.
4335 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
4337 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4338 instead of IS_NON_TYPE_CODE_CLASS.
4340 2005-03-04 Andrew Haley <aph@redhat.com>
4343 * class.c (set_method_index): Don't set method_index if it is
4345 (layout_class_method): Don't complain about "non-static method foo
4346 overrides static method" in the case of indirect dispatch.
4348 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4350 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4352 * Make-lang.in: Don't elide warnings in jcf-io.c.
4354 2005-03-01 Per Bothner <per@bothner.com>
4357 * check-init.c (wfl): Remove static.
4358 (final_assign_error, check_init): Replace calls to parse_error_context
4360 (check_init): Save, set, and restore input_location for each exp.
4362 2005-03-01 Per Bothner <per@bothner.com>
4364 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4365 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4366 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4368 2005-03-01 Per Bothner <per@bothner.com>
4370 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4372 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4375 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4378 2005-02-22 Tom Tromey <tromey@redhat.com>
4381 * verify-impl.c (EITHER): New define.
4382 (types_compatible): Handle it.
4383 (check_field_constant): Use it.
4385 2005-02-18 Tom Tromey <tromey@redhat.com>
4388 * verify-impl.c (types_equal): Fixed test.
4391 * verify-glue.c (vfy_class_has_field): New function.
4392 * verify.h (vfy_class_has_field): Declare.
4393 * verify-impl.c (check_field_constant): Added 'putfield'
4395 (verify_instructions_0): Updated.
4396 (types_equal): New function.
4398 2005-02-14 Tom Tromey <tromey@redhat.com>
4401 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4402 stack effect of multianewarray.
4404 2005-02-14 Andrew Haley <aph@redhat.com>
4407 * expr.c (expand_byte_code): Call promote_arguments().
4408 (promote_arguments): New function.
4409 * decl.c (check_local_unnamed_variable): Remove special case for
4411 (find_local_variable): Promote all boolean types to int
4412 when searching for local variable decls.
4414 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
4416 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4417 parse-scan.y: Update copyright.
4419 2005-02-11 Per Bothner <per@bothner.com>
4422 * parse-scan.y (input_location): Remove variable.
4423 (main_input_filename): New - replaces input_filename, which isn't
4424 settable if USE_MAPPED_LOCATION.
4425 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4426 so we don't reference input_location or wfl_operator in that case.
4427 * jv-scan.c (expand_location): Remove - no longer used.
4428 (main): Set main_input_filename rather than input_filename.
4430 2005-02-09 Richard Henderson <rth@redhat.com>
4432 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4433 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4435 2005-02-08 Marcin Dalecki <martin@dalecki.de>
4437 * expr.c (add_type_assertion): Use the proper enumeration type,
4438 since this is what htab_find_slot() is expecting.
4440 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
4442 * gcj.texi: Update copyright dates.
4444 2005-02-02 Tom Tromey <tromey@redhat.com>
4446 * gcj.texi (libgcj Runtime Properties): Default library_control
4449 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
4452 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4453 (modifiers) when square brackets are present in a declaration for
4455 * jv-scan.c (main): Set input_filename and input_line.
4457 2005-02-01 Tom Tromey <tromey@redhat.com>
4460 * gjavah.c (get_field_name): Don't override name for JNI header.
4462 2005-02-01 Roger Sayle <roger@eyesopen.com>
4464 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4465 of unsigned types using iushr and lushr JVM bytecodes.
4467 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4470 * gjavah.c (jni_print_float): Do not emit floating-point
4471 initialiser for a static final field.
4472 (jni_print_double): Likewise.
4474 2005-02-01 Mark Mitchell <mark@codesourcery.com>
4477 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4478 * gjavah.c (print_field_info): Mark static data members of
4479 floating-point type with "__extension__".
4481 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4483 * gjavah.c (print_field_info): Mark static data members of
4484 floating-point type with "__extension__".
4486 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4489 * parse.y (build_string_concatenation): Remove redundant if.
4490 (patch_conditional_expr): Attempt to patch_string() the condition
4491 of a ?: as well, in addition to its other operands.
4493 2005-01-25 Tom Tromey <tromey@redhat.com>
4495 * Make-lang.in (java/java-tree-inline.o): Removed.
4497 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
4500 * parse.y (patch_binop): Allow comparisons against NULL only
4501 if the other operand is of a reference type.
4503 2005-01-24 Tom Tromey <tromey@redhat.com>
4505 * java-tree.h (gcj_abi_version): Declare.
4506 * class.c (make_class_data): Push gcj_abi_version into "next"
4507 field. Renamed field.
4508 * decl.c (gcj_abi_version): New global.
4509 (parse_version): New function.
4510 (java_init_decl_processing): Call it. Renamed 'next' field.
4512 (GCJ_BINARYCOMPAT_ADDITION): New define.
4514 2005-01-24 Roger Sayle <roger@eyesopen.com>
4517 * jcf-write.c (generate_bytecode_insns): Conversions between
4518 integer types of the same precision shouldn't generate widening
4519 or narrowing conversion bytecodes.
4521 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4523 * java-except.h, java-tree.h: Remove unused prototypes.
4525 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4528 * jcf-write.c (perform_relocations): Don't call memcpy if source
4529 and destination are the same.
4531 2005-01-17 Tom Tromey <tromey@redhat.com>
4533 * verify-impl.c (get_short): Sign extend.
4534 (get_int): Likewise.
4536 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4538 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4541 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4543 * verify.c: Revert to the version before the BC-ABI merge.
4545 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4548 * check-init.c (check_init): Take care of references that do not
4549 have an explicit final variable declaration (e.g. array length
4550 access) for pre/post in/de-crement operators.
4552 2005-01-08 Mark Wielaard <mark@klomp.org>
4554 * parse.y (process_imports): Allocate (and free) original_name only
4555 when not already defined.
4556 * jcf-parse.c (read_class): Free results of find_class() and
4558 (java_parse_file): Keep pointer to head of file_list and free when
4559 done. Free result of lrealpath().
4561 2005-01-05 Tom Tromey <tromey@redhat.com>
4563 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4565 2004-12-20 Andrew Haley <aph@redhat.com>
4567 * typeck.c: Use fold_convert for ints and booleans.
4569 2004-12-17 Andrew Haley <aph@redhat.com>
4572 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4573 BOOLEAN_TYPE or CHAR_TYPE.
4574 (convert_to_boolean, convert_to_char) : Remove.
4575 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4576 * expr.c (expand_load_internal): Do type conversion if type is not
4579 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4582 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4585 2004-12-07 Andrew Haley <aph@redhat.com>
4588 * jcf-parse.c (load_class): Remove sanity test for missing inner
4591 2004-12-06 Tom Tromey <tromey@redhat.com>
4593 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4594 (java.uninstall): Likewise.
4595 (java.maintainer-clean): Likewise.
4596 (.INTERMEDIATE): Likewise.
4597 (java.install-man): Likewise.
4598 (gcj-dbtool.pod): New target.
4599 * gcj.texi (Code Generation): Document -findirect-dispatch.
4600 (libgcj Runtime Properties): Document
4601 gnu.gcj.precompiled.db.path.
4602 (Top): Link to "Invoking gcj-dbtool".
4604 2004-12-06 Tom Tromey <tromey@redhat.com>
4607 * java-tree.h (extract_field_decl): Declare.
4608 * parse.y (extract_field_decl): Renamed from
4609 strip_out_static_field_access_decl. No longer static.
4610 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4612 2004-12-03 Tom Tromey <tromey@redhat.com>
4614 * lang.c (flag_new_verifier): Define.
4615 (java_post_options): Set flag_new_verifier if indirect dispatch
4617 * lang.opt (fnew-verifier): Removed.
4619 2004-12-03 Tom Tromey <tromey@redhat.com>
4622 * Make-lang.in (java.install-common): Only install transformed
4623 gcjh if gcj-cross exists.
4625 2004-12-03 Andrew Haley <aph@redhat.com>
4628 * except.c (link_handler): Patch 'outer' field of siblings of the
4629 range we're demoting.
4631 2004-12-03 Andrew Haley <aph@redhat.com>
4634 * class.c (layout_class_method): Don't fail to override a method
4635 simply because it has DECL_ARTIFICIAL set.
4637 2004-12-02 Tom Tromey <tromey@redhat.com>
4640 * parse.y (craft_constructor): Special case null_pointer_node.
4642 2004-12-02 Tom Tromey <tromey@redhat.com>
4645 * java-gimplify.c (java_gimplify_expr): Don't call
4646 SET_EXPR_LOCATION unless wrapped tree is an expression.
4648 2004-11-27 Per Bothner <per@bothner.com>
4650 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4651 Fix fencepost error in 'i', which got executed one too many times.
4652 Also, fold memcpy into explicit loop, as originally intended.
4653 Also, free temporary 'buf' which otherwise leaks.
4655 2004-11-27 Per Bothner <per@bothner.com>
4657 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4658 local static variables if not USE_MAPPED_LOCATION.
4660 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4662 * class.c, decl.c, expr.c: Fix comment typos.
4664 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4667 * decl.c (end_java_method): Call
4668 attach_init_test_initialization_flags on all the init_decls.
4669 * parse.y (attach_init_test_initialization_flags): Move to ...
4670 * expr.c (attach_init_test_initialization_flags): here and
4671 support BIND_EXPR also.
4672 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4673 * jcf-parse.c (parse_class_file): Don't disable class init
4676 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4678 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4681 2004-11-24 Richard Henderson <rth@redhat.com>
4683 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4684 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4686 2004-11-24 Tom Tromey <tromey@redhat.com>
4688 * verify.c (defer_merging): Don't use C++-style comment.
4689 * verify.h (java_opcode): Added java_opcode_end.
4690 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4692 * verify-impl.c (vfy_push_type): Removed bogus "return".
4693 (initialize_stack): Use vfy_alloc and vfy_free.
4694 (verify_instructions_0): Likewise.
4696 * Merged gcj-abi-2-dev-branch to trunk.
4698 2004-11-24 Andrew Haley <aph@redhat.com>
4700 * jcf-parse.c (parse_class_file): Set file_start_location.
4702 2004-11-10 Tom Tromey <tromey@redhat.com>
4704 * class.c (make_field_value): Don't call build_static_field_ref.
4705 (build_static_field_ref): Don't emit direct references when using
4708 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4709 -verbose:class into man page synopsis.
4711 2004-11-09 Tom Tromey <tromey@redhat.com>
4713 * expr.c (build_java_arraystore_check): Still generate check if
4714 element type is itself an array.
4716 2004-11-08 Tom Tromey <tromey@redhat.com>
4718 * java-tree.h (soft_check_assignment_node): Removed.
4719 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4720 * decl.c (java_init_decl_processing): Don't initialize
4721 soft_check_assignment_node.
4723 2004-11-05 Tom Tromey <tromey@redhat.com>
4725 * class.c (layout_class_methods): Don't add Miranda methods when
4726 using indirect dispatch.
4728 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4730 * class.c (make_class_data): Call emit_assertion_table to set the
4731 'assertion_table' field.
4732 (build_signature_for_libgcj): Move here from expr.c.
4733 (add_assertion_table_entry): New function. Callback for assertion
4734 hashtable traversal.
4735 (emit_assertion_table): New. Take class argument, and generate
4736 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4737 * decl.c (init_decl_processing): Define assertion_entry_type record.
4738 Push 'assertion_table' class field instead of 'verify'.
4739 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4740 (type_assertion_hash): Include 'assertion_code' in hash.
4741 (add_type_assertion): Rewritten. Take class and assertion_code
4742 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4743 (can_widen_reference_to): Use new add_type_assertion() arguments.
4744 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4745 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4746 (verify_identifier_node): Removed.
4747 (assertion_entry_type, assertion_table_type): New.
4748 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4749 assertion code definitions.
4750 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4751 'target_type' to 'op1' and 'op2'.
4752 (add_type_assertion): Declare.
4753 (lang_printable_name_wls): Remove unused definition.
4754 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4755 to emit runtime assertion.
4756 (vfy_note_stack_type): Clean up non-C90 declarations.
4757 (vfy_note_local_type): Likewise.
4758 * verify.h (vfy_is_assignable_from): Declare.
4759 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4760 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4761 instead of is_assignable_from_slow().
4762 (types_compatible): Reinstate ref_compatible() call.
4764 2004-11-04 Tom Tromey <tromey@redhat.com>
4766 * class.c (build_static_field_ref): Reverted previous patch.
4768 * class.c (build_static_field_ref): Don't emit direct references
4769 when using indirect dispatch.
4771 2004-11-03 Tom Tromey <tromey@redhat.com>
4773 * expr.c (expand_java_arrayload): Set lhs_type_node.
4774 (expand_java_arraystore): Set rhs_type_node.
4776 2004-11-02 Tom Tromey <tromey@redhat.com>
4778 * jcf-parse.c (compute_class_name): Use filename length from zip
4779 directory, not strlen.
4781 * expr.c (expand_invoke): Mark new interface methods as abstract.
4783 2004-11-01 Tom Tromey <tromey@redhat.com>
4785 * verify-impl.c (push_jump): Removed check for uninitialized
4787 (push_exception_jump): Likewise.
4788 (handle_ret_insn): Likewise.
4789 (handle_jsr_insn): Likewise.
4790 (state_check_no_uninitialized_objects): Removed.
4792 * decl.c (check_local_unnamed_variable): Recognize
4793 promoted-to-int parameters when using the new verifier.
4794 * expr.c (expand_java_arraystore): Explicitly request array type
4795 when using new verifier.
4796 (expand_java_arrayload): Likewise.
4797 (invoke_build_dtable): Don't pass object_type_node as
4798 expression argument to build_java_indirect_ref.
4799 (build_java_check_indexed_type): Do nothing.
4800 (build_java_arraystore_check): Handle case where array doesn't
4802 (build_java_array_length_access): Likewise.
4803 (expand_invoke): Handle case where interface overrides a method
4805 (pop_type_0): Always succeed for reference types.
4806 (process_jvm_instruction): Don't pop a value in a dead
4808 (pop_arguments): Convert arguments to correct types.
4810 2004-10-29 Andrew Haley <aph@redhat.com>
4812 * jcf-parse.c (give_name_to_class): Remove line that was
4815 2004-10-29 Andrew Haley <aph@redhat.com>
4817 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4819 2004-10-20 Andrew Haley <aph@redhat.com>
4821 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4823 2004-10-26 Tom Tromey <tromey@redhat.com>
4825 * verify.h (vfy_notify_verified): Removed.
4826 * verify-glue.c (vfy_notify_verified): Removed.
4828 2004-10-26 Tom Tromey <tromey@redhat.com>
4830 * verify-impl.c (debug_print_state): Declare `i' before code.
4831 (merge_types): Modify `t' when it is null_type.
4833 2004-10-26 Tom Tromey <tromey@redhat.com>
4835 * verify-impl.c (type_print): Renamed from print. Now static and
4837 (debug_print_state): Use type_print.
4839 2004-10-25 Tom Tromey <tromey@redhat.com>
4841 * expr.c (build_invokeinterface): Compute correct offset for
4842 index into interface methods.
4844 2004-10-20 Tom Tromey <tromey@redhat.com>
4846 * java-tree.h (verify_jvm_instructions_new): Declare.
4848 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4851 * verify-impl.c (verify_instructions): Correctly handle wide
4853 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4854 (vfy_get_component_type): Strip pointer types.
4855 (vfy_find_class): Use get_type_from_signature. Strip pointer
4857 Include java-except.h.
4859 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4861 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4862 vfy_push_type_t, set_variable, add_new_state, merge_into,
4863 handle_jsr_insn, branch_prepass, check_class_constant,
4864 check_wide_constant, get_one_type, compute_static_types,
4865 verify_instructions_0): Clean up C99 declarations after statements.
4867 2004-10-20 Tom Tromey <tromey@redhat.com>
4869 * verify-impl.c (merge_refs): Compare reference against iterator,
4872 * verify-glue.c (vfy_tag): Mask off resolved flag.
4874 2004-10-19 Tom Tromey <tromey@redhat.com>
4876 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4877 (init_state_with_stack): Initialize `this_type' in state.
4878 (verify_method): Use debug_print.
4879 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4880 (vfy_note_stack_depth): Reverted last patch.
4881 (vfy_note_stack_type): Note pointer to Object, not Object.
4882 (vfy_note_local_type): Likewise.
4884 * verify.h (vfy_note_instruction_seen): Declare.
4885 * verify-glue.c (verify_jvm_instructions_new): Set
4886 BCODE_EXCEPTION_TARGET on target instruction.
4887 (vfy_note_instruction_seen): New function.
4888 * verify-impl.c (FLAG_INSN_SEEN): New define.
4889 (verify_instructions_0): Set flag on instruction. Save state for
4891 (verify_instructions): Call vfy_note_instruction_seen.
4893 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4894 (verify_jvm_instructions_new): Call method_init_exceptions,
4895 add_handler, and handle_nested_ranges.
4896 * verify-impl.c (verify_method): Return 1 on success.
4897 (verify_instructions_0): Save the state at PC=0.
4899 * verify-impl.c (init_type_from_class): Set is_resolved and
4900 ref_next on new ref_intersection.
4901 (init_type_from_string): Likewise.
4903 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4905 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4906 if flag_new_verifier is set.
4907 * java-tree.h (flag_new_verifier): Declare.
4908 * lang.opt (fnew-verifier): New option.
4909 * verify-impl.c: Work around namespace pollution by undef'ing
4911 (struct verifier_context): Make 'bytecode' const.
4912 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4913 (types_compatible): For the BC-ABI, always consider reference types
4915 (check_class_constant): Use vfr->current_class.
4916 (check_constant): Likewise.
4917 (check_wide_constant): Likewise.
4918 (check_field_constant): Check for 'L' at start of type name.
4919 (get_one_type): Return pointer instead of type. Set type result in
4920 caller via passed type pointer.
4921 (compute_argument_types): Update to use new get_one_type arguments.
4922 (compute_return_type): Likewise.
4923 (make_verifier_context): New. Allocate and initialize 'vfr'.
4924 (free_verifier_context): New. Free 'vfr' and its contents.
4925 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4926 and free_verifier_context.
4928 2004-10-15 Tom Tromey <tromey@redhat.com>
4930 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4931 * verify.h (vfy_fail): Fixed formatting.
4933 * verify-impl.c (vfr): Fixed comment formatting.
4934 (collapse_type): New function.
4935 (verify_instructions): Notify compiler about type map.
4936 * verify.h (vfy_note_stack_depth): Updated.
4937 (vfy_note_stack_type): Likewise.
4938 (vfy_note_local_type): Likewise.
4939 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4941 * verify-glue.c (vfy_note_stack_depth): Correctly size type
4942 state. Added `method' argument.
4943 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
4945 (vfy_note_local_type): New function.
4946 (vfy_unsuitable_type): Likewise.
4947 (vfy_return_address_type): Likewise.
4948 (vfy_null_type): Likewise.
4950 * verify.h (VFY_IN_GCC): Removed.
4951 (VFY_WANT_TYPEMAP): Removed.
4952 * verify-impl.c (verify_instructions_0): Removed useless "\".
4953 (struct state) <next>: Uncomment.
4955 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
4957 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4960 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4962 * Make-lang.in (verify.o): Re-enabled this target.
4963 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4964 (vfy_get_interface): Likewise.
4965 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4966 * verify.h (verify_jvm_instructions_new): Declare.
4967 * verify-impl.c (free_state): Temporarily comment out unused
4970 2004-10-06 Tom Tromey <tromey@redhat.com>
4972 * java-tree.h (JV_STATE_READ): New enum value.
4974 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4976 * verify.h: New file.
4978 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
4980 * verify-impl.c, verify-glue.c, verify.h: New files.
4981 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4983 2004-09-24 Andrew Haley <aph@redhat.com>
4985 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4986 for a slot if it's of pointer type.
4988 2004-09-14 Tom Tromey <tromey@redhat.com>
4990 * class.c (make_class_data): Correctly initialize "state" field.
4991 Initialize "engine" field.
4992 * decl.c (java_init_decl_processing): Add "engine" field.
4994 2004-09-10 Andrew Haley <aph@redhat.com>
4997 * expr.c (build_invokeinterface): Use fast method for interface
4999 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
5000 JTI_ITABLE_PTR_TYPE.
5001 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
5002 (emit_symbol_table): Add new arg, element_size.
5003 * decl.c (java_init_decl_processing): Initialize Class.itable.
5004 * class.c (GEN_TABLE): New macro.
5005 (gen_indirect_dispatch_tables): Use it. Add itable.
5006 (make_class_data): Add new arg for emit_symbol_table().
5008 (add_miranda_methods): Make sure search_class has been parsed.
5009 (emit_symbol_table): Add new arg, element_size.
5011 2004-09-06 Andrew Haley <aph@redhat.com>
5013 * verify.c (merge_types): Return Object for all merges of
5015 * expr.c (add_type_assertion): Don't generate assertions when
5016 source type is array of Object.
5018 2004-09-03 Andrew Haley <aph@redhat.com>
5020 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
5022 * lang.c (java_post_options): Force flag_verify_invocations if
5023 we're not using indirect dispatch.
5025 * expr.c (pop_type_0): Move test for interfaces before call to
5026 can_widen_reference_to().
5027 (build_signature_for_libgcj): Remove generation of canonical array
5029 (add_type_assertion): Canonicalize both arrays.
5030 Don't assert that type X can be assigned to Object.
5031 Don't assert that type X an be assigned to type X.
5032 Don't assert that Object can be assigned to type X.
5033 (can_widen_reference_to): Warn whenever we generate an assertion.
5034 (process_jvm_instruction): Use throwable_type_node for the type of
5037 2004-09-01 Andrew Haley <aph@redhat.com>
5039 * decl.c (java_init_decl_processing): Change
5040 verify_identifier_node to "__verify".
5041 * expr.c (add_type_assertion): Use verify_identifier_node for name.
5042 * java-tree.h (verify_identifier_node): Change to "__verify".
5044 * expr.c (build_signature_for_libgcj): New function.
5045 (add_type_assertion): Use it to construct signatures for
5046 source_type and target_type.
5048 2004-08-27 Andrew Haley <aph@redhat.com>
5050 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
5051 (verify_identifier_node): New.
5052 (TYPE_VERIFY_METHOD): New.
5053 (struct type_assertion): New type.
5054 * expr.c (type_assertion_eq): New function.
5055 (type_assertion_hash): New function.
5056 (add_type_assertion): New function.
5057 (can_widen_reference_to): Call add_type_assertion().
5058 * decl.c (java_init_decl_processing): Add verify_identifier_node.
5059 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
5060 (finish_class): Output TYPE_VERIFY_METHOD (type).
5062 * decl.c (end_java_method): Nullify unused fields.
5064 2004-08-17 Andrew Haley <aph@redhat.com>
5066 * verify.c (defer_merging): Quieten.
5067 * jcf-parse.c (load_class): Only try to open a class file if it's
5068 java.lang.Object or if it's part of the current compilation.
5069 Check that the class we just tried to load is the class we just
5071 (java_parse_file): Set flag_verify_invocations off if we're
5072 compiling from .class.
5073 (parse_zip_file_entries): Abort if we try to read a dummy class.
5074 * expr.c (can_widen_reference_to): Quieten.
5075 (build_invokevirtual): Abort if we try to invokevirtual an
5077 (expand_invoke): Don't build a non-interface call to an interface.
5078 (build_instanceof): Don't do premature optimization if
5079 flag_verify_invocations is not set.
5080 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
5082 (build_static_field_ref): Add correct type conversion for
5084 (add_miranda_methods): Disable generation of Miranda methods for
5086 (layout_class_method): Don't complain about non-static method
5087 overrides static method with dummy classes.
5089 2004-08-13 Tom Tromey <tromey@redhat.com>
5091 * class.c (build_static_field_ref): Re-enable atable lookups for
5094 * parse.y (strip_out_static_field_access_decl): Indentation fix.
5096 2004-08-11 Tom Tromey <tromey@redhat.com>
5098 * gcj.texi (libgcj Runtime Properties): Document new properties.
5100 2004-08-06 Andrew Haley <aph@redhat.com>
5102 * jcf-parse.c (load_class): Check that we really have loaded the
5103 class we're looking for.
5105 2004-07-19 Andrew Haley <aph@redhat.com>
5107 * verify.c (verify_jvm_instructions): Comment change only.
5109 * typeck.c (build_java_array_type): Add size field to array name.
5111 * java-tree.h (LOCAL_SLOT_P): New.
5112 (update_aliases): Add PC argument.
5113 (pushdecl_function_level): New function.
5115 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5116 MODIFY_EXPR, and SAVE_EXPR.
5117 (java_gimplify_modify_expr): New function.
5119 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5120 (expand_iinc): Pass PC to update_aliases().
5121 (STORE_INTERNAL): Likewise.
5122 (process_jvm_instruction): Likewise.
5124 * decl.c (base_decl_map): New variable.
5125 (uniq): New variable.
5126 (update_aliases): Rewrite with more thorough checking.
5127 (debug_variable_p): New function.
5128 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5129 (check_local_named_variable): Delete whole function.
5130 (initialize_local_variable): New function.
5131 (check_local_unnamed_variable): Add checks and comments.
5132 (find_local_variable): Rewrite.
5133 (java_replace_reference): New function.
5134 (function_binding_level): New variable.
5135 (pushdecl_function_level): New function.
5136 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5137 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5138 (start_java_method): Reset uniq. Create base_decl_map. Set
5139 function_binding_level.
5140 (end_java_method): Null unused fields to save memory.
5142 2004-06-29 Andrew Haley <aph@redhat.com>
5144 * except.c (expand_start_java_handler): Push a new binding level.
5145 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5146 register_exception_range() to register where we'll do it.
5147 (expand_end_java_handler): Remove old bogus code. Replace with
5148 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5149 the top of the expression we're curently building.
5150 (maybe_end_try): Delete.
5151 * decl.c (binding_level.exception_range): New field.
5152 (clear_binding_level): Add field exception_range. Reformat.
5153 (poplevel): Call expand_end_java_handler().
5154 (poplevel): Call java_add_stmt only if functionbody is false.
5155 (maybe_poplevels): Don't call maybe_end_try() from here.
5156 (end_java_method): Clear no longer used trees in function decl.
5157 (register_exception_range): New function.
5158 * java-tree.h (register_exception_range, struct eh_range): Declare.
5160 2004-06-22 Andrew Haley <aph@redhat.com>
5162 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5164 * check-init.c (get_variable_decl): Teach check-init about
5165 FIELD_DECLs addressed via the otable.
5166 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5169 2004-05-28 Andrew Haley <aph@redhat.com>
5171 * jcf-parse.c (load_class): Don't try to read a class that we've
5174 * expr.c (build_invokeinterface): Use the old-fashioned way of
5175 doing indirect dispatch: look up interfaces by name.
5176 * java-tree.h (enum java_tree_index): Add
5177 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5178 * decl.c (java_init_decl_processing): Add
5179 soft_lookupinterfacemethodbyname_node.
5181 * gjavah.c (print_method_info): Final methods have vtable entries,
5182 so gjavah needs to output them.
5183 * class.c (layout_class_method): Generate vtable entries for final
5185 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5186 dispatch, even if a method is final.
5188 2004-05-25 Andrew Haley <aph@redhat.com>
5190 * class.c (build_symbol_entry): Convert the names of constructors
5191 to init_identifier_node when generating an entry for the indirect
5194 * expr.c (build_known_method_ref): Generate indirect calls for
5195 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5197 2004-05-24 Andrew Haley <aph@redhat.com>
5199 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5200 atable element is of the right type.
5202 * class.c (build_static_field_ref): Cast pointer to correct type
5205 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
5207 * Merged with HEAD as of 20040514. Diff against
5208 gcj-abi-2-merge-20040514.
5210 2004-04-16 Andrew Haley <aph@redhat.com>
5212 * verify.c (check_pending_block): Disable subroutine checks.
5213 (defer_merging): New function.
5214 (merge_types): If types are dummy, use defer_merging to combine them.
5215 (verify_jvm_instructions): If invocation is invokeinterface and
5216 target is dummy, assume target really is an interface.
5218 * parse.y (patch_invoke): Break out call to java_create_object.
5220 * lang.c (flag_verify_invocations): New.
5222 * jcf-parse.c (load_class): If we've already failed to load a
5223 class, don't try again.
5224 (load_class): If we can't find a .class file, don't fail, but emit
5226 (parse_class_file): Don't act on dummy methods.
5228 * java-tree.h (flag_verify_invocations): New.
5230 (lang_type.dummy_class): New field.
5231 (java_create_object): New function.
5232 (METHOD_DUMMY): New.
5234 * expr.c (build_field_ref): Widen field offset.
5235 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5236 that each of its elements is compatible with the one we're
5238 (pop_type_0): Issue a warning to say that we need to generate a
5240 (java_create_object): New function.
5241 (build_field_ref): Only generate hard refs if we're not using
5243 (expand_java_field_op): If we're using !verify_invocations and we
5244 see a missing field, generate a decl for it.
5246 (expand_invoke): If a class doesn't have the method we seek and
5247 we're using !flag_verify_invocations, generate a decl for the
5250 (build_known_method_ref): Always use indirect dispatch via the
5251 atable for static methods.
5253 (expand_java_NEW): Break out object creation into new function,
5256 (can_widen_reference_to): Issue a warning to say that we need to
5257 generate a runtime check.
5259 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5260 (make_method_value): Also use index for interfaces.
5261 (make_class_data): Skip dummy field for inherited data.
5262 Don't build method array for dummy methods.
5263 Set size_in_byte to -1 when using inirect dispatch
5264 Don't build a hard class ref if we don't have a hard ref to our
5265 superclass, or if we're using inirect dispatch.
5266 Null out dispatch tables.
5268 (layout_class_method): Don't complain about non-static method
5269 overrides static method is method is artificial.
5271 (build_static_field_ref): Disable atable references to static
5272 fields for the time being.
5274 (layout_class_methods): Check for CLASS_INTERFACE as
5275 well as CLASS_ABSTRACT.
5277 2004-11-24 Steven Bosscher <stevenb@suse.de>
5279 * class.c (make_class_data): Don't check flag_inline_functions.
5280 * lang.c (flag_really_inline): Remove unused flag.
5281 (java_handle_option): Don't set it here. Remove special handling
5282 of flag_inline_functions for Java.
5283 (java_init): Don't set flag_inline_trees here. Already done...
5284 (java_post_options): ...here. Don't clear flag_inline_functions.
5286 2004-11-24 Steven Bosscher <stevenb@suse.de>
5288 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5289 (java_gimplify_exit_block_expr): New function.
5290 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5292 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5293 (EXIT_BLOCK_EXPR): Likewise.
5294 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5295 (LABELED_BLOCK_BODY): Likewise.
5296 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5297 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5298 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
5300 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5301 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5302 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
5303 second operand of EXIT_BLOCK_EXPR.
5304 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5306 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5308 2004-11-23 Ben Elliston <bje@au.ibm.com>
5310 * xref.h (xref_flag_value): Remove.
5311 (xref_set_data, xref_get_data): Likewise.
5312 (xref_set_current_fp): Likewise.
5313 (XREF_NONE): Likewise.
5314 (XREF_GET_DATA): Likewise.
5315 * xref.c (xref_flag_value): Remove.
5316 (xref_set_data, xref_get_data): Likewise.
5317 (xref_set_current_fp): Likewise.
5319 2004-11-23 Ben Elliston <bje@au.ibm.com>
5321 * gjavah.c (output_directory): Make static.
5322 (temp_directory): Likewise.
5324 2004-11-15 Tom Tromey <tromey@redhat.com>
5326 * decl.c (instn_ptr_type_node): Removed.
5327 (lineNumbers_ptr_type_node): Removed.
5328 (jint_type): Removed.
5329 (jint_ptr_type): Removed.
5331 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
5334 * check-init.c (check_init): Ignore DECL_EXPR.
5335 * expr.c (always_initialize_class_p): Reenable.
5336 (build_class_init): Use a variable to store the decl. Also use
5337 boolean_false_node instead of integer_zero_node.
5338 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5341 2004-11-08 Tom Tromey <tromey@redhat.com>
5344 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5345 generating a JNI header.
5346 (print_field_info): Handle JNI headers.
5347 (jni_print_float): Likewise.
5348 (jni_print_double): Likewise.
5350 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
5352 * decl.c (end_java_method): Remove duplicated code.
5354 2004-11-06 Zack Weinberg <zack@codesourcery.com>
5355 Gerald Pfeifer <gerald@pfeifer.com>
5357 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5360 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
5363 * class.c: Reinstate 2004-08-18 patch.
5364 (make_local_function_alias): Don't create an alias for extern (native)
5367 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
5370 * class.c (make_local_function_alias): Revert 2004-08-18 change.
5371 (make_method_value): Likewise.
5373 2004-10-21 Andrew Haley <aph@redhat.com>
5376 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5378 2004-10-20 Andrew Haley <aph@redhat.com>
5380 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5381 Remove duplicated code block.
5383 2004-10-18 Steven Bosscher <stevenb@suse.de>
5385 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5386 New rules to work around old Bison warnings.
5388 2004-10-17 Steven Bosscher <stevenb@suse.de>
5390 * class.c (ident_subst): Always alloca buffer.
5391 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5392 opcode after including javaop.def.
5393 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5394 conditional expression that exits, to avoid warnings.
5395 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5396 a user of an extension.
5397 * win32-host.c: Move check down to have non-empty file when
5398 WIN32 is not defined.
5400 * Make-lang.in (java-warn): Add STRICT_WARN.
5401 (java/jcf-io.o-warn): Don't have Werror for this file.
5402 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5404 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
5406 * expr.c (expr_add_location): Move declaration to before all
5408 * parse.y (java_expand_classes): Ditto.
5409 * lex.c (java_peek_unicode): Ditto.
5411 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5413 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5414 if possible, else convert `foo' to 'foo'.
5415 * class.c: Likewise.
5418 * jcf-io.c: Likewise.
5419 * jcf-parse.c: Likewise.
5422 * parse.h: Likewise.
5424 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5426 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5427 rename parameter 'msg' to 'msgid' in function declaration.
5428 (issue_warning_error_from_context): Likewise.
5429 (yyerror): Rename parameter 'msg' to 'msgid'.
5430 (all over): Use new quoting style for diagnostics.
5432 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
5434 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5435 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5438 2004-10-14 Matt Austern <austern@apple.com>
5440 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5443 2004-10-13 Tom Tromey <tromey@redhat.com>
5446 * lang.opt (--extdirs): Document.
5447 * jvspec.c (lang_specific_driver): Recognize -encoding and
5450 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
5452 * parse.y (issue_warning_error_from_context): Use va_list *
5453 instead of va_list parameter.
5454 (parse_error_context): Update call.
5455 (parse_warning_context): Likewise.
5457 2004-10-05 Zack Weinberg <zack@codesourcery.com>
5459 * parse.y, parse-scan.y: Add list of diagnostic messages to
5460 insulate translation template from version of yacc/bison used
5461 to compile the grammar.
5463 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
5465 Prepare for %q, %< and %> in diagnostic message strings.
5466 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5467 Name second parameter 'msgid'.
5468 * parse.y: Additionally include pretty-print.h and diagnostic.h.
5469 (issue_warning_error_from_context): Use pretty-printer functions
5470 instead of vsprintf for constructing formatted messages. Rename
5471 parameter 'msg' to 'msgid'.
5472 (parse_error_context): Rename parameter 'msg' to 'msgid'.
5473 (parse_warning_context): Likewise.
5475 2004-10-05 Andrew Haley <aph@redhat.com>
5478 * jcf-parse.c (parse_zip_file_entries): If a class has a
5479 superclass and a TYPE_SIZE of zero, lay it out.
5481 2004-09-30 Andrew Haley <aph@redhat.com>
5484 * jcf-parse.c (compute_class_name): Rewrite.
5486 2004-10-01 Jan Hubicka <jh@suse.cz>
5488 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5490 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5492 * lex.c: Fix a comment typo.
5494 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5496 * java-tree.h: Fix a comment typo.
5498 2004-09-30 Per Bothner <per@bothner.com>
5500 Simplify lexer. Implement --enable-mapped-location support.
5501 * jcf-parse.c (parse_class_file): Use linemap_line_start.
5502 (parse_source_file_1): Pass filename as extra parameter, so we can call
5503 linemap_add and set input_location here, rather than in both callers.
5504 (read_class): Pass copied filename to parse_source_file_1.
5505 Don't initialize wfl_operator - only needed for source compilation.
5506 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
5507 * lex.h: Remove a bunch of debugging macros.
5508 * lex.h (struct_java_line, struct java_error): Remove types.
5509 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
5510 (struct java_lc_s): Remove prev_col field.
5511 (struct java_lexer): New fields next_unicode, next_columns, and
5512 avail_unicode. New position field, and maybe token_start field.
5513 Don't need hit_eof field - use next_unicode == -1 instead.
5514 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
5515 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
5516 * parse.h: Various changes for USE_MAPPED_LOCATION.
5517 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5518 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5519 (struct parser_ctxt): New file_start_location field.
5520 Remove p_line, c_line fields since we no longer save lines.
5521 Remove elc, lineno, and current_jcf fields - no longer used.
5522 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5523 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5524 source_location and is probably not needed anymore anyway.
5525 Use new expr_add_Location function.
5526 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5527 (java_pop_parser_context): Minor cleanup.
5528 (java_parser_context_save_global, java_parser_context_restore_global,
5529 java_pop_parser_context): Save/restore input_location as a unit.
5530 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5531 a source_location instead of a wfl context node.
5532 (check_class_interface_creation): input_filename is not addressable.
5533 (create_artificial_method): Calling java_parser_context_save_global
5534 and java_parser_context_restore_global is overkill. Instead,
5535 temporarily set input_location from class decl.
5536 (java_layout_seen_class_methods): Set input_location from method decl.
5537 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5538 (finish_loop_body): Likewise.
5539 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5540 (java_sprint_unicode): Take a character, not index in line.
5541 (java_sneak_uncode): Replaced by java_peek_unicode.
5542 (java_unget_unicode): No longer used.
5543 (java_allocate_new_line. java_store_unicode): Removed, since we
5544 no longer remember "lines".
5545 (java_new_lexer): Update for new data structures.
5546 (java_read_char): Move unget_value checking to java_read_unicode.
5547 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5548 efficient functions that are used directly when lexing.
5549 (java_read_unicode_collapsing_terminators): No longer needed.
5550 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5551 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5552 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5553 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5554 combine switch branches, and test for common token kinds earlier.
5555 (java_lex_error): Rewrite.
5556 * jv-scan.c (expand_location): New function, copied from tree.c.
5557 (main): Set ctxp->filename instead of setting input_filename directly.
5559 2004-09-30 Per Bothner <per@bothner.com>
5561 More cleanup for --enable-mapped-location.
5562 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5563 input_location here. Instead do it in give_name_to_class.
5564 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5565 * expr.c (expand_byte_code): Call linemap_line_start.
5566 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5567 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5568 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5569 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5570 to USE_MAPPED_LOCATION case.
5572 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5573 * jcf-parse.c (java_parse_file): Don't set input_filename.
5574 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5575 Create a list of TRANSLATION_UNIT_DECL.
5576 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5577 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5578 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5579 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5580 (file_start_location): New static.
5581 (set_source_filename): Avoid extra access to input_filename macro.
5582 Concatenate new name with class's package prefix.
5583 (set_source_filename, give_name_to_class): Update.
5584 (give_name_to_class): Set class's "line 0" input_location here.
5585 (parse_class_file): Set input_location as a unit.
5587 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5589 2004-09-29 Per Bothner <per@bothner.com>
5591 * java-tree.h: Redefine some macros and add some declaration
5592 to handle the USE_MAPPED_LOCATION case.
5593 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5594 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5595 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5596 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5598 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5599 * decl.c (finish_method, java_add_stmt): Likewise.
5600 * java-gimplify.c (java-gimplify.c): Likewise.
5601 * jcf-write.c (generate_bytecode_insns): Likewise.
5602 * lang.c (java_post_options): Likewise - call linemap_add.
5604 2004-09-29 Andrew Haley <aph@redhat.com>
5607 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5608 result of TRUNC_MOD_EXPR.
5609 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5610 * decl.c (java_init_decl_processing): Mark
5611 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5613 2004-09-28 Tom Tromey <tromey@redhat.com>
5616 * class.c (add_miranda_methods): Load superinterface if not
5619 2004-09-28 Andrew Haley <aph@redhat.com>
5622 * jcf-parse.c (load_class): Don't try to read a class that we've
5625 2004-09-28 Andrew Haley <aph@redhat.com>
5627 * jcf-parse.c (load_class): Back out previous broken patch.
5629 2004-09-28 Andrew Haley <aph@redhat.com>
5632 * jcf-parse.c (load_class): Don't try to read a class that we've
5634 Check that we really did read the right class.
5636 2004-09-25 Tom Tromey <tromey@redhat.com>
5639 * parse.y (create_artificial_method): Use add_method_1.
5641 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5643 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5645 * gcj.texi: Fix typos.
5647 2004-09-24 Tom Tromey <tromey@redhat.com>
5650 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5651 in error parts of rule.
5652 (unary_expression): Don't call error_if_numeric_overflow when $1
5655 2004-09-24 Tom Tromey <tromey@redhat.com>
5658 * parse.y (resolve_qualified_expression_name): Set
5659 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5660 * expr.c (force_evaluation_order): Check for empty argument list
5661 after stripping COMPOUND_EXPR.
5663 2004-09-23 Andrew Haley <aph@redhat.com>
5666 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5669 2004-09-23 Tom Tromey <tromey@redhat.com>
5672 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5673 where operand is null.
5675 2004-09-23 Tom Tromey <tromey@redhat.com>
5678 * parse.y (not_accessible_p): Allow access to protected members
5679 even when class is not static.
5681 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5683 * Make-lang.in: Revert the gcc-none.o change.
5685 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5687 * parse.y (patch_anonymous_class): VEC_space returns true if there
5690 2004-09-21 Matt Austern <austern@apple.com>
5693 * gjavah.c (free_method_name_list): Fix function definition so
5694 it's a proper C prototype.
5696 2004-09-21 Tom Tromey <tromey@redhat.com>
5699 * gjavah.c (free_method_name_list): New method.
5702 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5703 Zack Weinberg <zack@codesourcery.com>
5705 * java-tree.def: Use tree_code_class enumeration constants
5706 instead of code letters.
5707 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5708 new tree-class enumeration constants.
5710 2004-09-13 Tom Tromey <tromey@redhat.com>
5713 * class.c (layout_class_method): Put synthetic methods into the
5716 2004-09-11 Andrew Pinski <apinski@apple.com>
5718 * Make-lang.in (java/ggc-none.c): Change dependency
5719 for ggc.h into $(GGC_H).
5721 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5723 * Make-lang.in (java/win32-host.o): Add dependency on
5725 * win32-host.c: Add includes for coretypes.h, jcf.h
5727 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5729 * Make-lang.in (GCJH_OBJS): Change dependency from
5730 ggc-none.o to java/ggc-none.o
5731 (JCFDUMP_OBJS): Likewise.
5732 (java/ggc-none.o): New target.
5734 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5736 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5737 * class.c (build_utf8_ref, build_static_field_ref,
5738 make_field_value, make_method_value, get_dispatch_table,
5739 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5740 * constants.c (get_tag_node, build_ref_from_constant_pool,
5741 build_constants_constructor): Likewise.
5742 * decl.c (java_init_decl_processing): Likewise.
5743 * expr.c (build_java_array_length_access, build_newarray,
5744 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5745 build_java_binop, build_field_ref, expand_java_add_case,
5746 expand_java_call, build_known_method_ref, build_invokevirtual,
5747 build_invokeinterface, build_jni_stub): Likewise.
5748 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5749 * jcf-parse.c (get_constant): Likewise.
5750 * lex.c (do_java_lex): Likewise.
5751 * parse.y (patch_binop, patch_unaryop, patch_cast,
5752 build_newarray_node, patch_newarray): Likewise.
5753 * resource.c (compile_resource_data): Likewise.
5754 * typeck.c (build_prim_array_type): Likewise.
5756 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5758 * decl.c (java_init_decl_processing): Adjust
5759 initialize_sizetypes call.
5761 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5763 * jv-scan.c (fancy_abort): Add.
5765 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5767 * expr.c (build_java_arrayaccess): Use convert to change
5770 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5772 * class.c (make_local_function_alias): Allocate extra space for 'L'
5773 in name buffer. Reported by Thomas Neumann.
5775 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5777 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5778 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5779 * lex.c (do_java_lex): Adjust.
5780 (error_if_numeric_overflow): Likewise.
5782 2004-08-18 Andrew Pinski <apinski@apple.com>
5784 * class.c (make_local_function_alias): Only make a new decl if we
5785 support alias attribute on all decls.
5787 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5789 * class.c (make_local_function_alias): New function. Create local
5790 alias for public method DECL.
5791 (make_method_value): Use make_local_function_alias.
5792 * parse.y (craft_constructor): Don't special-case anonymous classes.
5793 Always set ctor_name to init_identifier_node.
5794 (lookup_method_invoke): Call layout_class_method when creating
5795 anonymous class constructor.
5797 2004-08-18 Richard Henderson <rth@redhat.com>
5799 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5800 default case. Treat '<' similarly. Update for
5801 is_gimple_formal_tmp_var name change.
5803 2004-08-17 Andrew Haley <aph@redhat.com>
5805 * lang.c (lang_printable_name): Obey verbose flag.
5806 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5807 lang_printable_name().
5808 (verify_constructor_circularity, get_printable_method_name,
5809 check_abstract_method_definitions, java_check_regular_methods,
5810 java_check_abstract_methods, check_inner_class_access,
5811 fix_constructors, patch_method_invocation, patch_return):
5813 * expr.c (pop_type_0): Likewise.
5815 * java-tree.h (lang_printable_name_wls): Delete.
5817 2004-08-16 Tom Tromey <tromey@redhat.com>
5820 * parse.y (primary): Changed for initialized and uninitialized
5822 (array_access): Handle array_creation_initialized.
5823 (array_creation_expression): Split into
5824 array_creation_initialized and array_creation_uninitialized.
5826 2004-08-16 Andrew Haley <aph@redhat.com>
5828 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5829 generating bytecode.
5831 2004-08-16 Elliot Lee <sopwith@redhat.com>
5834 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5835 spaces, and quoted filelists.
5837 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5839 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5840 * class.c (build_utf8_ref, build_static_field_ref,
5841 make_field_value, make_method_value, get_dispatch_table,
5842 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5843 * constants.c (get_tag_node, build_ref_from_constant_pool,
5844 build_constants_constructor): Likewise.
5845 * decl.c (java_init_decl_processing): Likewise.
5846 * expr.c (build_java_array_length_access, build_newarray,
5847 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5848 build_java_binop, build_field_ref, expand_java_add_case,
5849 expand_java_call, build_known_method_ref, build_invokevirtual,
5850 build_invokeinterface, build_jni_stub): Likewise.
5851 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5852 * jcf-parse.c (get_constant): Likewise.
5853 * lex.c (do_java_lex): Likewise.
5854 * parse.y (patch_binop, patch_unaryop, patch_cast,
5855 build_null_of_type, patch_newarray): Likewise.
5856 * resource.c (compile_resource_data): Likewise.
5857 * typeck.c (build_prim_array_type): Likewise.
5859 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5861 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5862 Don't create BLOCK here or call java_gimplify_block.
5864 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5866 * java-tree.h (flag_deprecated): Removed.
5867 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5868 * parse.y (check_deprecation): Check warn_deprecated instead of
5871 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5873 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5874 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5875 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5876 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5877 flag_force_classes_archive_check, flag_optimize_sci,
5878 flag_indirect_dispatch): Remove explicit declarations.
5879 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5882 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5885 * Make-lang.in (java.install-man): Install from either build
5886 tree or source tree, whichever has the file first.
5888 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5890 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5891 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5892 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5893 (do_java_lex): Likewise. Adjust force_fit_type call.
5895 2004-08-04 Roger Sayle <roger@eyesopen.com>
5896 Andrew Haley <aph@redhat.com>
5898 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5899 checking trees as they're being built.
5900 (convert): Call convert_ieee_real_to_integer if we're
5901 converting a constant, even if we're writing a class file.
5903 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5906 * parse.y (fold_constant_for_init): Call resolve_field_access with
5907 correct current_class context.
5909 2004-08-01 Roger Sayle <roger@eyesopen.com>
5911 * decl.c (update_aliases, initialize_local_variable): Replace calls
5912 to build with calls to buildN.
5913 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5914 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5915 * parse.h (BUILD_THROW): Likewise.
5916 * parse.y (switch_expression, synchronized_statement,
5917 catch_clause_parameter, array_creation_expression,
5918 conditional_expression, make_qualified_name,
5919 resolve_qualified_expression_name, patch_method_invocation,
5920 patch_invoke, build_method_invocation, build_new_invocation,
5921 build_assignment, patch_assignment, build_binop, patch_binop,
5922 build_string_concatenation, build_incdec, patch_unaryop,
5923 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5924 patch_return, build_if_else_statement, build_labeled_block,
5925 build_new_loop, build_loop_body, build_bc_statement,
5926 build_assertion, encapsulate_with_try_catch, build_try_statement,
5927 build_try_finally_statement, patch_synchronized_statement,
5928 emit_test_initialization): Likewise, replace build with buildN.
5930 2004-07-28 Eric Christopher <echristo@redhat.com>
5932 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5933 (java_unsafe_for_reeval): Ditto.
5935 2004-07-26 <hp@bitrange.com>
5937 * parse.y (build_super_invocation): Adjust declaration order to
5938 avoid declaration after statement.
5940 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5942 * decl.c: Rename all identifiers named `class' to `cl'.
5944 2004-07-25 Richard Henderson <rth@redhat.com>
5946 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5948 2004-07-23 Mike Stump <mrs@apple.com>
5950 * boehm.c (set_bit): Improve type safety wrt unsignedness.
5951 * gjavah.c (throwable_p, decode_signature_piece,
5952 print_full_cxx_name, print_include, add_namelet, add_class_decl,
5953 process_file): Likewise.
5954 * jcf-dump.c (main): Likewise.
5955 * jcf-io.c (read_zip_member): Likewise.
5956 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5957 give_name_to_class, get_class_constant): Likewise.
5958 * jcf-write.c (find_constant_wide, push_long_const,
5959 generate_classfile): Likewise.
5960 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5961 * parse.y (read_import_dir): Likewise.
5962 * typeck.c (parse_signature_type): Likewise.
5963 * verify.c (verify_jvm_instructions): Likewise.
5964 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5966 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
5968 * Make-lang.in: Replace rmic and rmiregistry references with
5969 grmic and grmiregistry.
5970 * gcj.texi: Likewise.
5972 2004-07-20 Andrew Haley <aph@redhat.com>
5975 * verify.c (verify_jvm_instructions): Comment change only.
5977 * typeck.c (build_java_array_type): Add size field to array name.
5979 * java-tree.h (LOCAL_SLOT_P): New.
5980 (update_aliases): Add PC argument.
5981 (pushdecl_function_level): New function.
5983 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5984 MODIFY_EXPR, and SAVE_EXPR.
5985 (java_gimplify_modify_expr): New function.
5987 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5988 (expand_iinc): Pass PC to update_aliases().
5989 (STORE_INTERNAL): Likewise.
5990 (process_jvm_instruction): Likewise.
5992 * decl.c (base_decl_map): New variable.
5993 (uniq): New variable.
5994 (update_aliases): Rewrite with more thorough checking.
5995 (debug_variable_p): New function.
5996 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5997 (check_local_named_variable): Delete whole function.
5998 (initialize_local_variable): New function.
5999 (check_local_unnamed_variable): Add checks and comments.
6000 (find_local_variable): Rewrite.
6001 (java_replace_reference): New function.
6002 (function_binding_level): New variable.
6003 (pushdecl_function_level): New function.
6004 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
6005 (maybe_pushlevels): Call pushdecl() on each of the new decls.
6006 (start_java_method): Reset uniq. Create base_decl_map. Set
6007 function_binding_level.
6008 (end_java_method): Null unused fields to save memory.
6010 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
6012 * class.c (add_interface_do): Remove.
6013 (set_super_info, interface_of_p, maybe_add_interface,
6014 add_interface, make_class_data, layout_class,
6015 add_miranda_methods): Adjust BINFO accessors and addition.
6016 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
6018 * jcf-write.c (generate_classfile): Likewise.
6019 * parse.y (patch_anonymous_class, check_inner_circular_reference,
6020 check_circular_reference, java_complete_class,
6021 check_abstract_method_definitions,
6022 java_check_abstract_method_definitions,
6023 check_interface_throws_clauses, java_check_abstract_methods,
6024 lookup_java_interface_method2,
6025 find_applicable_accessible_methods_list): Adjust BINFO accessors
6027 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
6029 2004-07-18 Roger Sayle <roger@eyesopen.com>
6031 * builtins.c (max_builtin, min_builtin,
6032 java_build_function_call_expr): Replace calls to build with buildN.
6033 * class.c (build_class_ref, build_static_field_ref,
6034 get_dispatch_table, make_class_data, layout_class_method): Likewise.
6035 * constants.c (build_ref_from_constant_pool): Likewise.
6036 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
6037 add_stmt_to_compound): Likewise.
6038 * except.c (build_exception_object_ref, expand_end_java_handler):
6040 * java-gimplify.c (java_gimplify_case_expr,
6041 java_gimplify_default_expr, java_gimplify_block,
6042 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
6043 * jcf-write.c (generate_bytecode_insns): Likewise.
6044 * typeck.c (convert_ieee_real_to_integer): Likewise.
6046 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
6048 * java-tree.h (builtin_function): Declare.
6050 2004-07-16 Steven Bosscher <stevenb@suse.de>
6052 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
6053 abuse restore_line_number_status.
6055 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
6058 * jcf-parse.c (java_emit_static_constructor): Specify default
6061 2004-07-13 Per Bothner <per@bothner.com>
6063 * java-tree.h (all_class_filename): Remove useless macro.
6064 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
6065 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
6066 * parse.y (java_parser_context_restore_global): Replace
6067 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
6068 * jcf-parse.c (read_class, java_parse_file): Likewise.
6070 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
6073 gjavah.c (print_field_info): Emit constant only if field is static.
6075 2004-07-11 Roger Sayle <roger@eyesopen.com>
6077 * expr.c (java_truthvalue_conversion, flush_quick_stack,
6078 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
6079 build_java_ret, build_java_throw_out_of_bounds_exception,
6080 build_java_array_length_access, java_check_reference,
6081 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
6082 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
6083 expand_java_arrayload, build_java_monitor, expand_java_return,
6084 expand_load_internal, expand_java_NEW, build_get_class,
6085 build_instanceof, expand_java_CHECKCAST, expand_iinc,
6086 build_java_soft_divmod, build_java_binop, build_field_ref,
6087 expand_compare, expand_java_goto, expand_java_switch,
6088 expand_java_add_case, build_class_init, build_known_method_ref,
6089 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
6090 expand_invoke, build_jni_stub, expand_java_field_op,
6091 java_expand_expr, expand_byte_code, STORE_INTERNAL,
6092 force_evaluation_order, emit_init_test_initialization): Convert
6093 calls to "build" into calls to the prefered "buildN" functions.
6095 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
6097 * java-tree.h (set_block): Remove.
6098 * lang.c (java_clear_binding_stack): New.
6099 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6100 * decl.c (struct binding_level): Remove this_block.
6101 (clear_binding_level): Likewise.
6102 (poplevel): Don't handle this_block.
6103 (set_block): Remove.
6105 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
6107 * class.c (common_enclosing_context_p): Remove statement with no
6110 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6113 * parse.y (create_anonymous_class): Remove 'location' argument. Use
6114 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6115 (craft_constructor): Inherit access flags for implicit constructor
6116 from the enclosing class.
6117 (create_class): Fix comment typo.
6118 (resolve_qualified_expression_name): Pass type of qualifier to
6119 not_accessible_p, not the type in which target field was found.
6120 (not_accessible_p): Handle inner classes. Expand protected
6121 qualifier-subtype check to enclosing instances, but don't apply this
6122 check to static members. Allow protected access to inner classes
6123 of a subtype. Allow private access within common enclosing context.
6124 (build_super_invocation): Get WFL line number info from current
6126 (build_incomplete_class_ref): Update for new create_anonymous_class
6128 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6129 common_enclosing_instance_p.
6130 * class.c (common_enclosing_context_p): New. Determine if types
6131 share a common enclosing context, even across static contexts.
6132 (common_enclosing_instance_p): Renamed from
6133 common_enclosing_context_p. Determines if types share a common
6134 non-static enclosing instance.
6135 * java-tree.h (common_enclosing_instance_p): Declare.
6136 * jcf-write.c (get_method_access_flags): New. Surpress private flag
6137 for inner class constructors.
6138 (generate_classfile): Use get_method_access_flags.
6140 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6142 * class.c (interface_of_p): Check for null TYPE_BINFO.
6144 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
6146 * class.c (make_class): Do not create binfo here.
6147 (set_super_info): Create it here.
6148 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6150 2004-07-08 Richard Henderson <rth@redhat.com>
6152 * expr.c (case_identity, get_primitive_array_vtable,
6153 java_expand_expr, emit_init_test_initialization): Remove.
6154 * java-tree.h (java_expand_expr): Remove.
6155 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6157 2004-07-07 Per Bothner <per@bothner.com>
6159 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
6160 get internal error due to mismatched types.
6162 * gcj.texi (Invoking gij): Document new -verbose:class flag.
6164 * gcj.texi (Linking): New node. Document -lgij usage.
6166 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
6168 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6169 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6170 * java/class.c (set_super_info, class_depth, interface_of_p,
6171 maybe_add_interface, add_interface, make_class_data,
6172 layout_class, add_miranda_methods): Adjust BINFO macros.
6173 * expr.c (can_widen_reference_to, lookup_field): Likewise.
6174 * jcf-write.c (generate_classfile): Likewise.
6175 * parse.y (patch_anonymous_class,
6176 check_inner_circular_reference, check_circular_reference,
6177 java_complete_class, check_abstract_method_definitions,
6178 java_check_abstract_method_definitions,
6179 check_interface_throws_clauses, java_check_abstract_methods,
6180 lookup_java_interface_method2,
6181 find_applicable_accessible_methods_list): Likewise.
6182 * typeck.c (find_method_in_interface): Likewise.
6183 * verify.c (merge_types): Likewise.
6185 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
6187 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6188 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6190 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
6192 * class.c (make_class): Use make_tree_binfo.
6193 (set_super_info, add_interface_do): Likewise.
6194 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6196 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6198 * verify.c: Correct array element access formatting thinko.
6200 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6202 * verify.c: Insert a short blurb at the start referring to the JVMS.
6203 (merge_type_state): Remove redundant nested if statement.
6204 (verify_jvm_instructions): Ensure current_subr is initialised to
6206 Minor formatting fixes all over the place.
6208 2004-07-02 Richard Henderson <rth@redhat.com>
6210 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6212 2004-07-01 Richard Henderson <rth@redhat.com>
6214 * class.c (registerClass_libfunc): Remove.
6215 (init_class_processing): Don't set it.
6216 (emit_register_classes): Take list_p parameter. Fill it in
6217 with _Jv_RegisterClass calls.
6218 * decl.c (java_init_decl_processing): Don't call
6219 init_resource_processing.
6220 * jcf-parse.c (java_emit_static_constructor): New.
6221 (java_parse_file): Call it.
6222 * resource.c (registerResource_libfunc): Remove.
6223 (init_resource_processing): Remove.
6224 (write_resource_constructor): Take list_p parameter. Fill it in
6225 with _Jv_RegisterResource calls.
6226 * java-tree.h: Update prototypes.
6228 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
6231 * class.c (layout_class_method): Do not override package-private
6232 method if its in a different package.
6233 (split_qualified_name): Move here from parse.y. Rename from
6234 breakdown_qualified. Add comment.
6235 (in_same_package): Move here from parse.y. Add comment.
6236 * java-tree.h (break_down_qualified, in_same_package): Declare.
6237 (in_same_package): Likewise.
6238 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6241 2004-06-29 Andrew Haley <aph@redhat.com>
6243 * except.c (expand_start_java_handler): Push a new binding level.
6244 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
6245 register_exception_range() to register where we'll do it.
6246 (expand_end_java_handler): Remove old bogus code. Replace with
6247 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6248 the top of the expression we're curently building.
6249 (maybe_end_try): Delete.
6250 * decl.c (binding_level.exception_range): New field.
6251 (clear_binding_level): Add field exception_range. Reformat.
6252 (poplevel): Call expand_end_java_handler().
6253 (poplevel): Call java_add_stmt only if functionbody is false.
6254 (maybe_poplevels): Don't call maybe_end_try() from here.
6255 (end_java_method): Clear no longer used trees in function decl.
6256 (register_exception_range): New function.
6257 * java-tree.h (register_exception_range, struct eh_range): Declare.
6259 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
6261 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6263 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
6266 * expr.c (class_has_finalize_method): Fix method name indentation.
6267 (expand_java_call): Remove K&R style parameter declaration.
6268 (expand_invoke): Fix statement indentation.
6269 (expand_java_field_op): Likewise.
6270 * parse-scan.y: Fix typo.
6271 (reset_report): Fix method name indentation.
6272 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6274 * verify.c (verify_jvm_instructions): Document parameters, insert
6276 * lang.c (lang_init_source): Fix method name indentation.
6277 * class.c (common_enclosing_context_p): Likewise.
6278 (emit_symbol_table): Fix parameter list indentation.
6279 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6280 parameter declaration.
6281 * constants.c: Fix copyright notice indentation.
6282 * typeck.c (find_method_in_superclasses): Fix parameter list
6284 (find_method_in_interfaces): Likewise.
6285 * zextract.c (makelong): Fix method name indentation.
6287 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6290 * parse.y (create_interface): Set correct access modifiers for
6292 * jcf-write.c (get_classfile_modifiers): New function.
6293 (generate_classfile): Use get_classfile_modifiers, not
6296 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6298 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6299 dependency to current parser context, not NULL_TREE, for top-level
6301 (jdep_resolve_class): Enable member access check for all inner
6304 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6306 * parse.y (qualify_and_find): Pass type decl, not identifier, to
6309 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6312 * expr.c (expand_java_field_op): Ensure that target class for static
6313 field access has been loaded.
6315 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6316 Ranjit Mathew <rmathew@hotmail.com>
6318 PR java/1207, java/16178
6319 * jcf-parse.c (load_class): Return immediately if passed a type decl
6320 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6321 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6322 before calling load_class.
6323 (qualify_and_find): Likewise.
6324 (find_in_imports_on_demand): Likewise.
6325 (find_applicable_accessible_methods_list): Likewise.
6327 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
6329 * parse.y (java_layout_seen_class_methods): Don't call load_class
6330 on class defined by source parser.
6332 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
6334 * parse.y (set_nested_class_simple_name_value): Removed.
6335 (java_complete_expand_class): Remove calls to
6336 set_nested_class_simple_name_value.
6338 2004-06-22 Andrew Haley <aph@redhat.com>
6339 Ranjit Mathew <rmathew@hotmail.com>
6341 Fixes PR java/16113.
6342 * decl.c (force_poplevels): Remove call to expand_end_bindings.
6344 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
6346 * parse.y (create_class): Correct diagnostic message about
6347 java.lang.Object extending anything else.
6349 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6351 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6352 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6353 * constants.c (build_ref_from_constant_pool): Likewise.
6354 * expr.c (build_java_array_length_access): Likewise.
6355 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6356 (invoke_build_dtable, build_invokevirtual): Likewise.
6357 (build_invokeinterface, java_expand_expr): Likewise.
6358 (emit_init_test_initialization): Likewise.
6359 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6360 * parse.y (make_qualifed_name, build_array_ref): Likewise.
6362 2004-06-21 Andrew Haley <aph@redhat.com>
6364 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6367 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
6369 * jcf.h (struct JCF): Change java_source, right_zip and finished
6371 * lex.h (struct java_lexer): Change hit_eof, read_anything,
6372 byte_swap and use_fallback to unsigned int.
6373 * parse.h (struct _jdep): Change flag0 to unsigned int.
6375 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
6378 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6379 before trying to lay out its methods.
6380 * jcf-parse.c (read_class): Track parsed files using canonical paths
6381 obtained via lrealpath from libiberty.
6382 (java_parse_file): Likewise.
6383 (parse_source_file_1): Rename formal parameter to reflect its
6384 modified purpose. Minor formatting fix.
6386 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6388 * class.c (emit_register_classes): Make the function uninlinable,
6389 do not set current_function_cannot_inline.
6390 * resource.c (write_resource_constructor): Do not reset
6391 flag_inline_functions around rest_of_compilation.
6393 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
6396 * expr.c (java_truthvalue_conversion): Handle
6397 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6398 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6399 i.e. return the expression.
6401 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
6403 * gjavah.c: Include version.h
6405 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
6407 * jcf-write.c (generate_bytecode_conditional): Correct handling
6408 of unordered conditionals. Add comment.
6410 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
6411 Per Bothner <per@bothner.com>
6413 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6414 local variable was initialised upon declaration.
6415 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6416 variable was final and initialised upon declaration.
6417 * check-init.c (check_final_reassigned): Give error only if a blank
6418 final is not definitely unassigned or if an initialised final is
6420 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6421 assignment expressions. Remove case MODIFY_EXPR, label do_default.
6422 (check_init): Perform initialised-variable-removing-optimisation
6423 only on non-final local variables.
6425 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6427 * jcf-write.c (generate_bytecode_conditional): Handle binops
6428 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6430 (generate_bytecode_insns): Likewise.
6432 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6434 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6435 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6437 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6439 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6440 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6442 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6444 * decl.c (struct binding_level): Add GTY marker. Compile
6445 binding_depth unconditionally.
6446 (current_binding_level, free_binding_level, global_binding_level):
6448 (clear_binding_level): Unconditionally set binding_depth.
6449 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6451 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6453 * lex.c (java_new_lexer): Set 'encoding'.
6454 (java_read_char): Improve error message for unrecognized characters.
6455 * lex.h (struct java_lexer): New field 'encoding'.
6457 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6459 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6461 2004-05-21 Mark Wielaard <mark@klomp.org>
6463 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6466 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
6468 * typeck.c: Remove non-printable character 160.
6470 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
6472 * check-init.c: Correct minor typos.
6474 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6476 * Make-lang.in, expr.c, java-gimplify.c: Rename
6477 tree-simple.[ch] to tree-gimple.[ch].
6479 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
6481 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6483 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6485 Merge from tree-ssa-20020619-branch. See
6486 ChangeLog.tree-ssa for details.
6488 * Make-lang.in, builtins.c, check-init.c, class.c,
6489 constants.c, decl.c, except.c, expr.c, java-except.h,
6490 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6491 lang.c, lang.opt, parse.y, resource.c: Merged.
6492 * java-gimplify.c: New file.
6494 2004-05-10 Andrew Haley <aph@redhat.com>
6496 * parse.y (create_class): Set TYPE_VFIELD.
6497 * decl.c (java_init_decl_processing): Likewise.
6499 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6500 * class.c (make_method_value): Replace DECL_VINDEX with call to
6502 (get_dispatch_vector): Likewise.
6503 (layout_class_method): Likewise.
6504 Replace set of DECL_VINDEX with call to set_method_index().
6505 (set_method_index): New function.
6506 (get_method_index): New function.
6507 * java-tree.h (set_method_index): New function decl.
6508 (get_method_index): New function decl.
6510 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
6512 * parse.y (check_pkg_class_access): Add new argument
6513 and use it when cl is NULL to call lookup_cl on it.
6514 (parser_check_super_interface): Do not call lookup_cl.
6515 Pass this_decl to check_pkg_class_access and NULL
6516 instead of lookup_cl.
6517 (parser_check_super): Update for change in
6518 check_pkg_class_access.
6519 (do_resolve_class): Likewise.
6520 (process_imports): Likewise.
6521 (find_in_imports_on_demand): Likewise.
6522 (resolve_qualified_expression_name): Likewise.
6524 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6526 Fixes PR java/9685, PR java/15073
6527 * parse.y (accessibility_string): New method.
6528 (not_accessible_field_error): Use accessibility_string()
6529 instead of java_accstring_lookup().
6530 (resolve_qualified_expression_name): Check with
6531 check_pkg_class_access() before allowing access using
6534 Use check_pkg_class_access() instead of not_accessible_p()
6535 for unqualified types.
6536 (not_accessible_p): Use DECL_CONTEXT (member) instead of
6537 REFERENCE for package-private access checking.
6538 (patch_method_invocation): Use accessibility_string() instead
6539 of java_accstring_lookup().
6541 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6544 * gjavah.c (struct method_name): Add member is_native.
6545 (overloaded_jni_method_exists_p): Match candidate method only if
6547 (print_method_info): Initialise is_native flag from the method's
6550 2004-04-30 Roger Sayle <roger@eyesopen.com>
6552 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6553 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6555 2004-04-22 Roger Sayle <roger@eyesopen.com>
6557 * resource.c (write_resource_constructor): Guard call to possibly
6558 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6560 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6562 * class.c (make_class_data): Add new field aux_info.
6563 * decl.c (java_init_decl_processing): Push type and decl for
6566 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6568 * expr.c (expand_java_NEW): Don't use size argument for
6569 _Jv_AllocObject calls.
6570 * parse.y (patch_invoke): Likewise.
6572 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6574 * expr.c (build_invokeinterface): Remove unused variables to
6577 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6579 * class.c (get_interface_method_index): New function. Return dispatch
6580 index for interface method.
6581 (make_method_value): For interface methods, set index field to
6582 iface dispatch index, not DECL_VINDEX.
6583 * expr.c (build_invokeinterface): Use get_interface_method_index.
6585 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6587 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6589 2004-03-31 Andrew Haley <aph@redhat.com>
6592 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6594 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6596 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6597 form of GTY markers.
6599 2004-03-25 Marcus Meissner <meissner@suse.de>
6602 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6604 2004-03-23 Tom Tromey <tromey@redhat.com>
6607 * jcf-write.c (make_class_file_name): Don't report if mkdir
6610 2004-03-23 Tom Tromey <tromey@redhat.com>
6612 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6614 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6616 * class.c, gjavah.c, lang.c: Fix comment typos.
6617 * gcj.texi: Fix typos.
6619 2004-03-19 Per Bothner <per@bothner.com>
6621 * gcj.texi (Code Generation): Document new flags and assert defaults.
6623 * class.c (assume_compiled_node_struct): Rename type to
6624 class_flag_node_struct, as it is now also used for enable_assertions.
6625 Rename assume_compiled_node typedef. Rename excludep field to value.
6626 (find_assume_compiled_node): Rename function to find_class_flag_node.
6627 Minor optimization - avoid needless strlen.
6628 (add_assume_compiled): Some tweaking and optimization.
6629 Rename and generalize to add_class_flag takem an extra parameter.
6630 (add_assume_compled): New just calls add_class_flag.
6631 (add_enable_assert, enable_assertions): New functions.
6632 (enable_assert_tree): New static.
6633 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6634 * lang.opt (fenable-assertions, fenable-assertions=,
6635 fdisable-assertions, fdisable-assertions=): New options.
6636 * lang.c (java_handle_option): Handle new options.
6637 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6638 class in an interface - create helper class nested in outer interface.
6639 (build_assertion): Short-circuit if enable_assertions is false.
6641 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6643 * java-tree.h: Changes throughout to add checking to macros
6644 and numerous whitespace changes.
6645 (VAR_OR_FIELD_CHECK): New macro.
6646 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6647 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6649 2004-03-16 Per Bothner <per@bothner.com>
6651 * jcf-jump.c (options): New --print-constants option.
6652 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6654 * jcf-dump.c (flag_print_constant_pool): Default to off.
6655 (print_constant_terse_with_index): New helper function.
6656 (various places): Check flag_print_constant_pool where missing.
6657 (main): If verbose set flag_print_constant_pool.
6658 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6660 2004-03-15 Andrew Haley <aph@redhat.com>
6663 * parse.y (java_complete_lhs): Check that final variable has an
6666 2004-03-12 Andrew Haley <aph@redhat.com>
6669 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6672 2004-02-29 Roger Sayle <roger@eyesopen.com>
6674 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6677 2004-02-27 Per Bothner <per@bothner.com>
6679 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6680 suggestion: Use build_incomplete_class_ref.
6681 This fixes PR java/13508, java/11714.
6683 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6685 * java/parse.h: Update copyright.
6687 2004-02-26 Andrew Haley <aph@redhat.com>
6690 * parse.y (check_interface_throws_clauses): Check for
6691 !METHOD_INVISIBLE (iface_method).
6692 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6693 well as CLASS_ABSTRACT.
6695 2004-02-25 Per Bothner <per@bothner.com>
6697 * parse.y (build_assertion): If we're in an inner class, create the
6698 class$ helper routine in the outer class.
6700 2004-02-19 Richard Henderson <rth@redhat.com>
6702 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6704 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6706 * Make-lang.in (java.install-man): Add extra dependencies.
6708 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6710 * Make-lang.in: Install man pages under the same names
6711 (possibly transformed) as the program they document.
6713 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6715 * gjavah.c: Include "intl.h".
6716 (error): New function.
6717 (main): Call gcc_init_libintl.
6718 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6719 print_stub_or_jni, process_file, main): Use error rather than
6721 (print_method_info, usage, help, version, main): Mark strings for
6722 translation with _. Avoid splitting up sentences. Send
6723 information messages to stdout.
6724 * jcf-dump.c: Include "intl.h".
6725 (main): Call gcc_init_libintl.
6726 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6727 Mark error, usage and version messages for translation with _.
6728 Avoid splitting up sentences.
6729 * jv-scan.c: Include "intl.h".
6730 (fatal_error, warning): Change parameter s to msgid. Translate
6732 (main): Call gcc_init_libintl.
6733 (usage, help, version): Mark error, usage and version messages for
6734 translation with _. Avoid splitting up sentences.
6735 * jvgenmain.c: Include "intl.h".
6736 (main): Call gcc_init_libintl.
6737 (usage, main): Mark error messages for translation with _.
6738 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6739 JVGENMAIN_OBJS): Add intl.o.
6740 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6741 java/jvgenmain.o): Update dependencies.
6743 2004-02-08 Per Bothner <per@bothner.com>
6745 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6746 class don't use not_accessible_field_error, which can get confused.
6748 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6750 Make-lang.in (po-generated): Delete.
6752 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6754 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6756 * decl.c: Include target.h.
6757 (start_java_method): Replace PROMOTE_PROTOTYPES with
6758 targetm.calls.promote_prototypes.
6759 * expr.c: Include target.h.
6760 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6761 targetm.calls.promote_prototypes.
6762 * parse.y: Include target.h.
6763 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6764 with targetm.calls.promote_prototypes.
6766 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6768 * typeck.c: Update copyright.
6770 2004-02-02 Tom Tromey <tromey@redhat.com>
6772 * decl.c (java_init_decl_processing): Remove duplicate
6775 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6777 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6779 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6781 * expr.c (build_field_ref): Move variable
6784 2004-01-28 Andrew Haley <aph@redhat.com>
6786 * expr.c (build_field_ref): Widen field offset.
6788 2004-01-27 Andrew Haley <aph@redhat.com>
6791 * parse.y (check_interface_throws_clauses): Make sure class_decl
6794 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6797 * parse.y (patch_assignment): Don't modify lhs_type for
6798 reference assignments.
6800 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6802 * Make-lang.in: Replace $(docdir) with doc.
6803 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6804 (java.install-man): Revamp rule.
6806 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6808 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6809 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6810 instead of deferred backquote.
6812 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6814 * typeck.c (find_method_in_interfaces): Move variable
6817 2004-01-16 Andrew Haley <aph@redhat.com>
6820 * typeck.c (shallow_find_method): New.
6821 (find_method_in_superclasses): New.
6822 (find_method_in_interfaces): New.
6823 (lookup_do): Rewrite.
6824 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6826 * jcf-parse.c (read_class): Save and restore output_class.
6827 * decl.c (java_expand_body): Set output_class from fndecl.
6829 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6831 * class.c (gen_indirect_dispatch_tables): Fix string length
6834 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6836 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6837 (java.srcextra): Copy above back to source directory if requested.
6838 (po-generated): Delete reference to $(parsedir).
6839 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6842 2004-01-14 Jan Hubicka <jh@suse.cz>
6844 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6847 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6849 * java-tree.h (java_expand_expr): Change prototype.
6850 * expr.c (java_expand_expr): Add alt_rtl parameter.
6852 2004-01-09 Andrew Haley <aph@redhat.com>
6855 * parse.y (java_fix_constructors): Set output_class.
6856 (java_reorder_fields): Likewise.
6857 (java_layout_classes): Likewise.
6858 (java_expand_classes): Generate indirect dispatch tables.
6859 (java_expand_classes): Set output_class.
6860 (java_finish_classes): Likewise.
6861 * lang.c (java_init): Turn on always_initialize_class_p if we're
6862 using indirect dis[atch.
6863 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6864 (java_get_callee_fndecl): Use class local atable.
6866 (always_initialize_class_p): Decl moved to java-tree.h.
6867 (HANDLE_CLASS_INFO): Set output_class.
6868 (read_class): Likewise.
6869 (parse_class_file): Call gen_indirect_dispatch_tables.
6870 (parse_zip_file_entries): Set output_class.
6871 (java_parse_file): Set output_class. Don't emit symbol tables.
6872 * java-tree.h (output_class): New.
6873 Remove global declarations for otable, atable, and ctable.
6874 (always_initialize_class_p): moved here from decl.c.
6876 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6877 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6878 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6879 (struct lang_type): Add otable_methods, otable_decl,
6880 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6881 ctable_decl, catch_classes, type_to_runtime_map.
6882 * expr.c (build_field_ref): Make otable, atable, and ctable class
6883 local rather than global.
6884 (build_known_method_ref): Likewise.
6885 (build_invokeinterface): Likewise.
6886 (java_expand_expr): Pass runtime type (rather than actual type) to
6888 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6889 this class. Look up each class in that map to delete duplicates.
6890 (expand_end_java_handler): Pass runtime type (rather than actual
6891 type) to expand_start_catch.
6892 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6894 (java_init_decl_processing): Rearrange things. Remove global
6895 declarations of otable, atable, and ctable.
6896 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6897 (java_expand_body): Set output_class.
6898 * constants.c (build_constant_data_ref): Use output_class, not
6900 (alloc_name_constant): Likewise.
6901 * class.c (gen_indirect_dispatch_tables): New.
6902 (build_class_ref): Generate hard reference to superclass, even if
6903 using indirect dispatch.
6904 (build_static_field_ref): Use class local atable.
6905 (make_class_data): Generate hard reference to superclass, even if
6906 using indirect dispatch.
6907 Generate symbolic references to interfaces when using indirect
6909 (make_class_data): Emit otable, atable, and ctable.
6910 Make otable, atable, and ctable class local rather than global.
6911 (emit_catch_table): Make otable, atable, and ctable class local
6914 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6916 * parse.y (catch_clause_parameter): Fix typo.
6919 * parse.y: (catch_clause_parameter): Return early if $3, aka
6920 formal_parameter, is null.
6922 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6924 * class.c: Remove uses of "register" specifier in
6925 declarations of arguments and local variables.
6928 * gjavah.c: Likewise.
6929 * jcf-dump.c: Likewise.
6930 * jcf-io.c: Likewise.
6931 * jcf-parse.c: Likewise.
6932 * jcf-write.c: Likewise.
6933 * keyword.h: Likewise.
6934 * parse.y: Likewise.
6935 * typeck.c: Likewise.
6936 * verify.c: Likewise.
6938 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
6940 * Make-lang.in (GCJ_CROSS_NAME): Delete.
6941 (java.install_common, java.install-man): Adjust for above.
6942 (java.uninstall): Likewise.
6944 2003-12-03 Michael Koch <konqueror@gmx.de>
6946 * class.c (make_class_data):
6947 Push field value to 'hack_signers' instead of 'signers'.
6948 * decl.c (java_init_decl_processing):
6949 Push field 'hack_signers' instead of 'signers'.
6951 2003-12-03 Zack Weinberg <zack@codesourcery.com>
6953 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6956 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
6959 * parse.y (qualify_ambiguous_name): Remove lots of broken
6960 field access processing - there's no need to do that here,
6961 because we have resolve_field_access. Remove
6962 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6963 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6966 2003-12-01 Jeff Sturm <jsturm@one-point.com>
6969 * parse.y (java_complete_lhs): Save location prior to patching
6972 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
6975 * resource.c (write_resource_constructor): Append
6976 "_resource" to constructor identifier name.
6978 2003-11-25 Jeff Sturm <jsturm@one-point.com>
6981 * constants.c (cpool_for_class): New function.
6982 (outgoing_cpool): Remove global variable.
6983 (alloc_name_constant): Use cpool_for_class.
6984 (build_constants_constructor): Likewise.
6985 * decl.c (java_expand_body): Set current_class.
6986 * java-tree.h (outgoing_cpool) Remove declaration.
6987 (init_outgoing_cpool): Likewise.
6988 * jcf-parse.c (init_outgoing_cpool): Remove function.
6989 (parse_class_file): Don't call init_outgoing_cpool.
6990 * parse.y (java_complete_expand_methods): Don't call
6991 init_outgoing_cpool. Don't save outgoing_cpool.
6992 (java_expand_classes): Don't restore outgoing_cpool.
6993 (java_finish_classes): Likewise.
6995 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
6997 * Make-lang.in: (java.install-common) Add
6998 symlink for $(target_noncanonical)-gcjh for
7001 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
7003 * Make-lang.in (java.extraclean): Delete.
7005 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
7007 * Make-lang.in (check-java): Add.
7009 2003-11-19 Jeff Sturm <jsturm@one-point.com>
7012 * except.c (prepare_eh_table_type): Allocate variable-sized
7013 buffer `buf' with alloca.
7015 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7019 decl.c (java_init_decl_processing): Don't initialize
7020 class_not_found_type_node, no_class_def_found_type_node.
7022 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
7023 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
7024 (class_not_found_type_node, no_class_def_found_type_node):
7027 parse.y (build_dot_class_method_invocation): Add this_class
7028 argument. Qualify method invocations to a different class.
7029 (create_new_parser_context): Initialize saved_data_ctx to 0.
7030 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
7031 (build_dot_class_method): Don't load classes. Register
7033 (build_incomplete_class_ref): Special cases for interfaces
7034 and inner classes. Move build_dot_class_method call to here...
7035 (patch_incomplete_class_ref): ...from here. Pass current_class
7036 to build_dot_class_method_invocation.
7037 (build_assertion): Pass class_type to
7038 build_dot_class_method_invocation.
7039 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
7041 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7044 * java-tree.h (BLOCK_EMPTY_P): Define.
7045 * parse.y (java_complete_lhs): Check for empty blocks
7046 in TRY_FINALLY_EXPR case.
7048 2003-11-17 Andrew Haley <aph@redhat.com>
7050 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
7051 (struct lang_decl_var:freed): New variable.
7052 * decl.c (poplevel): Mark local vars that have gone out of scope.
7053 (push_jvm_slot): Don't use the RTL of a var that has gone out of
7056 2003-11-16 Jason Merrill <jason@redhat.com>
7058 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
7059 and TAGS files that include them for each front end.
7061 2003-11-15 Tom Tromey <tromey@redhat.com>
7063 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
7065 2003-11-12 Jason Merrill <jason@redhat.com>
7067 PR optimization/12547
7068 * lang.c (java_tree_inlining_walk_subtrees): Just walk
7069 BLOCK_EXPR_BODY directly.
7071 2003-11-12 Andrew Haley <aph@redhat.com>
7074 * parse.y (fold_constant_for_init): Check that we really do have a
7078 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
7079 init_test_decls being inlined.
7082 * parse.y (do_resolve_class): Check return value from
7083 breakdown_qualified().
7085 2003-11-11 Tom Tromey <tromey@redhat.com>
7088 * parse.y (merge_string_cste): Handle case where we have a
7089 pointer that happens to be zero, not null_pointer_node.
7091 2003-11-10 Tom Tromey <tromey@redhat.com>
7093 * jcf-parse.c (classify_zip_file): Correctly compare
7094 filename_length against length of manifest file's name.
7096 2003-11-08 Tom Tromey <tromey@redhat.com>
7099 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
7101 2003-11-06 Andrew Haley <aph@redhat.com>
7103 * expr.c (java_stack_swap): Make sure destination stack slots are
7104 of the correct type.
7106 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
7108 * Make-lang.in (dvi): Move targets to $(docobjdir).
7109 (gcj.dvi): Simplify rule and adjust target.
7110 (gcj.info): Simplify rule.
7111 (gcj.pod): New intermediate rule.
7112 (gcjh.pod): Likewise.
7113 (jv-scan.pod): Likewise.
7114 (jcf-dump.pod): Likewise.
7115 (gij.pod): Likewise.
7116 (jv-convert.pod): Likewise.
7117 (rmic.pod): Likewise.
7118 (rmiregistry.pod): Likewise.
7121 (jv-scan.1): Delete.
7122 (jcf-dump.1): Delete.
7124 (jv-convert.1): Delete.
7126 (rmiregistry.1): Delete.
7128 2003-11-02 Jeff Sturm <jsturm@one-point.com>
7130 Fixes PR java/12866.
7131 * parse.y (resolve_qualified_expression_name): Move test
7132 for outer field access methods from here...
7133 (check_thrown_exceptions) ...to here.
7135 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
7137 * .cvsignore: Delete.
7139 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
7141 * verify.c (verify_jvm_instructions): Don't warn about legal
7142 eh binding regions generated for example by jdk 1.4.1.
7144 2003-10-24 David S. Miller <davem@redhat.com>
7146 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7148 2003-10-22 Andrew Haley <aph@redhat.com>
7150 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7151 (java_get_callee_fndecl): New.
7153 * jcf-parse.c (java_parse_file): Call emit_catch_table().
7155 * java-tree.h (ctable_decl): New.
7156 (catch_classes): New.
7157 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7159 * decl.c (java_init_decl_processing): Add catch_class_type.
7161 Add catch_classes field.
7163 * class.c (build_indirect_class_ref): Break out from
7165 (make_field_value): Check flag_indirect_dispatch.
7166 (make_class_data): Ditto.
7167 Tidy uses of PUSH_FIELD_VALUE.
7168 Add field catch_classes.
7169 (make_catch_class_record): New.
7171 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7173 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7175 * jcf-write.c: Follow spelling conventions.
7176 * parse.y: Likewise.
7178 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7180 * ChangeLog: Fix typos.
7181 * expr.c: Fix comment typos.
7182 * jcf-write.c: Likewise.
7185 * mangle.c: Likewise.
7186 * parse-scan.y: Likewise.
7187 * parse.y: Likewise.
7189 2003-10-22 Tom Tromey <tromey@redhat.com>
7191 * expr.c (expand_byte_code): Only warn about dead bytecode when
7192 extra_warnings is set.
7194 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
7196 Fix for PR java/12586.
7197 * mangle.c (find_compression_record_match): Don't iterate through
7198 package namespace elements unless they all match compression_table
7201 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
7203 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7204 (generate-manpages): Likewise.
7205 (java.maintainer-clean): Likewise.
7206 (gcj.info): Likewise.
7209 (jv-scan.1): Likewise.
7210 (jcf-dump.1): Likewise.
7212 (jv-convert.1): Likewise.
7214 (rmiregistry.1): Likewise.
7215 (java.install-man): Likewise.
7216 (parse-scan.o): Move and define complete compile line.
7217 (parse.o): Likewise.
7218 (jcf-tree-inline.o): Move.
7220 2003-10-20 Mark Mitchell <mark@codesourcery.com>
7222 * Make-lang.in (info): Update dependencies.
7223 (java.install-info): Remove.
7224 ($(srcdir)/java/gcj.info): Replace with ...
7225 ($(docobjdir)/gcj.info): ... this.
7227 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
7229 * Make-lang.in: Replace uses of $(target_alias) with
7230 $(target_noncanonical).
7232 2003-10-09 Tom Tromey <tromey@redhat.com>
7234 * decl.c (java_init_decl_processing): Declare signers field.
7235 * class.c (make_class_data): Set signers field.
7237 2003-10-09 Jason Merrill <jason@redhat.com>
7239 * parse.y (patch_assignment): Use make_node to create a BLOCK.
7240 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7243 2003-10-06 Mark Mitchell <mark@codesourcery.com>
7245 * Make-lang.in (java.info): Replace with ...
7247 (java.dvi): Replace with ...
7249 (java.generated-manpages): Replace with ...
7251 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
7253 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7255 2003-10-01 Andrew Haley <aph@redhat.com>
7257 * jcf-parse.c (java_parse_file): Write otable and atable.
7258 * java-tree.h (atable_methods): New.
7260 (atable_syms_decl): New.
7261 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7262 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7263 (symbol_*type): Rename method_symbol* to symbol*type.
7264 (emit_offset_symbol_table): Delete.
7265 (emit_symbol_table): New.
7266 (get_symbol_table_index): New.
7268 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7269 (build_known_method_ref): Likewise.
7270 (get_symbol_table_index): Rename from get_offset_table_index.
7271 Parameterize to allow re-use by differing types of symbol table.
7272 (build_invokevirtual): Pass table to get_offset_table_index.
7273 * decl.c (java_init_decl_processing): Push types and decls for
7274 atable and atable_syyms.
7275 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7276 (make_class_data): Add new fields atable and atable_syms.
7277 (emit_symbol_table): Rename from emit_offset_symbol_table.
7278 Parameterize to allow re-use by different types of symbol table.
7279 (build_symbol_entry): Renamed from build_method_symbols_entry.
7281 2003-09-30 Roger Sayle <roger@eyesopen.com>
7283 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7284 semantics for SAVE_EXPR, by caching the result in a temporary.
7286 2003-09-28 Richard Henderson <rth@redhat.com>
7288 * check-init.c (check_init): Save and restore input_location
7289 instead of file and line separately.
7290 * decl.c (java_expand_body): Likewise.
7291 * jcf-write.c (generate_bytecode_insns): Likewise.
7292 * parse.y (safe_layout_class): Likewise.
7293 * jcf-parse.c (read_class, parse_class_file): Likewise.
7294 (java_parse_file): Use %H for warning locator.
7296 2003-09-28 Roger Sayle <roger@eyesopen.com>
7298 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7299 with void-type branches instead of using a COMPOUND_EXPR.
7301 2003-09-28 Jeff Sturm <jsturm@one-point.com>
7303 * decl.c (java_optimize_inline, dump_function): Remove.
7304 * java-tree.h (java_optimize_inline): Remove declaration.
7305 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7306 * parse.y (source_end_java_method, java_expand_classes):
7307 Likewise. Remove dead code.
7309 2003-09-27 Roger Sayle <roger@eyesopen.com>
7311 * lang.c (java_init_options): Set flag_evaluation_order.
7312 * expr.c (force_evaluation_order): Don't attempt to force
7313 evaluation order of binary operations using save_expr.
7314 * parse.y (java_complete_lhs): No longer need to call
7315 force_evaluation_order when constructing binary operators.
7317 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
7318 Bryce McKinlay <bryce@mckinlay.net.nz>
7321 * parse.y (not_accessible_field_error): New function.
7322 (resolve_expression_name): Check field access permissions.
7323 (resolve_qualified_expression_name): Use
7324 not_accessible_field_error.
7325 (resolve_qualified_expression_name): Likewise.
7327 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7329 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7331 2003-09-23 Roger Sayle <roger@eyesopen.com>
7333 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7334 with equal operands without side-effects.
7336 2003-09-22 Jeff Sturm <jsturm@one-point.com>
7338 * decl.c (java_init_decl_processing): Don't emit otable decls
7339 if flag_indirect_dispatch is not set.
7341 2003-09-21 Richard Henderson <rth@redhat.com>
7343 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7346 2003-09-21 Richard Henderson <rth@redhat.com>
7348 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7349 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7351 2003-09-20 Richard Henderson <rth@redhat.com>
7353 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7355 2003-09-18 Roger Sayle <roger@eyesopen.com>
7357 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7358 * check-init.c (check_init): Likewise.
7360 2003-09-18 Roger Sayle <roger@eyesopen.com>
7362 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7364 2003-09-16 Andrew Haley <aph@redhat.com>
7366 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7368 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
7371 * mangle.c (find_compression_record_match): Skip
7372 over a "6JArray" (the array template mangled string)
7374 (mangle_array_type): Correct minor typo.
7375 (atms): Move definition to the beginning.
7377 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
7379 * class.c (add_miranda_methods): Ensure super-interfaces are laid
7380 out. Fix for PR java/12254.
7382 2003-09-11 Richard Henderson <rth@redhat.com>
7384 * parse.y (source_end_java_method): Update for new
7385 cgraph_finalize_function argument.
7387 2003-09-09 Richard Henderson <rth@redhat.com>
7389 * parse.y (source_end_java_method): Update call to
7390 cgraph_finalize_function.
7392 2003-09-03 Jeff Sturm <jsturm@one-point.com>
7394 * decl.c (java_expand_body): New function.
7395 * expr.c (build_class_init): Set DECL_IGNORED_P.
7396 * java-tree.h (start_complete_expand_method,
7397 java_expand_body): Declare.
7398 * jcf-parse.c (cgraph.h): Include.
7399 (java_parse_file): Handle flag_unit_at_a_time.
7400 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7401 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7402 (java_estimate_num_insns): Use walk_tree_without_duplicates.
7403 (java_start_inlining): New function.
7404 * parse.h (java_finish_classes): Declare.
7405 * parse.y: Include cgraph.h.
7406 (block): Don't special-case empty block production.
7407 (craft_constructor): Set DECL_INLINE.
7408 (source_end_java_method): Handle flag_unit_at_a_time.
7409 Replace inline code with call to java_expand_body.
7410 (start_complete_expand_method): Remove static modifier.
7411 (java_expand_method_bodies): Patch function tree for
7412 class initialization and/or synchronization as needed.
7413 Don't begin RTL expansion yet.
7414 (java_expand_classes): Check flag_unit_at_a_time before
7415 calling finish_class.
7416 (java_finish_classes): New function.
7417 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7418 (patch_assignment): Set DECL_CONTEXT on temporary variable.
7419 (emit_test_initialization): Set DECL_IGNORED_P.
7421 2003-09-03 Roger Sayle <roger@eyesopen.com>
7423 * builtins.c (enum builtin_type): Delete unused enumeration.
7424 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7426 2003-08-28 Tom Tromey <tromey@redhat.com>
7428 * gcj.texi (Extensions): Document gcjlib URLs.
7430 2003-08-20 Tom Tromey <tromey@redhat.com>
7432 * gcj.texi (Extensions): Added xref.
7433 (libgcj Runtime Properties): Document
7434 gnu.gcj.runtime.VMClassLoader.library_control.
7436 2003-08-20 Andrew Haley <aph@redhat.com>
7438 * except.c (prepare_eh_table_type): Use new encoding for exception
7439 handlers when using -fno-assume-compiled.
7441 2003-08-13 Tom Tromey <tromey@redhat.com>
7443 * gcj.texi (Invoking gij): Document -X and -?.
7445 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
7447 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7448 GCJH_OBJS, JCFDUMP_OBJS
7449 * win32-host.c: Removed the unnecessary and broken dependency
7452 2003-08-11 Tom Tromey <tromey@redhat.com>
7454 * parse.y (java_check_regular_methods): Typo fixes. Call
7455 check_interface_throws_clauses. Use
7456 check_concrete_throws_clauses.
7457 (check_interface_throws_clauses): New function.
7458 (check_concrete_throws_clauses): New function.
7459 (hack_is_accessible_p): New function.
7460 (find_most_specific_methods_list): Added FIXME.
7461 * typeck.c (lookup_do): Use `flags' argument to decide what to
7463 (lookup_argument_method_generic): New function.
7464 (lookup_argument_method2): Removed.
7465 * jcf.h (ACC_INVISIBLE): New define.
7466 * jcf-write.c (generate_classfile): Skip invisible methods.
7467 * class.c (add_miranda_methods): New function.
7468 (layout_class_methods): Use it.
7469 (get_access_flags_from_decl): Use ACC_INVISIBLE.
7470 * java-tree.h (METHOD_INVISIBLE): New define.
7471 (lang_decl_func) [invisible]: New field.
7472 (lookup_argument_method_generic): Declare.
7473 (SEARCH_INTERFACE): New define.
7474 (SEARCH_SUPER): Likewise.
7475 (SEARCH_ONLY_INTERFACE): Likewise.
7476 (SEARCH_VISIBLE): Likewise.
7477 (lookup_argument_method2): Removed declaration.
7479 2003-08-05 Tom Tromey <tromey@redhat.com>
7481 Fix for PR java/11600:
7482 * parse.y (java_complete_lhs): See whether we're calling a method
7484 (check_thrown_exceptions): Added `is_array_call' argument;
7485 fixed `clone' checking; updated all callers.
7487 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
7489 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7491 2003-08-03 Tom Tromey <tromey@redhat.com>
7493 * java-tree.h (METHOD_TRANSIENT): Removed.
7494 * decl.c (pushdecl): Removed some dead code.
7495 * class.c (get_access_flags_from_decl): Can't have transient
7497 (add_method_1): Can't have a transient method.
7499 2003-07-28 Andreas Jaeger <aj@suse.de>
7501 * jvspec.c: Convert to ISO C90 prototypes.
7503 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
7505 * decl.c (force_poplevels): Fix warning call.
7507 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7509 * expr.c (expand_java_field_op): Don't use xxx_with_decl
7510 (expand_java_field_op): Likewise.
7511 * class.c (layout_class_method): Likewise
7512 (emit_register_classes): Likewise.
7513 * decl.c (pushdecl): Likewise.
7514 (poplevel): Likewise.
7515 (force_poplevels): Likewise.
7516 (give_name_to_locals): Likewise.
7517 * check-init.c (check_for_initialization): Likewise.
7519 2003-07-24 Jason Merrill <jason@redhat.com>
7521 * java-tree.h: Move boolean_type_node et al to the back end.
7523 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7525 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7528 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
7530 * lang.opt: Don't show -MD_ and -MDD_.
7532 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
7534 * lang-options.h: Remove.
7535 * lang.opt: Add help text.
7537 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7539 * expr.c: Remove the last argument to expand_assignment().
7541 2003-07-09 Jan Hubicka <jh@suse.cz>
7543 * java-tree.h (DECL_NUM_STMTS): Rename to...
7544 (DECL_ESTIMATED_INSNS): ... this.
7545 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7546 New static functions.
7547 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7548 * parser.y (add_stmt_to_compound): Do not account statements.
7550 2003-07-08 Mark Wielaard <mark@klomp.org>
7552 * gcj.texi: CNI now expands to Compiled Native Interface.
7554 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7556 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7558 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7560 * expr.c (expand_byte_code): Adjist emit_line_note call.
7562 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
7564 * lang.c (java_handle_option): Don't handle filenames.
7566 2003-07-02 Zack Weinberg <zack@codesourcery.com>
7568 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7571 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7572 * jcf.h: Delete COMPARE_FILENAMES definition.
7574 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
7576 * lang.c (java_init_options): Update prototype.
7578 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7580 * decl.c (poplevel): Adjust define_label call.
7582 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7584 * gjavah.c (flag_jni): Make non-static.
7585 * parse-scan.y (ctxp): Make non-static.
7587 * class.c (build_method_symbols_entry)
7588 * expr.c (get_offset_table_index)
7589 * jcf-parse.c (jcf_parse):
7590 Mark the definition static, matching the forward declaration.
7592 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7594 * lang.c (java_handle_option): Don't check for missing arguments.
7596 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7598 * class.c (push_class): Use a location_t to save place.
7599 (emit_register_classes): Set input_location. Adjust
7600 expand_function_end call.
7601 * resource.c (write_resource_constructor): Likewise.
7602 * decl.c (end_java_method): Adjust expand_function_end call.
7603 * parse.y (source_end_java_method): Likewise.
7605 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7607 * lang.c (java_handle_option): Likewise.
7609 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7611 * lang.c (java_handle_option): Special-casing of optional
7612 joined arguments no longer needed.
7613 * lang.opt: Update switches that take optional argument.
7615 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7617 * lang.opt: Declare Java.
7618 * lang.c (java_init_options): Update.
7620 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7622 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7624 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7626 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7627 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7628 * lang.opt: -MD and -MMD have an underscore.
7630 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7632 * class.c (emit_register_classes): Adjust init_function_start
7634 * decl.c (complete_start_java_method): Likewise.
7635 * resource.c (write_resource_constructor): Likewise.
7637 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7639 * Make-lang.in: Update to use options.c and options.h.
7640 * lang.c: Include options.h not j-options.h.
7641 (java_handle_option): Abort on unrecognized option.
7642 (java_init_options): Request Java switches.
7644 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7646 * Make-lang.in: Handle mostlyclean.
7648 2003-06-11 Tom Tromey <tromey@redhat.com>
7650 * lang.c (java_handle_option): Update dependency_tracking for
7653 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7656 2003-06-10 Andrew Haley <aph@redhat.com>
7658 * resource.c (write_resource_constructor): Use expand_expr to
7659 generate the address of the label attached to a resource.
7660 * Make-lang.in (java/resource.o): Add expr.h
7662 2003-06-10 Andrew Haley <aph@redhat.com>
7664 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7665 (java_decl_ok_for_sibcall): New.
7667 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7669 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7670 (java/j-options.c, java/j-options.h): New.
7671 * java-tree.h (resource_name, compile_resource_file,
7672 compile_resource_data): Constify.
7673 * jcf-write.c (jcf_write_base_directory): Similarly.
7674 * jcf.h (jcf_write_base_directory): Similarly.
7675 * lang.c: Include j-options.h.
7676 (cl_options_count, cl_options, string_option, java_decode_option,
7677 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7678 process_option_with_no): Remove.
7679 (resource_name): Constify.
7680 (LANG_HOOKS_HANDLE_OPTION): Override.
7681 (java_handle_option): New.
7682 (java_init): Don't call jcf_path_init.
7683 (java_init_options): Call jcf_path_init.
7685 * resource.c (compile_resource_data, compile_resource_file): Constify.
7687 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7689 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7690 (struct lang_decl_func): Add last_line field.
7691 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7692 DECL_SOURCE_LINE_LAST): Remove.
7693 * parse.y (missing_return_error, finish_method_declaration,
7694 lookup_cl, start_artificial_method_body, source_end_java_method,
7695 start_complete_expand_method): Adjust.
7697 2003-06-08 Tom Tromey <tromey@redhat.com>
7699 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7700 fno-assume-compiled.
7702 2003-06-08 Roger Sayle <roger@eyesopen.com>
7704 * builtins.c (define_builtin_type, builtin_types): Delete.
7705 (define_builtin): Rewritten to take just the built-in code,
7706 the function's name, type and fallback library function name.
7707 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7708 (initialize_builtins): Overhaul to define the GCC builtins
7709 used by gcj manually, providing the Java run-time's
7710 implementations as the fallback library function.
7712 2003-06-08 Anthony Green <green@redhat.com>
7714 * parse.y (patch_cast): Fix conversions from floating-point to
7717 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7719 * Make-lang.in: Update.
7720 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7722 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7724 * lang.c (java_init_options): Update.
7726 2003-06-05 Jan Hubicka <jh@suse.cz>
7728 * Make-lang.in: Add support for stageprofile and stagefeedback
7730 2003-05-31 Roger Sayle <roger@eyesopen.com>
7732 * lang.c (java_init_options): Prescribe wrap-around two's
7733 complement arithmetic overflow by setting flag_wrapv.
7735 2003-05-29 Roger Sayle <roger@eyesopen.com>
7737 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7738 (builtin_record): Add an additional builtin_code field to
7739 record which GCC built-in corresponds to the Java function.
7740 (java_builtins): Add new entries for atan, atan2, exp, log,
7742 (max_builtin, min_builtin, abs_builtin): Perform constant
7743 folding on the resulting tree.
7744 (java_build_function_call_expr): Likewise, perform constant
7745 folding on the resulting tree.
7746 (initialize_builtins): The NULL creators are now allowed in
7747 the java_builtins table, which is now terminated by an entry
7748 with builtin_code == END_BUILTINS.
7749 (check_for_builtin): Likewise. If the matching creator is
7750 NULL, construct the call using java_build_function_call_expr
7751 directly with the decl for the corresponding builtin_code.
7753 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7755 * win32-host.c: Normalize copyright boilerplate.
7757 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7759 * parse.y (print_int_node): Use string concatentation on
7760 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7761 function calls into one.
7763 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7765 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7766 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7767 all the affected error messages.
7769 2003-05-13 Richard Henderson <rth@redhat.com>
7771 * class.c (layout_class_method): Set DECL_EXTERNAL.
7772 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7773 * java-tree.h (java_mark_class_local): Declare.
7774 * jcf-parse.c (parse_class_file): Use it.
7775 * parse.y (java_expand_classes): Likewise.
7777 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7779 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7780 * lex.h: #include input.h.
7781 * jv-scan.c (input_filename): Remove.
7783 2003-05-02 Tom Tromey <tromey@redhat.com>
7786 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7787 (handle_inner_classes): New function.
7789 2003-05-01 Tom Tromey <tromey@redhat.com>
7792 * parse.y (finish_for_loop): Do nothing if update expression is a
7793 EXPR_WFL_NODE wrapping nothing.
7794 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7796 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7798 * lex.h (input_lineno): Remove declaration.
7799 * parse-scan.y: #include input.h.
7800 (input_filename): Remove declaration.
7801 (input_location): Add definition.
7802 (input_line): Remove definition.
7804 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7806 * lex.h (lineno): Rename to ...
7807 (input_line): ... here
7808 * parse-scan.y (lineno): Rename to ...
7809 (input_line): ... here.
7810 (reset_report): Rename lineno to input_line.
7811 * check-init.c (check_init): Likewise.
7812 * class.c (push_class): Likewise.
7813 * decl.c (complete_start_java_method, end_java_method): Likewise.
7814 * expr.c (expand_byte_code): Likewise.
7815 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7816 * jcf-write.c (generate_bytecode_insns): Likewise.
7817 * lex.c (java_init_lex, java_allocate_new_line,
7818 do_java_lex): Likewise.
7819 * parse.h (YYNOT_TWICE): Likewise.
7820 * parse.y (empty_statement, expression_statement,
7821 java_pop_parser_context, java_parser_context_save_global,
7822 yyerror, register_fields, method_header, safe_layout_class,
7823 find_in_imports_on_demand, create_artificial_method,
7824 source_end_java_method, start_complete_expand_method,
7825 build_thisn_assign, java_complete_lhs,
7826 maybe_absorb_scoping_block): Likewise.
7828 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7830 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7831 '/' when computing java source filename
7833 2003-04-13 Tom Tromey <tromey@redhat.com>
7835 * gjavah.c (print_c_decl): Indentation fix.
7837 2003-04-12 Zack Weinberg <zack@codesourcery.com>
7839 * class.c (make_field_value, make_method_value, get_dispatch_table)
7840 (make_class_data, emit_offset_symbol_table)
7841 * constants.c (build_constants_constructor)
7842 * java-tree.h (START_RECORD_CONSTRUCTOR)
7843 * parse.y (maybe_build_array_element_wfl):
7844 Use build_constructor.
7846 2003-04-10 Eric Blake <ebb9@email.byu.edu>
7849 * parse.y (string_convert_int_cst): Always use at least one digit
7850 in string conversion. Remove ASCII dependence.
7851 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7853 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7855 * Make-lang.in: added win32-host.c
7856 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7857 resolves to open() on non-Win32 platforms and
7858 Win32-specific jcf_open_exact_case() on Win32
7859 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7860 when trying .java and .class files
7861 * win32-host.c: added to repository. Defines
7862 Win32-specific jcf_open_exact_case()
7864 2003-04-10 Andrew Haley <aph@redhat.com>
7866 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7867 (maybe_free_localvar): Renamed from localvar_free.
7868 Add new arg, really.
7869 (generate_bytecode_insns): Set new variable, jsrs.
7870 Only free local vars if no jsr insns have been emittted.
7871 Call maybe_free_localvar, not localvar_free.
7873 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7875 * gcj.texi: Remove @ at start of file.
7877 2003-03-25 Tom Tromey <tromey@redhat.com>
7879 * parse.y (create_interface): Call CHECK_DEPRECATED.
7881 2003-03-23 Zack Weinberg <zack@codesourcery.com>
7883 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7885 2003-03-21 Zack Weinberg <zack@codesourcery.com>
7887 * javaop.h (jfloat, jdouble): Make them structures mirroring
7888 the bit fields of IEEE float and double respectively.
7889 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7890 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7891 (union Word, union DWord): Delete.
7892 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7894 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7895 D_NAN_MASK): Delete.
7896 (jni_print_float, jni_print_double): New. Generate
7897 hexadecimal floating constants.
7898 (print_field_info): Use jni_print_float/double.
7900 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7901 finite floating point numbers for output; special case
7904 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7906 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7907 Replace 0 and 1 with true and false in return statements.
7909 2003-03-19 Tom Tromey <tromey@redhat.com>
7911 * lex.c (do_java_lex): Renamed from java_lex.
7912 (java_lex): New function.
7915 2003-03-13 Tom Tromey <tromey@redhat.com>
7917 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7920 2003-03-04 Andrew Haley <aph@redhat.com>
7922 * gjavah.c (is_first_data_member): New global variable.
7923 (print_c_decl): If it's the first data member, align it as the
7925 (process_file): Set is_first_data_member.
7927 2003-03-11 Tom Tromey <tromey@redhat.com>
7929 * parse.y (resolve_field_access): Initialize class if field is
7930 found in another static field.
7931 * expr.c (build_class_init): Don't optimize out initialization of
7932 implemented interface.
7934 2003-03-11 Andrew Haley <aph@redhat.com>
7936 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7939 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
7941 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7942 and DIR_SEPARATOR_2 for a target.
7943 Correct minor typos.
7945 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7946 and DIR_SEPARATOR_2 for a target into account.
7948 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
7950 * lang.c (java_init): Update prototype, move code to java_post_options.
7951 (java_post_options): Similarly.
7953 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
7955 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7956 compare file name components depending on the case-sensitivity
7957 or otherwise of the host file system.
7959 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7960 "strcmp" to compare file name components.
7961 Use IS_DIR_SEPARATOR instead of comparing directly against
7963 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7964 comparing directly against DIR_SEPARATOR.
7966 2003-03-04 Tom Tromey <tromey@redhat.com>
7968 * Make-lang.in (java.tags): New target.
7970 2003-03-01 Roger Sayle <roger@eyesopen.com>
7972 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7973 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7975 2003-03-01 Tom Tromey <tromey@redhat.com>
7977 * parse.y (jdep_resolve_class): Only check deprecation if we found
7980 2003-02-28 Tom Tromey <tromey@redhat.com>
7983 * class.c (maybe_layout_super_class): Always pass a WFL to
7985 * parse.y (do_resolve_class): Updated comment to explain
7988 2003-02-26 Tom Tromey <tromey@redhat.com>
7990 * jcf-write.c (generate_classfile): Check whether class is
7991 deprecated before writing attribute count.
7993 2003-02-25 Roger Sayle <roger@eyesopen.com>
7995 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7996 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7998 2003-02-23 Tom Tromey <tromey@redhat.com>
8000 * lang-options.h: Added -Wdeprecated.
8001 * gcj.texi (Warnings): Document -Wdeprecated.
8002 * java-tree.h (flag_deprecated): Declare.
8003 * lang.c (lang_W_options): Added deprecated.
8004 (flag_deprecated): New global.
8005 * chartables.h: Rebuilt.
8006 * gen-table.pl (process_one): Look at whitespace.
8007 (print_tables): Define LETTER_SPACE, LETTER_MASK.
8008 * parse.h (CLEAR_DEPRECATED): New macro.
8009 (CHECK_DEPRECATED_NO_RESET): New macro.
8010 * jcf-parse.c (handle_deprecated): New function.
8011 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
8012 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
8013 * parse.y (resolve_type_during_patch): Check deprecation.
8014 (jdep_resolve_class): Likewise.
8015 (process_imports): Likewise.
8016 (resolve_expression_name): Likewise.
8017 (check_deprecation): Strip arrays from decl. Check
8019 (patch_method_invocation): Also check the particular constructor
8021 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
8022 * jcf-write.c (append_deprecated_attribute): New function.
8023 (generate_classfile): Generate deprecated attribute when
8025 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
8026 (java_lex) [case '*']: Simplify logic.
8027 (java_start_char_p): Use LETTER_MASK.
8028 (java_part_char_p): Likewise.
8029 (java_space_char_p): New function.
8031 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
8033 Change base class access representation.
8034 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
8035 (add_interface_do): Likewise.
8037 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
8039 * decl.c (java_init_decl_processing): Change
8040 soft_lookupjnimethod_node to reflect the change in
8041 signature of _Jv_LookupJNIMethod in libjava/jni.cc
8042 * expr.c (build_jni_stub): Calculate and pass the size
8043 on the stack of the arguments to a JNI function. Use
8044 new target macro MODIFY_JNI_METHOD_CALL to allow a
8045 target to modify the call to a JNI method.
8047 2003-02-08 Roger Sayle <roger@eyesopen.com>
8049 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
8050 instead of basename to avoid compiler warnings on Tru64.
8052 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
8054 * gcj.texi: Update to GFDL 1.2.
8056 2003-01-31 Andrew Haley <aph@redhat.com>
8058 * parse.y (java_expand_classes): Scan the whole class list looking
8059 for access methods that haven't yet been expanded.
8061 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
8065 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
8066 to fix bootstrap on sparc-unknown-netbsdelf1.5.
8067 * jcf-parse.c: Likewise.
8069 2003-01-31 Mark Wielaard <mark@klomp.org>
8071 * gjavah.c (throwable_p): Allocate 1 more byte for string.
8073 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
8075 * class.c (make_class): Use BINFO_ELTS.
8076 (set_super_info): Likewse.
8077 (add_interface_do): Likewise.
8079 2003-01-30 Tom Tromey <tromey@redhat.com>
8081 * jcf-parse.c (read_class): Update identifier's class value if it
8082 changed during parsing.
8084 2003-01-30 Loren James Rittle <ljrittle@acm.org>
8086 * Make-lang.in (po-generated): Find the targets in $(parsedir).
8087 Propagate change to all other rules as required.
8088 (java/parse-scan.o): Add explicit dependency on
8089 $(parsedir)/java/parse-scan.c .
8091 2003-01-29 Tom Tromey <tromey@redhat.com>
8093 * parse.y (patch_assignment): Only transform the rhs of an
8094 assignment when compiling to native.
8096 2003-01-28 Tom Tromey <tromey@redhat.com>
8098 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
8100 2003-01-28 Tom Tromey <tromey@redhat.com>
8102 * lex.c (java_lex): Don't include UEOF as part of token.
8103 (java_read_unicode): Error if \u sequence prematurely terminated.
8105 2003-01-27 Tom Tromey <tromey@redhat.com>
8107 * parse.y (java_check_regular_methods): Check for construct after
8108 checking types in throws clause.
8110 2003-01-24 Tom Tromey <tromey@redhat.com>
8112 * class.c (build_static_field_ref): Only a String or numeric field
8113 can fold to a constant.
8115 2003-01-23 Tom Tromey <tromey@redhat.com>
8117 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8118 file name in resource buffer.
8120 2003-01-23 Tom Tromey <tromey@redhat.com>
8122 * expr.c (build_known_method_ref): Use method's context to find
8125 2003-01-23 Tom Tromey <tromey@redhat.com>
8127 * constants.c (set_constant_entry): Allocated cleared memory.
8129 2003-01-22 Tom Tromey <tromey@redhat.com>
8131 * java-tree.h: Don't use PARAMS.
8132 * resource.c: Add prototypes for all functions.
8133 (write_resource_constructor): Use `const char *' to avoid
8136 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
8138 * jcf-parse.c (process_zip_dir): Remove unused variable.
8140 2003-01-22 Tom Tromey <tromey@redhat.com>
8142 * expr.c (build_invokeinterface): Abort if method's context is not
8145 2003-01-22 Tom Tromey <tromey@redhat.com>
8147 * gcj.texi (Input and output files): Mention non-class entries.
8148 * decl.c (java_init_decl_processing): Call
8149 init_resource_processing.
8150 * java-tree.h (compile_resource_data, write_resource_constructor,
8151 compile_resource_file, init_resource_processing): Declare.
8152 * config-lang.in (gtfiles): Added resource.c.
8153 * Make-lang.in (gt-java-resource.h): New target.
8154 (JAVA_OBJS): Added resource.o.
8155 (java/resource.o): New target.
8156 * resource.c: New file.
8157 * class.c (compile_resource_file): Moved to resource.c.
8158 (registerResource_libfunc): Likewise.
8159 (utf8_decl_list): Mark with GTY; now static.
8160 * jcf-parse.c (classify_zip_file): New function.
8161 (parse_zip_file_entries): Use it; compile .properties files.
8162 (process_zip_dir): Use classify_zip_file and compute_class_name.
8163 Don't write class name into zip directory.
8164 (java_parse_file): Call write_resource_constructor.
8165 (compute_class_name): New function.
8166 * jcf-io.c (read_zip_member): Reindented.
8168 2003-01-21 Tom Tromey <tromey@redhat.com>
8170 * class.c (supers_all_compiled): New function.
8171 (make_class_data): Use it.
8173 2003-01-21 Tom Tromey <tromey@redhat.com>
8175 * parse.y (method_header): Native method can't be strictfp.
8176 No method can be transient or volatile.
8178 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8180 Make-lang.in (jvspec.o-warn): Add -Wno-error.
8182 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
8184 * check-init.c: Fix comment typos.
8185 * class.c: Likewise.
8186 * constants.c: Likewise.
8188 * except.c: Likewise.
8190 * java-except.h: Likewise.
8191 * java-tree.h: Likewise.
8192 * javaop.h: Likewise.
8193 * jcf-dump.c: Likewise.
8194 * jcf-io.c: Likewise.
8195 * jcf-parse.c: Likewise.
8196 * jcf-write.c: Likewise.
8198 * mangle.c: Likewise.
8199 * typeck.c: Likewise.
8200 * verify.c: Likewise.
8202 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8204 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8205 * jcf-write.c: Include "tm_p.h".
8207 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8209 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8211 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8213 * builtins.c (java_build_function_call_expr): Renamed from
8214 build_function_call_expr. All callers changed.
8216 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8217 * jcf-parse.c: Include tm_p.h.
8219 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8222 2003-01-14 Tom Tromey <tromey@redhat.com>
8224 * class.c (make_class_data): Check that super is compiled before
8225 building class reference to it.
8227 2003-01-14 Andrew Haley <aph@redhat.com>
8229 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8230 varargs function -- correct.
8232 2003-01-14 Andrew Haley <aph@redhat.com>
8234 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8236 2003-01-14 Andrew Haley <aph@redhat.com>
8238 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8239 varargs function -- correct.
8241 * parse.y (patch_assignment): Copy the rhs of an assignment into a
8242 temporary if the RHS is a reference.
8244 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8246 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8247 * keyword.h: Regenerated.
8249 * All Files: Convert to ISO C style function definitions.
8251 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8253 * parse.y (check_pkg_class_access): ANSIfy definition.
8255 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8257 * decl.c, parse-scan.y, parse.y: Don't cast return value of
8260 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8262 2003-01-09 Geoffrey Keating <geoffk@apple.com>
8264 Merge from pch-branch:
8266 2002-12-02 Geoffrey Keating <geoffk@apple.com>
8268 * Make-lang.in (java/gjavah.o): Update dependencies.
8269 * gjavah.c: Include ggc.h.
8271 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
8273 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8274 (JCFDUMP_OBJS): Add ggc-none.o.
8275 (java/jcf-dump.o): Depend on GGC_H.
8276 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8277 CPool substructures.
8278 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8279 * jcf-dump.c: Include ggc.h.
8281 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8283 * jcf.h (union cpool_entry): New.
8284 (struct CPool): Use gengtype to mark. Change field 'data' to be
8286 (struct JCF): Use gengtype to mark.
8287 (CPOOL_UINT): Update for new cpool_entry type.
8288 (CPOOL_USHORT1): Likewise.
8289 (CPOOL_USHORT2): Likewise.
8290 (CPOOL_FINISH): Use GC to free cpool subfields.
8291 * parse.h (struct parser_ctxt): Mark field current_jcf.
8292 * lex.c (java_init_lex): Use GC to allocate struct JCF.
8293 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8294 (main_jcf): Use gengtype to mark.
8295 (ggc_mark_jcf): Delete.
8296 (get_constant): Update for new cpool_entry type.
8297 (give_name_to_class): Likewise.
8298 (get_class_constant): Likewise.
8299 (init_outgoing_cpool): Use GGC to allocate struct CPool.
8300 (java_parse_file): Use GGC to allocate struct JCF.
8301 (init_jcf_parse): Don't call ggc_add_root.
8302 * jcf-reader.c (jcf_parse_constant_pool): Update for new
8304 * java-tree.h (current_jcf): Use gengtype to mark.
8305 (CPOOL_UTF): Update for new cpool_entry type.
8306 (outgoing_cpool): Use gengtype to mark.
8307 (struct lang_type): GC struct JCF and struct CPool.
8308 * config-lang.in (gtfiles): Add jcf.h.
8309 * constants.c (find_tree_constant): New.
8310 (set_constant_entry): Allocate cpool subfields using GGC. Update
8311 for new cpool_entry type.
8312 (find_constant1): Update for new cpool_entry type.
8313 (find_constant2): Likewise.
8314 (find_utf8_constant): Use find_tree_constant.
8315 (find_class_or_string_constant): Remove unnecessary cast to jword.
8316 Update for new cpool_entry type.
8317 (count_constant_pool_bytes): Update for new cpool_entry type.
8318 (write_constant_pool): Likewise.
8319 (alloc_name_constant): Use find_tree_constant.
8320 (build_constants_constructor): Update for new cpool_entry type.
8322 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8324 * parse.y (mark_parser_ctxt): Delete.
8325 (goal): Don't use ggc_add_root.
8326 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8327 (java_pop_parser_context): Let GC free parser_ctxt.
8328 (java_parser_context_resume): Likewise.
8329 * parse.h (struct parser_ctxt): Use gengtype to mark.
8331 (ctxp_for_generation): Likewise.
8332 * lex.h (struct java_lc_s): Mark for gengtype.
8333 (java_lexer): Rearrange for gengtype.
8334 * config-lang.in (gtfiles): Add lex.h, parse.h.
8336 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8338 * All Files: Remove PARAMS macro.
8340 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8341 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8344 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8347 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
8349 * Make-lang.in (java.install-common, java.uninstall,
8350 java.install-info, java.install-man): Prepend $(DESTDIR)
8351 to destination paths in all (un)installation commands.
8352 (java.install-common): Rewrite $(LN) command to support
8353 DESTDIR with "ln" as well as with "ln -s".
8355 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
8357 * java-tree.h: Protect against multiple inclusion.
8359 2003-01-07 Tom Tromey <tromey@redhat.com>
8361 * class.c (add_assume_compiled): Don't adjust parent if we're
8362 already at the root of tree.
8364 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8366 * lang.c (dump_compound_expr): Prototype.
8368 2003-01-03 Tom Tromey <tromey@redhat.com>
8370 Fix for PR java/8712:
8371 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8372 when simply checking against `null'.
8374 2003-01-03 Tom Tromey <tromey@redhat.com>
8376 * gcj.texi (Standard Properties): Document http.proxyHost and
8379 * gcj.texi (GNU Classpath Properties): Document new properties.
8381 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8383 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8384 java/lang-options.h, java/mangle.c, java/mangle_name.c,
8385 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8387 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8389 * Make-lang.in, boehm.c, buffer.c,
8390 buffer.h, builtins.c, class.c,
8391 config-lang.in, constants.c,
8392 convert.h, decl.c, except.c,
8393 expr.c, java-except.h,
8394 java-tree.h, javaop.def,
8395 jcf-parse.c, jcf-write.c,
8396 jv-scan.c, jvgenmain.c,
8397 jvspec.c, keyword.gperf,
8398 keyword.h, lang-options.h,
8399 lang-specs.h, lang.c, lex.c,
8400 lex.h, mangle.c, mangle_name.c,
8401 parse-scan.y, parse.h, parse.y,
8402 typeck.c, verify.c, xref.c,
8403 xref.h: Replace "GNU CC" with
8404 "GCC" in the copyright header.
8406 * check-init.c, gjavah.c, javaop.h,
8407 jcf-depend.c, jcf-dump.c, jcf-io.c,
8408 jcf-path.c, jcf-reader.c, jcf.h,
8409 zextract.c, zipfile.h: These files are
8410 "part of GCC". Also say "GCC" not "GNU CC".
8412 2002-12-30 DJ Delorie <dj@redhat.com>
8414 * Make-lang.in: Protect against texi2pod/pod2man failing.
8416 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
8418 * gcj.texi: Use @copying.
8420 2002-12-27 Mark Mitchell <mark@codesourcery.com>
8422 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8423 print_cxx_classname.
8424 (print_cxx_classname): Add add_scope parameter.
8425 (print_class_decls): Do not emit a semicolon after the extern
8427 (process_file): Adjust calls to print_cxx_classname.
8429 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8431 * gcj.texi: Include Cover Texts in man page.
8433 2002-12-23 Jeff Sturm <jsturm@one-point.com>
8435 * class.c (build_static_field_ref): Check FIELD_FINAL.
8437 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8438 instead of current_constant_pool_data_ref.
8439 * java-tree.h (current_constant_pool_data_ref): Undefine.
8440 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8441 * jcf-parse.c (init_outgoing_cpool): Don't initialize
8442 current_constant_pool_data_ref.
8444 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8445 not build_internal_class_name.
8447 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8448 Use it when class ref isn't certain to be compiled.
8450 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8452 * gcj.texi: Include gcc-common.texi.
8453 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8454 $(srcdir)/doc/include/gcc-common.texi.
8456 2002-12-22 Anthony Green <green@redhat.com>
8458 * gcj.texi (Limitations): Add note about org.xml.sax and
8461 2002-12-20 Tom Tromey <tromey@redhat.com>
8463 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8464 where minimum case value is Integer.MIN_VALUE.
8467 2002-12-18 Andrew Haley <aph@redhat.com>
8469 * parse.y (patch_invoke): Force evaluation order when `check' is
8470 set. For PR libgcj/8945.
8472 2002-12-16 Mark Mitchell <mark@codesourcery.com>
8474 * gcj.texi: Change version number to 3.4.
8476 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
8477 Andrew Haley <aph@redhat.com>
8479 * parse.y (source_end_java_method): Remove custom encoding of line
8480 numbers for a function decl before passing it to the back end.
8482 2002-12-03 Andrew Haley <aph@redhat.com>
8484 * class.c (make_class_data): New field, "chain".
8485 * decl.c (java_init_decl_processing): Likewise.
8487 2002-12-02 Tom Tromey <tromey@redhat.com>
8490 * parse.y (do_resolve_class): Handle qualified name via
8493 2002-11-30 Zack Weinberg <zack@codesourcery.com>
8495 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8496 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8497 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8498 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8499 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8500 Include coretypes.h and tm.h.
8501 * Make-lang.in: Update dependencies.
8503 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8505 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8507 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8509 * jcf-reader.c: Don't expand JCF_readu4 inside the
8510 expansion of JCF_SKIP.
8512 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8514 * jcf-reader.c: Don't expand JCF_readu4 inside the
8515 expansion of JCF_SKIP.
8517 2002-11-22 Tom Tromey <tromey@redhat.com>
8519 * parse.y (patch_binop): Cast right hand side of shift expression
8520 to `int'. Fixes PR java/8676.
8522 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8523 Andrew Haley <aph@redhat.com>
8525 * gcc/java/jcf-write.c (write_classfile): Remove target
8526 class file, if it exists, before renaming the temporary
8529 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8531 * jvspec.c (lang_specific_spec_functions): New.
8533 2002-11-18 Tom Tromey <tromey@redhat.com>
8535 Fix for PR java/7912:
8536 * expr.c (can_widen_reference_to): Allow cast of array to
8537 Cloneable or Serializable.
8538 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8539 (java_io_serializable_identifier_node): Likewise.
8540 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8541 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8542 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8543 java_io_serializable.
8544 * decl.c (java_init_decl_processing): Initialize
8545 java_lang_cloneable_identifier_node and
8546 java_io_serializable_identifier_node.
8547 (java_lang_cloneable_identifier_node): New global.
8548 (java_io_serializable_identifier_node): Likewise.
8550 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8552 * buffer.c: Remove unnecessary casts.
8553 * check-init.c: Likewise.
8554 * class.c: Likewise.
8555 * constants.c: Likewise.
8557 * except.c: Likewise.
8558 * gjavah.c: Likewise.
8559 * jcf-io.c: Likewise.
8560 * jcf-parse.c: Likewise.
8561 * jcf-path.c: Likewise.
8562 * jvspec.c: Likewise.
8565 * verify.c: Likewise.
8567 2002-11-06 Tom Tromey <tromey@redhat.com>
8569 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8572 2002-11-05 Tom Tromey <tromey@redhat.com>
8574 Fix for PR java/6388.
8575 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8576 * java-tree.h (enum java_tree_index): New values
8577 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8578 (decimal_int_max, decimal_long_max): New defines.
8579 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8580 (error_if_numeric_overflow): Rewrote range checking.
8581 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8584 2002-11-02 Tom Tromey <tromey@redhat.com>
8586 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8588 * class.c (make_method_value): Put class name, not signature, into
8589 `throws' field. For PR java/8415.
8591 2002-10-24 Tom Tromey <tromey@redhat.com>
8593 * gcj.texi (Invoking gij): Document --showversion.
8594 (Standard Properties): java.library.path now set.
8596 2002-10-23 Tom Tromey <tromey@redhat.com>
8598 * gjavah.c (decode_signature_piece): In JNI mode, print
8599 `jobjectArray' when array depth is nonzero.
8602 2002-10-15 Andrew Haley <aph@redhat.com>
8604 * parse.y (patch_invoke): Call force_evaluation_order on a static
8606 (resolve_qualified_expression_name): Call force_evaluation_order
8607 on a arg list that is part of a Qualified Expression Name.
8609 * lang.c (dump_compound_expr): New.
8610 (java_dump_tree): New.
8612 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8614 * gcj.texi: Added item describing the GCJ runtime property
8617 2002-10-15 Richard Henderson <rth@redhat.com>
8619 * jcf-parse.c (get_constant): Fix type warning.
8621 2002-10-15 Andrew Haley <aph@redhat.com>
8623 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8624 (java_inlining_map_static_initializers): Declare.
8626 2002-10-14 Andrew Haley <aph@redhat.com>
8628 * tree-inline.c (remap_block): All local class initialization
8629 flags go in the outermost scope.
8630 (expand_call_inline): Call java_inlining_map_static_initializers.
8631 (expand_call_inline): Call java_inlining_merge_static_initializers.
8632 * java/lang.c (merge_init_test_initialization): New.
8633 (java_inlining_merge_static_initializers): New.
8634 (inline_init_test_initialization): New.
8635 (java_inlining_map_static_initializers): New.
8637 2002-10-11 Mark Wielaard <mark@klomp.org>
8639 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8641 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8643 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8645 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8647 * parse.y (merge_string_cste): Add parentheses around & within |.
8649 2002-10-08 Tom Tromey <tromey@redhat.com>
8651 * parse.y (variable_declarator_id): Simplify error path for
8652 array declarator error. For PR java/8003.
8654 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8656 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8659 2002-10-08 Andrew Haley <aph@redhat.com>
8661 * parse.y (attach_init_test_initialization_flags): Check for
8664 2002-10-07 Anthony Green <green@redhat.com>
8666 * parse.y (merge_string_cste): Fix bug in string concatenation.
8668 2002-10-03 Michael Koch <konqueror@gmx.de>
8670 * gcj.texi (Standard properties):
8671 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8673 2002-10-02 Roger Sayle <roger@eyesopen.com>
8675 PR optimization/6627
8676 * lang.c (java_init): If storing the vbit in function
8677 pointers, ensure that force_align_functions_log is atleast
8678 one to aid compatability with g++ vtables.
8680 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8682 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8683 foul of type-based aliasing.
8685 2002-09-30 Anthony Green <green@redhat.com>
8687 * gcj.texi (Invoking jv-scan): Fix texinfo.
8689 2002-09-28 Anthony Green <green@redhat.com>
8691 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8692 (Code Generation): Add -fno-assert documentation.
8693 * jv-scan.c (flag_assert): New global.
8694 (options): Add assert option.
8695 (help): Add --no-assert documentation.
8696 * parse-scan.y (flag_assert): New global.
8697 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8698 (flag_assert): New global.
8699 * java-tree.h (flag_assert): New global.
8700 * lex.c (java_lex): Obey flag_assert.
8701 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8704 2002-09-26 Andrew Haley <aph@redhat.com>
8706 * expr.c (build_java_array_length_access): Check for null pointer.
8707 * expr.c (expand_java_arrayload): Likewise.
8709 2002-09-21 Richard Henderson <rth@redhat.com>
8711 * jcf-parse.c (get_constant): Decode from IEEE no matter
8712 what the target format.
8714 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8716 * ChangeLog: Follow spelling conventions.
8717 * class.c: Likewise.
8720 * gjavah.c: Likewise.
8721 * java-tree.h: Likewise.
8722 * jcf-dump.c: Likewise.
8723 * jcf-parse.c: Likewise.
8724 * jvspec.c: Likewise.
8726 * mangle.c: Likewise.
8727 * parse.y: Likewise.
8729 2002-09-17 Tom Tromey <tromey@redhat.com>
8731 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8732 where \r appears at EOF. Fixes PR java/7950.
8734 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8736 * jvspec.c (lang_specific_driver): Remove unused variable.
8738 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8740 * java-tree.h (union lang_tree_node): Add chain_next option.
8742 2002-09-16 Richard Henderson <rth@redhat.com>
8744 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8745 use new real.h interface.
8746 * jcf-write.c (find_constant_index): Use new real.h interface.
8747 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8749 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8751 * lang.c: Follow spelling conventions.
8753 2002-09-11 Per Bothner <per@bothner.com>
8755 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8756 constant to the type of the field.
8757 (java_complete_tree): Remove now-redundant code.
8759 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8761 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8764 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8765 return label if a ret instruction for the jsr has been reached.
8767 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8769 * parse.y (DIR_SEPARATOR): Don't define.
8770 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8772 2002-08-28 Andrew Haley <aph@redhat.com>
8774 * verify.c (verify_jvm_instructions): Allow exception handler
8775 inside code that is being protected, but generate a warning.
8776 * except.c (link_handler): Initialize `expanded' in new eh_range.
8777 (binding_depth, is_class_level, current_pc): Declare extern.
8779 2002-09-01 Mark Wielaard <mark@klomp.org>
8781 * gcj.texi: Add chapter about system properties.
8784 2002-08-26 Tom Tromey <tromey@redhat.com>
8786 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8787 conversion if RHS_TYPE is byte, short, or char.
8789 2002-08-22 Tom Tromey <tromey@redhat.com>
8791 * gcj.texi (Invoking gij): Document -cp and -classpath.
8793 2002-08-21 Tom Tromey <tromey@redhat.com>
8795 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8796 $(prefix)/share. For PR libgcj/7633.
8798 For PR java/6005 and PR java/7611:
8799 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8800 (java_can_use_bit_fields_p): New function.
8802 2002-08-16 Tom Tromey <tromey@redhat.com>
8804 * gcj.texi (Class Initialization): Mention class initialization of
8807 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8809 * Make-lang.in (java-tree-inline.o): New.
8810 (JAVA_OBJS): Add java-tree-inline.o.
8811 * parse.y (source_end_java_method): Call java_optimize_inline.
8812 (java_expand_method_bodies): Save method's tree in
8814 (add_stmt_to_compound): Keep track of the number of statments.
8815 * lang.c (java_init): Enable flag_inline_trees.
8816 (java_post_options): If flag_inline_functions is on, enable
8817 flag_inline_trees instread.
8818 (decl_constant_value): New.
8819 (java_tree_inlining_walk_subtrees): New.
8820 * java-tree.h (DECL_NUM_STMTS): New macro.
8821 (java_optimize_inline): Declare.
8822 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8823 Handle a LABEL_EXPR.
8824 * decl.c (build_result_decl): If we already have a DECL_RESULT
8826 (dump_function): New.
8827 (java_optimize_inline): New.
8828 (dump_function): New.
8830 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8833 * parse.y (build_assertion): Invert return from
8834 desiredAssertionStatus.
8836 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8838 * jcf-write.c (get_access_flags): Return correct access flags for
8839 private and protected inner classes.
8841 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8843 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8845 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8847 * mangle_name.c: Don't include obstack.h twice.
8848 * xref.c: Don't include obstack.h.
8850 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8852 * class.c: (permanent_obstack): Delete declaration.
8853 * constants.c: (permanent_obstack): Delete declaration.
8854 * except.c: (permanent_obstack): Delete declaration.
8855 * expr.c: (permanent_obstack): Delete declaration.
8856 * jcf-parse.c: (permanent_obstack): Delete declaration.
8857 (saveable_obstack): Delete declaration.
8858 * parse.h: (permanent_obstack): Delete declaration.
8859 * typeck.c: (permanent_obstack): Delete declaration.
8861 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8863 * gcj.texi (version-gcc): Increase to 3.3.
8865 2002-07-22 Tom Tromey <tromey@redhat.com>
8867 * lex.c (java_lex): Check for `e' or `E' after 0.
8869 2002-07-21 Richard Henderson <rth@redhat.com>
8871 * lang.c (java_unsafe_for_reeval): New.
8872 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8874 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
8876 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8877 (jcf_path_init): Use GET_ENVIRONMENT.
8879 2002-07-10 Roger Sayle <roger@eyesopen.com>
8880 Zack Weinberg <zack@codesourcery.com>
8882 * builtins.c (initialize_builtins): Remove defines that
8883 handled C/C++ specific junk hereby removed from builtins.def.
8885 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
8887 * lang.c (java_post_options): Update prototype.
8889 2002-07-05 Roger Sayle <roger@eyesopen.com>
8891 * builtins.c (initialize_builtins): Ignore the additional
8892 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8893 the builtins.def file.
8895 2002-07-01 Tom Tromey <tromey@redhat.com>
8898 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8901 2002-07-01 Roger Sayle <roger@eyesopen.com>
8903 * java/decl.c (builtin_function): Accept additional parameter.
8904 (java_init_decl_processing): Pass an additional NULL_TREE
8905 argument to builtin_function.
8907 2002-06-29 T.J. Mather <tjmather@maxmind.com>
8909 * gcj.texi: Fixed gcj invocation example so that it compiles.
8911 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8913 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8914 * parse.y (mark_parser_ctxt): Likewise.
8915 (check_modifiers, declare_local_variables): Avoid incorrect
8916 hardcoded constant 10.
8918 * lex.c (java_read_char): Avoid "comparison is always true"
8921 2002-06-25 Andreas Schwab <schwab@suse.de>
8923 * expr.c (JSR): Avoid undefined operation on PC.
8925 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8927 * decl.c (clear_binding_level): Const-ify.
8929 2002-06-13 Akim Demaille <akim@epita.fr>
8931 * parse.y (class_declaration, interface_declaration): Make sure
8932 all their rules have an action, in order to avoid meaningless `$$
8933 = $1' and their type clashes.
8935 2002-06-11 Tom Tromey <tromey@redhat.com>
8937 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8938 * parse-scan.y (statement_without_trailing_substatement): Added
8940 (assert_statement): New rule.
8941 * java-tree.h (struct lang_type) [assertions]: New field.
8942 (TYPE_USES_ASSERTIONS): New macro.
8943 (CLASS_USES_ASSERTIONS): Likewise.
8944 (FIELD_SYNTHETIC): New define.
8945 * lex.c (java_lval;): Added ASSERT_TK.
8946 * parse.y (ASSERT_TK): Added.
8947 (statement_without_trailing_substatement): Added assert_statement.
8948 (assert_statement): New rule.
8949 (build_assertion): New function.
8950 (maybe_generate_pre_expand_clinit): Create and initialize
8951 $assertionsDisabled.
8952 (lookup_package_type): Removed decl.
8953 * keyword.h: Rebuilt.
8954 * keyword.gperf (assert): New token.
8956 2002-06-10 Akim Demaille <akim@epita.fr>
8958 * parse.y (interface_type_list, class_member_declaration)
8959 (unary_expression_not_plus_minus): Remove duplicate %type.
8962 2002-06-09 Tom Tromey <tromey@redhat.com>
8964 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8966 * parse.y (method_header): Give error message in all cases.
8969 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8971 Don't use RTL inlining. Fix for PR java/6820.
8972 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8973 (flag_really_inline): New.
8974 (java_decode_option): Set flag_really_inline if -finline-functions
8976 (java_post_options): New function. Turn off inlining unless
8977 flag_really_inline is set.
8979 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8981 * gjavah.c (throwable_p): Accept argument as either a classname or
8982 signature fragment. Create null-terminated classname string for super
8983 when calling itself recursively.
8984 (decode_signature_piece): Skip first character from class name
8985 signature when calling throwable_p.
8987 2002-06-08 H.J. Lu (hjl@gnu.org)
8989 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8991 2002-06-04 Tom Tromey <tromey@redhat.com>
8993 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8995 2002-06-04 Michael Koch <konqueror@gmx.de>
8997 * gcj.texi (Input Options): Fixed typo.
8999 2002-06-04 Zack Weinberg <zack@codesourcery.com>
9001 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
9002 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
9003 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
9004 and all now-pointless local variables. Rename other local
9005 variables to reflect their not being handles.
9007 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
9008 #if JCF_USE_STDIO blocks.
9010 * parse.y: Add missing semicolon at end of rule.
9012 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9014 * check-init.c (attach_initialized_static_class): Delete, unused.
9015 * parse.y: Use htab_t instead of struct hashtable, update
9017 * java-tree.h: Include hashtab.h instead of hash.h.
9018 (struct lang_decl_func): Use htab_t, set up for gengtype.
9019 (struct init_test_hash_entry): Delete.
9020 (struct treetreehash_entry): New.
9021 (java_treetreehash_find): New
9022 (java_treetreehash_new): New prototype.
9023 (java_treetreehash_create): New prototype.
9024 (java_mark_tree): Delete prototype.
9025 (java_hash_hash_tree_node): Delete prototype.
9026 (java_hash_compare_tree_node): Delete prototype.
9027 (attach_initialized_static_class): Delete prototype.
9028 * expr.c (build_class_init): Update to use java_treetreehash
9030 (java_expand_expr): Update to use htab_t.
9031 (emit_init_test_initialization): Likewise.
9032 * decl.c (java_mark_tree): Delete.
9033 * class.c (init_test_hash_newfunc): Delete.
9034 (java_hash_hash_tree_node): Delete.
9035 (java_hash_compare_tree_node): Delete.
9036 (add_method_1): Update to use java_treetreehash functions.
9037 (JAVA_TREEHASHHASH_H): New macro.
9038 (java_treetreehash_hash): New function.
9039 (java_treetreehash_compare): New function.
9040 (java_treetreehash_find): New function.
9041 (java_treetreehash_new): New function.
9042 (java_treetreehash_create): New function.
9043 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
9045 * Make-lang.in (java/parse.o): Depend on debug.h.
9046 * java-tree.h (struct lang_identifier): Use gengtype.
9047 (union lang_tree_node): New.
9048 (struct lang_decl_func): Use gengtype.
9049 (struct lang_decl_var): Likewise.
9050 (struct lang_decl): Likewise.
9051 * parse.y: Include debug.h.
9052 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
9054 * lang.c (struct language_function): New dummy structure.
9056 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
9057 descriminator for DECL_LANG_SPECIFIC.
9058 (struct lang_decl_func): Rename from struct lang_decl.
9059 (enum lang_decl_desc): New.
9060 (struct lang_decl): Make it a union. Update all the accessor macros.
9061 (struct lang_type): Use gengtype.
9062 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
9063 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
9064 are now the same size.
9065 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
9066 use discriminator to mark DECL_LANG_SPECIFIC.
9068 * Make-lang.in (gt-java-builtins.h): New rule.
9069 (java/builtins.o): Add dependency on gt-<filename>.h.
9070 * builtins.c: Use gengtype for roots.
9071 (union string_or_tree): Use gengtype.
9072 (struct builtin_record): Use gengtype.
9073 * config-lang.in (gtfiles): Add builtins.c.
9075 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
9076 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
9077 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
9078 gt-java-parse.h, gtype-java.h): Add rules to generate.
9079 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
9080 (class.o): Add dependency on gt-*.h.
9081 (constants.o): Likewise.
9084 (jcf-parse.o): Likewise.
9085 (jcf-write.o): Likewise.
9087 * config-lang.in (gtfiles): New.
9088 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9089 * constants.c: Replace uses of ggc_add_* with GTY markers.
9091 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9092 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9093 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
9094 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
9096 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
9098 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9099 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
9101 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9102 Include gtype-java.h.
9104 2002-06-02 Tom Tromey <tromey@redhat.com>
9106 Fix for PR java/5913:
9107 * parse.y (patch_binop): Call patch_string on op1.
9109 2002-06-02 Tom Tromey <tromey@redhat.com>
9111 Fix for PR java/1343, PR java/6336:
9112 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9113 formatting. Changed return type.
9114 (anonymous_class_counter): Moved to top of file.
9115 (maybe_make_nested_class_name): Append number to class name for
9116 function-local classes.
9118 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9120 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9121 * Make-lang.in: Update dependency lists.
9123 2002-05-18 Mark Mitchell <mark@codesourcery.com>
9125 * gjavah.c (throwable_p): Do not free the name of the class after
9126 passing it to find_class.
9127 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9128 * jcf-io.c (dirent.h): Include it.
9129 (fnmatch.h): Likewise.
9130 (compare_path): New function.
9131 (java_or_class_file): Likewise.
9132 (memoized_dirlist_entry): New type.
9133 (memoized_dirlist_lookup_eq): New function.
9134 (memoized_dirlists): New variable.
9135 (caching_stat): New function.
9136 (memoized_class_lookup_eq): New function.
9137 (memoized_class_lookups): Likewise.
9138 (find_class): Use memoized_class_lookups and caching_stat.
9139 * jcf.h (JCF_USE_SCANDIR): Define.
9140 * parse.y (java_expand_classes): Write the class files in reverse
9143 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9145 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9147 2002-05-13 Mark Mitchell <mark@codesourcery.com>
9149 * jcf-write.c (write_classfile): Unlink the temporary file if it
9150 cannot be renamed. Use concat to build up the name of the
9153 2002-05-08 Mark Mitchell <mark@codesourcery.com>
9155 * jcf-write.c (write_classfile): Write the file to a
9156 temporary file and then rename it.
9158 2002-05-07 Tom Tromey <tromey@redhat.com>
9160 * gjavah.c (throwable_p): Use xstrdup, not strdup.
9162 Fix for PR java/1200:
9163 * gjavah.c (throwable_p): New function.
9164 (decode_signature_piece): Use it. A `WeakReference' isn't the
9167 (gcjh_streq): New function.
9169 2002-05-07 Andreas Jaeger <aj@suse.de>
9171 * parse.y (finish_for_loop): Fix if statement.
9173 2002-05-06 Tom Tromey <tromey@redhat.com>
9175 Fix for PR java/5941:
9176 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9177 loop update expression.
9178 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9179 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9181 2002-05-04 Mark Wielaard <mark@klomp.org>
9184 * parse.y (build_string_concatenation): Return just op1 only when op2
9185 is null and op1 is a STRING_CST, otherwise always construct a
9188 2002-04-27 Tom Tromey <tromey@redhat.com>
9191 * parse.y (string_convert_int_cst): New function.
9192 (merge_string_cste): Use it.
9194 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9196 * java-tree.h (java_parse_file): Update.
9197 (java_set_yydebug): Remove.
9198 * jcf-parse.c (yydebug): Remove.
9199 (java_set_yydebug): Die.
9200 (java_parse_file): Update.
9201 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9203 2002-04-24 Tom Tromey <tromey@redhat.com>
9206 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9207 EXPR_WFL_QUALIFICATION of qual_wfl.
9209 2002-04-23 Per Bothner <per@bothner.com>
9211 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
9212 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
9213 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
9215 2002-04-23 Tom Tromey <tromey@redhat.com>
9218 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
9219 recognize `-fcompile-resource='.
9220 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
9223 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9225 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9226 paths. Fixes PR java/2791.
9228 2002-04-19 Andrew Haley <aph@redhat.com>
9230 * jcf-write.c (push_long_const): lo, hi: New variables.
9231 Use rshift_double to extract the high part of a 64-bit long.
9232 Use WORD_TO_INT to extract the low part.
9234 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9235 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
9236 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9238 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9240 * typeck.c (incomplete_type_error): Remove.
9242 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9244 * class.c (make_class_data): Set DECL_ALIGN on static class data,
9245 for hash synchronization.
9246 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9247 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9250 2002-04-16 Mark Wielaard <mark@klomp.org>
9252 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9255 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9257 Fix for PR java/6294:
9258 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9261 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9263 Fix for PR java/6085:
9264 * parse.y (patch_method_invocation): Always use build_access_to_thisn
9265 to get enclosing "this" argument for inner-class constructor
9266 invocation. Pass correct arguments to build_access_to_thisn.
9268 2002-04-10 Andreas Jaeger <aj@suse.de>
9270 * gcj.texi (Input Options): Fix extdirs patch.
9272 2002-04-10 Anthony Green <green@redhat.com>
9274 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9276 2002-04-09 Anthony Green <green@redhat.com>
9278 * gcj.texi (Input Options): Add --extdirs documentation.
9279 * jcf-dump.c (OPT_extdirs): New macro.
9280 (options): Add extdirs option.
9281 (help): Describe --extdirs.
9282 (main): Handle OPT_extdirs.
9283 * gjavah.c (OPT_extdirs): New macro.
9284 (options): Add extdirs option.
9285 (help): Describe --extdirs.
9286 (main): Handle OPT_extdirs.
9287 * jcf-path.c (jcf_path_init): Add extdirs support.
9288 (jcf_path_extdirs_arg): New function.
9289 (extensions): New variable to hold extensions path entries.
9290 * jvspec.c: Remove -fextdirs= when compiling main().
9291 * lang.c (java_decode_option): Handle -fextdirs=.
9292 * jcf.h (jcf_path_extdirs_arg): Declare new function.
9293 * Make-lang.in: Compile jcf-path with version info for use in
9294 identifying the appropriate libgcj.jar.
9296 2002-04-08 Tom Tromey <tromey@redhat.com>
9299 * .cvsignore: Added rmic.1 and rmiregistry.1.
9300 * gcj.texi (Top): Link to new nodes.
9301 (Invoking rmic): New node.
9302 (Invoking rmiregistry): Likewise.
9303 * Make-lang.in (java.generated-manpages): Added rmic.1 and
9305 (java.maintainer-clean): Likewise.
9306 ($(srcdir)/java/rmic.1): New target.
9307 ($(srcdir)/java/rmiregistry.1): Likewise.
9308 (java.install-man): Handle rmic.1 and rmiregistry.1.
9310 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9312 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9313 Add note about handling uncaught exceptions. Add an exception handler
9316 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9318 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9319 after using it to patch CALL_EXPR.
9321 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9323 * gcj.texi (Invocation): Document CNI invocation API.
9325 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9327 * expr.c (truthvalue_conversion): Rename. Update.
9328 (expand_compare): Update.
9329 * java-tree.h (java_truthvalue_conversion): New.
9330 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9332 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9334 * java-tree.h (java_mark_addressable): New.
9335 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9336 * typeck.c (mark_addressable): Rename, update.
9338 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9340 * expr.c (build_java_binop): Update.
9341 * java-tree.h (java_signed_type, java_unsigned_type,
9342 java_signed_or_unsigned_type): Update.
9343 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9344 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9345 * parse.y (patch_binop): Update.
9346 * typeck.c (signed_or_unsigned_type, unsigned_type,
9347 signed_type): Update.
9349 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9351 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9352 (java_dummy_print): Remove.
9353 (lang_print_error): Rename. Exit early if inhibiting output.
9354 (inhibit_error_printing_function): New.
9355 (java_init): Don't set hook.
9356 (lang_init_source): Use new boolean.
9358 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9360 * parse.y (do_resolve_class): Fix infinite recursion.
9362 2002-03-29 Tom Tromey <tromey@redhat.com>
9364 * parse.y (check_inner_circular_reference): Ignore incomplete
9367 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9369 * Make-lang.in (builtins.o): Update.
9370 * boehm.c (get_boehm_type_descriptor): Update.
9371 * builtins.c: Include langhooks.h.
9372 * decl.c (java_init_decl_processing): Update.
9373 * java-tree.h (java_type_for_mode, java_type_for_size): New.
9374 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9376 * typeck.c (type_for_mode, type_for_size): Update.
9378 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9380 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9382 2002-03-28 Tom Tromey <tromey@redhat.com>
9384 * except.c (expand_end_java_handler): If the handler type is NULL,
9385 use java.lang.Throwable. Fixes PR java/5986.
9387 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9389 Fix for PR java/4715:
9390 * jcf-parse.c (parse_source_file_3): New function.
9391 (read_class): Call it.
9392 (java_parse_file): Likewise.
9394 2002-03-28 Jan Hubicka <jh@suse.cz>
9396 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9398 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9400 * parse.y (resolve_package): Initialize "decl".
9401 (lookup_package_type): Remove unused function.
9403 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9405 Fix for PR java/5993:
9406 * parse.y (resolve_package): Return the decl if resolution was
9407 successful. Don't special case "java.lang" and "java.lang.reflect"
9408 packages. Set type_name to the merged identifier.
9409 (resolved_qualified_expression_name): Print error using "name" if
9410 resolve_package returns NULL_TREE.
9412 2002-03-27 Tom Tromey <tromey@redhat.com>
9414 * expr.c (expand_invoke): Don't generate null pointer check if
9415 we're calling <init>.
9417 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9419 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9421 * java-tree.h (java_lang_expand_expr): Similarly.
9422 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9423 (java_init): Don't set hook.
9425 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9427 Fix for PR java/5850:
9428 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9429 context if field was not found in the current scope.
9430 * expr.c (lookup_field): Don't look in enclosing contexts.
9432 2002-03-26 Tom Tromey <tromey@redhat.com>
9434 Fix for PR java/5942:
9435 * parse.y (init_src_parse): Added sanity check.
9436 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9439 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9441 * decl.c (lang_mark_tree): Rename java_mark_tree.
9442 * java-tree.h (java_mark_tree): New.
9443 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9445 2002-03-25 Zack Weinberg <zack@codesourcery.com>
9447 * lex.c: Change java_perform_atof to take normal parameters
9448 instead of a pointer to a parameter block. Call it directly
9451 2002-03-22 Mark Wielaard <mark@klomp.org>
9453 Fix for PR java/5368:
9454 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9455 when printing error message.
9457 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9459 * decl.c (maybe_build_cleanup): Remove.
9461 2002-03-22 Tom Tromey <tromey@redhat.com>
9463 Andrew Haley <aph@cambridge.redhat.com>
9465 * expr.c (build_field_ref): Don't build a check if the field is a
9468 2002-03-21 Eric Blake <ebb9@email.byu.edu>
9470 Fix for PR java/6026:
9471 * lex.c (java_lex): Fix parsing of consecutive floats.
9473 2002-03-21 Tom Tromey <tromey@redhat.com>
9475 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9478 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9480 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9481 insert_block, getdecls, kept_level_p, global_bindings_p): New.
9483 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9485 * gcj.texi: @code{gcj} becomes @command{gcj}.
9486 @code{gcc} becomes @command{gcc}.
9487 GcjRaw changed to gnu.gcc.RawData.
9489 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9491 * decl.c (start_java_method): Use new hook.
9492 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9493 (java_init): Remove old hook.
9495 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9497 * builtins.c (define_builtin): Do nothing if `type' is null.
9500 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9502 * parse.y (parser_check_super_interface): Fix error message
9505 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9507 * jcf-parse.c (get_constant): Delete unused variables.
9509 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9511 * java-tree.h (java_parse_file): New.
9512 * jcf-parse.c (yyparse): Rename java_parse_file.
9513 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9515 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9517 * parse.y (craft_constructor): Return the constructor decl.
9518 (java_expand_classes): Update comments.
9519 (lookup_method_invoke): Call fix_constructors immediately for
9520 anonymous class. Fixes PR java/5935.
9522 2002-03-15 Anthony Green <green@redhat.com>
9524 * jcf-parse.c (yyparse): Don't emit class registration
9525 constructor when compiling resource files.
9527 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9529 * lang.c (java_tree_code_type, java_tree_code_length,
9530 tree_code_name): Delete.
9531 (tree_code_type, tree_code_length, tree_code_name): Define.
9532 (java_init): Don't try to copy into the various tree_code
9535 2002-03-12 Tom Tromey <tromey@redhat.com>
9537 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9538 UTF-8, not UCS-2. Fixes PR java/5923.
9540 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9541 a call_expr wrapped in a convert. Fixes PR java/5848.
9543 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9545 * jcf-write.c (write_classfile): Improve error strings.
9547 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9549 * lex.c: Adjust comments to GNU standards.
9551 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9553 Fix for PR java/5902:
9554 * lex.c (java_lex): Fix parsing of literals.
9556 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9558 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9559 to prevent it getting evaluated twice in the store checking case.
9560 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9563 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9565 * decl.c (java_init_decl_processing): Make sure class_type_node
9566 alignment is not less than 64 bits if hash synchronization is enabled.
9568 2002-03-08 Per Bothner <per@bothner.com>
9570 * parse.y (java_complete_lhs): Check if patch_assignment
9571 returned an error-mark.
9573 * parse.y (try_builtin_assignconv): Don't special-case zero.
9575 2002-03-08 Per Bothner <per@bothner.com>
9577 Fix for PR java/5812.
9578 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9579 here instead of in JSR macro. Likewise with load_type_state call.
9580 Do the latter on if the return_pc has been verified (the jsr returns).
9581 (JSR): Now just call build_java_jsr.
9583 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9585 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9586 (java.install-common): Link native driver to
9587 JAVA_TARGET_INSTALL_NAME.
9589 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9591 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9592 * builtins.c(sin_builtin): Likewise
9593 * builtins.c(sqrt_builtin): Likewise
9595 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9597 * java/expr.c, java/jcf-parse.c, java/lex.c:
9598 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9599 REAL_ARITHMETIC blocks unconditional. Delete some further
9600 #ifdef blocks predicated on REAL_ARITHMETIC.
9602 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9604 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9605 explicit sizeof/sizeof.
9606 * decl.c (java_init_decl_processing): Likewise.
9607 * jcf-parse.c (init_jcf_parse): Likewise.
9608 * parse.y (init_src_parse): Likewise.
9610 2002-03-02 Per Bothner <per@bothner.com>
9612 Make --CLASSPATH by a synonym for --classpath and -classpath.
9613 Implement --bootclasspath.
9614 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9615 (classpath_l): Remove.
9616 (jcf_path_CLASSPATH_arg): Remove.
9617 (jcf_path_bootclasspath_arg): New function.
9618 (jcf_path_seal): Simplify accordingly.
9620 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9621 (jcf_path_CLASSPATH): Remove declaration.
9622 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9623 (lang_specific_driver): Translate -bootclasspath.
9624 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9625 * lang.c (decode_lang_options): Do jcf_path_init first.
9626 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9627 * gjavah.c: Also handle --bootclasspath.
9628 Handle --CLASSPATH as a synonum for --classpath.
9629 * jcf-dump.c: Likewise.
9631 "." is not part of system path, but is the default for --classpath.
9632 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9633 (jcf_path_seal): Add "." if no CLASSPATH specified.
9635 * gcj.texi: Document changes.
9637 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9639 * expr.c (build_java_arraystore_check): Fix formatting.
9641 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9643 Fix for PR java/5758, java/5632:
9644 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9645 inner-class separator too.
9646 * parse.y (do_resolve_class): New local `decl_result.'
9647 Progressively build a name for what can have been loaded.
9649 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9651 * expr.c (java_array_data_offset): Removed function.
9652 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9653 (build_java_array_length_access): Obtain "length" value using a
9654 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9655 (build_java_arrayaccess): Correct comment. Access "data" using a
9656 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9657 (build_java_arraystore_check): New function.
9658 (expand_java_arraystore): Use build_java_arraystore_check.
9659 * parse.y (patch_assignment): Simplify code to insert a store check
9660 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9661 * check-init.c (check_init): Update to reflect that an array length
9662 access is now a COMPONENT_REF.
9663 * gcj.texi (Code Generation): Improve documentation of
9664 -fno-bounds-check. Add documentation for -fno-store-check.
9665 * java-tree.h (flag_store_check): Declare.
9666 (build_java_arraystore_check): Declare.
9667 * lang.c (flag_store_check): Initialize to 1.
9668 (lang_f_options): Add store-check option.
9669 * jvspec.c: Don't pass store-check option to jvgenmain.
9670 * lang-options.h: Add help string for -fno-store-check.
9672 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9674 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9675 * java-tree.h (java_dup_lang_specific_decl): New.
9676 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9678 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9680 * builtins.c, decl.c: Delete traditional-mode-related code
9681 copied from the C front end but not used, or used only to
9682 permit the compiler to link.
9684 2002-02-22 Tom Tromey <tromey@redhat.com>
9686 Fix for PR java/2369:
9687 * jvspec.c (verify_class_name): New function.
9688 (lang_specific_driver): Call it.
9689 (JAVA_START_CHAR_P): New macro.
9690 (JAVA_PART_CHAR_P): Likewise.
9692 2002-02-22 Per Bothner <per@bothner.com>
9694 * class.c: Change vtable to be more compatible with g++ v3 abi.
9695 (get_dispatch_table): Prepend offset-to-top (always 0) and
9696 type_info pointer (currently unimplemented hence NULL) to vtable.
9697 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9698 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9699 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9700 (build_dtable_decl): Add declarations for new fields.
9702 2002-02-20 Per Bothner <per@bothner.com>
9704 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9705 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9706 don't need to set it on the COMPOUND_EXPR - the caller does that.
9708 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9710 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9711 `--CLASSPATH' becomes `--classpath.'
9712 * gjavah.c: Likewise.
9713 * jcf-dump.c: Likewise.
9714 * lang-options.h: Likewise.
9716 * jcf-path.c: Updated comment.
9717 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9718 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9719 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9720 (jcf_path_CLASSPATH_arg): Ditto.
9721 (classpath_u): Updated leading comment.
9723 2002-02-20 Per Bothner <per@bothner.com>
9725 * builtins.c (check_for_builtin): New function.
9726 (build_call_or_builtin): Remove.
9727 * java-tree.h: Update accordingly.
9728 * expr.c (expand_invoke): Use build + check_for_builtin instead
9729 of build_call_or_builtin.
9730 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9731 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9732 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9734 2002-02-17 Tom Tromey <tromey@redhat.com>
9736 * java-tree.h (TYPE_STRICTFP): New macro.
9737 (struct lang_type) [strictfp]: New field.
9738 (CLASS_STRICTFP): New macro.
9739 (METHOD_STRICTFP): New macro.
9740 (struct lang_decl) [strictfp]: New field.
9741 * parse.y (method_header): Disallow strictfp constructor or
9743 (STRICT_TK): Move before MODIFIER_TK.
9744 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9745 (METHOD_MODIFIERS): Likewise.
9746 (INTERFACE_MODIFIERS): Likewise.
9747 * jcf-write.c (get_access_flags): Likewise.
9748 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9749 (add_method_1): Likewise.
9750 (get_access_flags_from_decl): Likewise.
9751 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9752 recognize strictfp flag.
9753 * jcf.h (ACC_STRICT): New define.
9755 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9757 * class.c(build_utf8_ref): Move declaration of decl_size
9759 2002-02-07 Tom Tromey <tromey@redhat.com>
9761 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9764 2002-02-04 Anthony Green <green@redhat.com>
9766 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9767 sections if available.
9769 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9771 * parse.y (java_expand_classes): Fix typo in static field loop.
9773 2002-02-02 Richard Henderson <rth@redhat.com>
9775 * class.c (add_field): Mark static fields external.
9776 (build_class_ref): Remove redundant set.
9777 * parse.y (java_expand_classes): Mark static fields of classes
9778 to be compiled as local.
9779 * jcf-parse.c (parse_class_file): Likewise.
9781 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9783 * gcj.texi (About CNI): New node.
9785 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9788 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9789 setlocale() with LC_CTYPE as a parameter.
9792 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9794 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9795 Follow GNU Coding Standards for --version.
9797 2002-01-28 Tom Tromey <tromey@redhat.com>
9799 * expr.c (build_jni_stub): Ensure storage for `meth' is
9801 * parse.y (java_complete_expand_methods): Set
9802 current_function_decl before building JNI stub.
9804 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9806 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9809 2002-01-22 Tom Tromey <tromey@redhat.com>
9811 * decl.c (java_init_decl_processing): Use add_predefined_file.
9812 Predefine RawData.java.
9813 (predef_filenames): Removed.
9814 (java_init_decl_processing): Don't register predef_filenames.
9815 * jcf-parse.c (add_predefined_file): New function.
9816 (predefined_filename_p): Rewrote.
9817 (predefined_filename_p): No longer static.
9818 * decl.c (java_init_decl_processing): Call initialize_builtins.
9819 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9820 (java/builtins.o): New target.
9821 * builtins.c: New file.
9822 * parse.y (patch_invoke): Use build_call_or_builtin.
9823 * java-tree.h (build_call_or_builtin): Declare.
9824 (initialize_builtins): Declare.
9825 (java_set_exception_lang_code): Removed unused declaration.
9826 (PREDEF_FILENAMES_SIZE): Removed.
9827 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9828 (predef_filenames): New define.
9829 (add_predefined_file): Declare.
9830 (predefined_filename_p): Declare.
9831 * expr.c (expand_invoke): Use build_call_or_builtin.
9833 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9835 * parse.y (patch_switch_statement): Fix format specifier.
9837 2002-01-16 Tom Tromey <tromey@redhat.com>
9839 More for PR java/5365:
9840 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9842 (process_file): Generate include for
9843 java.lang.UnsupportedOperationExceptions.
9845 2002-01-15 Andreas Jaeger <aj@suse.de>
9847 * .cvsignore: Add man pages.
9849 2002-01-15 Tom Tromey <tromey@redhat.com>
9851 Fix for PR java/5365:
9852 * gjavah.c (process_file): Turn class name into a file name.
9854 2002-01-14 Matthias Klose <doko@debian.org>
9856 * gcj.texi: Fix whitespace and formatting errors in the
9857 synopsis of the man pages. Update copyright.
9859 2002-01-14 Tom Tromey <tromey@redhat.com>
9862 * Make-lang.in (java.install-man): Handle jv-convert man page.
9863 (java.generated-manpages): Added jv-convert.1.
9864 (java.uninstall): Remove jv-convert.1.
9865 (java.maintainer-clean): Likewise.
9866 ($(srcdir)/java/jv-convert.1): New target.
9867 * gcj.texi (Top): Link to jv-convert node.
9868 (Individual utilities): Likewise.
9869 (Invoking jv-convert): New node.
9871 2001-01-10 Jeff Sturm <jsturm@one-point.com>
9872 Martin Kahlert <martin.kahlert@infineon.com>
9874 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9875 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9877 2002-01-03 Graham Stott <grahams@redhat.com>
9879 * class.c (compile_resource_file): Update copyright date.
9880 Constify filename parameter.
9881 (java-tree.h): Update copyright date.
9882 (compile_resource_file): Constify filename parameter.
9884 2002-01-03 Graham Stott <grahams@redhat.com>
9886 * gcc/jcf-parse.c: Update copyright date.
9887 (yyparse): Constify resource_filename.
9889 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9891 * parse.y (src_parse_roots): Don't needlessly zero init.
9893 2001-12-31 Tom Tromey <tromey@redhat.com>
9895 * parse.y (dump_java_tree): New function.
9896 (source_end_java_method): Call it.
9897 (end_class_declaration): Likewise.
9898 * lang.c (java_decode_option): Call dump_switch_p.
9900 2001-12-28 Tom Tromey <tromey@redhat.com>
9902 * gen-table.pl: Don't process characters after \uffff. Added
9903 comment pointing to input file.
9905 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9907 * gen-table.pl: Const-ify output. Document the location of a
9908 suitable unicode input file.
9910 * chartables.h: Regenerate.
9912 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9914 * chartables.h: Const-ify.
9915 * gjavah.c (options): Likewise.
9916 * jcf-dump.c (options): Likewise.
9917 * jv-scan.c (options): Likewise.
9918 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9919 * parse.y (binop_lookup): Likewise.
9921 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9923 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9924 the static arrays that are output.
9925 * jvspec.c (jvgenmain_spec): Make static.
9926 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9927 * keyword.h: Regenerate.
9928 * lang.c (string_option, process_option_with_no, lang_f_options,
9929 lang_W_options): Const-ify.
9930 * lex.c (java_lex): Likewise.
9932 2001-12-21 Richard Henderson <rth@redhat.com>
9934 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9935 (get_boehm_type_descriptor): ... here. Arrange for the
9936 TREE_TYPE to get set properly.
9938 2001-12-21 Richard Henderson <rth@redhat.com>
9940 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9941 only if the target requires collect2.
9943 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9945 2001-12-20 Tom Tromey <tromey@redhat.com>
9948 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9949 CAN_COMPLETE_NORMALLY for the node.
9950 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9951 generate code for second branch if first branch can't complete
9953 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9954 the loop head if the loop body can't complete normally.
9956 2001-12-20 Tom Tromey <tromey@redhat.com>
9959 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9960 case where `finally' clause can't complete normally.
9962 2001-12-20 Tom Tromey <tromey@redhat.com>
9965 * parse.y (analyze_clinit_body): Added this_class parameter.
9966 Check for more cases where we must keep <clinit>.
9967 (maybe_yank_clinit): Cleaned up flow control.
9969 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9971 * decl.c (java_init_decl_processing): Don't initialize
9972 finit_leg_identifier_node.
9973 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9974 (finit_leg_identifier_node): Remove.
9975 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9977 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9979 * mangle.c (mangle_member_name): Don't special-case for
9981 * mangle_name.c (unicode_mangling_length): Likewise.
9982 (append_unicode_mangled_name): Likewise.
9983 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9986 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9988 * expr.c (build_java_array_length_access): Don't force null pointer
9989 check unless flag_check_references is set.
9991 2001-12-20 Tom Tromey <tromey@redhat.com>
9993 Fix for PR java/3417:
9994 * parse.y (patch_assignment): Added special processing for
9996 (patch_return): Don't convert booleans to integers, and don't
9997 special-case `null'.
9999 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10001 * config-lang.in (diff_excludes): Remove.
10003 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
10005 * gcj.texi: Update link to GCC manual.
10007 2001-12-17 Tom Tromey <tromey@redhat.com>
10009 * parse.y (link_nested_class_to_enclosing): Removed useless
10012 2001-12-16 Tom Tromey <tromey@redhat.com>
10014 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
10015 Fixes PR java/5088.
10017 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10019 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
10020 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
10023 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10025 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
10027 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10029 * decl.c (java_init_decl_processing): Build otable_type correctly.
10030 otable_decl is an otable_type.
10032 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10034 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
10035 otable_type, otable_ptr_type, method_symbol_type,
10036 method_symbols_array_type, method_symbols_array_ptr_type): New
10037 field/global tree definitions.
10038 (flag_indirect_dispatch): New flag.
10039 * decl.c (java_init_decl_processing): Initialize new otable and
10040 otable_syms type nodes and decls. Add new field "index" to
10042 * class.c (build_method_symbols_entry): New function.
10043 (make_method_value): Set "index" to to method's vtable index for
10044 virtual methods when indirect-dispatch is not used.
10045 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
10046 and set vtable_method_count to -1. Set otable and otable_syms field
10047 if indirect-dispatch is used and there was something to put in them.
10048 (build_method_symbols_entry): New function.
10049 (emit_offset_symbol_table): New function.
10050 * expr.c (get_offset_table_index): New function.
10051 (build_invokevirtual): Build array reference to otable at the index
10052 returned by get_offset_table_index, and use the result as the vtable
10054 (build_invokeinterface): Similar.
10055 * jcf-parse.c (yyparse): If indirect-dispatch, call
10056 emit_offset_symbol_table at the end of compilation, after all classes
10057 have been generated.
10058 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
10059 * lang.c (flag_indirect_dispatch): Define.
10060 (lang_f_options): Add indirect-dispatch flag.
10062 2001-12-14 Matthias Klose <doko@debian.org>
10064 * gcj.texi: Markup for man page generation. Document missing
10065 options printed by <tool> --help.
10066 Terminate description of gij's -ms option with a dot.
10067 * Make-lang.in ($(srcdir)/java/*.1): New targets.
10068 (java.generated-manpages java.install-man, java.uninstall,
10069 java-maintainer-clean) Updated.
10071 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
10073 * class.c (get_dispatch_table): Fix java vtable layout
10074 for TARGET_VTABLE_USES_DESCRIPTORS.
10075 * decl.c (java_init_decl_processing): Initialize
10076 alloc_no_finalizer_node, finalize_identifier_node.
10077 * expr.c (class_has_finalize_method): New function.
10078 (expand_java_NEW): Generate calls for finalizer-free allocation.
10079 (build_invokevirtual): Fix java vtable layout for
10080 TARGET_VTABLE_USES_DESCRIPTORS.
10081 * java-tree.h (enum java_tree_index): New entries:
10082 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
10083 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
10084 (class_has_finalize_method): declare.
10085 (HAS_FINALIZER_P): New macro.
10086 * parse.y (patch_invoke): Generate calls for finalizer-free
10089 2001-12-12 Matthias Klose <doko@debian.org>
10091 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
10092 whitespace at end of line.
10094 2001-12-11 Tom Tromey <tromey@redhat.com>
10096 * lex.c (java_init_lex): Define wfl_to_string as
10097 gnu.gcj.runtime.StringBuffer unless generating bytecode.
10099 2001-12-11 Jeff Sturm <jsturm@one-point.com>
10101 * class.c (make_method_value): Use null_pointer_node to
10102 represent empty exception table.
10104 2001-12-10 Tom Tromey <tromey@redhat.com>
10106 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
10108 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
10110 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10112 2001-12-09 Per Bothner <per@bothner.com>
10114 * check-init.c (current_switch_has_default): New static field.
10115 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
10116 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
10117 DEFAULT_EXPR seen, simulate a default alternative that copies state.
10119 2001-12-09 Tom Tromey <tromey@redhat.com>
10121 * check-init.c (check_init): Don't allow pre- or post- increment
10122 or decrement of final variable.
10123 (final_assign_error): Minor error message rewording.
10125 2001-12-08 Tom Tromey <tromey@redhat.com>
10127 * java-tree.h: Fixed typo.
10129 * gjavah.c (decompile_method): Don't decompile to `return this'
10130 for static methods.
10132 * gjavah.c (cxx_keywords): Re-sorted.
10133 * lex.c (cxx_keywords): Re-sorted.
10135 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10138 * gjavah.c (print_namelet): Clear subnamelets.
10139 (HANDLE_METHOD): Set `method_printed' earlier.
10141 2001-12-07 Tom Tromey <tromey@redhat.com>
10143 * lang.c (lang_f_options): Added
10144 optimize-static-class-initialization.
10145 (java_decode_option): Removed special case.
10147 2001-12-07 Per Bothner <per@bothner.com>
10149 * check-init.c (check_init): Fix typo freeing memory twice.
10151 2001-12-05 Per Bothner <per@bothner.com>
10153 Restore support for static class initialization optimization.
10154 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10155 * check-init.c (check_int): At end of BLOCK handle initialization
10156 blocks, which used to be done in java_complete_expand_method but did
10157 not handle the case where check_for_initialization might allocate
10158 more than a word of bits.
10159 * decl.c (lang_make_tree): The smic field is now a tree.
10160 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
10161 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
10163 * parse.y (emit_test_initialization): Combine hash_lookup calls.
10165 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10166 Change from a hash table to a list.
10167 (struct_lang_decl): Change field 'smic' to match.
10168 * class.c (add_method_1): Initialize
10169 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10170 * parse.y (adjust_init_test_initialization): Removed - inlined into -
10171 (java_expand_method_bodies): -here, since 'smic' is now a list.
10172 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
10174 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
10176 * class.c (java_hash_compare_tree_node): Fix casts.
10178 2001-12-04 Per Bothner <per@bothner.com>
10180 * check-init.c: Handle definite unassignment to finals in addition
10181 to definite assignment.
10182 (loop_current_locals): New field.
10183 (num_current_locals, int start_current_locals, num_current_words):
10185 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
10186 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10187 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
10188 (get_variable_decl, check_final_reassigned): New functions.
10189 (check_init, check_bool_init): Modify as needed for checking finals.
10190 (check_for_initialization): Take extra parameter and return void.
10191 Do extra start-up logic to check final fields for assignment.
10192 * parse.y (check_static_final_variable_assignment_flag,
10193 reset_static_final_variable_assignment_flag, check_final_assignment,
10194 check_final_variable_local_assignment_flag,
10195 reset_final_variable_indirect_assignment_flag,
10196 reset_final_variable_global_assignment_flag): Remove functions.
10197 (java_complete_expand_methods, outer_field_access_fix,
10198 patch_assignment): Remove no-longer used logic.
10199 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
10200 * parse.y (register_fields, java_complete_tree): Update accordingly.
10202 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
10203 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
10204 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
10206 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
10208 * java-tree.h (DECL FINAL): New bit-field.
10209 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
10210 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
10211 (DECL_INIT_CALLS_THIS): New macro.
10212 (struct lang_decl): New bit-field init_calls_this.
10213 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10214 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10215 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
10216 use it for both local variables and final fields.
10217 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
10219 (struct lang_type): Remove hfv bit-field.
10220 (check_for_initialization): Change to return void.
10222 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
10223 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
10224 * check-init.c (final_assign_error): New helper function.
10225 (check_final_reassigned, check_init): Use it.
10226 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10228 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
10229 bit-fields to unsigned.
10231 2001-12-03 Per Bothner <per@bothner.com>
10233 * parse.y (patch_binop): Minor constant folding.
10235 * parse.y (build_current_thisn): Shorter 'buffer'.
10237 2001-12-03 Per Bothner <per@bothner.com>
10239 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
10240 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10241 * jcf-write.c (generate_bytecode_insns): Remove support for
10242 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10243 * check-init.c (check_init): Likewise.
10245 2001-12-03 Per Bothner <per@bothner.com>
10247 * verify.c (subroutine_nesting): New function.
10248 (verify_jvm_instructions): Use it to fix logic for checking that
10249 we're done with the current subroutine.
10251 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10252 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10254 2001-12-03 Per Bothner <per@bothner.com>
10256 * jcf.h: Fix obvious typo in comment.
10257 * typeck.c (build_null_signature): Add comment.
10259 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10261 * expr.c: Remove leading capital from diagnostic messages, as
10262 per GNU coding standards.
10263 * jcf-io.c: Similarly.
10264 * jcf-parse.c: Similarly.
10265 * jv-scan.c: Similarly.
10266 * jvspec.c: Similarly.
10267 * mangle.c: Similarly.
10269 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
10270 Alexandre Petit-Bianco <apbianco@redhat.com>
10272 * expr.c (build_java_arrayaccess): Call save_expr on array for
10273 correct evaluation order, modified comment, fixed indentation.
10274 * parse.y: (patch_assignment): Correctly extract the array base
10275 from the tree generate by build_java_arrayaccess, added comments.
10276 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10277 Fixes PR java/3096, PR java/3803, PR java/3965.
10279 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10281 * expr.c (expand_byte_code): Remove trailing periods from messages.
10282 * jcf-parse.c (load_class, jcf_parse): Similarly.
10283 * jcf-write.c (generate_classfile): Similarly.
10284 * lex.c (java_lex): Similarly.
10286 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10288 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10290 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10292 * Make-lang.in (java.generated-manpages): New dummy target.
10294 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10296 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10298 (lang_specific_pre_link): Use set_input to set input_filename.
10299 Append `main' here.
10300 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10301 (main): Fix definition.
10302 Strip `main' from classname.
10305 2001-11-18 Roger Sayle <roger@eyesopen.com>
10307 * parse.h (java_expand_switch): Remove old prototype.
10309 2001-11-18 Tom Tromey <tromey@redhat.com>
10311 Fix for PR java/1401:
10312 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10314 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10317 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10319 * lang.c (finish_parse): Rename to java_finish.
10320 (LANG_HOOKS_FINISH, java_finish): New.
10322 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10324 * decl.c (init_decl_processing): Rename java_init_decl_processing.
10325 * java-tree.h: New prototype.
10326 * lang.c (java_init): Update prototype. Combine with old init_parse.
10328 2001-11-13 Tom Tromey <tromey@redhat.com>
10330 * gjavah.c (method_signature): New global.
10331 (HANDLE_METHOD): Set it.
10332 (decompile_return_statement): New function.
10333 (decompile_method): Use it.
10334 (print_method_info): Removed `synth' argument.
10336 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10338 * java-tree.h (java_set_yydebug): New.
10339 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10340 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10341 (print_lang_decl, print_lang_type, print_lang_identifier,
10342 print_lang_statistics, lang_print_xnode): Remove.
10344 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10346 * jcf-parse.c (init_lex): Remove.
10347 * lang.c (language_string, lang_identify): Remove.
10348 (struct lang_hooks): Constify.
10349 (LANG_HOOKS_NAME): Override.
10350 (init_parse): Update.
10352 2001-11-08 Andreas Franck <afranck@gmx.de>
10354 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10355 program_transform_name the way suggested by autoconf.
10356 (java.install-common): Also transform auxiliary program names with
10357 program_transform_name.
10359 2001-11-08 Tom Tromey <tromey@cygnus.com>
10361 * parse.y (trap_overflow_corner_case): New rule.
10362 (unary_expression): Use it.
10363 * lex.c (java_init_lex): Don't set minus_seen.
10364 (yylex): Don't use minus_seen. Communicate overflow to parser for
10366 (error_if_numeric_overflow): New function.
10367 * parse.h (minus_seen): Removed field.
10368 (JAVA_RADIX10_FLAG): New define.
10370 2001-11-07 Tom Tromey <tromey@redhat.com>
10372 Patch for PR java/1414:
10373 * parse.y (case_label_list): New global.
10374 (goal): Register case_label_list with GC.
10375 (java_complete_lhs): Save new case on case_label_list.
10376 (patch_switch_statement): Check for duplicate case labels.
10378 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10380 * parse.y (patch_assignment): Removed unused third argument.
10381 (java_complete_lhs): Removed unused third argument to patch_assignment.
10383 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10385 * lang.c: Include langhooks-def.h.
10386 * Make-lang.in: Update.
10388 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10390 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10392 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10394 * mangle.c (find_compression_record_match): Don't match compression
10395 records for package name elements unless they occur at the start of
10396 the name. Fix for PR java/4717.
10398 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10400 * expr.c (expand_java_field_op): Don't special-case references to
10401 java.lang.PRIMTYPE.TYPE.
10402 (build_primtype_type_ref): Removed.
10403 * java-tree.h (build_primtype_type_ref): Remove prototype.
10404 * parse.y (maybe_build_primttype_type_ref): Removed.
10405 (complete_function_arguments): Don't special-case references to
10406 java.lang.PRIMTYPE.TYPE.
10407 (patch_assignment): Likewise.
10408 (array_constructor_check_entry): Likewise.
10410 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10412 * mangle.c (static tree compression_table): Fixed leading comment.
10413 * parse.h (struct parser_ctxt): Fixed field comment.
10414 * parse.y (check_pkg_class_access): New prototype, fixed leading
10415 comment, new parameter used to emit error only if passed as true.
10416 (parse_check_super): Pass extra argument to check_pkg_class_access.
10417 (do_resolve_class): Likewise.
10418 (process_imports): Likewise.
10419 (read_import_dir): Fixed indentation.
10420 (find_in_imports_on_demand): New local class_type_name. Local
10421 node_to_use deleted. while loop changed into for loop. Report
10422 multiple definition only for accessible classes. Improved error
10424 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10425 assigned to parameter list, fixed indentation. while loop changed
10426 into for loop, restore TREE_CHAIN on local `tem' before the next
10429 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10431 * lang.c (lang_get_alias_set): Deleted.
10433 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10435 * gjavah.c (jni_print_char): Fix thinko in last change.
10437 * gjavah.c (jni_print_char, decode_signature_piece): Use
10438 safe-ctype macros and/or fold extra calls into fewer ones.
10439 * lex.c (java_read_unicode, java_lex): Likewise.
10440 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10441 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10442 * mangle_name.c (append_unicode_mangled_name,
10443 unicode_mangling_length): Likewise.
10445 2001-10-17 Richard Henderson <rth@redhat.com>
10447 * Make-lang.in (java/lang.o): Depend on langhooks.h.
10449 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10451 * lang.c (langhooks.h): Included.
10452 (LANG_HOOKS_INIT): Redefined.
10453 (LANG_HOOKS_INIT_OPTIONS): Likewise.
10454 (LANG_HOOKS_DECODE_OPTION): Likewise.
10455 (struct lang_hooks lang_hooks): New initialization.
10457 2001-10-11 Per Bothner <per@bothner.com>
10459 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
10460 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10461 The former is simpler, and jcf-write.c handles it better.
10462 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
10463 or WITH_CLEANUP_EXPR.
10464 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
10465 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10467 * parse.y (patch_if_else_statement): If the condition is constant,
10468 optimize away the test.
10470 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10472 * parse.y (patch_cast): Call patch_string on the first operand of
10473 the incoming node, update it if necessary. Fixes PR java/4510.
10475 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10477 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10478 when name qualifier matches a package name.
10480 2001-10-08 Tom Tromey <tromey@redhat.com>
10482 Fix for PR java/4489:
10483 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10484 force a new label when computing `body_block'.
10486 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10488 * jcf-io.c (format_uint): Const-ify.
10489 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10490 * lex.c (java_get_line_col): Likewise.
10491 * parse.y (build_incdec): Likewise.
10493 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10495 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10496 a NULL enclosing context if appropriate. Fixes PR java/4466.
10498 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10500 * parse.y (patch_assignment): Use lvalue's original TYPE when
10501 building the final COMPOUND_EXPR.
10502 (try_reference_assignconv): Fixed leading comment.
10504 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10506 * parse.y (check_final_variable_indirect_assignment): For
10507 COMPOUND_EXPR, return only if finals were found initialized
10508 properly, if not, keep on checking.
10509 (check_final_variable_global_assignment_flag): New local
10510 error_found, set when appropriate and used to decide whether to
10511 report uninitialized finals. Fixed typo in comment.
10513 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10515 * decl.c (init_decl_processing): Fixed typo in predef_filenames
10516 last three initializations. Fixes PR java/4360.
10518 2001-09-21 Richard Henderson <rth@redhat.com>
10520 * class.c (get_dispatch_table): Handle function descriptors.
10521 (build_dtable_decl): Likewise.
10522 * expr.c (build_invokevirtual): Likewise.
10524 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10526 * parse.y (patch_method_invocation): Build class initialization
10527 when static finals are used to qualify method invocation.
10528 Fixes PR java/4366.
10530 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10532 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10533 build_type_name_from_array_name.
10534 (STRING_STRIP_BRACKETS): New macro.
10535 * parse.y (build_type_name_from_array_name): New function.
10536 (array_creation_expression:): Accumulate []s instead of [s.
10537 (cast_expression:): Accumulate []s instead of [s after cast type
10539 (build_array_from_name): Local string deleted, use
10540 build_type_name_from_array_name.
10541 (build_unresolved_array_type): Accumulate []s instead of [s after
10543 (register_fields): Fixed comment.
10544 (resolve_class): Local name, base deleted, new locals tname and
10545 array_dims. Use build_type_name_from_array_name. Use array_dims to
10547 (purify_type_name): Use STRING_STRIP_BRACKETS.
10549 2001-09-18 Andreas Jaeger <aj@suse.de>
10551 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10552 * jv-scan.c: Likewise.
10554 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10556 * parse.y (patch_method_invocation): Inner class creation context
10557 check not enforced within constructors. Fixes PR java/1873.
10559 2001-09-16 Tom Tromey <tromey@redhat.com>
10561 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10562 NOTE_PUSH for single-case push. Fixes PR java/4189.
10564 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10566 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10567 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10568 (struct lang_type): New fields import_list and import_demand_list.
10569 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10570 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10571 (do_resolve_class): New local saved_enclosing_type, initialized,
10572 passed as parameter to find_in_imports and find_in_imports_on_demand.
10573 (find_in_imports): Added paramater enclosing_type, use its
10574 TYPE_IMPORT_LIST when applicable.
10575 (find_in_imports_on_demand): Added parameter enclosing_type, use
10576 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10577 declaration and initialization.
10578 (fold_constant_for_init): Switch/restore current_class to the
10579 appropriate context.
10581 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10583 * verify.c (verify_jvm_instructions): Fix typo.
10585 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10587 * expr.c (expand_invoke): Const-ification.
10588 * parse.y (patch_method_invocation): Likewise.
10590 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10592 * gjavah.c (cxx_keywords): Const-ification.
10593 * keyword.gperf (java_keyword): Likewise.
10594 * lang.c (java_tree_code_name): Likewise.
10595 * lex.c (cxx_keywords): Likewise.
10596 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10598 2001-09-11 Richard Henderson <rth@redhat.com>
10600 * parse.h (ctxp_for_generation): Mark extern.
10602 2001-09-10 Richard Henderson <rth@redhat.com>
10604 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10606 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10608 * typeck.c (java_array_type_length, build_prim_array_type):
10609 Represent empty arrays by NULL index.
10611 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10613 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10614 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10616 2001-09-06 Anthony Green <green@redhat.com>
10618 * class.c (O_BINARY): Define if necessary.
10619 (registerResource_libfunc): Declare.
10620 (init_class_processing): Initilize registerResource_libfunc.
10621 (compile_resource_file): New function.
10622 * java-tree.h (resource_name): Declare.
10623 (compile_resource_file): Declare.
10624 * jcf-parse.c (yyparse): Handle compiling java resource files.
10625 * lang.c (java_decode_option): Handle -fcompile-resource option.
10626 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10628 * gcj.texi (Code Generation): Add documentation for -R flag.
10630 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10632 * jcf-write.c (generate_classfile): Issue an error in case of
10633 field/initial value mismatch.
10634 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10635 being initialized and we're generating bytecode.
10636 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10637 set DECL_INITIAL properly when appropriate.
10641 2001-09-01 Per Bothner <per@bothner.com>
10643 * parse.y (maybe_yank_clinit): A field without an initializer is not
10644 relevant. All initializers except static final and constant require
10645 <clinit>, regardless of flag_emit_class_files.
10647 2001-08-31 Per Bothner <per@bothner.com>
10649 * class.c (set_constant_value): When not emitting class files, then a
10650 String ConstantValue is a utf8const_ptr_type.
10652 2001-08-30 Per Bothner <per@bothner.com>
10654 * jcf-write.c (generate_classfile): Check that field is primitive
10655 or string before emitting ConstantValue attribute.
10657 2001-08-30 Per Bothner <per@bothner.com>
10659 * parse.y (resolve_qualified_expression_name): If creating a
10660 COMPOUND_EXPR, set it's type correctly.
10662 2001-08-30 Per Bothner <per@bothner.com>
10664 * jcf-io.c (open_class): Set filename field.
10666 * jcf-parse,c (parse_class_file): Set current_function_decl
10667 for better error message when Code attribute is missing.
10669 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10670 better diagnostics, especially for constructors.
10672 2001-08-30 Per Bothner <per@bothner.com>
10674 * jcf-write.c (generate_classfile): Don't write ConstantValue
10675 attribute if field is not final, for compatibility with jdk.
10677 * jcf-write.c (generate_classfile): Convert ConstantValue values
10678 to correct type. Work-around for front-end bug.
10679 * class.c (set_constant_value): Error if constant has wrong type.
10681 2001-08-30 Per Bothner <per@bothner.com>
10683 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10684 "Double" are printed at verbosity 1.
10686 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10688 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10690 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10692 * parse.y (patch_assignment): Don't verify final re-assignment here.
10693 (java_complete_lhs): Verify assignments to finals calling
10694 patch_assignment. Verify re-assignments to finals before calling
10697 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10699 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10702 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10704 * lex.c (java_lex): new local found_hex_digits. Set and then used
10705 in test to reject invalid hexadecimal numbers.
10706 * parse.y (java_complete_tree): Prevent unwanted cast with
10707 initialized floating point finals.
10708 (patch_binop): Emit a warning when detecting a division by zero,
10709 mark result not constant, don't simplify non integer division.
10711 2001-08-28 Per Bothner <per@bothner.com>
10713 * jcf-write.c (generate_bytecode_insns): For increments and
10714 decrements just recurse to push constant. Improvement on Mark's patch.
10716 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10718 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10719 real conversion for increments and decrements of reals.
10721 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10723 * parse.y (resolve_qualified_expression_name): Handle unresolved
10724 qualified expressions, prevent numerical qualifiers, fixed typo.
10727 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10729 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10730 don't report anything but deprecated class when marked so. Handle
10732 (patch_method_invocation): Check deprecation on methods and types.
10733 (patch_binop): code becomes an enum tree_code, added default: to
10734 switch to handle that. Detect division by zero, try to fold and
10735 return before using a subroutine.
10737 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10739 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10740 file smaller than 4 bytes.
10741 * parse.y (check_inner_circular_reference): New function.
10742 (check_circular_reference): Likewise.
10743 (array_initializer:): Accept {,}.
10744 (java_check_circular_reference): Rewritten using
10745 check_circular_reference and check_inner_circular_reference.
10746 (java_complete_expand_method): Unconditionally save and restore
10747 the unpurged exception list.
10748 (build_dot_class_method_invocation): Unmangle signature parameter.
10750 2001-08-21 Tom Tromey <tromey@redhat.com>
10752 * decl.c (init_decl_processing): Add `throws' field to method
10754 * class.c (make_method_value): Compute `throws' field for method.
10756 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10758 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10759 circularity is detected.
10760 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10762 2001-08-17 Richard Henderson <rth@redhat.com>
10764 * class.c (emit_register_classes): Add align parameter to
10765 call to assemble_integer.
10767 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10769 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10770 loading a class_or_name fails, try considering an innerclass name
10771 and load the enclosing context.
10772 * parse.y (resolve_inner_class): New function.
10773 (find_as_inner_class): Added leading comment.
10774 (register_incomplete_type): Keep the current context as enclosing
10775 context for JDEP_FIELD dependencies.
10776 (do_resolve_class): Locals new_class_decl and super initialized to
10777 NULL. Call resolve_inner_class, explore the enclosing context
10778 superclass if necessary.
10781 2001-08-16 Tom Tromey <tromey@redhat.com>
10783 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10784 * gjavah.c (main): Updated for change to jcf_path_seal.
10785 * lang.c (version_flag): New global.
10786 (java_decode_option): Recognize `-version'.
10787 (java_init): Update for change to jcf_path_seal.
10788 * jcf.h (jcf_path_seal): Added `print' argument.
10789 * jcf-path.c (jcf_path_seal): Added `print' argument.
10791 2001-08-13 Zack Weinberg <zackw@panix.com>
10793 * Make-lang.in (java/decl.o): Update dependencies.
10794 * decl.c: Include libfuncs.h, don't include toplev.h.
10796 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10798 * decl.c (init_decl_processing): exception_type_node,
10799 class_not_found_type_node, and no_class_def_found_type_node
10800 initialized. predef_filenames augmented accordingly.
10801 instinit_identifier_node initialized.
10802 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10803 * java-tree.h (enum java_tree_index): New entries
10804 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10805 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10806 (exception_type_node): New macro.
10807 (class_not_found_type_node): Likewise.
10808 (no_class_def_found_type_node): Likewise.
10809 (instinit_identifier_node): Likewise.
10810 (PREDEF_FILENAMES_SIZE): Adjusted.
10811 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10812 (struct lang_type): Fixed typo in bitfield name.
10813 (DECL_INSTINIT_P): New macro.
10814 (ID_INSTINIT_P): Likewise.
10815 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10817 * parse.y (encapsulate_with_try_catch): New function.
10818 (generate_instinit): Likewise.
10819 (build_instinit_invocation): Likewise.
10820 (ctors_unchecked_throws_clause_p): Likewise.
10821 (add_instance_initializer): Deleted.
10822 (build_instance_initializer): Likewise.
10823 (in_instance_initializer): Likewise.
10824 (check_method_redefinition): instinit$ not to be verified.
10825 (java_complete_expand_methods): Generate instinit$, simplified code.
10826 (build_dot_class_method): Eliminated unnecessary locals. Use
10827 encapsulate_with_try_catch, removed unnecessary code.
10828 (fix_constructors): New local iii. Use build_instinit_invocation.
10829 (patch_method_invocation): Added comment.
10830 (maybe_use_access_method): Don't consider instinit$.
10831 (find_applicable_accessible_methods_list): Shorten the search for
10833 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10834 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10835 (patch_throw_statement): Likewise. Fixed typo.
10837 2001-08-12 David Edelsohn <edelsohn@gnu.org>
10840 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10841 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10843 (lang_specific_pre_link): Use set_input to set input_filename.
10844 Append `main' here.
10845 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10846 (main): Fix definition.
10847 Strip `main' from classname.
10850 2001-08-11 Zack Weinberg <zackw@panix.com>
10852 * lex.h: Don't include setjmp.h. Don't define
10853 SET_FLOAT_HANDLER or prototype set_float_handler.
10855 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10857 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10858 `poplevel' in the right order.
10860 2001-08-09 Richard Henderson <rth@redhat.com>
10862 * Make-lang.in (class.o): Depend on TARGET_H.
10863 * class.c (emit_register_classes): Use target hooks instead of
10864 assemble_constructor and assemble_destructor.
10866 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10868 * check-init.c (flags.h): Include
10869 (check_init): Don't report uninitialized static class
10870 initialization flags, don't free bit index when doing static class
10871 initialization optimization.
10872 (check_for_initialization): Return type changed to `unsigned int.'
10873 (attach_initialized_static_class): New function.
10874 * class.c (add_method_1): Create the initialized static class
10875 table if necessary.
10876 (finish_class): Always emit deferred inline methods.
10877 * decl.c (emit_init_test_initialization): Moved to expr.c
10878 (complete_start_java_method): Don't traverse
10879 DECL_FUNCTION_INIT_TEST_TABLE.
10880 (lang_mark_tree): Mark hash tables in function decls.
10881 * expr.c (emit_init_test_initialization): Moved from decl.c.
10882 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10883 initialization flag, set DECL_CONTEXT and
10884 LOCAL_CLASS_INITIALIZATION_FLAG.
10885 (java_lang_expand_expr): Emit initialization code for static class
10886 initialized flags when entering block, if necessary.
10887 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10888 * java-tree.h (flag_optimize_sci): New global variable declaration.
10889 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10890 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10891 (LOCAL_FINAL_P): Fixed typo in comment.
10892 (FINAL_VARIABLE_P): Likewise.
10893 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10894 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10895 (struct lang_decl): New fields `ict', `smic' and `cif.'
10896 (check_for_initialization): New returned value for global.
10897 (attach_initialized_static_class): New global function.
10898 (STATIC_CLASS_INIT_OPT_P): New macro.
10899 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10900 * lang.c (java_decode_option): Handle
10901 `-fno-optimize-static-class-initialization'
10902 * parse.y (start_complete_expand_method): New function.
10903 (java_expand_method_bodies): Likewise.
10904 (attach_init_test_initialization_flags): Likewise.
10905 (adjust_init_test_initialization): Likewise.
10906 (emit_test_initialization): Likewise.
10907 (java_complete_expand_methods): Nullify abstract and native method
10909 (java_complete_expand_method): New locals `fbody', `block_body'
10910 and `exception_copy.' Reorganized: directly return on empty method
10911 bodies, call `start_complete_expand_method', remember definitely
10912 initialized static class in function, don't expand method bodies.
10913 (java_expand_classes): Call `java_expand_method_bodies' before
10914 `finish_class' when compiling to native.
10915 (resolve_expression_name): Use `orig' after building outer class
10917 (patch_invoke): Remember static method invocations.
10919 2001-08-06 Richard Henderson <rth@redhat.com>
10921 * class.c (emit_register_classes): Pass a symbol_ref and priority
10922 to assemble_constructor.
10924 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
10926 * java-tree.h (all_class_filename): New macro.
10927 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10928 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10929 newly created IDENTIFIER_NODE to `all_class_filename.'
10931 2001-08-01 Jeff Sturm <jsturm@one-point.com>
10933 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10934 Use ggc_add_tree_root to register roots.
10936 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10938 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10939 second operand calling check_init.
10940 * decl.c (complete_start_java_method): Swaped second and third
10941 arguments while creating WITH_CLEANUP_EXPR node.
10942 * jcf-write.c (generate_bytecode_insns): Use second operand
10943 instead of third when handling WITH_CLEANUP_EXPR.
10944 * parse.y (java_complete_lhs): Expand second operand of
10945 WITH_CLEANUP_EXPR nodes.
10946 (patch_synchronized_statement): Swaped second and third arguments
10947 while creating WITH_CLEANUP_EXPR node.
10949 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
10951 * parse.y (create_interface): Avoid cyclic inheritance report when
10952 syntax error encountered during class definition.
10955 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10957 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10959 (lang_specific_pre_link): Use set_input to set input_filename.
10960 Append `main' here.
10961 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10962 (main): Fix definition.
10963 Strip `main' from classname.
10966 2001-07-18 Tom Tromey <tromey@redhat.com>
10969 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10970 * lex.c (java_new_lexer): Use ICONV_CONST.
10971 (java_read_char): Likewise.
10972 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10973 (jv-scan$(exeext)): Likewise.
10975 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10977 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10978 * parse.y (check_class_interface_creation): Allow `private' if the
10979 enclosing is not an interface.
10980 (create_interface): Interface tagged public if the enclosing
10981 context is an interface.
10982 (create_class): Class tagged public if the enclosing context
10986 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10988 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10991 2001-07-14 Tim Josling <tej@melbpc.org.au>
10993 * check-init.c (check_init): Remove references to EXPON_EXPR.
10995 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10997 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10998 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
11001 2001-07-13 Tom Tromey <tromey@redhat.com>
11003 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
11006 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11008 * parse.y (patch_method_invocation): Don't override primary if one
11009 is already provided, but let this$<n> be built. Fixed comment.
11011 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11013 * parse.y (empty_statement:): Report empty statement error only
11014 when found at class declaration level.
11017 2001-07-12 Tom Tromey <tromey@redhat.com>
11019 * expr.c (expand_load_internal): New function.
11020 (LOAD_INTERNAL): Use it.
11022 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
11024 * parse.y (verify_constructor_super): Compare anonymous class ctor
11025 args with `valid_method_invocation_conversion_p.'
11028 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11030 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
11031 `-fsyntax-only.' Fixes PR java/3248
11033 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11035 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
11037 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11039 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
11040 current function is static. Fixes PR java/1970
11042 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11044 * parse.y (patch_method_invocation): Add enclosing context to ctor
11045 calls if necessary. Fixes PR java/2953
11047 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11049 * parse.y (resolve_package): Abort if qualified expression member
11051 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
11054 2001-07-07 Zack Weinberg <zackw@stanford.edu>
11056 * verify.c: Don't use // comments.
11058 2001-07-05 Tom Tromey <tromey@redhat.com>
11060 * lang.c (flag_assume_compiled): Removed.
11061 * java-tree.h (flag_assume_compiled): Removed.
11062 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
11063 -fhash-synchronization, -fuse-divide-subroutine,
11064 -fcheck-references, -femit-class-file, -femit-class-files,
11065 -fassume-compiled. Updated --encoding information. Changed
11066 -foutput-class-dir to `-d'.
11068 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
11070 * jcf-parse.c (parse_class_file): Add lineno parameter to
11071 debug_start_source_file call.
11073 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
11075 * gcj.texi: Use gpl.texi.
11076 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
11077 dependencies and use doc/include in search path.
11079 2001-07-03 Jeff Sturm <jsturm@one-point.com>
11081 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
11082 `this'. If so, don't build instance initializers.
11084 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
11086 * parse.y (resolve_expression_name): Improved error message for
11087 inner class cases. Fixes PR java/1958
11089 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
11091 * lang.c: #include diagnostic.h
11092 (lang_print_error): Add a `diagnostic_context *' parameter.
11093 (java_dummy_print): Likewise.
11094 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
11096 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11098 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
11099 * jcf.h (typedef struct JCF): New bitfield `finished.'
11100 (JCF_FINISH): Set `finished.'
11101 (JCF_ZERO): Reset `finished.'
11104 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11106 * parse.y (class_body_declaration:): Don't install empty instance
11110 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11112 * class.c (set_super_info): Call `set_class_decl_access_flags.'
11113 (set_class_decl_access_flags): New function.
11114 * java-tree.h (set_class_decl_access_flags): New prototype.
11115 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11116 (parse_class_file): New local `decl_max_locals.' Take wide types
11117 into account to compute DECL_MAX_LOCALS.
11118 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11121 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
11123 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11125 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11127 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11128 * parse.y (do_resolve_class): Moved comments out to leading comment
11129 section. Removed local `start', New local `_ht' and
11130 `circularity_hash.' Record `enclosing' in hash table and search
11131 it to detect circularity. Use `enclosing' as an argument to
11132 `lookup_cl.' Free the hash table when done.
11134 2001-06-19 Tom Tromey <tromey@redhat.com>
11136 * lex.c (java_read_char): Disallow invalid and overlong
11137 sequences. Fixes PR java/2319.
11139 2001-06-05 Jeff Sturm <jsturm@one-point.com>
11141 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11143 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11145 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11146 arguments accordingly.
11148 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
11150 * gcj.texi: Move contents to just after title page.
11152 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
11154 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11156 (patch_incomplete_class_ref): Build the class ref, build the class
11157 init if necessary, complete the tree.
11160 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11162 * parse.y (lookup_field_wrapper): Test `name' code.
11163 (resolve_qualified_expression_name): Test `qual_wfl' code.
11164 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11165 handle `qual_wfl' by code.
11166 (maybe_build_primttype_type_ref): Test `wfl' code.
11168 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11170 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11172 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
11173 the dvi file in the java directory.
11175 2001-05-25 Sam TH <sam@uchicago.edu>
11177 * gen-table.pl javaop.h jcf.h lex.h,
11178 parse.h: Fix header include guards.
11180 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
11182 * jv-scan.c (version): Update copyright year.
11184 2001-05-21 Per Bothner <per@bothner.com>
11186 * jcf-parse.c (read_class): If class is from .class or .zip file
11187 and it's already been read, don't push/pop parser context.
11189 2001-05-18 Per Bothner <per@bothner.com>
11191 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
11192 command line so the jvgenmain-generated main program comes first.
11194 2001-05-15 Tom Tromey <tromey@redhat.com>
11196 * class.c (build_utf8_ref): Don't generate identifier based on
11197 utf8const contents.
11199 2001-05-12 Richard Henderson <rth@redhat.com>
11201 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11202 * expr.c (java_lang_expand_expr): Expand it.
11203 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11204 calling build_exception_object_ref.
11205 * parse.y (catch_clause_parameter): Likewise.
11206 (build_dot_class_method): Likewise.
11207 (try_reference_assignconv): Likewise.
11208 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11209 * jcf-write.c (generate_bytecode_insns): Likewise.
11211 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11213 * parse.y (build_unresolved_array_type): Set
11214 EXPR_WFL_QUALIFICATION on the newly created wfl.
11215 Fixes PR java/2538. Fixes PR java/2535.
11217 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11219 * parse.y (fix_constructors): Removed unnecessary assignment to
11220 local. Moved assignment to `this$<n>', fixed comments and
11222 (build_wfl_wrap): Fixed indentation.
11223 Fixes PR java/2598, java/2579 and java/2658.
11225 2001-05-03 Mo DeJong <mdejong@redhat.com>
11227 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11228 check for byte swap.
11230 2000-05-02 Jeff Sturm <jsturm@one-point.com>
11232 * expr.c (build_class_init): Move MODIFY_EXPR
11233 outside of COND_EXPR. Remove variable `call'.
11235 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11237 * decl.c: NULL_PTR -> NULL.
11238 * jcf-write.c: Likewise.
11240 2001-05-01 Tom Tromey <tromey@redhat.com>
11242 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11243 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11244 * gcj.texi: Updated copyright text. Include fdl.texi.
11245 (Top): Link to new node.
11247 2001-05-01 Per Bothner <per@bothner.com>
11249 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
11251 2001-05-01 Per Bothner <per@bothner.com>
11253 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
11254 import_list contains the name, not the TREE_PURPOSE.
11256 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11258 * jcf-io.c (read_zip_member): Cast to long in comparison with
11261 * jvspec.c (lang_specific_driver): Initialize variables.
11263 * mangle.c (find_compression_record_match): Likewise.
11265 * typeck.c (build_null_signature): Provide static prototype. Mark
11266 parameter with ATTRIBUTE_UNUSED.
11268 * verify.c (verify_jvm_instructions): Initialize variable.
11270 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11272 * parse.y (do_resolve_class): Check for cyclic inheritance during
11273 inner class resolution.
11275 2001-04-27 Per Bothner <per@bothner.com>
11277 * parse.y (java_expand_classes): Don't change ctxp_for_generation
11278 while iterating, since that could cause gc to lose stuff.
11280 2001-04-26 Per Bothner <per@bothner.com>
11282 Fix method search wrt scope of inner classes to match JLS2.
11283 * typeck.c (build_null_signature): New static function.
11284 (has_method): New function. Uses build_null_signature and lookup_do.
11285 * java-tree.h (has_method): New declaration.
11286 * parse.y (find_applicable_accessible_methods_list): Do not search
11287 context of inner classes here.
11288 (patch_method_invocation): Search scope, ie. current and outer clases,
11289 for method matching simple name, to find class.
11291 2001-04-26 Per Bothner <per@bothner.com>
11293 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11294 Fix thinko: If a single case, use if_icmpeq, not ifeq.
11296 * constants.c (find_methodref_with_class_index): New function.
11297 (find_methodref_index): Use find_methodref_with_class_index.
11298 * java-tree.h (find_methodref_with_class_index): New declaration.
11299 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
11300 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11301 If context changed from interface to class, don't use invokeinterface.
11303 2001-04-25 Per Bothner <per@bothner.com>
11305 * verify.c (verify_jvm_instructions): For field instructions,
11306 check that field index is valid. For invoke instructions, check that
11307 method index is valid.
11309 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
11311 * config-lang.in (target_libs): Copy from $libgcj_saved.
11313 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11315 * decl.c (init_decl_processing): Add new class "protectionDomain"
11317 * class.c (make_class_data): Set initial value for "protectionDomain".
11319 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11321 * jvspec.c (lang_specific_driver): Fix memory allocation
11322 deficit, by using concat in lieu of xmalloc/sprintf.
11324 2001-04-20 Per Bothner <per@bothner.com>
11326 Fixes to compile multiple .class files at once.
11327 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
11328 * java-tree.h (CLASS_PARSED_P): New macro.
11329 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11330 * jcf-parse.c (jcf_parse_source): Inline into read_class.
11331 (read_class): Avoid some code duplication.
11332 Don't call JCF_FINISH for a .class file - might be needed later.
11333 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
11334 rather than CLASS_LOADED_P, since latter implies class laid out.
11335 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
11336 * parse.y: Don't need to set CLASS_LOADED_P for array types.
11338 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11340 * Make-lang.in (java/boehm.o): Depend on toplev.h.
11342 * boehm.c: Include toplev.h.
11344 2001-04-06 Tom Tromey <tromey@redhat.com>
11345 Alexandre Petit-Bianco <apbianco@redhat.com>
11347 Fix for PR gcj/1404 and PR gcj/2332:
11348 * parse.y (build_array_from_name): If we use the type_wfl then
11349 accumulate dimensions from the original type as well.
11350 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11352 2001-04-06 Tom Tromey <tromey@redhat.com>
11354 * parse.y (analyze_clinit_body): Return true if the second operand
11355 of a METHOD_EXPR is nonzero.
11357 2001-04-06 Tom Tromey <tromey@redhat.com>
11359 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11361 ($(srcdir)/java/parse.c): Likewise.
11363 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
11365 * gcj.texi: Use `which-gcj' instead of `which-g77.'
11366 (version-gcc): Initialized.
11367 (which-gcj): Likewise.
11369 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11371 * java-tree.h (struct lang_decl): New macro
11372 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11373 * parse.y (build_instance_initializer): New function.
11374 (add_instance_initializer): Use it.
11375 (java_fix_constructors): Set `current_class' before fix pass.
11376 (fix_constructors): Just return if already fixed. Move `super()'
11377 invocation ahead. Use `build_instance_initializer.'
11378 Fixes PR java/1315.
11380 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11382 * parse.y (resolve_qualified_expression_name): Pass field's
11383 DECL_CONTEXT to `not_accessible_p.'
11384 (not_accessible_p): Changed parameters order in `inherits_from_p'
11387 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
11389 * lang-options.h: Add flag_check_references.
11391 2001-04-04 Per Bothner <per@bothner.com>
11393 * java-tree.h (CONSTANT_VALUE_P): New macro.
11394 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
11395 * parse.y (maybe_build_class_init_for_field): New static function.
11396 (resolve_expression_name, resolve_field_access): Use
11397 maybe_build_class_init_for_field instead of build_class_init
11398 This does not do the init if the field is compile-time-constant.
11399 (resolve_field_access): Simplify.
11401 * parse.y (fold_constant_for_init): Merge test into switch.
11403 2001-04-03 Zack Weinberg <zackw@stanford.edu>
11405 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11407 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11409 2001-04-02 Zack Weinberg <zackw@stanford.edu>
11411 * expr.c (pop_type_0): Save the result of the first
11412 lang_printable_name call in a scratch buffer, so it
11413 won't be clobbered by the second call.
11415 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
11417 * parse-scan.y (array_type:): Rewritten.
11418 (type_declaration:): `empty_statement' replaces `SC_TK.'
11419 (class_member_declaration:): `empty statement' added.
11420 (method_body:): Simplified.
11421 (static_initializer:): Likewise.
11422 (primary_no_new_array:): Use `type_literals.'
11423 (type_literals:): New rule.
11424 (dims:): Set and update `bracket_count.'
11425 Fixes PR java/1074. Fixes PR java/2412.
11427 2001-03-28 Hans Boehm <boehm@acm.org>
11429 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11430 (get_boehm_type_descriptor): Set type on returned value to be a
11431 pointer length integer.
11433 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11435 * expr.c (pop_type_0): Call `concat' rather than building the
11437 (pop_type): Add format specifier in call to `error'.
11439 * parse.y (patch_method_invocation): Avoid casting away
11442 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
11444 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11446 2001-03-28 Richard Henderson <rth@redhat.com>
11448 IA-64 ABI Exception Handling:
11449 * Make-lang.in (except.o): Don't depend on eh-common.h.
11450 * check-init.c (check_init): Handle EXC_PTR_EXPR.
11451 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11452 [soft_exceptioninfo_call_node]: Remove.
11453 [eh_personality_libfunc, lang_eh_runtime_type]: New.
11454 (end_java_method): No emit_handlers.
11455 * except.c (java_set_exception_lang_code): Remove.
11456 (method_init_exceptions): Don't call it.
11457 (prepare_eh_table_type): No CATCH_ALL_TYPE.
11458 (build_exception_object_ref): New.
11459 (expand_end_java_handler): Update for except.h name changes.
11460 (emit_handlers, expand_resume_after_catch): Remove.
11461 * expr.c (java_lang_expand_expr): Update for except.h name changes.
11462 (process_jvm_instruction): Use build_exception_object_ref.
11463 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11464 (soft_exceptioninfo_call_node): Remove.
11465 (build_exception_object_ref): Declare.
11466 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11467 soft_exceptioninfo_call_node. Move processing ...
11468 [EXC_PTR_EXPR]: ... here.
11469 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11470 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11471 (source_end_java_method): No java_set_exception_lang_code or
11473 (build_dot_class_method): Use build_exception_object_ref.
11474 (try_reference_assignconv): Check EXC_PTR_EXPR not
11475 soft_exceptioninfo_call_node.
11477 2001-03-28 Richard Henderson <rth@redhat.com>
11479 * java-tree.h (throw_node): Define as a single member of
11480 java_global_trees instead of a separate array.
11481 (JTI_THROW_NODE): New.
11482 * decl.c (throw_node): Don't declare.
11483 (init_decl_processing): Init a scalar throw_node.
11484 Don't register it for gc.
11485 * check-init.c (check_init): Reference scalar throw_node.
11486 * expr.c (build_java_athrow): Likewise.
11487 * jcf-write.c (generate_bytecode_insns): Likewise.
11488 * parse.h (BUILD_THROW): Likewise.
11490 2001-03-28 Richard Henderson <rth@redhat.com>
11492 * decl.c (end_java_method): Do not save and restore
11493 flag_non_call_exceptions.
11494 * parse.y (source_end_java_method): Likewise.
11495 * lang.c (flag_exceptions): Don't declare.
11496 (java_init_options): Set flag_non_call_exceptions. Set
11497 flag_exceptions here ...
11498 (java_init): ... not here.
11500 2001-03-27 Richard Henderson <rth@redhat.com>
11502 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11503 exceptions_via_longjmp.
11505 * lang.c (flag_new_exceptions): Don't declare it.
11506 (java_init_options): Or set it.
11508 2001-03-27 Richard Henderson <rth@redhat.com>
11510 * decl.c (end_java_method): Rename asynchronous_exceptions to
11511 flag_non_call_exceptions.
11512 * parse.y (source_end_java_method): Likewise.
11514 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11516 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11518 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11520 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11522 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11524 * parse.y (find_as_inner_class): Follow current package
11525 indications not to mistakingly load an unrelated class.
11527 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11529 * constants.c (PUTN): Use memcpy, not bcopy.
11531 * lex.c (java_read_char): Use memmove, not bcopy.
11533 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11535 2001-03-23 Per Bothner <per@bothner.com>
11537 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11538 macro for better error pin-pointing.
11539 * java-tree.h: Fix typo in comment.
11541 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11542 Don't include jsr/goto in exception range.
11543 Check if start and end of exception range are the same (also TRY_EXPR).
11544 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11545 However, do emit the following goto even if try_block is empty.
11546 Defer freeing exception_decl until after the finalizer, to make
11547 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11549 * parse.y (java_complete_lhs): If the try-clause is empty, just
11550 return the finally-clause and vice versa.
11552 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11554 * gcj.texi (Input Options): documented the check for attribute
11555 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11556 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11557 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11558 (jcf_parse): Check for the right classes archive if necessary.
11559 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11560 (jcf_parse_fields): Fixed indentation.
11561 * jcf-write.c (append_gcj_attribute): New function.
11562 (generate_classfile): Compute the attribute count, invoke
11563 `append_gcj_attribute'.
11564 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11565 turned into bit-fields. New bit-field `right_zip.'
11566 (JCF_ZERO): Set `right_zip' to zero.
11567 * lang-options.h (-fforce-classes-archive-check): Added flag.
11568 * lang.c (flag_force_classes_archive_check): New flag.
11569 (lang_f_options): New entry `force-classes-archive-check.'
11570 Fixes PR java/1213.
11572 2001-02-07 Andrew Haley <aph@redhat.com>
11574 * gcj.texi (Configure-time Options): Add -fcheck-references.
11575 * expr.c (build_java_indirect_ref): New function.
11576 (java_check_reference): New function.
11577 (build_java_array_length_access): Use build_java_indirect_ref to
11578 check for null references.
11579 (build_java_arrayaccess): Likewise.
11580 (build_get_class): Likewise.
11581 (build_field_ref): Likewise.
11582 (invoke_build_dtable): Likewise.
11583 (build_invokeinterface): Likewise.
11584 * lang.c (lang_f_options): Add flag_check_references.
11585 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11586 * java-tree.h (flag_check_references): New variable.
11587 * lang.c (flag_check_references): Likewise.
11588 * parse.y (patch_invoke): Use java_check_reference.
11589 (patch_assignment): Allow for extra nesting in
11590 _Jv_CheckArrayStore.
11592 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11594 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11595 * lex.c (cxx_keywords): Likewise.
11597 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11599 * parse.y (qualify_ambiguous_name): Broaden `length'
11600 recognition. Help MODIFY_EXPR be resolved as expression names.
11601 Fixes PR java/2066. Fixes PR java/2400.
11603 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11605 * gjavah.c (process_file): Mark interface definitions with
11606 "__attribute__ ((java_interface))".
11608 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11610 * class.c (layout_class): Fixed push_super_field's second
11611 argument. Fixes PR java/2333.
11612 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11613 too early to lay innerclasses out.
11615 2001-03-20 Tom Tromey <tromey@redhat.com>
11616 Alexandre Petit-Bianco <apbianco@redhat.com>
11618 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11619 inside an array reference. Insertion of the array store check
11620 rewritten. Fixes PR java/2299.
11622 2001-03-20 Tom Tromey <tromey@redhat.com>
11624 * lex.c (java_read_unicode): Only accept leading `u's.
11626 2001-03-20 Tom Tromey <tromey@redhat.com>
11628 * jcf-parse.c (read_class): Initialize `class'.
11630 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11632 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11634 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11636 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11637 (layout_class): Likewise.
11638 (layout_class_method): Likewise.
11639 (emit_register_classes): Likewise.
11640 * decl.c (builtin_function): Likewise.
11641 (give_name_to_locals): Likewise.
11643 2001-03-19 Per Bothner <per@bothner.com>
11645 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11646 before trying to load an inner class.
11648 Fixes to process to command-line .class files in two passes.
11649 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11650 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11651 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11652 * class.c (is_compiled_class): Fix for renamed flag.
11653 * parse.y (maybe_create_class_interface_decl): Likewise.
11654 * jcf-parse.c (yyparse): Also set if compiling .class files.
11655 * jcf-parse.c (read_class); Read current_class.
11656 (jcf_parse): Make static.
11657 (load_inner_classes): New function, with code moved from jcf_parse,
11658 because we need to inner classes after the command-line files are read.
11659 (yyparse): Set finput to NULL when it doesn't need to be closed.
11660 Reduce use of main_jcf (basically only for archive) and
11661 use finput instead of main_jcf->read_state.
11662 Inline jcf_figure_file_type into yyparse.
11663 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11664 Defer load_inner_classes and parse_class_file to a second pass,
11665 after we've correctly mapped command-line .clas fiels to classes.
11666 (jcf_figure_file_type): Removed.
11667 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11668 (JCF_ZERO): Also clear zipd field.
11669 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11671 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11673 * jcf-parse.c (yyparse): Change ch from char * to char.
11675 2001-03-19 Per Bothner <per@bothner.com>
11677 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11678 Add constructed filelist-file at end, following -xjava. Thus any .o
11679 and library files are not affected by the -xjava. Also wrap
11680 explicit @FILE with -xjava and -xnone.
11682 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11684 * class.c (build_static_field_ref): Call make_decl_rtl() after
11685 setting the DECL_EXTERNAL flag.
11687 2001-03-17 Per Bothner <per@bothner.com>
11689 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11691 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11692 when result is is needed (target is STACK_TARGET).
11694 * parse.h (JDEP_SOLV): Removed.
11695 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11697 * parse.y (incomplete_class_list): Removed.
11698 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11699 It doesn't work if resolve_class changes the name of an array type
11700 that is on the list and then someone else looks for the modified name.
11701 Also, seems liable to break when compiling multiple source files at
11702 once. So the simplest is to just remove incomplete_class_list -
11703 it is only a minor space win and it is not even clear it saves time.
11705 * parse.y (resolve_class): Remove unneeded promote_type.
11707 2001-03-15 Per Bothner <per@bothner.com>
11709 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11710 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11711 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11712 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11714 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11715 * parse.y (java_expand_classes): Likewise.
11717 * parse.y (expand_start_java_method): Was only called once and had a
11718 misleading name, so inline in caller java_complete_expand_method.
11719 (enter_a_block): Likewise inline in enter_block and remove.
11721 Remove junk from when gcc/java was created (by copying from C/C++).
11722 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11723 (struct binding_level): Remove fields keep, keep_if_subblocks,
11724 more_cleanups_ok, have_cleanups (which have never been used).
11725 (pushlevel, poplevel): Remove related useless code.
11727 * class.c (make_class_data): The class_dtable_decl (i.e. the
11728 vtable for Class) should be external, except when compiling Class.
11730 * jvspec.c (lang_specific_driver): Fix -C handling.
11731 Check -save-temps to see if temp @FILE should be deleted.
11732 Follow-up to/fix for February 16 patch.
11734 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11735 (type_stack_dup): Remove no-longer neded error check.
11737 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11739 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11740 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11741 don't surround the element with 'N..E' if the type name is
11744 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11746 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11747 DECL_RTL_SET_P, etc.
11748 (make_method_value): Likewise.
11749 (get_dispatch_table): Likewise.
11751 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11753 2001-03-07 Tom Tromey <tromey@redhat.com>
11755 * config-lang.in (lang_requires): Define.
11757 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11759 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11760 not flag_fast_math.
11762 2001-03-05 Per Bothner <per@bothner.com>
11764 Fix a problem where rest_of_decl_compilation applied to
11765 class_dtable_decl causes problems because it was done too early,
11766 before output file was opened.
11767 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11768 * class.c (class_dtable_decl): Add macro - element of class_roots.
11769 (make_class_data): Define class_dtable_decl.
11770 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11772 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11774 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11775 uses of 'boolean' with 'bool'.
11777 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11779 * lang-specs.h: Add zero initializer for cpp_spec field to all
11782 2001-02-16 Per Bothner <per@bothner.com>
11784 Handle compiling multiple input files at once, and @FILE syntax.
11785 * gcj.texi: Updated documentation to match.
11786 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11787 * jcf-parse.c (parse_source_file): Split into ...
11788 (parse_source_file_1): New function - and:
11789 (parse_source_file_2): New function.
11790 (yyparse): On -ffilelist-file, open and scan named file.
11791 On first pass over files, only do parse_source_file_1.
11792 A new second pass calls parse_source_file_2 for each file to compile.
11793 (init_jcf_parse): Call init_src_parse.
11794 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11795 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11796 as multiple input file combined in one compilation.
11797 * lang-options.h: Add -ffilelist-file
11798 * lang.c (flag_filelist_file): New flag variable.
11799 (lang_f_options): Handle -ffilelist-file.
11800 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11801 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11802 gclass_list - use global fields of src_parse_roots instead.
11803 * parse.y (src_parse_roots): New array.
11804 (incomplete_class_list, gclass_list): New macros.
11805 (push_parser_context, java_pop_parser_context,
11806 java_parser_context_resume): Don't fiddle with deleted fields.
11807 (various): Use incomplete_class gclass_list and global macros
11808 instead of parse_ctxt fields - the lists are global.
11809 (init_src_parse): New function.
11811 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11813 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11815 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11817 * parse.y (check_inner_class_access): Moved declaration of local
11818 `enclosing_decl_type' to the right location.
11820 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11822 * parse.y (parser_check_super_interface): Don't call
11823 check_pkg_class_access for an inner interface.
11824 (parser_check_super): Don't call check_pkg_class_access for inner
11826 (do_resolve_class): Simplify enclosing type loop. Don't call
11827 check_pkg_class_access if CL and DECL are not set.
11828 (find_in_imports_on_demand): Set DECL if class_type needed to be
11829 loaded. Don't call check_pkg_class_access for an inner class.
11830 (check_inner_class_access): Rewritten to implement member access
11831 rules as per spec 6.6.1.
11832 (check_pkg_class_access): Handle the empty package correctly.
11833 (in_same_package): New function. Determine if two classes are in the
11836 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11838 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11839 method into array types.
11840 * parse.y (patch_method_invocation): Bypass access check on clone call
11843 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11845 * expr.c (build_instanceof): Check for arrays when trying fold to
11848 2001-02-15 Jim Meyering <meyering@lucent.com>
11850 * Make-lang.in (java.install-common): Depend on `installdirs'.
11851 (java.install-info): Likewise.
11853 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11855 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11857 2001-02-14 Tom Tromey <tromey@redhat.com>
11858 Alexandre Petit-Bianco <apbianco@cygnus.com>
11860 Fix for PR java/1261.
11861 * typeck.c (build_java_array_type): Add public `clone' method to
11863 * parse.y (resolve_qualified_expression_name): Use current_class
11864 when checking for inaccessibility.
11865 (patch_method_invocation): Fixed error message when accessibility
11866 denied. Added `from_super' argument.
11868 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11870 * parse.y (resolve_class): Don't build a fake decl. Use the one
11872 * typeck.c (build_java_array_type): Build and assign decl to array
11875 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11877 * parse.y (not_accessible_p): Changed leading comment. Added extra
11878 `where' argument. Use it to enforce protected access rules.
11879 (resolve_qualified_expression_name): Added extra argument to
11881 (patch_method_invocation): Use argument `primary' to provide
11882 not_accessible_p with an extra argument.
11883 (lookup_method_invoke): Added extra argument to not_accessible_p.
11884 (search_applicable_method_list): Likewise.
11886 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11888 * parse.y (resolve_qualified_expression_name): Try to resolve as
11889 an inner class access only if `decl' is a TYPE_DECL.
11891 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11893 * decl.c (classdollar_identifier_node): Initialize.
11894 * java-tree.h (enum java_tree_index): New entry
11895 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11896 (classdollar_identifier_node): New macro.
11897 (ID_CLASSDOLLAR_P): Likewise.
11898 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11899 (build_dot_class_method_invocation): Likewise.
11900 (find_applicable_accessible_methods_list): `class$' can't be
11903 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11905 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11907 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11909 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11910 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11913 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11915 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11916 outside of the `__U' sequence too.
11917 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11920 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11922 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11924 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11926 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11927 (JVGENMAIN_OBJS): Likewise.
11928 * java-tree.h (append_gpp_mangled_name): New prototype.
11929 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11930 Removed cast calling `gcc_add_root.'
11931 * jvgenmain.c (mangle_obstack): New global, initialized.
11933 (do_mangle_class): Constify local `ptr.'
11934 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11935 append_gpp_mangle_name and update `count' if necessary.
11936 Use `mangle_obstack.'
11937 * mangle.c (append_unicode_mangled_name): Removed.
11938 (append_gpp_mangled_name): Likewise.
11939 (unicode_mangling_length): Likewise.
11940 (mangle_member_name): Return type set to `void.'
11941 (mangle_field_decl): Don't append `U' in escaped names.
11942 (mangle_method_decl): Likewise.
11943 (mangle_member_name): Just use `append_gpp_mangled_name.'
11944 * mangle_name.c: New file.
11946 2001-02-07 Per Bothner <per@bothner.com>
11948 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
11950 * check-init.c (check_init): Don't call done_alternative after
11951 processing loop code, as a LOOP_EXPR never terminates normally.
11953 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
11955 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11957 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11959 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11962 2001-02-06 Tom Tromey <tromey@redhat.com>
11964 * lex.c (java_new_lexer): Longer error message.
11966 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
11967 Alexandre Petit-Bianco <apbianco@cygnus.com>
11969 * typeck.c (build_prim_array_type): Added leading comment.
11970 (build_java_array_type): Moved locals out of
11971 block. Always create the `data' field, fixed alignment to match
11974 2001-02-04 Tom Tromey <tromey@redhat.com>
11976 * expr.c (java_lang_expand_expr): Don't bother recomputing
11977 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
11978 Fixes PR java/1866.
11980 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11982 * parse.y (process_imports): Save the original name of the import
11983 for better error report.
11985 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
11987 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11988 of macros used when compiling jvspec.c.
11989 * jvspec.c (lang_specific_driver): Link with the shared
11992 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11994 * check-init.c (check_init): Call internal_error instead of fatal.
11995 * expr.c (java_lang_expand_expr): Likewise.
11996 * jcf-parse.c (get_constant): Likewise.
11997 * mangle.c (java_mangle_decl): Likewise.
11998 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11999 (operator_string): Likewise.
12000 * check-init.c (check_init): Call abort instead of fatal.
12001 * class.c (build_class_ref): Likewise.
12002 * constants.c (write_constant_pool): Likewise.
12003 * decl.c (start_java_method): Likewise.
12004 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
12005 (java_stack_dup, encode_newarray_type): Likewise.
12006 (build_java_array_length_access): Likewise.
12007 (build_java_check_indexed_type, expand_java_pushc): Likewise.
12008 (build_java_soft_divmod, build_invokeinterface): Likewise.
12009 * java-tree.h (INNER_CLASS_P): Likewise.
12010 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
12011 (give_name_to_class, get_class_constant): Likewise.
12012 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
12013 (find_constant_index, generate_bytecode_conditional): Likewise.
12014 (generate_bytecode_insns, perform_relocations): Likewise.
12015 * lex.c (java_unget_unicode, java_lex): Likewise.
12016 * mangle.c (mangle_type, mangle_record_type): Likewise.
12017 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
12018 (finish_mangling): Likewise.
12019 * parse.h (MARK_FINAL_PARMS): Likewise.
12020 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
12021 (obtain_incomplete_type, java_complete_class): Likewise.
12022 (java_check_regular_methods, java_complete_expand_method): Likewise.
12023 (cut_identifier_in_qualified, check_deprecation): Likewise.
12024 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
12025 (java_complete_lhs, lookup_name_in_blocks): Likewise.
12026 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
12027 * typeck.c (set_local_type, parse_signature_type): Likewise.
12028 (parse_signature_string, build_java_signature): Likewise;
12029 (set_java_signature): Likewise.
12030 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
12031 * class.c (add_method): Call fatal_error instead of fatal.
12032 (build_static_field_ref): Likewise.
12033 * expr.c (build_known_method_ref, expand_invoke): Likewise.
12034 * jcf-parse.c (get_constant, jcf_parse): Likewise.
12035 * lex.c (java_new_new_lexer): Likewise.
12036 * jv-scan.c (main): Likewise.
12037 (fatal_error): Renamed from fatal.
12038 * jcf-parse.c (yyparse): Call fatal_io_error instead of
12040 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
12041 (yyparse): Likewise.
12042 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
12043 * lex.c (java_get_line_col): Likewise.
12044 * jcf-parse.c (load_class): Make errors non-fatal.
12045 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
12047 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
12049 * jvgenmain.c (class_mangling_suffix): Remove unused string.
12050 (error): Remove unused function.
12051 (main): Don't use "__attribute__ alias" on generated class symbol.
12053 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12055 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
12057 * parse.y (finish_method_declaration): Code accounting for WFLed
12058 method DECL_NAMEs deleted.
12059 (check_abstract_method_definitions): Likewise.
12060 (resolve_type_during_patch): Layout resolved type.
12061 * typeck.c (lookup_do): Removed unused local.
12063 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
12065 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
12066 * decl.c (init_decl_processing): Use integer_minus_one_node, not
12067 integer_negative_one_node.
12068 * expr.c (build_java_binop): Likewise.
12070 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
12072 * zextract.c (read_zip_archive): Read file_offset before writing
12073 zipd and consequently clobbering the header contents.
12075 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12077 * Make-lang.in: Remove all dependencies on defaults.h.
12078 * decl.c: Don't include defaults.h.
12079 * expr.c: Likewise.
12080 * parse.y: Likewise.
12082 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12084 * ChangeLog (2001-01-21): Fixed typo.
12085 * class.c (layout_class_method): Code accounting for WFLed
12086 method DECL_NAMEs deleted.
12087 * constant.c (find_methodref_index): Likewise.
12088 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
12089 * java-tree.h (DECL_FUNCTION_WFL): New macro.
12090 (struct lang_decl): New field `wfl'.
12091 (java_get_real_method_name): Prototype deleted.
12092 * mangle.c (mangle_method_decl): Code accounting for WFLed
12093 method DECL_NAMEs deleted.
12094 * parse.h (GET_METHOD_NAME): Macro deleted.
12095 * parse.y (reset_method_name): Deleted.
12096 (method_header): Set DECL_FUNCTION_WFL.
12097 (check_abstract_method_header): Code accounting for WFLed method
12098 DECL_NAMEs deleted.
12099 (java_get_real_method_name): Deleted.
12100 (check_method_redefinition): Code accounting for WFLed method
12101 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
12102 (java_check_regular_methods): Likewise.
12103 (java_check_abstract_methods): Likewise.
12104 (java_expand_classes): Don't call `reset_method_name.'
12105 (search_applicable_method_list): Use DECL_NAMEs instead of
12107 * typeck.c (lookup_do): Code accounting for WFLed method
12108 DECL_NAMEs deleted.
12110 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
12112 * lex.c (java_read_char): Check for EOF from getc first.
12114 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12116 * class.c (layout_class): Don't lay the superclass out if it's
12117 already being laid out.
12118 * jcf-parse.c (handle_innerclass_attribute): New function.
12119 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12120 handle_innerclasses_attribute.
12121 (jcf_parse): Don't load an innerclasses if it's already being
12123 * jcf-write.c (append_innerclass_attribute_entry): Static
12124 `anonymous_name' and its initialization deleted. `ocii' and `ini'
12125 to be zero for anonymous classes.
12127 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12129 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12131 * jcf-parse.c (set_source_filename): Use
12132 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12134 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12136 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12137 gets a unique asm name.
12139 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12141 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12142 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12144 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12145 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12146 * parse.y (lookup_package_type_and_set_next): Deleted.
12147 (resolve_package): Removed unnecessary code.
12148 (find_applicable_accessible_methods_list): `finit$' can't be
12150 * verify.c (pop_argument_types): Added missing prototype.
12152 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
12154 * config-lang.in: Disable java by default.
12156 2001-01-23 Tom Tromey <tromey@redhat.com>
12158 * gcj.texi (Copying): New node.
12159 Added copyright information.
12161 2001-01-21 Per Bothner <per@bothner.com>
12163 Various fixes to allow compiling a compressed .jar/.zip archive.
12164 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
12165 (struct ZipFile): Add fields name and next (from ZipFileCache).
12166 (struct ZipDirectory): New field zipf points to owning ZipFile.
12167 * jcf.h (struct ZipDirectory): Add forward declaration.
12168 (struct JCF): Declare zipd field to have type struct ZipDirectory.
12169 Remove seen_in_zip and zip_offset fields.
12170 (JCF_SEEN_IN_ZIP): New macro.
12171 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
12172 * jcf-io.c: Change all ZipFileCache to ZipFile.
12173 (read_zip_member): New function.
12174 (open_in_zip): Call read_zip_member.
12175 * jcf-parse.c (find_in_current_zip): Remove function.
12176 (read_class): Merge in find_in_current_zip functionality.
12177 Call read_zip_member if needed.
12178 (parse_zip_file_entries): Use read_zip_member.
12179 (process_zip_dir): Update for removed and added JCF fields.
12180 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
12182 2001-01-21 Per Bothner <per@bothner.com>
12184 Minor optimization of static ggc roots.
12185 * jcf-parse.c (parse_roots): New static field.
12186 (current_field, current_method, current_file_list): Replace by macros
12187 naming fields of parse_roots.
12188 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
12189 * class.c (class_roots): New static field.
12190 (registered_class, fields_ident, info_ident, class_list):
12191 New macros naming fields of parse_roots.
12192 (build_static_field_ref): Don't register roots here.
12193 (layout_class): Static field list replaced by macro class_list.
12194 (init_class_processing): Call ggc_add_tree_root for 4 roots.
12195 Initialize fields_ident and info_ident here.
12197 2001-01-21 Per Bothner <per@bothner.com>
12199 * jcf-parse.c (ggc_mark_jcf): New function.
12200 (init_jcf_parse): Register current_jcf as ggc root.
12202 2001-01-21 Per Bothner <per@bothner.com>
12204 * lang.c (put_decl_node): Print method's name.
12206 2001-01-21 Per Bothner <per@bothner.com>
12208 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
12209 (verify_jvm_instructions): Use it, for better error messages on loads.
12211 2001-01-21 Per Bothner <per@bothner.com>
12213 * verify.c (merge_type_state): Still may have to merge even if
12214 LABEL_VERIFIED (label).
12216 2001-01-21 Per Bothner <per@bothner.com>
12218 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
12219 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12221 2001-01-19 Per Bothner <per@bothner.com>
12223 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
12224 if expeting an interface type. Refines Tom's change of 2000-09-12.
12226 2001-01-18 Per Bothner <per@bothner.com>
12228 * gcj.texi (Input Options): Mention .java files.
12230 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12232 * lang-options.h (-Wunsupported-jdk11): Removed.
12233 * lang.c (flag_not_overriding): Deleted.
12234 (flag_static_local_jdk1_1): Likewise.
12235 (lang_W_options): Removed "unsupported-jdk11" entry.
12236 * parse.y (java_check_methods): Removed dead code.
12238 2001-01-17 Tom Tromey <tromey@redhat.com>
12240 Changes suggested by Per Bothner:
12241 * gcj.texi (Input Options): Don't mention input files.
12242 (Code Generation): Updated --main information.
12243 (Invoking jcf-dump): Mention that --javap is incomplete.
12244 From Alexandre Petit-Bianco:
12245 (Warnings): Don't mention -Wunsupported-jdk11.
12247 (Compatibility): Mention JDK 1.2-ness of libraries.
12248 (Resources): Mention resources used when writing gcj.
12250 2001-01-17 Tom Tromey <tromey@redhat.com>
12252 * gcj.texi: New file.
12253 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12254 (java.info): Depend on gcj.info.
12255 (java/gcj.dvi): New target.
12256 (java.dvi): Depend on gcj.dvi.
12257 (java.install-info): Wrote.
12259 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
12261 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12262 having called make_decl_rtl.
12264 2001-01-14 Per Bothner <per@bothner.com>
12266 Various patches to emit better messages on verification errors.
12267 * expr.c (push_type_0): Return error indication on stack overflow,
12268 instead of callinfg fatal.
12269 (push_type): Now just call push_type_0 (nd fatal on overflow).
12270 (pop_type_0): Return detailed error message (in a char** argument).
12271 (pop_type): If pop_type_0 fails, print error message.
12272 (pop_argument_types): Moved to verify.c.
12273 * verify.c (pop_argument_types): Moved from expr.c.
12274 Return a (possible) error message, rather than void.
12275 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
12276 (verify_jvm_instruction): Use new macros, improving error messages.
12277 For case OPCODE_astore use object_ptr_type_node.
12278 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
12279 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
12281 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12282 constant, return body without wrapper. (Improves constant folding.)
12283 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
12285 2001-01-13 Per Bothner <per@bothner.com>
12287 * expr.c (expand_java_field_op): Assigning to a final field outside
12288 an initializer does not violate JVM spec, so should be warning, not
12289 error. (Sun's verifier does not complain - though MicroSoft's does.)
12291 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
12293 * gjavah.c (version), jcf-dump.c (version): Update copyright year
12296 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
12298 * parse.y (resolve_expression_name): Permit instance variables from
12299 enclosing context in super constructor call.
12300 (resolve_qualified_expression_name): Permit enclosing class's qualified
12301 "this" in super constructor call.
12303 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12305 * class.c (build_utf8_ref): Remove last argument in call to
12306 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12307 (build_class_ref): Likewise.
12308 (build_static_field_ref): Likewise.
12309 (get_dispatch_table): Likewise.
12310 (layout_class_method): Likewise.
12311 (emit_register_classes): Likewise.
12312 * constants.c (build_constant_data_ref): Likewise.
12313 * decl.c (builtin_function): Likewise.
12314 (create_primitive_vtable): Likewise.
12315 * expr.c (build_known_method_def): Likewise.
12316 (build_jni_stub): Likewise.
12317 (java_lang_expand_expr): Likewise.
12319 2001-01-10 Tom Tromey <tromey@redhat.com>
12321 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12323 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12325 * java-tree.h (lang_printable_name_wls): New prototype.
12326 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12327 rather than `current_class' to print type name. Don't prepend type
12328 names when printing constructor names.
12329 (lang_printable_name_wls): New function.
12330 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12331 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12332 * parse.y (patch_method_invocation): Message tuned for constructors.
12333 (not_accessible_p): Grant `private' access from within
12334 enclosing contexts.
12336 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12338 All files with updated copyright when applicable.
12339 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12340 * class.c (mangle_class_field): Function removed.
12341 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12342 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12343 (build_class_ref): Call `java_mangle_class_field' instead of
12344 `mangle_class_field.'
12345 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12346 (layout_class): Call `java_mangle_decl' instead of
12347 `mangle_static_field.'
12348 (cxx_keywords): Initialized static array moved to `lex.c.'
12349 (layout_class_method): Changed leading comment. Simplified to
12350 call `java_mangle_decl.' Local `ptr' moved in for loop body.
12351 * decl.c (lang_mark_tree): Mark field `package_list.'
12352 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12353 (struct lang_type): New field `package_list.'
12354 (unicode_mangling_length): Prototype removed.
12355 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12356 emit_unicode_mangled_name): Likewise.
12357 (cxx_keyword_p): New prototype.
12358 (java_mangle_decl, java_mangle_class_field,
12359 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12360 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12362 * jvgenmain.c (main_method_prefix): Global variable removed.
12363 (main_method_suffix): Likewise.
12364 (do_mangle_classname): New function.
12365 (main): Call it. Format changed to accommodate new mangling scheme.
12366 * lex.c: (utf8_cmp): Conditionally prototyped.
12367 (cxx_keywords): Moved from class.c, conditionally defined.
12368 (utf8_cmp, cxx_keyword_p): Likewise.
12369 * mangle.c (obstack.h, ggc.h): Included.
12370 (mangle_field_decl): New function.
12371 (mangle_method_decl, mangle_type, mangle_pointer_type,
12372 mangle_array_type, mangle_record_type,
12373 find_compression_pointer_match, find_compression_array_match,
12374 find_compression_record_match,
12375 find_compression_array_template_match, set_type_package_list,
12376 entry_match_pointer_p, emit_compression_string, init_mangling,
12377 finish_mangling, compression_table_add, mangle_member_name): Likewise.
12378 (mangle_obstack): New global.
12379 (MANGLE_RAW_STRING): New macro.
12380 (unicode_mangling_length): Turned static.
12381 (append_unicode_mangled_name): Renamed from
12382 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
12383 replaces `obstack', removed from the parameter list.
12384 (append_gpp_mangled_name): Turned static. `mangle_obstack'
12385 replaces parameter `obstack', removed from the parameter list. Call
12386 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12387 (append_gpp_mangled_classtype): Removed.
12388 (compression_table, compression_next): New static variables.
12389 * parse.y (temporary_obstack): Extern declaration removed.
12391 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12393 * parse.y (patch_binop): Compute missing type in error situations.
12395 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12397 * class.c (make_class_data): Push initial value for "arrayclass".
12398 * decl.c (init_decl_processing): Add new class field "arrayclass".
12400 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12402 From patha@softlab.ericsson.se:
12403 * parse.y (switch_label): Use build, not build1, to construct
12406 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
12408 * lang.c (lang_decode_option): Change -MA to -MP.
12409 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12410 Update to new prototype; do quote targets.
12411 (jcf_dependency_write): Update.
12413 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
12415 Shorten primitive array allocation path:
12416 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12417 to create new primitive arrays.
12418 * expr.c (build_newarray): If generating native code, call
12419 soft_newarray_node with a reference to the primitive TYPE identifier
12420 instead of type_value.
12422 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
12424 Fix for PRs gcj/312 and gcj/253:
12425 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12426 dest if they arn't already.
12427 * class.c (layout_class): Call maybe_layout_super_class on
12428 superinterfaces also, but only if compiling from bytecode.
12430 Fix for PR gcj/373:
12431 * parse.y (create_class): Set ACC_STATIC if class is declared in an
12434 2000-12-15 Tom Tromey <tromey@redhat.com>
12436 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12439 2000-12-14 Andrew Haley <aph@redhat.com>
12441 * boehm.c (mark_reference_fields): Change test to correctly detect
12444 2000-12-15 Andreas Jaeger <aj@suse.de>
12446 * config-lang.in (lang_dirs): Added.
12448 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12450 * parse.y (end_artificial_method_body): Fixed undefined behavior.
12451 Credits go to rth for finding it.
12453 2000-12-13 Mike Stump <mrs@wrs.com>
12455 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12457 2000-11-07 Tom Tromey <tromey@cygnus.com>
12459 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12460 * lex.c (java_ignorable_control_p): Removed.
12461 (java_letter_or_digit_p): Removed.
12462 (java_start_char_p): New function.
12463 (java_read_char): Return `int', not `unicode_t'. Changed
12465 (java_read_unicode): Likewise.
12466 (java_read_unicode_collapsing_terminators): Likewise.
12467 (java_get_unicode): Likewise.
12468 (java_new_lexer): Initialize hit_eof.
12469 (java_parse_end_comment): Take `int' argument.
12470 (java_parse_doc_section): Likewise.
12471 (java_parse_escape_sequence): Don't allow backlash-newline.
12473 * lex.h (JAVA_DIGIT_P): Removed.
12474 (_JAVA_LETTER_OR_DIGIT_P): Removed.
12475 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12476 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12477 (JAVA_PART_CHAR_P): New macro.
12479 (JAVA_CHAR_ERROR): Now -2.
12480 (java_lexer): New field `hit_eof'.
12481 * chartables.h: New file.
12482 * gen-table.pl: new file.
12484 2000-11-20 Tom Tromey <tromey@cygnus.com>
12485 Alexandre Petit-Bianco <apbianco@cygnus.com>
12487 * parse.y (java_complete_lhs): Only allow compound assignment of
12488 reference type if type is String.
12490 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12492 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12493 jcf-path.c: Likewise.
12495 2000-12-09 Anthony Green <green@redhat.com>
12497 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12498 filestart and filename_length as int values.
12500 2000-12-07 Mo DeJong <mdejong@redhat.com>
12502 * jcf-io.c (find_class): Correct the logic that tests to see if a
12503 .java file is newer than its .class file. The compiler was
12504 incorrectly printing a warning when file mod times were equal.
12506 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
12508 * jvgenmain.c: Use ISPRINT not isascii.
12510 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12512 * parse.y (end_artificial_method_body): Fixed typo.
12514 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
12516 * parse.y (patch_method_invocation): Pick the correct enclosing
12517 context when creating inner class instances.
12520 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12522 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12523 Update copyright year to 2000.
12525 2000-11-23 Anthony Green <green@redhat.com>
12527 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12528 Move current_file_list out of yyparse and make it static.
12530 * expr.c: Declare quick_stack and tree_list_free_list as static
12531 (init_expr_processing): Register quick_stack and
12532 tree_list_free_list roots.
12534 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12536 * parse.y (build_outer_field_access): New local `decl_ctx', use
12537 it. Check for field's context and current class immediate outer
12538 context inheritance.
12539 (outer_field_access_p): Consider fields inherited from the last
12541 (build_access_to_thisn): Stop at the last enclosing context if
12545 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
12547 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12549 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12551 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12554 2000-11-20 Tom Tromey <tromey@cygnus.com>
12556 * jv-scan.c (help): Document --complexity.
12557 (options): Added --complexity.
12558 (flag_complexity): New global.
12559 (main): Call `report'.
12560 * parse-scan.y (complexity): New global.
12561 (if_then_statement, if_then_else_statement,
12562 if_then_else_statement_nsi, switch_block_statement_group,
12563 while_expression, do_statement, for_begin, continue_statement,
12564 throw_statement, catch_clause, finally, method_invocation,
12565 conditional_and_expression, conditional_or_expression,
12566 conditional_expression): Update complexity.
12567 (reset_report): Reset complexity.
12568 (report): New function.
12570 2000-11-20 Tom Tromey <tromey@cygnus.com>
12572 * lex.c (yylex): Added STRICT_TK case.
12573 * parse.y (STRICT_TK): Added.
12574 * parse-scan.y (STRICT_TK): Added.
12575 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12576 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12578 * keyword.h: Rebuilt.
12579 * keyword.gperf (strictfp): Added.
12581 2000-11-20 Tom Tromey <tromey@cygnus.com>
12583 * lex.c (yylex): Recognize floating point constants with leading
12586 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12588 * java-tree.h (cyclic_inheritance_report): Constify.
12589 * parse.y (cyclic_inheritance_report): Likewise.
12591 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12593 * parse.y (goal): Remove call to ggc_add_string_root.
12595 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12597 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12598 Create string in scratch buffer, then pass to build_string.
12600 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12602 * parse.y (issue_warning_error_from_context): Add
12605 2000-11-11 Anthony Green <green@redhat.com>
12607 * jcf-parse.c (process_zip_dir): Add finput parameter.
12608 (jcf_figure_file_type): Call process_zip_dir with appropriate
12611 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12613 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12614 * jcf-parse.c (jcf_figure_file_type): Likewise.
12616 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12618 * parse.y (create_new_parser_context): Use memset () instead of
12621 2000-11-08 Tom Tromey <tromey@cygnus.com>
12623 * gjavah.c (process_file): Only include gcj/cni.h when generating
12626 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12628 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12629 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12630 instead of bzero ().
12632 2000-11-05 Tom Tromey <tromey@cygnus.com>
12634 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12635 * lex.c (IS_ZERO): New define.
12636 (java_perform_atof): Error on floating point underflow.
12638 2000-11-04 Tom Tromey <tromey@cygnus.com>
12640 * lex.c (java_parse_escape_sequence): Only read two octal
12641 characters if the first one is greater than 3. Don't allow
12642 "octal" numbers to include the digits 8 or 9.
12644 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12646 * Make-lang.in (java.distdir): Remove.
12648 2000-11-03 Tom Tromey <tromey@cygnus.com>
12650 * Make-lang.in (java.dvi): New target.
12651 Partial fix for PR other/567.
12653 * lang-options.h: Mention -Wout-of-date.
12654 * jcf-dump.c (flag_newer): New global.
12655 * gjavah.c (flag_newer): New global.
12656 * jcf-io.c (find_class): Only warn when flag_newer set.
12657 * lang.c (flag_newer): New global.
12658 (struct string_option): New declaration.
12659 (lang_W_options): New global.
12660 (process_option_with_no): New function.
12661 (lang_decode_option): Use it.
12663 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12664 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12667 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12668 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12669 * lex.c (java_read_unicode): Removed `term_context' argument.
12670 Recognize any number of `u' in `\u'.
12671 (java_read_unicode_collapsing_terminators): New function.
12672 (java_get_unicode): Use it.
12673 (java_lineterminator): Removed.
12674 (yylex): Produce error if character literal is newline or single
12675 quote. Return if eof found in middle of `//' comment. EOF in
12676 `//' comment is only an error if pedantic.
12677 (java_ignorable_control_p): New function.
12678 (java_parse_end_comment): Return if eof found in middle of
12681 * jv-scan.c (pedantic): New global.
12683 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12685 * parse.y (outer_field_access_p): Inherited fields aren't
12686 consider outer fields.
12687 (maybe_build_thisn_access_method): Use
12688 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12689 (resolve_expression_name): Trigger an error if a static field
12690 is being accessed as an outer field.
12692 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12694 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12697 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12699 * Make-lang.in: Move all build rules here from Makefile.in,
12700 adapt to new context. Wrap all rules that change the current
12701 directory in parentheses. Expunge all references to $(P).
12702 When one command depends on another and they're run all at
12703 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12704 all object-file generation rules. Delete obsolete variables.
12706 * Makefile.in: Delete.
12707 * config-lang.in: Delete outputs= line.
12709 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12711 * parse.y (patch_method_invocation): NULLify this_arg when already
12713 (maybe_use_access_method): Handle call to methods unrelated to the
12714 current class. Fixed comment.
12717 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12719 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12722 2000-10-24 Tom Tromey <tromey@cygnus.com>
12724 * lex.c (java_new_lexer): Initialize new fields. Work around
12725 broken iconv() implementations.
12726 (java_read_char): Swap bytes if required. Use fallback decoder if
12728 (byteswap_init, need_byteswap): New globals.
12729 (java_destroy_lexer): Only close iconv handle if it is in use.
12730 * lex.h (java_lexer): New fields read_anything, byte_swap,
12732 Made out_buffer unsigned.
12734 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12736 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12737 where an enclosing context can be set on the jdep.
12738 (do_resolve_class): Fixed identation.
12740 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12742 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12744 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12747 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12749 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12751 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12753 * jcf-write.c (OP1): Update `last_bc'.
12754 (struct jcf_block): Fixed indentation and typo in comments. New
12756 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12757 follows `monitorenter'.
12758 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12762 2000-10-16 Tom Tromey <tromey@cygnus.com>
12764 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12765 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12766 * lang-options.h: Added -MA, -MT, -MF..
12767 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12768 (DEPEND_TARGET_SET): New macro.
12769 (DEPEND_FILE_ALREADY_SET): Likewise.
12770 (init_parse): Handle new flags.
12771 * jcf.h (jcf_dependency_print_dummies): Declare.
12772 * Make-lang.in (s-java): Added mkdeps.o.
12773 * Makefile.in (BACKEND): Added mkdeps.o.
12774 (../gcjh$(exeext)): Added mkdeps.o.
12775 (../jcf-dump$(exeext)): Added mkdeps.o.
12776 * jcf-depend.c: Include mkdeps.h.
12777 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12778 add_entry): Removed.
12779 (jcf_dependency_reset): Rewrote.
12780 (dependencies): New global.
12781 (jcf_dependency_set_target): Rewrote.
12782 (jcf_dependency_add_target): Likewise.
12783 (jcf_dependency_add_file): Likewise.
12785 (print_ents): Removed.
12786 (jcf_dependency_write): Rewrote.
12787 (print_dummies): New global.
12788 (jcf_dependency_print_dummies): New function
12789 (jcf_dependency_write): Call deps_dummy_targets if required.
12791 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12793 * gjavah.c (add_class_decl): Removed unused variables `tname',
12794 `tlen' and `name_index'.
12795 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12796 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12797 in `wfl_operator' with value.
12798 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12799 (jcf_figure_file_type): Fixed identation.
12800 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12801 * parse.y (analyze_clinit_body): New function.
12802 (static_initializer:): Reset `current_static_block'.
12803 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12804 `wfl_operator' with new value.
12805 (lookup_cl): Use EXPR_WFL_FILENAME.
12806 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12807 analyze_clinit_body.
12808 (build_outer_field_access): Access to this$<n> built from
12809 current_class, not its outer context.
12810 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12811 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12812 (patch_method_invocation): Use `is_static_flag' when already
12814 (patch_newarray): Removed assignment in ternary operator.
12816 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12818 * except.c (free_eh_ranges): Don't free `whole_range'.
12820 2000-10-15 Anthony Green <green@redhat.com>
12822 * decl.c (init_decl_processing): Call init_class_processing before
12825 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12827 * check-init.c (check_init): Fixed leading comment. Use
12829 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12830 (give_name_to_locals): Likewise.
12831 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12832 fields in lang_decl_var.
12833 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12834 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12835 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12836 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12837 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12838 (LOCAL_FINAL): Rewritten.
12839 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12840 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12841 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12842 `init_final' fields.
12843 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12844 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12845 (TYPE_HAS_FINAL_VARIABLE): New macro.
12846 (struct lang_type): Added `afv' field.
12847 * parse.y (check_static_final_variable_assignment_flag): New function.
12848 (reset_static_final_variable_assignment_flag): Likewise.
12849 (check_final_variable_local_assignment_flag): Likewise.
12850 (reset_final_variable_local_assignment_flag): Likewise.
12851 (check_final_variable_indirect_assignment): Likewise.
12852 (check_final_variable_global_assignment_flag): Likewise.
12853 (add_inner_class_fields): Use LOCAL_FINAL_P.
12854 (register_fields): Handle local finals and final variables.
12855 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12856 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12857 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12859 (java_complete_expand_methods): Loop to set
12860 TYPE_HAS_FINAL_VARIABLE. Call
12861 `reset_final_variable_local_assignment_flag' and
12862 `check_final_variable_local_assignment_flag' accordingly before
12863 and after constructor expansion. Call
12864 `reset_static_final_variable_assignment_flag'
12865 before expanding <clinit> and after call
12866 `check_static_final_variable_assignment_flag' if the
12867 current_class isn't an interface. After all methods have been
12868 expanded, call `check_final_variable_global_assignment_flag' and
12869 `check_static_final_variable_assignment_flag' if the current class
12871 (maybe_yank_clinit): Fixed typo in comment.
12872 (build_outer_field_access_methods): Removed old sanity check. Use
12873 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12874 Don't create access methods for finals.
12875 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12876 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12877 existing DECL_INIT has been processed.
12878 (java_complete_lhs): Likewise.
12879 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12880 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12882 (patch_assignment): Use LOCAL_FINAL_P.
12883 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12884 DECL_INITIAL is nullified.
12887 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12889 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12891 * Makefile.in (parse.c, parse-scan.c): Likewise.
12893 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12895 * class.c (temporary_obstack): Remove.
12896 (make_class): Don't mess with obstascks.
12897 (push_class): Likewise.
12898 (set_super_info): Likewise.
12899 (add_method_1): Likewise.
12900 (add_method): Likewise.
12901 (add_field): Likewise.
12902 (build_utf8_ref): Likewise.
12903 (build_class_ref): Likewise.
12904 (build_static_field_ref): Likewise.
12905 (finish_class): Likewise.
12906 (push_super_field): Likewise.
12907 (layout_class): Likewise.
12908 (layout_class_methods): Likewise.
12909 (init_class_processing): Likewise.
12910 * constants.c (get_tag_node): Likewise.
12911 (build_constant_data_ref): Likewise.
12912 * decl.c (ggc_p): Remove.
12913 (copy_lang_decl): Use ggc_alloc.
12914 (complete_start_java_method): Don't mess with obstacks.
12915 (start_java_method): Likewise.
12916 (end_java_method): Likewise.
12917 * except.c (link_handler): Use xmalloc.
12918 (free_eh_ranges): New function.
12919 (method_init_exceptions): Use it.
12920 (add_handler): Use xmalloc.
12921 (expand_start_java_handler): Don't mess with obstacks.
12922 (prepare_eh_table_type): Likewise.
12923 (expand_end_java_handler): Likewise.
12924 * expr.c (push_value): Likewise.
12925 (create_label_decl): Likewise.
12926 (build_jni_stub): Likewise.
12927 (java_lang_expand_expr): Likewise.
12928 (note_instructions): Use xrealloc.
12929 (java_push_constant_from_pool): Don't mess with obstacks.
12930 (process_jvm_instruction): Likewise.
12931 * java-tree.h (cyclic_inheritance_report): Remove duplicate
12933 * jcf-parse.c (get_constant): Don't mess with obstacks.
12934 (read_class): Likewise.
12935 (jcf_parse): Likewise.
12936 * lex.c (expression_obstack): Remove.
12937 (java_lex): Don't use obstack_free.
12938 * parse.h (exit_java_complete_class): Don't mess with obstacks.
12939 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12940 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12941 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12942 * parse.y (gaol): Add more GC roots.
12943 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12944 (lookup_field_wrapper): Likewise.
12945 (obtain_incomplete_type): Don't mess with obstacks.
12946 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12948 (craft_constructor): Don't mess with obstacks.
12949 (safe_layout_class): Likewise.
12950 (java_complete_class): Likewise.
12951 (source_end_java_method): Likewise.
12952 (build_outer_field_access_methods): Likewise.
12953 (build_outer_method_access_method): Likewise.
12954 (maybe_build_thisn_access_method): Likewise.
12955 (build_dot_class_method_invocation): Likewise.
12956 (java_complete_tree): Likewise.
12957 (java_complete_lhs): Likewise.
12958 (do_merge_string_cste): Likewise.
12959 (patch_string_cst): Likewise.
12960 (array_constructor_check_entry): Likewise.
12961 * typeck.c (build_java_array_type): Likewise.
12962 (parse_signature_string): Likewise.
12963 (build_java_signature): Likewise.
12965 2000-10-12 Tom Tromey <tromey@cygnus.com>
12967 Fix for PR gcj/356:
12968 * gjavah.c (add_class_decl): Don't special-case inner classes.
12969 (add_namelet): Likewise.
12971 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
12973 * java-tree.h: Constify current_encoding.
12974 * lang.c: Constify current_encoding.
12976 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
12978 * jvgenmain.c (class_mangling_suffix): Omit `.'.
12979 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12981 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12983 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12984 patch. Fixes gcj/340.
12986 2000-10-10 Tom Tromey <tromey@cygnus.com>
12988 * lex.c (java_new_lexer): Initialize out_first and out_last
12990 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12992 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12994 * parse.y (pop_current_osb): New function.
12995 (array_type:): Use `dims:', changed actions
12996 accordingly. Suggested by Anthony Green.
12997 (array_creation_expression:): Used pop_current_osb.
12998 (cast_expression:): Likewise.
12999 (search_applicable_method_list): Fixed indentation.
13001 2000-10-08 Anthony Green <green@redhat.com>
13003 * parse.y (array_type_literal): Remove production.
13004 (type_literals): Refer to array_type, not array_type_literal.
13006 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13008 Patch contributed by Corey Minyard.
13009 * decl.c (check_local_named_variable): New function.
13010 (tree check_local_unnamed_variable): Likewise.
13011 (find_local_variable): Splitted. Call check_local_{un}named_variable.
13013 2000-10-07 Anthony Green <green@redhat.com>
13015 * class.c (layout_class): Handle case where superclass can't be
13018 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
13020 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
13023 2000-10-05 Tom Tromey <tromey@cygnus.com>
13025 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
13026 * jvgenmain.c (class_mangling_prefix): Removed.
13027 (class_mangling_suffix): New global.
13029 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
13031 (print_method_info): Handle overrides for static and final
13033 (process_file): Generate declaration for class object field.
13034 * class.c (cxx_keywords): New array.
13035 (utf8_cmp): New function.
13036 (cxx_keyword_p): New function.
13037 (layout_class_method): Mangle C++ keywords by appending `$'.
13038 (mangle_field): New function.
13039 (mangle_class_field): Use mangle_field. Mangle class name as
13041 (mangle_static_field): Use mangle_field.
13043 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
13045 * decl.c (find_local_variable): Removed uncessary type check and
13046 fixed range check typo. From Corey Minyard.
13048 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13050 * decl.c (give_name_to_locals): New local `code_offset'. Call
13051 `maybe_adjust_start_pc'.
13052 * expr.c (note_instructions): New function.
13053 (expand_byte_code): Don't collect insn starts here.
13054 (peek_opcode_at_pc): New function.
13055 (maybe_adjust_start_pc): Likewise.
13056 * java-tree.h (maybe_adjust_start_pc): Declare.
13057 (note_instructions): Likewise.
13058 * jcf-parse.c (parse_class_file): Call `note_instructions'.
13060 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13062 * parse.y (field_access:): Fixed indentation.
13063 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
13065 2000-09-07 Tom Tromey <tromey@cygnus.com>
13067 Fix for PR gcj/307:
13068 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
13069 JPRIMITIVE_TYPE_P, for arithmetic operators.
13070 (patch_method_invocation): Indentation fix.
13071 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
13072 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
13073 (do_unary_numeric_promotion): Cleaned up code.
13074 (valid_cast_to_p): Handle boolean correctly.
13076 2000-09-27 Tom Tromey <tromey@cygnus.com>
13078 * lex.c (java_read_unicode): Reset bs_count when finished with
13081 2000-10-01 Mark Mitchell <mark@codesourcery.com>
13084 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
13085 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
13086 (typeck.o): Depend on ggc.h.
13087 * class.c (add_method_1): Use GC functions for allocation.
13088 (init_class_processing): Register roots.
13089 * decl.c (ggc_p): Set to 1.
13090 (pending_local_decls): Make it static.
13091 (push_jvm_slot): Use GC functions for allocation.
13092 (init_decl_processing): Register roots.
13093 (give_name_to_locals): Use GC functions for allocation.
13094 (lang_mark_tree): New function.
13095 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
13096 functions for allocation.
13097 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
13098 * lex.c (java_lex): Use build_string, rather than replicating it
13100 * parse.y (goal): Add more roots.
13101 (mark_parser_ctxt): New function.
13102 * typeck.c: Include ggc.h.
13104 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13106 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
13107 contains something else than MODIFY_EXPR.
13109 2000-09-23 Mark Mitchell <mark@codesourcery.com>
13111 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13112 * Makefile.in (parse.o): Depend on ggc.h.
13113 (class.o): Likewise.
13114 (constants.o): Likewise.
13115 (decl.o): Likewise.
13116 (expr.o): Likewise.
13117 (jcf-parse.o): Likewise.
13118 (jcf-write.o): Likewise.
13119 (mangle.o): Likewise.
13120 * class.c: Include ggc.h.
13121 (build_static_field_ref): Register GC roots.
13122 (layout_class): Likewise.
13123 (init_class_processing): Likewise.
13124 * constants.c: Include ggc.h.
13125 (current_constant_pool_data_ref): Remove.
13126 (tag_nodes): Move it to ...
13127 (get_tag_node): ... here. Register GC roots.
13128 * decl.c: Include ggc.h. Remove many global tree definitions.
13129 (throw_node): Define.
13130 (java_global_trees): Likewise.
13131 (predef_filenames): Make the size a constant.
13132 (init_decl_processing): Adjust accordingly.
13133 (init_decl_processing): Call init_jcf_parse. Register GC roots.
13134 * expr.c: Include ggc.h.
13135 (init_expr_processing): Register GC roots.
13136 (build_invokeinterface): Likewise.
13137 * java-tree.h: Replace extern tree declarations with macros.
13138 (java_global_trees): New variable.
13139 (java_tree_index): New enumeration.
13140 (init_jcf_parse): Declare.
13141 * jcf-parse.c: Include ggc.h.
13142 (current_class): Remove declaration.
13143 (main_class): Likewise.
13144 (all_class_list): Likewise.
13145 (predefined_filename_p): Adjust for constant size of
13147 (init_jcf_parse): New function.
13148 * jcf-write.c: Include ggc.h.
13149 (generate_classfile): Register GC roots.
13150 (append_synthetic_attribute): Likewise.
13151 (append_innerclass_attribute_entry): Likewise.
13152 * lang.c: Include ggc.h.
13153 (lang_print_error): Register GC roots.
13154 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13156 * parse.y: Include ggc.h.
13157 (wfl_operator): Remove.
13158 (goal): Register GC roots.
13159 (java_pop_parser_context): Adjust for new field names.
13160 (java_parser_context_save_global): Likewse.
13161 (java_parser_context_restore_global): Likewise.
13162 (java_parser_context_suspend): Likewise.
13163 (java_parser_context_resume): Likewise.
13164 (verify_constructor_circularity): Register GC roots.
13165 (lookup_cl): Likewise.
13166 (java_reorder_fields): Likewise.
13167 (build_current_this): Likewise.
13168 (class_in_current_package): Likewise.
13169 (argument_types_convertible): Likewise.
13170 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13172 2000-09-14 Tom Tromey <tromey@cygnus.com>
13174 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13176 2000-09-13 Tom Tromey <tromey@cygnus.com>
13178 * jcf-parse.c: Include <locale.h>.
13179 * jv-scan.c: Include <locale.h>.
13181 2000-09-12 Tom Tromey <tromey@cygnus.com>
13183 * expr.c (pop_type_0): Return `Object' if trying to merge two
13185 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13186 interface types; `Object' is always a valid supertype.
13188 2000-09-12 Tom Tromey <tromey@cygnus.com>
13191 * jv-scan.c (help): Document --encoding.
13192 (options): Added `encoding' entry.
13193 (OPT_ENCODING): New define.
13194 (main): Handle --encoding.
13195 Include <langinfo.h> if nl_langinfo exists.
13196 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13198 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13199 (parse_source_file): Correctly call java_init_lex. Added `finput'
13200 argument. Use nl_langinfo to determine default encoding.
13201 * java-tree.h (current_encoding): Declare.
13202 * parse.y (java_parser_context_restore_global): Don't restore
13204 (java_parser_context_save_global): Don't set `finput' field.
13205 (java_pop_parser_context): Don't restore `finput'. Free old lexer
13207 * lang.c (current_encoding): New global.
13208 (lang_decode_option): Recognize `-fencoding='.
13209 (finish_parse): Don't close finput.
13210 * parse.h (struct parser_ctxt): Removed `finput' and
13211 `unget_utf8_value' fields. Added `lexer' field.
13212 (java_init_lex): Fixed declaration.
13213 * lex.c (java_new_lexer): New function.
13214 (java_destroy_lexer): Likewise.
13215 (java_read_char): Added `lex' argument. Handle iconv case.
13216 (java_read_unicode): Added `lex' argument. Count backslashes in
13218 (java_init_lex): Added `finput' and `encoding' arguments. Set
13219 `lexer' field in ctxp.
13220 (BAD_UTF8_VALUE): Removed.
13221 (java_lex): Handle seeing UEOF in the middle of a string literal.
13222 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13223 (java_lexer): New structure.
13226 (DEFAULT_ENCODING): New define.
13227 (java_destroy_lexer): Declare.
13229 2000-09-12 Tom Tromey <tromey@cygnus.com>
13231 Fix for PR gcj/343:
13232 * lex.c (java_init_lex): Initialize java_io_serializable.
13233 * parse.y (java_io_serializable): New global.
13234 (valid_ref_assignconv_cast_p): An array can be cast to
13237 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13239 * decl.c, expr.c: Include defaults.h if not already included.
13240 Don't define the *_TYPE_SIZE macros.
13242 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
13244 * typeck.c (build_java_array_type): Correct first parameter
13245 in ADJUST_FIELD_ALIGN invocation.
13247 2000-09-06 Tom Tromey <tromey@cygnus.com>
13249 * lang-specs.h: Also recognize `-femit-class-files'.
13251 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13253 * verify.c (merge_types): Load the types to merge if necessary.
13255 2000-09-02 Anthony Green <green@redhat.com>
13257 * jcf-io.c: Include zlib.h.
13258 (open_in_zip): Read compressed class file archives.
13259 * zipfile.h (ZipDirectory): Add uncompressed_size and
13260 compression_method fields.
13261 * zextract.c (read_zip_archive): Collect file compression info.
13263 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
13265 * parse.y (do_resolve_class): Also explore superclasses of
13266 intermediate enclosing contexts when searching for inner classes.
13268 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13270 * parse.y (variable_declarator_id:): Better error message.
13271 (expression_statement:): Use YYNOT_TWICE.
13272 (cast_expression:): Likewise.
13273 (assignment:): Likewise.
13275 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13277 * parse.y (do_merge_string_cste): New locals. Create new
13278 STRING_CSTs each time, use memcpy. Fixes gcj/311.
13280 2000-08-07 Hans Boehm <boehm@acm.org>
13282 * boehm.c (mark_reference_fields): Set marking bits for all words in
13283 a multiple-word record.
13284 (get_boehm_type_descriptor): Use the procedure marking descriptor for
13287 2000-08-31 Mike Stump <mrs@wrs.com>
13289 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13290 jcf-dump$(exeext)): Make parallel safe.
13292 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13294 * jcf-parse.c (set_source_filename): Constify a char *.
13295 * jcf-write.c (append_innerclasses_attribute,
13296 make_class_file_name): Constify a char *. Don't recycle a
13297 variable for an unrelated purpose.
13298 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13299 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13301 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13303 * expr.c (can_widen_reference_to): Fixed indentation.
13304 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13305 * parse.y: `finit$' replaces `$finit$' in comments.
13306 (try_builtin_assignconv): Fixed leading comment.
13308 2000-08-25 Greg McGary <greg@mcgary.org>
13310 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13312 2000-08-24 Greg McGary <greg@mcgary.org>
13314 * lang.c (lang_decode_option): Use ARRAY_SIZE.
13315 * parse.y (BINOP_LOOKUP): Likewise.
13317 2000-08-22 Andrew Haley <aph@cygnus.com>
13319 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13320 sign extending. Fixes gcj/321.
13321 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13322 combining to make a jlong. Fixes gcj/321.
13324 2000-08-21 Nix <nix@esperi.demon.co.uk>
13326 * lang-specs.h: Do not process -o or run the assembler if
13329 2000-08-16 Andrew Haley <aph@cygnus.com>
13331 * typeck.c (build_java_array_type): Rewrite code to do array
13332 alignment. Take into account back-end macros when aligning array
13333 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13334 user to set alignment. Fixes gcj/252 and 160.
13336 2000-08-09 Tom Tromey <tromey@cygnus.com>
13338 * parse.y (check_abstract_method_definitions): Now return `int'.
13339 Check implemented interfaces. Fixes PR gcj/305.
13341 * parse.y (patch_switch_statement): Disallow `long' in switch
13342 expressions. Fixes PR gcj/310.
13344 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13346 * decl.c (finit_leg_identifier_node): New global.
13347 (init_decl_processing): Use `finit$' to initialize
13348 finit_identifier_node. Use `$finit$' to initialize
13349 finit_leg_identifier_node.
13350 * expr.c (expand_java_field_op): Use ID_FINIT_P.
13351 * java-tree.h (finit_identifier_node): Changed attached comment.
13352 (finit_leg_identifier_node): New declaration.
13353 (ID_FINIT_P): Take finit_identifier_node and
13354 finit_leg_identifier_node into account. This is a backward
13355 compatibility hack.
13357 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13359 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13361 (generate_bytecode_insns): Check `nargs' before emitting it.
13362 * verify.c (merge_type_state): Fixed typo.
13363 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13364 generate_bytecode_{conditional,insns}.
13366 2000-08-13 Anthony Green <green@redhat.com>
13368 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13371 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13373 * class.c (maybe_layout_super_class): Fixed indentation.
13374 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13375 (java_check_methods): New function declaration.
13376 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13377 instead of `str_ptr'.
13378 * jcf-write.c (generate_bytecode_insns): Emit number the of args
13379 of a `invokeinterface' at the right time.
13380 * parse.h (WFL_STRIP_BRACKET): New macro.
13381 (SET_TYPE_FOR_RESOLUTION): Use it.
13382 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13383 (check_class_interface_creation): Don't check for cross package
13384 innerclass name clashes.
13385 (method_header): Behave properly if MDECL is `error_mark_node'.
13386 (method_declarator): Return `error_mark_node' if bogus current
13388 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13389 (resolve_and_layout): New local `decl_type', set and used. Call
13390 java_check_methods.
13391 (java_check_methods): New method.
13392 (java_layout_classes): Use it.
13393 (resolve_qualified_expression_name): No EH check necessary in
13395 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13397 (patch_assignment): Set DECL_INITIAL on integral final local.
13399 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13401 * java-tree.h (flag_extraneous_semicolon): New extern.
13402 * lang-options.h: (-Wextraneous-semicolon): New option.
13403 * lang.c (flag_redundant): Fixed typo in leading comment.
13404 (flag_extraneous_semicolon): New global.
13405 (lang_decode_option): Set `flag_extraneous_semicolon' when
13406 -Wall. Decode `-Wextraneous-semicolon'.
13407 * parse.y (type_declaration:): Removed `SC_TK' hack, added
13408 `empty_statement' rule.
13409 (class_body_declaration): Likewise.
13410 (method_body:): Accept `;' as a method body.
13411 (static_initializer:): Removed `SC_TK' hack.
13412 (constructor_block_end:): Likewise.
13413 (empty_statement:): Report deprecated empty declaration. Fixes
13416 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13418 * parse.y (build_dot_class_method_invocation): Changed parameter
13419 name to `type'. Build signature from `type' and convert it to a
13420 STRING_CST if it's an array.
13421 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13422 to use `ref_type' directly.
13424 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
13426 * lang-options.h: Added a comma after the last element to avoid
13427 syntax errors when other languages define additional options.
13429 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13431 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13432 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13433 (jc1): Link with $(BACKEND).
13434 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13436 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13438 * jvspec.c: Adjust type of second argument to
13439 lang_specific_driver, and update code as necessary.
13441 * class.c (build_dtable_decl): Initialize dummy.
13443 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13445 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13446 method bodies not to rule out discarding `<clinit>'; don't use
13447 <clinit> to initialize static fields with constant initializers.
13449 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13451 * gjavah.c (print_method_info): Added `synth' parameter. Skip
13453 (method_synthetic): New global.
13454 (HANDLE_METHOD): Recognize synthetic method and tell
13455 `print_method_info' about it.
13456 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13457 processing a synthetic method.
13458 * jcf-reader.c (skip_attribute): New function.
13459 ( skip_attribute): Likewise.
13461 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13463 * parse.y (build_outer_field_access): Fixed comments.
13464 (fix_constructors): Emit the initialization of this$<n> before
13466 (resolve_qualified_expression_name): Build an access to `decl' if
13469 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13471 * parse-scan.y (curent_class): Non longer const.
13472 (inner_qualifier, inner_qualifier_length): Deleted.
13473 (current_class_length): New global.
13474 (bracket_count): Fixed typo in leading comment.
13475 (anonymous_count): New global.
13476 (class_instance_creation_expression:): Handle anonymous classes.
13477 (anonymous_class_creation:): New rule.
13478 (push_class_context): Rewritten.
13479 (pop_class_context): Likewise.
13480 (INNER_QUALIFIER): Macro deleted.
13481 (report_class_declaration): call `push_class_context' when
13482 entering the function. `fprintf' format modified not to use
13484 (report_class_declaration): Assign `package_name' and
13485 `current_class' to NULL separately.
13487 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13489 * expr.c (build_invokeinterface): Call layout_class_methods on
13492 2000-07-27 Tom Tromey <tromey@cygnus.com>
13493 Anthony Green <green@cygnus.com>
13494 Alexandre Petit-Bianco <apbianco@cygnus.com>
13496 * class.c (make_class_data): Create vtable for abstract classes.
13497 (get_dispatch_table): Changed to cope with abstract classes.
13499 2000-07-27 Tom Tromey <tromey@cygnus.com>
13501 * parse.y (patch_method_invocation): Don't reverse the argument
13502 list when dealing with anonymous class constructors. Fixed typo in
13505 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13507 * parse.y (build_alias_initializer_parameter_list): Reverse
13508 crafted list when building aliases for anonymous class
13511 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13513 * parse.y (jdep_resolve_class): Don't bother checking potential
13514 innerclass access if `decl' is NULL.
13515 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13518 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13520 * parse.c: Remove (again.)
13522 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13524 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13525 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13526 outside the `if' statement, alias to innerclass removed, `decl'
13527 used to mark the class complete.
13529 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13531 * parse.y (simple_name:): Fixed typo in error message.
13533 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13535 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13536 or its first operand can be error marks.
13538 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13540 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13541 * parse.y (method_header): Likewise.
13543 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13545 * parse.y (process_imports): Consider that one might be trying to
13546 import an innerclass. Fixes gcj/254
13548 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13550 * parse.y (find_as_inner_class): Handle the case where the
13551 enclosing context of an innerclass has been loaded as bytecode.
13553 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13555 * parse.y (simple_name:): Reject `$' in type names.
13556 (resolve_type_during_patch): Use `type' as a second
13557 argument to resolve_no_layout. Fixes gcj/257.
13559 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13561 * parse.y (find_most_specific_methods_list): Select the only
13562 non-abstract method even if max has been set.
13563 Fixes gcj/285, gcj/298.
13565 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13567 * lang-specs.h: Added %(jc1) to java compiler options.
13569 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13571 * .cvsignore: New file.
13573 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13575 * parse.y (not_accessible_p): Access granted to innerclasses
13576 (indirectly) extending the reference type. Fixes gcj/249.
13578 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13580 * parse.y (patch_method_invocation): Fixed comment.
13581 (maybe_use_access_method): Build this$<n>s to the context of the
13582 target method, or a type that extends it. Fixes gcj/242.
13584 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13588 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13590 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13592 2000-07-13 Tom Tromey <tromey@cygnus.com>
13594 * lang-specs.h: Added %{I*}.
13596 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13598 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13600 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13602 * parse-scan.c: Remove.
13604 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13606 * class.c (set_super_info): Handled protected inner classes.
13607 (common_enclosing_context_p): Bail early if arguments aren't both
13609 (get_access_flags_from_decl): Handle private and protected inner
13611 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13612 (CLASS_PROTECTED): Likewise.
13613 (struct lang_type): New bitfield `poic'.
13614 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13615 inner classes only.
13616 (check_inner_class_access): Renamed arguments, added
13617 comments. Handles protected inner classes (fixes gcj/225)
13618 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13620 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13622 * parse.y (resolve_qualified_expression_name): Verify qualified
13623 access to `this'. Fixes gcj/239.
13625 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13627 * jcf-write.c (generate_classfile): Don't install ConstantValue
13630 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13632 * parse.y (resolve_qualified_expression_name): Handle inner class
13633 access. Fixes gcj/256.
13635 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13637 * jcf-write.c (generate_classfile): Properly install the
13638 ConstantValue attribute and the initial value constant pool index
13639 on string constants.
13640 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13643 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13645 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13647 * parse.y (find_as_inner_class): Fixed typo.
13648 (do_resolve_class): Explore enclosing contexts when searching for
13649 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13650 (check_inner_class_access): Check `decl' which can be null in case
13651 of previous errors.
13653 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13655 * java-tree.h (java_debug_context): Declared `extern'.
13656 (safe_layout_class): Likewise.
13657 * parse.y (resolve_field_access): Field must be `static' in order
13658 to be replaced by its initial value. Added comments.
13659 (find_applicable_accessible_methods_list): Fixed typo.
13660 (find_most_specific_methods_list): Methods found in innerclasses
13661 take over methods founds in the enclosing contexts.
13662 (java_complete_tree): Loosen restrictions on the type of DECLs
13663 that can be replaced by their initialization values.
13664 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13666 2000-07-05 Tom Tromey <tromey@cygnus.com>
13668 * Make-lang.in (PARSE_DIR): New macro.
13669 (PARSE_RELDIR): Likewise.
13670 (PARSE_C): Likewise.
13671 (PARSE_SCAN_C): Likewise.
13672 ($(PARSE_C)): New target.
13673 ($(PARSE_SCAN_C)): Likewise.
13674 (SET_BISON): New macro.
13675 (BISONFLAGS): Likewise.
13676 (JAVABISONFLAGS): Likewise.
13678 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13680 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13681 argument on the first pass for CNI as well as JNI.
13682 (print_method_info): Set up method name on the first pass only.
13684 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13686 * parse.y (parser_qualified_classname): Removed parameter
13688 (create_interface): Removed first passed parameter to
13689 parser_qualified_classname.
13690 (create_class): Likewise. Don't install alias on static
13691 innerclasses. Fixes gcj/275.
13693 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13695 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13696 debugable statement with empty_stmt_node. Fixes gcj/272
13698 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13700 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13703 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13705 * jcf-write.c (push_long_const): Appropriately cast short negative
13708 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13710 * parse.y (verify_constructor_super): Use loop variable
13711 `m_arg_type' initialized with `mdecl_arg_type'.
13713 2000-06-29 Tom Tromey <tromey@cygnus.com>
13715 * parse.y (resolve_field_access): Handle case where `type_found'
13718 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13720 * expr.c (lookup_field): The same field can be found through two
13721 different interface. Don't declare it ambiguous in that case.
13723 2000-06-27 Tom Tromey <tromey@cygnus.com>
13725 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13726 follows \r, then unget it at a lower level.
13728 2000-06-26 Tom Tromey <tromey@cygnus.com>
13730 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13731 java_complete_tree.
13733 2000-06-25 Tom Tromey <tromey@cygnus.com>
13735 * parse.y (for_statement): Wrap expression in a WFL if it is a
13736 constant. For PR gcj/268.
13738 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13740 * parse.y (do_resolve_class): Minor optimiztion in the package
13741 list search. Removed unnecessary test and return statement.
13742 (valid_ref_assignconv_cast_p): Order of arguments to
13743 enclosing_context_p fixed.
13745 2000-06-24 Tom Tromey <tromey@cygnus.com>
13747 * expr.c (lookup_field): Print error and return error_mark_node if
13748 field reference is ambiguous.
13750 * parse.y (check_abstract_method_definitions): Also check if
13751 `other_method' is abstract.
13753 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13755 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13757 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13758 (struct lang_type): New field `pic'.
13759 (CLASS_PRIVATE): New macro.
13760 * parse.y (check_inner_class_access): New function.
13761 (jdep_resolve_class): Call it.
13763 2000-06-23 Tom Tromey <tromey@cygnus.com>
13765 * parse.y (patch_incomplete_class_ref): Initialize the returned
13766 class. For PR gcj/260.
13768 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13770 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13772 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13774 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13775 Java specific checks.
13776 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13777 screened by DECL_P.
13778 * java-tree.def (CASE_EXPR): Marked 'e'.
13779 (DEFAULT_EXPR): Likewise.
13780 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13781 screened by DECL_P.
13782 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13783 Java specific checks.
13784 (generate_bytecode_insns): Test try_block for BLOCK before using
13786 * parse.y (build_wfl_wrap): Added `location' argument. Set
13787 EXPR_WFL_LINECOL accordingly.
13788 (dim_expr:): Wrap constants with WFLs.
13789 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13790 (resolve_package): Check for `stmt' not being a BLOCK before
13791 building a debuggable statement with it.
13792 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13794 (resolve_field_access): Make sure `decl' is a DECL before treating
13796 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13797 IDENTIFIER_NODE before treating it as such.
13798 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13799 treating it as such.
13800 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13801 to be applied only on non array types.
13803 2000-06-16 Per Bothner <per@bothner.com>
13805 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13806 define in terms of DECL_RESULT, as that fails when --enable-checking.
13808 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13810 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13811 types the same in comparison.
13812 (CHECK_OP): Add static prototype.
13814 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13816 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13817 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13818 * parse.c: Rebuilt.
13820 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13822 * decl.c (create_primitive_vtable): Prototype.
13824 * jcf-write.c (generate_bytecode_insns): Initialize variable
13827 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13829 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13831 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13832 to track searched classes, and do not search the same class more than
13833 once. Call find_applicable_accessible_methods_list on immediate
13834 superclass, instead of search_applicable_method_list on all ancestors.
13835 Fix for PR gcj/238.
13837 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13839 * parse.y (register_fields): Permit static fields in inner classes
13840 if they are final. Fix for PR gcj/255.
13842 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13844 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13845 * parse.y (find_in_imports): Returned type changed to void,
13846 leading comment fixed.
13847 (register_package): New function.
13848 (qualify_and_find): Likewise.
13849 (package_declaration:): Use `register_package'.
13850 (single_type_import_declaration:): Removed local variable
13851 `node'. Added missing `;' for consistency.
13852 (type_import_on_demand_declaration:): Use `chainon' to link new
13854 (lookup_field_wrapper): Lookup local variables defined in outer
13856 (java_complete_class): Don't reverse the list of imported on demand.
13857 (do_resolve_class): Reorganized. Removed local variable
13858 `original_name'. Call `qualify_and_find' with the current package
13859 name, invoke `find_in_imports_on_demand' right after. Call
13860 `qualify_and_find' with the packages we've seen so far. Fixed
13861 operations numbering in comments.
13862 (java_expand_class): Don't reverse `package_list'.
13863 (find_most_specific_methods_list): New local variables `abstract'
13864 and `candidates'. Use them to pick the right method.
13866 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
13868 * parse.y (check_modifiers_consistency): Don't subtract out
13869 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13871 2000-06-04 Philipp Thomas <pthomas@suse.de>
13873 * Makefile.in (INTLLIBS): New.
13877 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13879 * class.c (get_dispatch_table): Build the vtable dummy entry list
13880 element with a null purpose. Fixed leading comment.
13881 (build_dtable_decl): Build an accurate dtable type when appropriate
13884 2000-06-02 Richard Henderson <rth@cygnus.com>
13886 * lang.c (lang_get_alias_set): New.
13888 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13890 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13891 before using it as the accessed field.
13893 2000-05-31 Tom Tromey <tromey@cygnus.com>
13895 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13896 char_array_vtable, short_array_vtable, int_array_vtable,
13897 long_array_vtable, float_array_vtable, double_array_vtable):
13899 * expr.c (get_primitive_array_vtable): New function.
13900 (create_primitive_vtable): New function.
13901 (java_lang_expand_expr): Enable code to statically generate
13903 * decl.c (init_decl_processing): Create primitive vtables.
13904 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13905 short_array_vtable, int_array_vtable, long_array_vtable,
13906 float_array_vtable, double_array_vtable): Define.
13908 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13910 * java/parse.y (find_applicable_accessible_methods_list):
13911 Don't add an uninitialized value to the list.
13913 2000-05-25 Tom Tromey <tromey@cygnus.com>
13915 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13916 when trying to see if field's class should be initialized. Always
13917 initialize field's declaring class, not qualified class.
13920 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13921 `wfl_operator', to maybe_build_primttype_type_ref.
13924 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
13926 * parse.y (patch_method_invocation): Don't try to lookup methods
13927 in primitive types.
13929 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13931 * parse.y (resolve_field_access): Call the appropriate <clinit>
13932 before accessing the length of a static array. Craft a decl for
13933 the field while its time. Fixes PR gcj/129.
13935 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13937 * parse.y (resolve_package): Correctly set `*next' (was off by
13939 (resolve_qualified_expression_name): Fixed comment.
13941 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13943 * jcf-parse.c (jcf_parse_source): Reset current_class and
13944 current_function_decl to NULL before parsing a new file.
13946 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13948 * parse.y (block_end:): If the collected block doesn't feature a
13949 statement, insert an empty statement.
13951 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13953 * parse.y (maybe_yank_clinit): New function.
13954 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13955 end of the list of methods belonging to a class.
13956 (java_complete_expand_method): Check whether <clinit> is really
13957 necessary and expand it accordingly.
13959 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13961 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13962 processed by the method's switch statement.
13964 2000-05-19 Tom Tromey <tromey@cygnus.com>
13966 * java-tree.h: Added init state enum.
13967 * decl.c (emit_init_test_initialization): Initialize class
13968 initialization check variable by looking at class' state.
13970 2000-05-19 Tom Tromey <tromey@cygnus.com>
13972 * java-tree.h (build_instanceof): Declare.
13973 (build_get_class): Declare.
13974 * parse.y (patch_binop): Use build_instanceof.
13975 * expr.c (build_instanceof): New function. If class is final,
13976 don't make a function call.
13977 (expand_java_INSTANCEOF): Use it.
13978 (build_get_class): New function.
13980 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13982 * jcf-write.c (generate_classfile): Scan the source_file for
13983 slashes with the right pointer variable.
13985 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
13987 * lang.c (lang_decode_option): Update -Wunused flags by calling
13989 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13991 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
13993 * check_init.c (check_init): Constify local char *.
13994 * class.c (push_class): Constify local char *.
13995 * java_tree.h: Update prototypes.
13996 * jcf-io.c (open_class): Constify filename parameter and
13998 (find_class): Remove redundant string copy. Cast return from
14000 * jcf-parse.c (read_class, parse_class_file, yyparse):
14001 Constify local char *.
14002 * jcf-write.c (generate_bytecode_insns, generate_classfile):
14003 Constify local char *.
14004 * jcf.h (JCF): Constify filename and classname.
14005 (JCF_FINISH): Cast args to FREE to char * when appropriate.
14006 * lang.c (init_parse): Constify parameter and return value.
14007 * lex.c (java_get_line_col): Constify filename parameter.
14008 * parse.h: Constify parser_ctxt.filename. Update prototypes.
14009 * parse.y (java_parser_context_suspend,
14010 issue_warning_error_from_context, safe_layout_class): Constify
14012 * parse.c: Regenerate.
14014 2000-05-08 Tom Tromey <tromey@cygnus.com>
14016 * expr.c (build_jni_stub): Cache the result of
14017 _Jv_LookupJNIMethod.
14019 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14021 * decl.c (predef_filenames_size): Now 7.
14022 (predef_filenames): New seventh entry.
14024 2000-05-04 Tom Tromey <tromey@cygnus.com>
14026 * boehm.c (mark_reference_fields): Don't mark RawData fields.
14027 Keep track of when we've seen a reference field after a
14028 non-reference field.
14029 (get_boehm_type_descriptor): Handle case where we see
14030 non-reference fields but no trailing reference field.
14031 * decl.c (rawdata_ptr_type_node): Define.
14032 (init_decl_processing): Initialize rawdata_ptr_type_node.
14033 * java-tree.h (rawdata_ptr_type_node): Declare.
14035 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14037 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
14038 specifiers in calls to fprintf.
14040 2000-05-03 Andrew Haley <aph@cygnus.com>
14042 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
14044 * javaop.h (WORD_TO_INT): New function.
14045 (IMMEDIATE_s4): Use WORD_TO_INT.
14046 * jcf.h (JPOOL_INT): Ditto.
14048 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
14051 2000-04-19 Tom Tromey <tromey@cygnus.com>
14053 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
14054 on native function.
14055 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
14057 * expr.c (build_jni_stub): New function.
14058 * lang-specs.h: -fjni and -femit-class-file are incompatible.
14059 * parse.c: Rebuilt.
14060 * parse.y (java_complete_expand_methods): Expand a native method
14061 and call build_jni_stub if -fjni given.
14062 * lang-options.h: Document -fjni.
14063 * lang.c (flag_jni): New global.
14064 (lang_f_options): Added `jni' entry.
14065 * java-tree.h (soft_lookupjnimethod_node,
14066 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
14068 (flag_jni): Declare.
14069 (build_jni_stub): Declare.
14070 (struct lang_decl): Added `native' flag.
14071 (METHOD_NATIVE): Redefined to use `native' field of lang specific
14073 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
14074 soft_jnipopsystemframe_node): New globals.
14075 (init_decl_processing): Set them. _Jv_InitClass only takes one
14078 * java-tree.def: Put into `C' mode.
14080 2000-04-27 Tom Tromey <tromey@cygnus.com>
14083 * expr.c (expand_invoke): Generate check to see if object pointer
14084 is null in nonvirtual invocation case.
14085 * java-tree.h (soft_nullpointer_node): Declare.
14086 * decl.c (soft_nullpointer_node): New global.
14087 (init_decl_processing): Initialize soft_nullpointer_node.
14088 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14089 or `private' methods.
14090 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14092 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14094 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14097 2000-04-26 Tom Tromey <tromey@cygnus.com>
14099 * zextract.c (find_zip_file_start): New function.
14100 (read_zip_archive): Use it.
14102 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14104 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
14106 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14108 * class.c (common_enclosing_context_p): New function.
14109 * java-tree.h (common_enclosing_context_p): Added prototype.
14110 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14111 classes sharing an outer context with the current instance.
14112 * parse.y (build_access_to_thisn): Fixed leading comment.
14113 (verify_constructor_super): New local `supper_inner'. Skip
14114 enclosing context argument in the case of inner class constructors.
14115 (patch_method_invocation): Insert proper context as second
14116 parameter to pure inner class constructor super invocations.
14118 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14120 * parse.y (end_class_declaration): Reset the interface number
14123 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14125 * parse.y (source_start_java_method): Deleted unnecessary code.
14126 (patch_method_invocation): Fixed comment.
14128 2000-04-24 Robert Lipe <robertlipe@usa.net>
14130 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14132 2000-04-23 Tom Tromey <tromey@cygnus.com>
14134 * boehm.c (mark_reference_fields): Use int_byte_position.
14136 2000-04-22 Tom Tromey <tromey@cygnus.com>
14138 * boehm.c (mark_reference_fields): Only call byte_position on
14141 2000-04-22 Tom Tromey <tromey@cygnus.com>
14143 * boehm.c (mark_reference_fields): Added `last_view_index'
14144 argument. Use DECL_FIELD_OFFSET to determine field's offset.
14146 2000-04-20 Mo DeJong <mdejong@cygnus.com>
14148 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14149 * parse.y (check_class_interface_creation): Fixed comments. Select
14150 permitted modifiers for (inner) interfaces. Changed error message
14151 to report rejected modifiers used with local classes.
14153 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14155 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14156 of directly inherited type considered in scope.
14157 * parse.y (do_resolve_class): Search inherited classes for inner
14160 2000-04-20 Tom Tromey <tromey@cygnus.com>
14162 * parse.y (not_accessible_p): Use member's class, not current
14163 class, when doing inheritance check for protected reference.
14166 2000-04-20 Jason Schroeder <shrode@subnature.com>
14168 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14170 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14172 * parse.y (lookup_field_wrapper): Search for final local aliases.
14173 (resolve_expression_name): Let lookup_field_wrapper search for
14174 final local aliases. Force the value of `name' if one is found.
14175 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14176 an expression name. Fixed comments.
14178 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14180 * parse.y (yyerror): `msg' can be null, don't use it in that case.
14182 2000-04-19 Tom Tromey <tromey@cygnus.com>
14184 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14186 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14188 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14190 2000-04-18 Tom Tromey <tromey@cygnus.com>
14193 * gjavah.c (utf8_cmp): Changed return value.
14194 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
14196 (cxx_keywords): New global.
14197 (get_field_name): Handle new result of cxx_keyword_subst.
14198 (print_method_info): Likewise.
14200 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
14202 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14203 with a newline, for CNI.
14204 (print_stub_or_jni): Print a space or newline before method name for
14205 CNI as well as JNI.
14206 (print_cxx_classname): Don't write leading "::" in CNI stub method.
14207 (process_file): Include gcj/cni.h if generating CNI stubs.
14209 2000-04-16 Tom Tromey <tromey@cygnus.com>
14211 * gjavah.c (decompile_method): Use print_field_name.
14214 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14216 * parse.y (java_expand_classes): Reverse the package list once.
14217 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14219 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14220 the `==' and `!=' operators.
14222 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14224 * jcf-write.c (generate_bytecode_insns): At invocation time,
14225 always relate an interface method to the type of its selector.
14227 2000-04-05 Tom Tromey <tromey@cygnus.com>
14230 * expr.c (expand_invoke): Generate check to see if object pointer
14231 is null in nonvirtual invocation case.
14232 * java-tree.h (soft_nullpointer_node): Declare.
14233 * decl.c (soft_nullpointer_node): New global.
14234 (init_decl_processing): Initialize soft_nullpointer_node.
14235 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14236 or `private' methods.
14237 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14239 2000-04-05 Tom Tromey <tromey@cygnus.com>
14241 Fix for PR gcj/140:
14242 * parse.y (check_final_assignment): Recognize assignments to the
14243 `length' field of an array when generating class files.
14245 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14247 * class.c (decl_hash): Prototype removed.
14248 (decl_compare): Likewise.
14250 2000-04-05 Tom Tromey <tromey@cygnus.com>
14252 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14253 * parse.y (check_modifiers_consistency): Check for final/volatile
14254 clash. Fixes PR gcj/164.
14256 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14258 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14260 (java_hash_compare_tree_node): Renamed from `decl_compare, made
14262 (add_method_1): Use `java_hash_hash_tree_node' and
14263 `java_hash_compare_tree_node'.
14264 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14265 (java_hash_compare_tree_node): Likewise.
14266 * parse.y (find_applicable_accessible_methods_list): Create,
14267 delete and use a hash table to remember already searched interfaces.
14269 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
14271 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14274 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14276 * boehm.c (mark_reference_fields, set_bit): Prototype.
14277 (set_bit): Un-ANSI-fy definition.
14279 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14282 * decl.c (emit_init_test_initialization): Likewise.
14284 * gjavah.c (jni_print_char): Likewise.
14286 * parse.y (create_new_parser_context): Likewise.
14288 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14290 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14291 patch missing hunk. Fixed indentation.
14293 2000-03-30 Tom Tromey <tromey@cygnus.com>
14295 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14296 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14298 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14300 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14301 when negative *before* using it as an array index.
14302 * ChangeLog: Fixed typo.
14304 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14306 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14307 to 0 when it reaches -1.
14309 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14311 * jcf-parse.c (get_constant): Properly cast `num' during the
14312 invocation of `add_double'.
14313 * jcf-write.c (push_long_const): Properly cast `lo' before
14314 comparing it to short bounds.
14315 * parse-scan.y (interface_declaration:): Rule re-arrange so that
14316 `interface_body:' is reduced after the current interface is
14319 2000-03-26 Tom Tromey <tromey@cygnus.com>
14321 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14322 Java-specific `-f' option.
14324 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14326 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14327 Adjust order of making types.
14328 Make bitsize_*_node values.
14330 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14332 * class.c (make_field_value): Use byte_position.
14333 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14334 (java_array_data_offset): Likewise.
14335 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14338 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14340 * parse.y (check_abstract_method_definitions): New local
14341 `end_type_reached'. Make sure we also consider `end_type'.
14342 (java_check_abstract_method_definitions): Make sure we eventually
14343 consider `java.lang.Object'.
14344 (maybe_use_access_method): Don't use access method if not in the
14345 context of a pure inner class or if the method's context is right.
14346 (find_applicable_accessible_methods_list): New static flag
14347 `object_done'. Don't search abstract classes as interfaces. Fixed
14348 indentation. Fixed the `java.lang.Object' only search. Search
14349 class interface(s) first, then fully search enclosing contexts.
14350 (find_most_specific_methods_list): Pick the closest candidate when
14351 they're all abstract.
14353 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14355 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14356 properly initialize `finished_label'. Don't emit gotos for empty
14359 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14361 * except.c (emit_handlers): Clear catch_clauses_last.
14363 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14365 * parse.y (check_method_types_complete): New function.
14366 (create_class): Reset anonymous class counter only when seeing an
14368 (java_complete_class): JDEP_METHOD: Don't recompute signature
14371 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14373 * class.c (build_static_ref): Fixed indentation in comment.
14374 * java-tree.def (TRY_EXPR): Fixed typo in name.
14375 (CLASS_LITERAL): Likewise.
14376 * java-tree.h: (TYPE_DOT_CLASS): New macro.
14377 (struct lang_type): New field `dot_class'.
14378 * jcf-write.c (generate_bytecode_insns): Fixed error message.
14379 (generate_classfile): Method `class$' is synthetic.
14380 * parse.y (build_do_class_method): New function.
14381 (build_dot_class_method_invocation): Likewise.
14382 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14383 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14384 (qualify_ambiguous_name): Likewise.
14385 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14386 (build_try_statement): Fixed leading comment.
14388 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14390 * class.c (make_field_value): Properly handle sizes.
14391 (get_dispatch_vector): Use tree_low_cst and host_integerp.
14392 (layout_class_method): Count using trees.
14393 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14394 * expr.c (java_array_data_offset): Use int_bit_position.
14395 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14396 (build_invokevirtual): Use tree_low_cst and do computations with trees.
14398 2000-03-16 Tom Tromey <tromey@cygnus.com>
14400 * lang.c (flag_hash_synchronization): New global.
14401 (lang_f_options): Added `hash-synchronization'.
14402 * lang-options.h: Mention -fhash-synchronization.
14403 * java-tree.h (flag_hash_synchronization): Declare.
14404 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14405 hash table synchronization is disabled.
14406 * decl.c (init_decl_processing): Only push `sync_info' value when
14407 hash table synchronization is disabled.
14408 * class.c (make_class_data): Only push `sync_info' field when hash
14409 table synchronization is disabled. Removed dead code.
14411 2000-03-16 Tom Tromey <tromey@cygnus.com>
14413 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14415 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14417 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14419 * parse.y (patch_method_invocation): Handle anonymous classes
14420 creation in static context.
14422 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14424 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14425 * parse.y (resolve_qualified_expression_name): Use it.
14426 (patch_method_invocation): Likewise.
14428 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14430 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14431 depending on the type of dependency which dictates what the
14433 (unresolved_type_p): Resolved types limited to the current class.
14435 2000-03-15 Tom Tromey <tromey@cygnus.com>
14437 * decl.c (init_decl_processing): Set type of `sync_info' to be
14440 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14441 Correctly compute bit number for current slot. Zero `high' and
14442 `low' in DS_LENGTH case. Don't skip inherited fields. Use
14443 mark_reference_fields.
14444 (mark_reference_fields): New function.
14446 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14448 * parse.y (register_incomplete_type): Fixed initialization of
14451 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14453 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14455 (push_class_context, pop_class_context): New function.
14456 (class_body:): Call pop_class_context.
14457 (interface_body:): Likewise.
14458 (INNER_QUALIFIER): New macro.
14459 (report_class_declaration): Changed output format and use
14460 INNER_QUALIFIER. Call push_class_context.
14462 2000-02-14 Andrew Haley <aph@cygnus.com>
14464 * check-init.c (check_init): Add new cases for unary and binary
14467 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14469 * parse.y (resolve_package): Set `next' once a type name has been
14470 progressively discovered.
14471 (resolve_qualified_expression_name): Propagate resolution only if
14472 there are remaining qualifiers. Take into account `q' might have
14473 been cleared after re-qualification.
14474 * parse.y (patch_method_invocation): New local `resolved'.
14475 Section dealing with qualified expression rewritten to use
14476 resolve_field_access.
14478 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14480 * parse.h (PUSH_CPC): Fixed indentation.
14481 (DEBUG_CPC): New macro.
14482 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14483 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14484 * parse.y (class_body_declaration:): Use
14485 SET_CPC_INSTANCE_INITIALIZER_STMT.
14486 (method_declaration:): Check for null current_function_decl.
14487 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14488 (java_parser_context_pop_initialized_field): Better handling of
14490 (maybe_make_nested_class_name): Mark nested class name as
14491 qualified when necessary.
14492 (end_class_declaration): Don't call java_parse_context_resume when
14493 one or more error occurred.
14494 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14495 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14496 SET_CPC_INITIALIZER_STMT.
14497 (method_header): Check for inner classes declaring static methods.
14498 (resolve_qualified_expression_name): Handle situation where `this'
14501 2000-03-13 Hans Boehm <boehm@acm.org>
14503 * typeck.c (build_prim_array_type): Correctly set the high word too.
14505 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14507 * parse.y (java_complete_expand_methods): Leave <clinit> out of
14509 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14510 list of methods for interfaces.
14512 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14514 * parse.y (qualify_ambiguous_name): Properly handle expressions
14517 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14519 * parse.y (check_final_assignment): Extended to process
14521 (patch_assignment): Have check_final_assignment called only once.
14523 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14525 * java-tree.h (IS_INIT_CHECKED): New flag.
14526 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14527 * parse.y (patch_string): Call force_evaluation_order on the
14528 completed string concatenation tree.
14529 * expr.c (force_evaluation_order): Call force_evaluation_order on
14530 function's arguments too.
14532 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14534 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14535 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14536 (build_anewarray): Likewise.
14537 * parse.y (patch_newarray): Likewise.
14538 * parse.c: Regenerated.
14540 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14542 * decl.c (init_decl_processing): Added new class fields `depth',
14543 `ancestors', and `idt' to class_type_node. Use
14544 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14545 * class.c (make_class_data): Push initial values for new fields.
14546 * java-tree.h: Updated prototype for `build_invokeinterface'.
14547 * expr.c (build_invokeinterface): Changed parameters to accept
14548 `method' tree. Calculate index of `method' in its declaring
14549 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14550 (expand_invoke): Call `build_invokeinterface' with new parameters.
14551 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14554 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14556 * typeck.c (lookup_do): Search superinterfaces first
14557 when looking up an interface method. From Godmar Back
14558 <gback@cs.utah.edu>
14560 2000-03-06 Tom Tromey <tromey@cygnus.com>
14562 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14564 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14566 * java-tree.h (lookup_argument_method2): Declared.
14567 (safe_layout_class): Prototype moved from parse.h.
14568 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14569 * parse.y (java_check_regular_methods): Local `super_class' gone.
14570 Call lookup_argument_method2 instead of lookup_argument_method.
14571 Perform modifier match for methods found declared in implemented
14572 interfaces. Fixed indentation problem. Overriding/hiding error
14573 report to take place only for methods found in classes.
14574 * typeck.c (lookup_argument_method): Changed leading
14575 comment. Re-written by calling lookup_do.
14576 (lookup_argument_method2): New function.
14577 (lookup_java_method): Re-written by calling lookup_do.
14578 (lookup_do): New function.
14580 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14582 * check-init.c (check_init): Removed dead code. Handle (blank)
14584 * parse.y (declare_local_variables): New local `final_p', set it
14585 and use it to initialize LOCAL_FINAL.
14586 (check_final_assignment): Only check FIELD_DECLs.
14588 2000-02-17 Tom Tromey <tromey@cygnus.com>
14590 * Makefile.in (JAVA_OBJS): Added boehm.o.
14591 (boehm.o): New target.
14592 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14593 * java-tree.h (flag_use_boehm_gc): Declare.
14594 (get_boehm_type_descriptor): Declare.
14595 * lang.c (lang_f_options): Added `use-boehm-gc'.
14596 (flag_use_boehm_gc): New global.
14597 * lang-options.h: Added -fuse-boehm-gc.
14598 * boehm.c: New file.
14599 * class.c (get_dispatch_table): If class uses a Boehm type
14600 descriptor, put it in the vtable.
14601 (make_class_data): Removed dead code.
14603 2000-03-03 Per Bothner <per@bothner.com>
14605 * decl.c (init_decl_processing): Initialize sizetype properly.
14607 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14609 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14610 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14611 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14612 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14613 (jcf_parse): New local `current'. Load innerclasses seen in outer
14614 context being processed.
14615 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14616 * jcf-write.c (append_innerclasses_attribute): New function.
14617 (append_innerclasses_attribute_entry): Likewise.
14618 (get_access_flags): Handle static classes. Set anonymous and local
14619 classes to be private.
14620 (generate_classfile): Attribute count adjusted. Call
14621 append_innerclasses_attribute.
14622 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14623 PURE_INNER_CLASS_TYPE_P.
14624 * parse.y (parser_qualified_classname): New parameter `is_static',
14625 produce non qualified name accordingly.
14626 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14627 (create_interface): Added argument to parser_qualified_classname.
14628 (create_class): Added argument to parser_qualified_classname. Setup
14629 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14630 (add_inner_class_fields): Fixed indentation.
14631 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14632 (method_declarator): Fixed typo in comment.
14633 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14634 (build_current_thisn): Likewise.
14635 (patch_method_invocation): Likewise.
14637 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14639 * decl.c (current_function_decl): Move to toplev.c.
14641 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14643 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14644 (DECL_BIT_INDEX): Use underlying representation.
14645 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14647 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14649 * expr.c (build_java_ret): Pass proper type to size_binop.
14651 2000-02-25 Anthony Green <green@cygnus.com>
14653 * expr.c (build_class_init): Mark the decl to be ignored by
14655 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14656 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14657 * class.c (init_test_hash_newfunc): New function.
14658 (decl_hash): New function.
14659 (decl_compare): New function.
14660 * decl.c (emit_init_test_initialization): New function.
14661 (complete_start_java_method): Traverse the init test hashtable,
14662 calling emit_init_test_initialization.
14663 (always_initialize_class_p): Define.
14664 * expr.c (build_class_init): Use initialization tests when
14665 emitting class initialization code.
14666 (always_initialize_class_p): Declare.
14667 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14669 * java-tree.h: Include hash.h.
14670 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14671 (struct lang_decl): Add init_test_table field.
14672 (init_test_hash_entry): Define.
14674 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14676 * gjavah.c (main): Avoid using `argi' to report unimplemented
14679 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14681 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14682 initialize locals to avoid warnings. Local `exception_type' moved
14685 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14687 * parse.y (resolve_expression_name): Use `orig' as a second
14688 argument to resolve_field_access.
14689 (resolve_field_access): Removed unnecessary code when dealing with
14692 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14694 * class.c (push_super_field): Don't push the field twice.
14695 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14696 * parse.h (java_reorder_fields): Prototyped.
14697 * parse.y (java_reorder_fields): New function.
14698 (java_layout_class): Simplified not to worry about re-ordering.
14700 2000-02-23 Tom Tromey <tromey@cygnus.com>
14702 * gjavah.c (print_name): In JNI case, correctly quote string.
14703 (print_method_info): Don't handle overrides in JNI mode.
14705 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14707 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14708 value type set to `boolean_type_node'.
14710 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14712 * jcf-dump.c (main): Test for correct condition after
14713 output file creation.
14715 2000-02-19 Anthony Green <green@cygnus.com>
14717 * jcf-depend.c (add_entry): Fix test for first list entry.
14719 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14721 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14722 * constants.c (build_constants_constructor): Likewise.
14724 2000-02-19 Anthony Green <green@cygnus.com>
14726 * jcf-depend.c (add_entry): Add entries to the end of the list.
14728 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
14730 * decl.c (INT_TYPE_SIZE): Define if necessary.
14731 (expand_java_return): Handle the case of a native integer smaller
14732 than a JVM integer.
14734 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
14736 * gjavah.c (help): Use GCCBUGURL.
14737 * jv-scan.c (help): Likewise.
14738 * jcf-dump.c (help): Likewise.
14740 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14742 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14745 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14747 * jcf-parse.c (load_class): Call `fatal' if no file containing
14748 the target class are found.
14750 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14752 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14753 lex.c, lex.h, and PARSE_H to...
14754 (parse.o, parse-scan.o): ...here, respectively.
14756 * lex.c: Split out code that may trigger SIGFPE from yylex()
14757 to its own function.
14758 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14760 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14762 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14764 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14766 * parse.y (outer_field_access_p): Stop in time when outer contexts
14768 (resolve_qualified_expression_name): Properly qualify *everything*
14769 after a package.type to be resoled as expression names.
14770 (find_applicable_accessible_methods_list): Save/restore `class' to
14771 isolate it from a possible outer context search.
14773 2000-02-15 Tom Tromey <tromey@cygnus.com>
14775 * gjavah.c (jni_print_char): New function.
14776 (print_full_cxx_name): Use it.
14777 (decode_signature_piece): Likewise.
14778 (print_cxx_classname): Likewise.
14780 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14782 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14784 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14786 * gjavah.c: Include version.h.
14788 * jcf-dump.c: Likewise.
14790 * jv-scan.c: Likewise.
14792 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14794 * parse.y (outer_field_access_fix): First parameter now a tree
14795 node. Check for assignment to final. First argument to
14796 build_outer_field_access_fix modified to accommodate prototype.
14797 (build_outer_field_access): Don't check for assignment to final
14799 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14800 possibly returned by outer_field_access_fix. Changed
14801 outer_field_access_fix's first argument.
14802 (check_final_assignment): $finit$'s context is OK.
14803 (patch_unaryop): Use node instead of its line/column value when
14804 calling outer_field_access_fix.
14806 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14808 * parse.y (interface_declaration:): No longer tagged
14809 <node>. Re-installed default action.
14810 (class_member_declaration:): Handle inner interfaces.
14811 (interface_member_declaration): Handle inner interfaces and
14813 (create_interface): Push error if one seen. Suspend parsing
14814 context when processing an inner interface.
14815 (register_fields): Inner class static field limitations not to
14816 apply to inner interfaces.
14818 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14820 * jcf-parse.c (load_class): Update `java_error_count' when a
14821 class' file can't be found.
14822 (parse.y): Avoid (byte)code generation when errors seen.
14824 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14826 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14827 decodes a valid node.
14828 (patch_binop): Handle TRUNC_DIV_EXPR.
14830 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14832 * parse.y (resolve_package): New local `acc'. Try to progressively
14833 build and guess a package and type name.
14835 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14837 * parse.y (find_applicable_accessible_methods_list): Load and
14838 layout the search class if necessary.
14839 (java_complete_tree): Keep to original type of the folded initial
14842 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14844 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14845 Generate error message if circularity is detected. New static
14847 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14848 * jcf-write.c (generate_bytecode_insns): Very simply handle
14850 * parse.y (java_check_circular_reference): Use
14851 `cyclic_inheritance_report' during report, if necessary.
14852 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14853 walking NEW_ARRAY_INIT twice.
14855 2000-02-09 Tom Tromey <tromey@cygnus.com>
14857 * parse.y (check_class_interface_creation): Allow inner classes to
14858 be `private' or `protected', check modifiers' consistency. Prevent
14859 block local classes from bearing any modifiers.
14861 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14863 * except.c (check_start_handlers): Re-add prototype lost in last
14865 (maybe_start_try): Remove excess argument to `check_start_handlers'.
14867 2000-02-09 Andrew Haley <aph@cygnus.com>
14869 * decl.c (clear_binding_level): Remove excess initializer.
14870 (maybe_poplevels): Remove unused variable.
14871 (force_poplevels): Ditto.
14872 (struct binding_level): Add comment.
14874 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14876 * jcf-write.c (generate_classfile): Don't consider
14877 pre-initialization with reference value (use <clinit> instead.)
14878 * parse.y (java_fix_constructors): No generated constructor for
14880 (build_outer_field_access): Removed debug message.
14881 (outer_field_expanded_access_p): Adapted to bytecode generation.
14882 (build_outer_field_access_method): Use fix_method_argument_names.
14883 (build_outer_method_access_method): Fixed indentation. Added
14884 comment. Handle access method generation for static and also void
14886 (build_access_to_thisn): Inserted debug message.
14887 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14888 (resolve_qualified_expression_name): Fixed comment.
14889 (not_accessible_p): Adapted to bytecode generation. Added comment.
14890 (patch_method_invocation): Added comment.
14891 (maybe_use_access_method): Fixed leading comment. Handle static
14893 (java_complete_lhs): Don't shortcut handling of initialized upon
14894 declaration String type static fields when generating bytecode.
14895 (patch_unaryop): Handle outer field access when generating
14898 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14900 * java-tree.h (FIELD_THISN): New macro.
14901 * jcf-write.c (append_synthetic_attribute): New function.
14902 (generate_classfile): Set "Synthetic" attribute on this$<n>,
14903 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14904 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14906 (build_outer_field_access): Turned on access functions usage and
14907 generation when compiling to bytecode.
14908 (maybe_use_access_method): Likewise.
14910 2000-01-25 Andrew Haley <aph@cygnus.com>
14912 * java-except.h (struct eh_range): Add `expanded' field.
14913 (maybe_start_try): Add end_pc arg.
14914 (maybe_end_try): Ditto.
14915 * java-tree.h (force_poplevels): new function.
14916 * expr.c (expand_byte_code): Don't call maybe_start_try or
14918 * except.c (add_handler): Reset expanded.
14919 (expand_start_java_handler): Set expanded.
14920 (check_start_handlers): Don't expand a start handler that's
14921 already been expanded.
14922 (maybe_start_try): Add end_pc arg. Only expand a handler which
14924 (expand_end_java_handler): call force_poplevels.
14925 (force_poplevels): new function.
14926 * decl.c (binding_level): Add start_pc of binding level.
14927 (maybe_pushlevels): Call maybe_start_try when pushing binding
14929 (maybe_poplevels): Call maybe_end_try when popping binding levels.
14930 (LARGEST_PC): Define.
14931 (clear_binding_level): Use LARGEST_PC.
14933 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14934 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14935 (binding_depth, is_class_level, current_pc): new variables.
14936 (struct binding_level): ditto.
14937 (indent): new function.
14938 (push_jvm_slot): add debugging info.
14939 (maybe_pushlevels): ditto.
14940 (maybe_poplevels): ditto.
14941 (pushlevel): ditto.
14943 (start_java_method): ditto.
14944 (give_name_to_locals): comment only.
14945 * except.c (binding_depth, is_class_level, current_pc):
14947 (expand_start_java_handler): add debugging info.
14948 (expand_end_java_handler): ditto.
14950 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14952 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14953 (print_name_for_stub_or_jni, process_file): Constify a char*.
14955 2000-02-03 Tom Tromey <tromey@cygnus.com>
14957 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14959 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14961 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14962 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14965 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14967 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14968 * java-tree.h (TYPE_II_STMT_LIST): New macro.
14969 (struct lang_type): New field `ii_block'.
14970 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14971 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14972 * parse.h (struct parser_ctxt): New field `instance_initializers'.
14973 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14974 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14975 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14977 * parse.y (add_instance_initializer): New function.
14978 (in_instance_initializer): New static global.
14979 (class_body_declaration:): Link instance initializer block.
14980 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14981 (array_creation_expression:): Remove unused local.
14982 (java_parser_context_push_initialized_field): Fixed leading
14983 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14984 CPC_INSTANCE_INITIALIZER_LIST.
14985 (java_parser_context_pop_initialized_field): Likewise.
14986 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14987 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14988 CPC_INITIALIZER_STMT.
14989 (fix_constructors): New local `class_type'. Use it. Call
14990 add_instance_initializer.
14991 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14992 (patch_return): Forbid return in instance initializers.
14993 (patch_throw_statement): Enforce exception handling in the context
14994 of instance initializers.
14996 2000-02-03 Tom Tromey <tromey@cygnus.com>
14998 * Make-lang.in (java.mostlyclean): Remove executables in
15001 2000-01-31 Scott Bambrough <scottb@netwinder.org>
15003 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
15004 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
15005 (java_float_finite): Convert to use union Word from javaop.h.
15006 (java_double_finite): Convert to use union DWord from javaop.h.
15008 2000-02-02 Tom Tromey <tromey@cygnus.com>
15010 * gjavah.c (options): Added `jni' entry.
15011 (help): Document -jni.
15012 (flag_jni): New global.
15013 (process_file): Handle JNI output. Don't print text from
15014 -prepend, -add, etc, when generating stubs. Only remove `.class'
15015 suffix if it actually exists.
15016 (main): Create a `.c' file when run with `--jni --stubs'. Create
15017 correct output file name with `--jni'.
15018 (print_include): Mangle header name differently in JNI case.
15019 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
15021 (print_method_info): Handle JNI case. Put signature info into
15022 method name. Handle case when STREAM is NULL.
15023 (print_name_for_stub_or_jni): New function.
15024 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
15025 (print_cxx_classname): Handle JNI.
15026 (print_full_cxx_name): Likewise.
15027 (decode_signature_piece): Likewise.
15028 (overloaded_jni_method_exists_p): New function.
15029 (struct method_name): Added `signature' and `sig_length' fields.
15030 (HANDLE_END_FIELD): Do nothing in JNI mode.
15032 2000-02-02 Tom Tromey <tromey@cygnus.com>
15034 * jv-scan.c: Include version.c, <getopt.h>.
15035 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
15036 (options): New array.
15037 (usage): New function.
15038 (version): New function.
15039 (main): Use getopt_long to parse command line.
15040 * jcf-dump.c: Include version.c, <getopt.h>.
15041 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
15042 OPT_JAVAP): New macros.
15043 (options): New array.
15044 (usage): Return `void'. Changed message.
15045 (help): New function.
15046 (version): New function.
15047 (main): Use getopt_long_only to parse command line.
15048 * gjavah.c: Include <getopt.h>.
15049 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
15050 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
15051 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
15052 (options): New array.
15053 (java_no_argument): Removed.
15054 (help): Updated with missing options.
15055 (main): Use getopt_long_only to parse command line.
15056 (usage): Changed message.
15058 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15060 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
15061 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
15062 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
15063 * parse.y (array_creation_expression:): Handle anonymous arrays.
15064 (build_array_from_name): Don't set `ret_name' if null.
15065 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
15066 (qualify_ambiguous_name): Likewise.
15067 (java_complete_expand_class): Likewise.
15069 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15071 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
15072 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
15073 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
15074 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
15075 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
15076 AIPL_FUNCTION_COMPLETED_INVOCATION.
15077 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
15078 AIPL_FUNCTION_INVOCATION_READY.
15079 (AIPL_FUNCTION_DECLARATION): New enum entry.
15080 * parse.y (reorder_static_initialized): New function.
15081 (java_parser_context_pop_initialized_field): Use it.
15082 (add_inner_class_fields): Use
15083 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
15084 augmented. Install marker after last alias initializer, if any.
15085 (generate_finit): Fixed typo. Don't try to retain only the used
15087 (method_header): Compute and set DECL_FUNCTION_NAP.
15088 (method_declarator): Fixed comment. Insert alias initializer in
15090 (build_alias_initializer_parameter_list): Fixed leading
15091 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
15092 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
15093 (java_complete_expand_class): Code to retain only used aliases
15095 (java_complete_expand_methods): New local `first_decl'. Generate
15096 $finit$ first, then expand the constructors, regular methods and
15098 (java_complete_expand_method): Don't report error on missing
15099 return statement if previously detected bogus.
15100 (fix_constructors): Don't patch constructor parameters list.
15101 (patch_method_invocation): Use new AIPL enum values. Reverse
15102 alias initializer list for anonymous classes.
15104 2000-01-30 Anthony Green <green@redhat.com>
15106 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
15107 determine how many stack slots to pop.
15109 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15111 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15112 error handling/recovery.
15113 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15115 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15117 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
15118 FIELD_LOCAL_ALIAS_USED): New macros.
15119 (DECL_FUNCTION_NAP): New macro.
15120 (struct lang_decl): New field `nap'.
15121 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15122 (struct lang_type): New fields `finit_stmt_list' and
15123 `clinit_stmt_list'.
15124 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15125 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15126 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
15127 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
15128 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
15129 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
15130 (BUILD_THROW): Macro line separator re-indented.
15131 * parse.y (end_class_declaration): New function.
15132 (maybe_generate_pre_expand_clinit): New name for
15133 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15134 pre-expand static fields.
15135 (maybe_generate_clinit): Function deleted.
15136 (check_for_static_method_reference): Prototype's parameter list
15138 (generate_finit): New name for maybe_generate_finit. Changed
15139 leading comment. Function rewritten to use
15140 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
15141 (build_alias_initializer_parameter_list): New function.
15142 (java_parser_context_pop_initialized_field): Likewise.
15143 (add_inner_class_fields): Likewise.
15144 (type_declaration:): Call end_class_declaration.
15145 (class_member_declaration:): Likewise.
15146 (formal_parameter_list:): Fixed typos.
15147 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
15148 element. Improved error handling.
15149 (block_statement:): Call end_class_declaration.
15150 (anonymous_class_creation:): Likewise.
15151 (create_anonymous_class): Fixed comments.
15152 (create_class): Call add_inner_class_fields.
15153 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15154 (method_header): Use MARK_FINAL_PARMS.
15155 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15156 (method_declarator): Propagate final argument flag.
15157 (craft_constructor): New local `artificial'. Call
15158 build_alias_initializer_parameter_list. Use
15159 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
15160 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
15162 (complete_expand_class): Get rid of unused outer context local
15164 (java_complete_expand_methods): Fixed leading
15165 comment. Generate/pre-expand <clinit> first. Changed method
15166 expansion order to regular, $finit$, constructors, <clinit>.
15167 (java_complete_expand_method): Set current_function_decl.
15168 (fix_constructors): Fix constructor parameter list to account for
15169 outer context local alias initializers.
15170 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15171 (resolve_expression_name): Lookup outer context local aliases. New
15172 local `access', use it.
15173 (patch_method_invocation): Patch inner class ctor invocation with
15174 outer context local aliases initialization values. $finit$
15175 invocation patching now includes things generated with
15176 build_alias_initializer_parameter_list.
15177 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15178 (build_super_invocation): Likewise.
15179 (patch_assignment): Changed comment.
15181 2000-01-27 Andrew Haley <aph@cygnus.com>
15183 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15187 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15189 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15191 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15193 * parse.y (register_fields): Don't pass a format specifier to
15194 OBSOLETE_MODIFIER_WARNING.
15195 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15196 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15198 (check_modifiers): Change function into a macro.
15199 (check_class_interface_creation): Pass a literal format string.
15201 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15203 * buffer.h: PROTO -> PARAMS.
15204 * check-init.c: Likewise.
15205 * class.c: Likewise.
15206 * constants.c: Likewise.
15207 * convert.h: Likewise.
15208 * decl.c: Likewise.
15209 * except.c: Likewise.
15210 * expr.c: Likewise.
15211 * gjavah.c: Likewise.
15212 * java-except.h: Likewise.
15213 * java-tree.h: Likewise.
15214 * jcf-depend.c: Likewise.
15215 * jcf-dump.c: Likewise.
15216 * jcf-parse.c: Likewise.
15217 * jcf-path.c: Likewise.
15218 * jcf-reader.c: Likewise.
15219 * jcf-write.c: Likewise.
15221 * jv-scan.c: Likewise.
15222 * jvgenmain.c: Likewise.
15223 * jvspec.c: Likewise.
15224 * lang.c: Likewise.
15227 * parse-scan.y: Likewise.
15228 * parse.h: Likewise.
15229 * parse.y: Likewise.
15230 * typeck.c: Likewise.
15231 * verify.c: Likewise.
15232 * xref.c: Likewise.
15233 * xref.h: Likewise.
15234 * zextract.c: Likewise.
15235 * zipfile.h: Likewise.
15237 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15239 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15240 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15241 * constants.c (build_constant_data_ref): Check for cached
15242 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15243 in TYPE_CPOOL_DATE_REF.
15244 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15245 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15246 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15247 (LOCAL_FINAL): New macro.
15248 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15249 constant pool -- don't try to reuse.
15250 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15251 TYPE_LANG_SPECIFIC.
15252 (find_in_current_zip): Use TYPE_JCF.
15253 * parse.h (java_check_final): Prototype removed.
15254 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15255 (maybe_create_class_interface_decl,
15256 check_class_interface_creation): Likewise.
15257 (java_expand_finals): Function removed.
15258 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15259 (block_statement:): Fixed comment.
15260 (anonymous_class_creation:): Likewise.
15261 (check_class_interface_creation): Reversed Jan 12, 2000 extra
15263 (check_class_interface_creation): Loosened error report on (inner)
15264 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15265 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15266 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15268 (create_interface): Likewise.
15269 (anonymous_class_counter): New static global.
15270 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15271 patch. Fixed comments.
15272 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15273 anonymous_class_counter when declaring a toplevel class.
15274 (craft_constructor): Fixed constructor name when handling
15275 anonymous classes. Anonymous class constructors to feature hidden
15276 this$<n> parameter.
15277 (java_fix_constructors): Added comment.
15278 (java_check_final): Function removed.
15279 (java_complete_expand_methods): Fixed comment. Don't generate
15280 class data, save its outgoing constant pool instead.
15281 (verify_constructor_super): Skip anonymous class constructor
15282 hidden this$<n> parameter.
15283 (java_expand_classes): New local `saved_ctxp'. Removed call to
15284 java_expand_finals and java_check_final. Expand anonymous class
15285 constructors. Generate class data.
15286 (build_super_invocation): Skip anonymous class hidden this$<n>
15288 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15289 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15290 (set_java_signature): Likewise.
15292 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15294 * gjavah.c: Delete ACC_VISIBILITY define.
15295 * jcf.h: Add ACC_VISIBILITY define.
15296 * parse.y: final: rule tagged <value>.
15297 (java_check_regular_methods): Use ACC_VISIBILITY define for
15298 default package access check.
15299 (local_variable_declaration_statement): Use final: rule.
15301 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15303 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15304 (final:): New rule.
15306 2000-01-17 Tom Tromey <tromey@cygnus.com>
15308 * gjavah.c (print_field_info): Allow non-static final fields.
15310 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15312 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15313 * parse.y (patch_anonymous_class): New function.
15314 (create_anonymous_class): Register incomplete type when the
15315 class/interface to extends/implement isn't known yet.
15316 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15317 (verify_constructor_super): Tuned error message.
15319 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15321 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15322 (ANONYMOUS_CLASS_P): New macro.
15323 (TYPE_SIGNATURE, TYPE_JCF): New macros.
15324 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15325 * parse.y (create_class): Added leading argument.
15326 (maybe_create_class_interface_decl,
15327 check_class_interface_creation): Likewise.
15328 (craft_constructor): New function.
15329 (verify_constructor_super): Added argument in prototype.
15330 (class_declaration:): Inserted leading argument.
15331 (for_begin:): Use FOR_LOOP_P.
15332 (anonymous_class_creation): Create WFL of the anonymous class to
15333 instantiate. Call build_new_invocation. Added comments.
15334 (check_class_interface_creation): Handle parameter `anonymous' in
15335 verbose mode class creation announce.
15336 (link_nested_class_to_enclosing): Exclude anonymous classes.
15337 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15338 anonymous class, even though they appear to have an enclosing
15340 (create_interface): Pass extra argument to
15341 check_class_interface_creation.
15342 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15343 (create_class): Call check_class_interface_creation and
15344 maybe_create_class_interface_decl with extra new argument. Don't
15345 add private this$<n> to anonymous classes.
15346 (method_declarator): Insert hidden this$<n> to anonymous class
15348 (java_fix_constructors): Deleted code creating default
15349 constructor. Call craft_constructor instead.
15350 (java_check_regular_methods): Set `saw_constructor' to 1 for
15352 (fix_constructors): Pass extra argument to verify_constructor_super.
15353 (verify_constructor_super): New local `sdecl', use it. Search for
15354 matching constructor (possibly featuring arguments) in super
15356 (lookup_method_invoke): Craft constructor according to arguments
15357 list when dealing with anonymous class constructors.
15358 (build_super_invocation): Pass arguments to anonymous class super
15360 (search_loop): Use FOR_LOOP_P.
15361 (labeled_block_contains_loop_p): Likewise.
15363 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15365 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15366 (enclosing_context_p): New function.
15367 (get_access_flags_from_decl): Handle CLASS_STATIC.
15368 (maybe_layout_super_class): Extra first argument passed to
15370 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15372 * decl.c (access0_identifier_node): New global.
15373 (init_decl_processing): access0_identifier_node initialized.
15374 (pushdecl): Set DECL_CONTEXT only on non type decls.
15375 * expr.c (lookup_field): Lookup inner class fields in enclosing
15377 (expand_invoke): Use ID_INIT_P.
15378 (expand_java_field_op): Use DECL_CLINIT_P.
15379 * java-tree.def (CLASS_LITERAL): New tree code.
15380 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15381 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15382 (struct lang_decl): New field `inner_access'.
15383 (enclosing_context_p): Prototyped.
15384 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15385 ID_CLINIT_P): New macros.
15386 (CLASS_STATIC): New macro.
15387 (CLASS_ACCESS0_GENERATED_P): New macro.
15388 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15389 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15390 INNER_CLASS_P): New macros.
15391 (DECL_INNER_CLASS_LIST): New macro.
15392 * jcf-parse.c (yyparse): Avoid the use of ANSI string
15394 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15395 the shift value to int. Fixed typo in comment.
15396 * lex.c (inst_id, wpv_id): Initialize.
15397 * mangle.c (unicode_mangling_length): Take `$' into account.
15398 * parse.h (DRECOVER, RECOVER): Terminate properly.
15399 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15400 (typedef struct _jdep): New field `enclosing'.
15401 (JDEP_ENCLOSING): New macro.
15402 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15403 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15404 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15405 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15406 GET_ENCLOSING_CPC_CONTEXT): New macros.
15407 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15408 (do_resolve_class): Added extra argument in prototype.
15409 * parse.y (resolve_class): Added extra argument in prototype.
15410 (maybe_create_class_interface_decl): Likewise.
15411 (maybe_use_access_method, build_wfl_wrap): New functions.
15412 (java_complete_expand_classes, java_complete_expand_class):
15414 (java_parser_context_push_initialized_field,
15415 java_parser_context_suspend, java_parser_context_resume):
15417 (maybe_make_nested_class_name, make_nested_class_name,
15418 set_nested_class_simple_name_value,
15419 link_nested_class_to_enclosing, find_as_inner_class,
15420 find_as_inner_class_do, check_inner_class_redefinition,
15421 build_thisn_assign, build_current_thisn, build_access_to_thisn,
15422 maybe_build_thisn_access_method, build_outer_field_access,
15423 build_outer_field_access_methods, build_outer_field_access_expr,
15424 build_outer_method_access_method, build_new_access_id,
15425 build_outer_field_access_method, outer_field_access_p,
15426 outer_field_expanded_access_p, outer_field_access_fix,
15427 build_incomplete_class_ref, patch_incomplete_class_ref,
15428 create_anonymous_class): Likewise.
15429 (inst_id, wpv_id): New static global variables.
15430 (synchronized:): New rule, tagged <node>.
15431 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15433 (anonymous_class_creation:): New rule, tagged <node>.
15434 (NEW_TK): Tagged <node>.
15435 (type_literals, array_type_literal): New rules, tagged <node>.
15436 (class_declaration:): Removed action when reducing by class_body:
15437 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15438 using GET_CPC in sub-rules.
15439 (class_member_declaration): Handle inner classes.
15440 (method_declaration): When reducing method_header:, reset
15441 current_function_decl when appropriate.
15442 (method_declarator:): Set the number of formal parameter to 0 for
15443 method declared without arguments.
15444 (constructor_declarator:): Likewise.
15445 (static_initializer:): List of elements kept in a list.
15446 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15447 use of the keyword `static' for type declarations.
15448 (block_statement:): Handle inner class declarations.
15449 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15450 type qualified `this'.
15451 (class_instance_creation_expression): Use anonymous_class_creation:
15452 to handle inner class instances creation. Handle qualified `new'.
15453 (something_dot_new): Added appropriate actions.
15454 (create_new_parser_context): New function.
15455 (java_push_parser_context, java_parser_context_save_global,
15456 java_parser_context_suspend): Use create_new_parser_context.
15457 (check_modifiers): Changed leading comment.
15458 (check_class_interface_creation): Handle interclasses.
15459 (add_superinterfaces): Fixed comment.
15460 (create_interface): Build qualified name from the raw_name instead
15461 of its matching WFL. Push the initialized fields list. raw_name added
15462 as an extra argument to maybe_create_class_interface_decl.
15463 (create_class): Build qualified name from the raw_name instead of
15464 its matching WFL. Removed assignment to current_parsed_class_un.
15465 Call PUSH_ERROR before returning an error. Suspend the current
15466 parser context when processing an inner class. Push the
15467 initialized fields list. raw_name added as an extra argument to
15468 maybe_create_class_interface_decl. Add the private this$<n>
15470 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15471 (register_fields): Get the class type from GET_CPC and handle
15472 previous errors. Added code to handle the creation of static
15473 fields in inner classes. Initialized fields initialization
15474 statements kept in a list of lists.
15475 (maybe_generate_finit): Initialized fields initialization
15476 statements kept in a list of lists. Use GET_CPC.
15477 (maybe_generate_clinit): Likewise.
15478 (method_header): Use GET_CPC and GET_CPC_UN.
15479 (parser_qualified_classname): Handle inner classes.
15480 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15481 (java_fix_constructors): Hide pointer to enclosing context
15482 instance in constructor list when dealing with inner classes.
15483 (jdep_resolve_class): Call resolve_class with extra first argument
15485 (resolve_class): Add enclosing context as a first extra argument
15486 to do_resolve_class.
15487 (do_resolve_class): Call find_as_inner_class. Handle WFLs
15489 (resolve_no_layout): Extra argument added to resolve_class
15491 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15492 (java_get_real_method_name): Use GET_CPC_UN.
15493 (check_abstract_method_definitions): Use DECL_CLINIT_P.
15494 (java_check_abstract_methods): Handle static method declared in
15495 inner classes by an error.
15496 (java_check_regular_methods): Use DECL_CLINIT_P.
15497 (source_start_java_method): Also set DECL_MAX_LOCALS.
15498 (create_artificial_method): Call java_parser_context_save_global
15499 and java_parser_context_restore_global instead of saving/restoring
15500 the context by hand.
15501 (expand_start_java_method): Improved verbose mode message.
15502 (java_complete_expand_methods): Fixed leading comment. Use
15504 (fix_constructors): Added assignment to this$<n> if necessary.
15505 (java_expand_classes): Call java_complete_expand_classes instead
15506 of java_complete_expand_methods.
15507 (make_qualified_primary): Simplified.
15508 (merge_qualified_name): Optimized for missing left or right parts.
15509 (resolve_expression_name): Handle access to outer class fields from
15511 (resolve_qualified_expression_name): New macro
15512 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15513 classes. Report error on non appropriate qualification of
15514 `new'. Handle qualified `this'.
15515 (not_accessible_p): Allow access to outer class private fields from
15517 (patch_method_invocation): Handle method invocations through
15518 access methods and inner class constructor invocations.
15519 (find_applicable_accessible_methods_list): Search enclosing
15520 contexts of an inner class.
15521 (search_applicable_methods_list): Fixed typo.
15522 (argument_types_convertible): Handle inner class constructors'
15523 hidden outer context reference argument.
15524 (qualify_ambiguous_name): Handle qualified `this'.
15525 (java_complete_lhs): Handle use of field accessed through
15526 artificial access methods in various cases of assignments. Handle
15527 CLASS_LITERAL node.
15528 (check_final_assignment): Use DECL_CLINIT_P.
15529 (valid_ref_assignconv_cast_p): Handle the destination being an
15530 enclosing context of the source.
15531 (patch_unaryop): Handle use of field accessed through artificial
15533 (patch_return): Use DECL_CLINIT_P.
15534 (patch_throw_statement): Use DECL_CLINIT_P.
15535 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15536 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15539 2000-01-16 Anthony Green <green@cygnus.com>
15541 * parse.y (build_string_concatenation): Only use
15542 StringBuffer(String) shortcut if String arg is constant.
15544 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15546 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15547 the shift value to int. Fixed typo in comment.
15549 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15551 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15552 * jcf-write.c: Likewise.
15553 * parse.y: Likewise.
15554 * parse.c: Regenerate.
15556 2000-01-09 Anthony Green <green@cygnus.com>
15558 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15559 bytecodes in the correct order.
15561 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15563 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15565 2000-01-06 Anthony Green <green@cygnus.com>
15567 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15568 before building constant array decl.
15570 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15572 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15573 method invocation and typo in conditional expression.
15574 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15575 the appropriate NOTE_POP.
15576 * parse.y (patch_binop): Shift value mask to feature the right
15579 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15581 * class.c (assume_compiled, assume_compiled_node): Add static
15583 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15585 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15587 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15589 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15590 to `__modifier' to avoid stringifying it.
15592 * parse.y (verify_constructor_circularity): Don't call a variadic
15593 function with a non-literal format string.
15594 (java_check_abstract_methods): Move unreachable code inside
15595 `continue' statement.
15596 (lookup_method_invoke): Call xstrdup, not strdup.
15598 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15601 * jcf-parse.c (yyparse): Likewise.
15603 * jv-scan.c (main): Likewise.
15605 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15607 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15608 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15609 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15612 * parse.y (synchronized, variable_redefinition_error,
15613 check_class_interface_creation, create_interface, create_class,
15614 method_header, finish_method_declaration,
15615 check_modifiers_consistency, method_declarator,
15616 complete_class_report_errors, check_abstract_method_definitions,
15617 java_check_regular_methods, check_throws_clauses,
15618 java_check_abstract_methods, read_import_dir,
15619 check_pkg_class_access, declare_local_variables, fix_constructors,
15620 cut_identifier_in_qualified, resolve_expression_name,
15621 resolve_qualified_expression_name, patch_method_invocation,
15622 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15623 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15624 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15625 patch_try_statement, patch_synchronized_statement,
15626 patch_throw_statement, check_thrown_exceptions,
15627 patch_conditional_expr): Likewise.
15629 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15631 * Makefile.in (LIBDEPS): Added gcc's errors.o
15632 (../jcf-dump$(exeext):): Link with gcc's errors.o
15633 (../gcjh$(exeext):): Likewise.
15634 * expr.c (expand_java_NEW): Layout the entire target type instead of
15635 laying out its methods only.
15636 (lookup_field): Layout the class after having loaded it.
15637 * java-tree.h (java_debug_context): Declared.
15638 * jcf-io.c (toplev.h): Included.
15639 (find_class): Removed assignment to jcf's outofsynch
15640 field. Force source file to be read if newer than its matching
15641 class file. Tweaked debug messages.
15642 * jcf-parse.c (jcf_out_of_synch): Deleted.
15643 (read_class): Call to jcf_out_of_synch removed.
15644 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15645 (jcf_out_of_synch): Prototype deleted.
15646 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15647 `deprecated' and `class_err': integer turned into bit-fields.
15648 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15649 * parse.y (package_list): New global.
15650 (package_declaration:): Record newly parsed package name.
15651 (extra_ctxp_pushed_p): Static global deleted.
15652 (java_parser_context_save_global): Create buffer context for the
15653 purpose of saving globals, if necessary.
15654 (java_parser_context_restore_global): Pop context pushed for the
15655 purpose of saving globals, if necessary.
15656 (java_debug_context_do): New prototype and function.
15657 (java_debug_context): Likewise.
15658 (do_resolve_class): Use already parsed package names to qualify
15659 and lookup class candidate.
15660 (java_pre_expand_clinit): Removed unnecessary local variable.
15662 1999-12-17 Tom Tromey <tromey@cygnus.com>
15664 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15666 (process_file): Use `\n\' at end of each line in string.
15668 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15670 * expr.c (expand_invoke): Layout the loaded class before
15671 attempting to use it.
15672 (expand_java_field_op): Allow final field assignments to take
15674 * typeck.c (convert): Return error_mark_node if expr is null.
15676 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15678 * class.c (class_depth): Return -1 if the class doesn't load
15680 * expr.c (can_widen_reference_to): Check for errors during depth
15681 computation and return 0 accordingly.
15682 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15683 create default constructors and add an other error check.
15684 * parse.h (java_fix_constructors): Prototyped.
15685 * parse.y (java_pre_expand_clinit): Likewise.
15686 (build_super_invocation): Re-prototyped to feature one argument.
15687 (java_check_circular_reference): Directly use `current'.
15688 (java_fix_constructors): New function.
15689 (java_check_regular_methods): Don't create default constructors
15690 here, but abort if none were found.
15691 (java_complete_expand_methods): Pre-process <clinit> calling
15692 java_pre_expand_clinit.
15693 (java_pre_expand_clinit): New function.
15694 (fix_constructors): build_super_invocation invoked with the
15695 current method declaration as an argument.
15696 (build_super_invocation): Use the context of the processed method
15697 decl argument instead of current_class.
15698 * typeck.c (lookup_java_method): Take WFLs in method names into
15701 1999-12-14 Per Bothner <per@bothner.com>
15703 * class.c (make_class_data): flag_keep_inline_functions to keep
15704 private methods in the method array.
15706 1999-12-15 Anthony Green <green@cygnus.com>
15708 * check-init.c (check_init): Take into account both types of
15709 `throw's when checking for uninitialized variables.
15711 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15713 * parse.y (java_complete_lhs): Force conversion of array
15714 dimensions to int_type_node, that's what runtime's ABI expects.
15716 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15718 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15719 operand of a WFL, until the Java front-end gets fixed with regard
15720 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15722 1999-12-10 Andrew Haley <aph@cygnus.com>
15724 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15725 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15726 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15727 java-tree.h: Ditto.
15728 jcf-write.c: Ditto.
15730 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15732 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15733 before calling expand_eh_region_start and expand_start_all_catch.
15734 * except.c (expand_start_java_handler): Switch to permanent
15735 obstack before calling expand_eh_region_start.
15736 (expand_end_java_handler): Switch to permanent obstack before
15737 calling expand_start_all_catch.
15739 1999-12-5 Anthony Green <green@cygnus.com>
15741 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15742 function with side effects.
15743 (init_decl_processing): Mark all memory allocating DECLs with
15746 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15748 * except.c (expand_end_java_handler): Call
15749 expand_resume_after_catch and end_catch_handler.
15751 1999-11-30 Anthony Green <green@cygnus.com>
15753 * verify.c (verify_jvm_instructions): Create new return label
15754 chain if non existent (don't rely on the verified state of the jsr
15757 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15759 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15760 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15762 * parse.y (patch_assignment): Removed bogus final class test on
15763 lhs when checking on whether to emit an ArrayStoreException runtime
15765 * expr.c (expand_java_arraystore): Likewise.
15767 1999-11-28 Anthony Green <green@cygnus.com>
15769 * decl.c (find_local_variable): Reuse single slot decls when
15772 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15774 * jcf-parse.c (saw_java_source): Global variable removed.
15775 (read_class): Don't use `saw_java_source'. Added extra braces.
15776 (yyparse): Code setting `saw_java_source' removed.
15778 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15780 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15782 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15784 * verify.c (merge_type_state): Non verified subroutines being
15785 considered more than once to trigger passive type merge.
15787 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15789 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15790 in case of error. Error message tuned.
15792 1999-11-21 Anthony Green <green@cygnus.com>
15794 * constants.c (find_methodref_index): Unwrap method names before
15795 inserting them in the constant pool.
15797 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15799 * class.c (assume_compiled_node): New typedef.
15800 (assume_compiled_tree): New static data.
15801 (find_assume_compiled_node): New function.
15802 (add_assume_compiled): New function.
15803 (assume_compiled): New function.
15804 * class.c (make_class_data): Use assume_compiled.
15805 (is_compiled_class): Use assume_compiled.
15807 * java-tree.h (add_assume_compiled): Declare.
15809 * lang.c (lang_decode_option): Parse new options.
15811 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15813 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15814 int_type_node: that's what `_Jv_AllocObject' expects.
15816 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15818 * parse.y (lookup_method_invoke): Use lang_printable_name to
15819 reliably build the type name during error report. Fixes PR gcj/97.
15821 1999-11-09 Tom Tromey <tromey@cygnus.com>
15823 * jcf-path.c: Include <sys/stat.h>.
15824 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15825 (DIR_UP): New macro.
15827 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15829 * parse.y (source_end_java_method): Resume permanent allocation,
15830 reversing Apr 27 1998 patch.
15831 (patch_string_cst): Pop obstacks after having pushed the permanent
15834 1999-11-05 Tom Tromey <tromey@cygnus.com>
15836 * class.c (finish_class): Emit inlined methods if any native
15837 methods exist in the class. Fixes PR gcj/85.
15839 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15841 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15842 (qualify_ambiguous_name): Likewise.
15844 1999-11-03 Godmar Back <gback@cs.utah.edu>
15846 * typeck.c: (lookup_java_method): search all inherited
15847 interfaces when looking up interface method.
15849 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15851 * parse.y (method_header:): Issue error message for rule `type
15853 (synchronized:): Error report when not using synchronized.
15855 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15857 * parse.y (resolve_qualified_expression_name): Prevent `this' from
15858 being used before the superclass constructor has been called.
15859 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15860 instead of `CALL_THIS_CONSTRUCTOR_P'.
15862 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
15864 * check-init.c: Fix typo in comment.
15866 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15868 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15871 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15873 * parse.y (expression_statement:): Call function to report
15874 improper invocation of a constructor.
15875 (parse_ctor_invocation_error): New function.
15877 1999-10-26 Mark Mitchell <mark@codesourcery.com>
15879 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15882 1999-10-21 Tom Tromey <tromey@cygnus.com>
15884 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15885 in generated `main'.
15887 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15889 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15890 (qualify_ambiguous_name): Likewise.
15892 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15894 * parse.y (java_complete_tree): fold_constant_for_init to work on
15896 (java_complete_lhs): Likewise.
15897 (array_constructor_check_entry): Complete an initializer element
15898 on permanent_obstack.
15900 1999-10-19 Tom Tromey <tromey@cygnus.com>
15902 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15903 From Mike Moreton <mike@pillim.demon.co.uk>.
15905 1999-10-15 Greg McGary <gkm@gnu.org>
15907 * java-tree.h (flag_bounds_check): Remove extern decl.
15908 * lang.c (flag_bounds_check): Remove global variable.
15909 (lang_f_options): Remove "bounds-check" entry.
15910 (lang_init_options): Default flag_bounds_check to "on".
15912 1999-10-14 Tom Tromey <tromey@cygnus.com>
15914 * jvgenmain.c (usage): New function.
15915 (main): Use it. Also, handle `-D' options.
15916 * jvspec.c (lang_specific_driver): Recognize -D.
15917 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15919 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15921 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15923 * jcf-dump.c (print_constant, disassemble_method): Don't call a
15924 variadic function with a non-literal format string.
15926 * parse-scan.y (report_main_declaration): Likewise.
15928 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15930 * parse.y (read_import_dir, patch_assignment, patch_binop,
15931 patch_array_ref): Likewise.
15933 * typeck.c (build_java_array_type): Likewise.
15935 * verify.c (verify_jvm_instructions): Likewise.
15937 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15939 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15941 1999-10-07 Anthony Green <green@cygnus.com>
15943 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15944 where CHECK_PUT may fail for valid reasons.
15946 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15947 UNSAFE_PUTN): New macros.
15949 1999-10-04 Tom Tromey <tromey@cygnus.com>
15951 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15952 well. Fixes Java PR gcj/59.
15953 * parse-scan.y (yyerror): Report errors.
15955 1999-09-24 Glenn Chambers <GChambers@provsol.com>
15957 * decl.c (insert_block): Remove unconditional `abort'.
15959 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
15961 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
15962 FUNCTION_CODE now of type int. All callers changed.
15963 Set the builtin's DECL_BUILT_IN_CLASS.
15965 1999-09-23 Tom Tromey <tromey@cygnus.com>
15967 * jvspec.c (lang_specific_driver): Don't read spec file if
15968 -fsyntax-only given.
15970 1999-09-22 Tom Tromey <tromey@cygnus.com>
15972 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15974 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15975 (WORDS_TO_LONG): Likewise.
15976 (WORDS_TO_DOUBLE): Likewise.
15978 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15980 * jcf-write.c (RELOCATION_VALUE_0): New macro.
15981 (RELOCATION_VALUE_1): Likewise.
15982 (emit_iinc, emit_reloc, push_constant1, push_constant2,
15983 push_in_const, push_long_const): Prototyped.
15984 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15985 (push_constant2): Likewise.
15986 (push_int_const): Cast find_constant1's integer arguments to `jword'.
15987 (find_constant_wide): Cast find_constant2's integer arguments to
15989 (find_constant_index): Cast find_constant2's and find_constant2's
15990 integer arguments to `jword'.
15991 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15992 (emit_switch_reloc): Use RELOCATION_VALUE_0.
15993 (emit_if): Use RELOCATION_VALUE_1.
15994 (emit_goto): Likewise.
15995 (emit_jsr): Likewise.
15996 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15997 argument to push_long_const to HOST_WIDE_INT.
15999 1999-09-15 Andreas Schwab <schwab@suse.de>
16001 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
16003 1999-09-20 Nick Clifton <nickc@cygnus.com>
16005 * lang.c (lang_decode_option): Extend comment.
16007 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16009 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
16012 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16014 * gjavah.c (get_field_name, print_method_info, print_include,
16015 add_namelet): Use xmalloc, not malloc.
16017 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
16018 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
16021 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
16023 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
16025 * jcf-path.c (add_entry): Likewise.
16027 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
16029 * jv-scan.c (xmalloc): Remove definition.
16031 * jvgenmain.c (xmalloc): Likewise.
16033 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
16035 * lex.c (java_store_unicode): Use xrealloc, not realloc.
16037 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
16038 concat, not xmalloc/sprintf.
16039 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
16040 (xstrdup): Remove definition.
16042 * parse.y (duplicate_declaration_error_p,
16043 constructor_circularity_msg, verify_constructor_circularity,
16044 check_abstract_method_definitions, java_check_regular_methods,
16045 java_check_abstract_methods, patch_method_invocation,
16046 check_for_static_method_reference, patch_assignment, patch_binop,
16047 patch_cast, array_constructor_check_entry, patch_return,
16048 patch_conditional_expr): Use xstrdup, not strdup.
16050 * zextract.c (ALLOC): Use xmalloc, not malloc.
16052 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16054 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
16056 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
16057 (do_spec, lang_specific_pre_link, lang_specific_driver,
16058 input_filename, input_filename_length): Don't declare.
16059 (main_class_name, jvgenmain_spec, lang_specific_driver):
16061 (lang_specific_driver): All calls to the function pointer
16062 parameter now explicitly call `fatal'.
16064 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16066 * parse.y (find_applicable_accessible_methods_list): Search
16067 abstract classes as interfaces.
16069 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16071 * class.c (finish_class): We're now outside a valid method
16072 declaration. Tell the rest of gcc so.
16074 1999-09-08 Bruce Korb autogen@linuxbox.com
16076 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
16078 1999-09-07 Tom Tromey <tromey@cygnus.com>
16080 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
16082 (decode_signature_piece): Don't emit "::" in JArray<>.
16083 (print_namelet): Only print trailing `;' when printing a class.
16085 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
16087 * java-tree.h: Delete declarations for all tree nodes now moved to
16089 * decl.c: Delete their definitions.
16091 1999-09-04 Mark Mitchell <mark@codesourcery.com>
16093 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
16094 * Makefile.in (OBJS): Add ggc-callbacks.o.
16095 (OBJDEPS): Likewise.
16097 1999-09-03 Tom Tromey <tromey@cygnus.com>
16099 * parse.y (strip_out_static_field_access_decl): Return operand if
16100 it satisfies JDECL_P.
16102 1999-09-02 Tom Tromey <tromey@cygnus.com>
16104 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
16105 Handle nested arrays, like `[[I'.
16107 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16109 * class.c (finish_class): Remove unused parameter, all callers
16112 * expr.c (build_java_athrow): Change return type to void.
16113 (java_lang_expand_expr): Make sure each case in switch returns a
16116 * java-tree.h (finish_class): Fix prototype to take void args.
16118 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16119 (main): Issue return from main, not exit.
16121 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16123 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16125 * jv-scan.c (main): Issue return from main, not exit.
16127 * parse.y (check_abstract_method_definitions,
16128 java_check_abstract_method_definitions): Add static prototypes.
16129 (java_complete_expand_methods): Fix call to `finish_class'.
16131 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16134 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16136 * lang.c (language_string): Constify.
16138 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16140 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16141 Remove hacks for stuff which comes from libiberty.
16143 * Make-lang.in: Likewise.
16145 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
16147 * Makefile.in (xref.o): Depend on xref.c explicitly.
16149 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16151 * java-tree.h (lang_printable_name): Constify a char*.
16153 * lang.c (lang_printable_name): Likewise.
16155 1999-08-27 Jeffrey A Law (law@cygnus.com)
16157 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16158 comments in C code.
16160 1999-08-26 Tom Tromey <tromey@cygnus.com>
16162 * gjavah.c (print_cxx_classname): Print "::" before qualified
16165 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16167 * parse.y (lookup_cl): Changed leading comment. Now does its best
16168 to set the column number.
16169 (qualify_ambiguous_name): Take WFL wrappers into account.
16171 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
16173 * verify.c (verify_jvm_instructions): Don't check instruction
16174 validity beyond end of method.
16176 1999-08-25 Tom Tromey <tromey@cygnus.com>
16178 * jvspec.c (lang_specific_driver): Correctly handle --help again.
16180 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16182 * gjavah.c (print_name, print_base_classname, utf8_cmp,
16183 cxx_keyword_subst, generate_access, name_is_method_p,
16184 get_field_name, print_field_name, super_class_name, print_include,
16185 decode_signature_piece, print_class_decls, usage, help,
16186 java_no_argument, version, add_namelet, print_namelet): Add static
16188 (print_base_classname, utf8_cmp, cxx_keyword_subst,
16189 name_is_method_p): Constify a char*.
16190 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
16191 Provide a final else clause in an if-else-if.
16192 (print_field_info): Add missing final arg in function call to
16193 `print_field_name'.
16194 (print_method_info, decompile_method, decode_signature_piece,
16195 print_c_decl, print_full_cxx_name, print_stub,
16196 print_mangled_classname, super_class_name, print_include,
16197 add_namelet, add_class_decl, print_class_decls, process_file,
16198 help): Constify a char*.
16200 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16201 push_int_const, find_constant_wide, find_constant_index,
16202 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16203 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16204 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16205 emit_if, emit_goto, emit_jsr, call_cleanups,
16206 make_class_file_name): Add static prototypes.
16207 (generate_bytecode_return, generate_bytecode_insns): Pass a
16208 NULL_PTR, not a NULL_TREE.
16210 * jv-scan.c: Include "jcf.h".
16211 (main): Declare using DEFUN macro.
16213 * jvspec.c (find_spec_file, lang_specific_pre_link,
16214 lang_specific_driver): Add prototypes.
16215 (find_spec_file): Constify a char*.
16217 * keyword.gperf (hash, java_keyword): Add prototypes.
16219 * lang.c (lang_print_error): Add static prototype.
16220 (lang_init): Prefer memcpy over bcopy to avoid casts.
16222 * lex.c (yylex): Add static prototype.
16224 * parse-scan.y: Include "lex.c" earlier.
16226 * parse.h: Remove redundant declaration for `yylex'.
16228 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16229 labeled_block_contains_loop_p): Add static prototypes.
16230 (not_accessible_p): Make static to match prototype.
16232 * verify.c (start_pc_cmp): Don't needlessly cast away const.
16234 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16236 * parse.y (check_method_redefinition): Changed leading comment.
16237 (check_abstract_method_definitions): New function.
16238 (java_check_abstract_method_definitions): New function.
16239 (java_check_regular_methods): Call it.
16240 (verify_constructor_super): Fixed indentation.
16241 (lookup_method_invoke): Likewise.
16243 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16245 * parse.y (method_header): Return a null pointer if the current
16246 class node is null.
16247 (finish_method_declaration): Return if the current function decl
16249 (source_start_java_method): Likewise.
16250 (java_method_add_stmt): Likewise.
16252 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16254 * class.c (emit_register_class): Removed unnecessary call to
16256 * parse.y (labeled_block_contains_loop_p): Removed unused local
16259 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16261 * parse.y (java_refold): Added prototype.
16263 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16265 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16266 (java_stabilize_reference): Removed unnecessary `else'.
16267 (java_complete_lhs): Set flag to remember boolean. Call
16268 java_refold. Added comments.
16269 (java_decl_equiv): New function.
16270 (binop_compound_p): Likewise.
16271 (java_refold): Likewise.
16272 (patch_unaryop): Striped static field access assigned to decl and
16273 op. Changed promotion scheme for ++/-- operators.
16274 (search_loop): New function.
16275 (labeled_block_contains_loop_p): Likewise.
16276 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16278 (patch_bc_statement): Call search_loop. Fixed comment.
16280 1999-08-14 Anthony Green <green@cygnus.com>
16282 * expr.c (java_lang_expand_expr): Mark static array data as
16285 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
16287 * jvgenmain.c (main): NUL-terminate name_obstack.
16289 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16291 * check-init.c (check_bool2_init, done_alternative): Add static
16294 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16295 (add_method, build_utf8_ref, build_class_ref,
16296 append_gpp_mangled_type, layout_class_method): Constify a char*.
16298 * decl.c (push_promoted_type, make_binding_level): Add static
16300 (push_promoted_type, pushdecl): Constify a char*.
16302 * except.c (find_handler_in_range, link_handler,
16303 check_start_handlers): Add static prototypes.
16305 * expr.c (process_jvm_instruction): Constify a char*.
16307 * gjavah.c (main): Constify a char*.
16309 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16312 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16314 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16315 munge, print_ents): Constify a char*.
16317 * jcf-dump.c (disassemble_method): Constify a char*.
16318 (print_constant_pool, print_exception_table): Add static prototypes.
16319 (print_constant, print_exception_table, main, disassemble_method):
16322 * jcf-io.c (find_classfile, find_class): Likewise.
16324 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16325 (set_source_filename, predefined_filename_p): Add static prototypes.
16326 (set_source_filename, get_constant, get_class_constant,
16327 find_in_current_zip): Constify a char*.
16329 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16331 (add_entry, add_path, jcf_path_classpath_arg,
16332 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16334 * jcf-reader.c (get_attribute, jcf_parse_preamble,
16335 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16336 jcf_parse_one_method, jcf_parse_methods,
16337 jcf_parse_final_attributes): Add static prototypes.
16338 (get_attribute): Constify a char*.
16340 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16341 jcf_dependency_add_target, jcf_path_classpath_arg,
16342 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16344 * jv-scan.c (main): Constify a char*.
16345 (gcc_obstack_init): Add prototype arguments.
16347 * jvgenmain.c (gcc_obstack_init): Likewise.
16348 (main): Constify a char*.
16350 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16352 (put_decl_string, lang_print_error): Constify a char*.
16353 (lang_init): Remove redundant extern prototype.
16355 * mangle.c (emit_unicode_mangled_name): Constify a char*.
16357 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16358 Add static prototypes.
16359 (get_type_from_signature): Constify a char*.
16361 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16362 Add static prototypes.
16363 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16364 (verify_jvm_instructions): Constify a char*.
16366 * xref.c (xref_flag_value): Likewise.
16368 * xref.h (xref_flag_value): Likewise.
16370 * zextract.c (makeword, makelong): Add static prototypes.
16371 (makeword, makelong): Constify a uch*.
16373 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16375 * lang.c (java_dummy_print): Constify a char*.
16376 (lang_print_error): Likewise.
16377 (lang_init): Remove redundant prototype for `print_error_function'.
16378 (lang_init_source): Likewise.
16379 (lang_identify): Constify a char*.
16381 1999-08-09 Tom Tromey <tromey@cygnus.com>
16383 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16384 (WORDS_TO_LONG): Likewise.
16385 (WORDS_TO_DOUBLE): Likewise.
16387 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16389 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16391 * expr.c (java_stack_pop, java_array_data_offset,
16392 build_java_throw_out_of_bounds_exception, case_identity,
16393 build_java_check_indexed_type): Add static prototypes.
16394 (linenumber_table, expand_invoke, expand_java_field_op,
16395 build_primtype_type_ref, expand_byte_code): Constify a char*.
16397 * java-tree.h (build_primtype_type_ref, linenumber_table):
16399 (java_lang_expand_expr): Add prototype.
16401 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
16402 `java_lang_expand_expr'.
16404 * lex.c (java_lex_error): Constify a char*.
16405 (java_get_unicode, java_read_char, java_allocate_new_line,
16406 java_unget_unicode, java_sneak_unicode): Prototype.
16408 * parse-scan.y (current_class, package_name, method_declarator,
16409 report_class_declaration, yyerror): Constify a char*.
16411 * parse.h (java_report_errors): Prototype.
16412 (yyerror): Constify a char*.
16414 * parse.y (classitf_redefinition_error, check_modifiers,
16415 parse_jdk1_1_error, lookup_package_type,
16416 lookup_package_type_and_set_next, get_printable_method_name,
16417 purify_type_name): Constify a char*.
16418 (build_super_invocation, maybe_generate_finit,
16419 verify_constructor_super, parser_add_interface,
16420 add_superinterfaces, jdep_resolve_class, note_possible_classname,
16421 java_complete_expand_methods, java_expand_finals,
16422 cut_identifier_in_qualified, java_stabilize_reference,
16423 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16424 merge_string_cste): Prototype.
16425 (single_type_import_declaration, yyerror,
16426 variable_redefinition_error, build_array_from_name,
16427 build_unresolved_array_type, check_class_interface_creation,
16428 resolve_class, complete_class_report_errors,
16429 note_possible_classname, read_import_dir,
16430 find_in_imports_on_demand, resolve_package, fix_constructors,
16431 check_deprecation, lookup_method_invoke,
16432 maybe_build_primttype_type_ref, array_constructor_check_entry):
16434 (java_complete_expand_methods, java_expand_finals): Make static.
16435 (convert_narrow): Remove static prototype.
16437 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
16439 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16441 1999-08-02 Richard Henderson <rth@cygnus.com>
16443 * decl.c: Include defaults.h instead of expr.h.
16444 * parse.y: Likewise.
16446 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
16448 * java/decl.c (start_java_method): Change all uses of
16449 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16450 Ensure expr.h is included.
16451 * java/expr.c (pop_arguments): Ditto.
16452 * java/parse.y (expand_start_java_method): Ditto.
16454 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16456 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16458 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
16460 * decl.c: Include "function.h".
16461 * except.c: Likewise.
16462 * parse.y: Likewise.
16463 * Makefile.in: Update dependencies.
16465 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16467 * expr.c (build_java_soft_divmod): Provide a default case in switch.
16468 (java_lang_expand_expr): Mark parameters `target', `tmode' and
16469 `modifier' with ATTRIBUTE_UNUSED.
16471 * gjavah.c (process_file): Add braces around ambiguous `else'.
16473 * jcf-dump.c (print_access_flags, localvar_free): Change return
16476 * parse.y (java_complete_expand_method): Initialize variable
16478 (resolve_qualified_expression_name): Likewise for `field_decl'.
16479 (patch_method_invocation): Likewise for `class_to_search'.
16480 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16481 (patch_assignment): Likewise for `lhs_type'.
16483 * verify.c (verify_jvm_instructions): Remove unused variable
16486 1999-07-25 Richard Henderson <rth@cygnus.com>
16488 * decl.c (va_list_type_node): New.
16490 1999-07-25 Anthony Green <green@cygnus.com>
16492 * gjavah.c (print_stub): New function.
16493 (METHOD_IS_NATIVE): New macro.
16494 (print_mangled_classname): Make static.
16495 (HANDLE_END_FIELD): Don't emit fields during stub generation.
16496 (process_file): Perform stub generation.
16497 (HANDLE_METHOD): Don't emit class decls during stub
16499 (HANDLE_END_METHOD): Take into account stub generation.
16500 (print_method_info): Handle stub generation.
16501 (print_stub): New function.
16502 (print_cxx_classname): Make signature consistant with others.
16503 (help): Describe -stubs option.
16504 (main): Create stub file.
16505 (version): Use version.c.
16506 (print_full_cxx_name): New function.
16507 (print_c_decl): Use print_full_cxx_name.
16509 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16511 * check-init.c (check_init): Handle MAX_EXPR.
16513 1999-07-15 Andrew Haley <aph@cygnus.com>
16515 * lang.c (flag_use_divide_subroutine): New variable.
16516 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16517 fp-to-integer conversion.
16518 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16521 * expr.c (build_java_soft_divmod): New function.
16522 (build_java_binop): Call build_java_soft_divmod if
16523 flag_use_divide_subroutine is set.
16524 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16525 soft_lrem_node: new builtin functions.
16526 (init_decl_processing) Initialize the new builtins.
16527 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16528 soft_lrem_node: new builtin functions.
16529 (build_java_soft_divmod): New function.
16530 * parse.y: Call build_java_soft_divmod if
16531 flag_use_divide_subroutine is set.
16532 * parse.c: Rebuilt.
16534 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16535 a --specs= arg) even if not linking.
16536 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16537 -fuse-divide-subroutine
16539 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16541 * parse.y (resolve_and_layout): Check methods only once.
16542 (resolve_qualified_expression_name): Verify thrown exceptions
16544 (check_thrown_exceptions): Reject exceptions thrown in
16545 initializer. Error message tuned.
16547 1999-07-14 Andrew Haley <aph@cygnus.com>
16549 * expr.c (expand_expr): Do not return the last statement in a
16550 block as the block's value.
16552 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16554 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16555 CALL_EXPR, to avoid order of evaluation changes.
16557 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16559 * parse.y (qualify_ambiguous_name): Do not use
16560 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16562 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16564 * check-init.c (check_init): Handle MAX_EXPR.
16565 * expr.c (force_evaluation_order): Force method call arguments to
16566 be evaluated in left-to-right order.
16567 * parse.y (qualify_ambiguous_name): Loop again to qualify
16568 NEW_ARRAY_EXPR properly.
16570 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16572 * parse.y (patch_invoke): Resolve unresolved invoked method
16574 (qualify_ambiguous_name): STRING_CST to qualify expression for
16575 type name resolution.
16577 1999-06-24 Andrew Haley <aph@cygnus.com>
16579 * class.c (finish_class): Whenever a deferred method is
16580 output, rescan the list of methods to see if a new candidate for
16581 output can be found.
16583 1999-06-28 Tom Tromey <tromey@cygnus.com>
16585 * jvspec.c (lang_specific_driver): Recognize --help.
16587 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16589 * parse.y (resolve_package): Fixed bogus return statement.
16590 (patch_method_invocation): Resolve method invocation beginning with
16591 a package name qualifier.
16593 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16595 * Make-lang.in (java.stage1): Depend on stage1-start.
16596 (java.stage2): Likewise for stage2-start.
16597 (java.stage3): Likewise for stage3-start.
16598 (java.stage4): Likewise for stage4-start.
16600 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16602 * parse.y (java_complete_lhs): When doing cross referencing, don't
16603 try to keep file location on a WFL expanded as a CALL_EXPR.
16605 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16607 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16608 compiling to class file a void method with an empty method body.
16609 As a side effect, the bytecode backend will generate the
16610 appropriate `return' instruction.
16612 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16614 * parse.y (lookup_package_type_and_set_next): New function prototype.
16615 (resolve_package): Search current and imported packages.
16616 (lookup_package_type_and_set_next): New function.
16618 1999-06-22 Andrew Haley <aph@cygnus.com>
16620 * verify.c (verify_jvm_instructions): Check for pending blocks
16621 before invalid PC test and opcode switch, not after.
16623 1999-06-21 Andrew Haley <aph@cygnus.com>
16625 * except.c (find_handler_in_range): The upper limit for exception
16626 ranges is exclusive, not inclusive: (start <= pc < end).
16627 (link_handler): find child pointer which points to outer by
16628 searching sibling list: previous code incorrectly assumed that
16629 outer->outer->first_child must point to outer.
16630 * verify.c (verify_jvm_instructions): FIXME added to code for
16632 (verify_jvm_instructions): Do not assume that the last block
16633 processed in a subroutine is a block which ends with a `ret'
16634 instruction. With some control flows it is possible that the last
16635 block ends with an `athrow'.
16637 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16639 * parse.y (qualify_ambiguous_name): Reorganized the post
16640 evaluation of non WFL leading expression nodes.
16642 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16644 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16647 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16649 * parse.y (qualify_ambiguous_name): Handle qualified expression
16650 beginning with a STRING_CST.
16652 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16654 * parse.y (register_fields): Set DECL_INITIAL on both
16655 pre-initialized static and public fields.
16656 (resolve_field_access): Static field access expressions to always
16658 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16659 qualification. CONVERT_EXPR to be resolved as an expression name.
16660 (java_complete_lhs): Identify and access qualified final
16661 initialized field in switch statement case expression.
16662 (fold_constant_for_init): Pre-initialized field decl constant to
16665 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16667 * parse.y (note_possible_classname): Mark returned node with
16668 QUALIFIED_P only if the original class name contained a '/'.
16670 1999-06-05 Anthony Green <green@cygnus.com>
16672 * Make-lang.in (gcjh): More parallel build fixes.
16674 1999-06-03 Mike Stump <mrs@wrs.com>
16676 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16678 1999-06-02 Anthony Green <green@cygnus.com>
16680 * except.c (link_handler): Chain exception handlers in order.
16682 1999-06-02 Anthony Green <green@cygnus.com>
16684 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16685 with nops and process as usual in order to always set correct EH
16686 ranges. Emit detailed warnings about unreachable bytecodes.
16688 1999-06-02 Anthony Green <green@cygnus.com>
16690 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16693 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16695 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16696 or the searched field decl.
16698 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16700 * parse.y (fold_constant_for_init): Convert numerical constant
16701 values to the type of the assigned field.
16703 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16705 * expr.c (lookup_field): Relaxed the test on class loading error
16707 * parse.y (fold_constant_for_init): Enabeled old code.
16709 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16711 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16712 decide the validity of the cast of a java.lang.Cloneable reference
16714 (patch_conditional_expr): Fixed first argument passed to
16715 binary_numeric_promotion.
16717 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16719 * parse.y (qualify_ambiguous_name): Take into account that a
16720 CONVERT_EXPR might specify a type as a WFL.
16722 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16724 * parse.y (patch_assignment): Save the rhs before using it as an
16725 argument to _Jv_CheckArrayStore.
16727 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16729 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16731 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16733 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16734 floating point literal only when the exponent indicator has been
16737 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16739 * parse.y (formal_parameter:): Construct argument tree list
16740 element even if a yet unsupported final parameter was encountered.
16742 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16744 * parse.y (finish_method_declaration): Issue errors for native or
16745 abstract methods declared with a method body, as well as for non
16746 native or non abstract methods with no method body.
16748 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16750 * class.c (build_utf8_ref): Initialize variable `field'.
16752 * decl.c (init_decl_processing): Initialize variable `field'.
16754 * expr.c (build_known_method_ref): Mark parameters `method_type',
16755 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16756 (process_jvm_instruction): Likewise for parameter `length'.
16758 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16759 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16762 * parse.y (maybe_generate_clinit): Remove unused variable
16763 `has_non_primitive_fields'.
16764 (find_in_imports_on_demand): Initialize variables `node_to_use'
16766 (patch_binop): Likewise for variable `prom_type'.
16767 (patch_unaryop): Likewise for variable `prom_type'.
16769 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16771 * xref.c (xref_table): Add missing initializer.
16773 1999-05-14 Tom Tromey <tromey@cygnus.com>
16775 * java-except.h (struct eh_range): Removed unused `next' member.
16776 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16777 after adding all exception handlers. Sort exception ranges in
16779 (struct pc_index): New structure.
16780 (start_pc_cmp): New function.
16781 * except.c (add_handler): Return `void'. Don't call link_handler;
16782 instead construct an ordinary linked list and do range
16784 (check_nested_ranges): New function.
16785 (link_handler): Changed interface to allow merging of eh_ranges.
16786 Split overlapping ranges. Return `void'.
16788 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16790 * parse.y (constructor_block_end:): New rule, tagged <node>.
16791 (constructor_body:): Use `constructor_block_end' instead of
16794 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16796 * parse.y (statement_nsi:): Pop `for' statement block.
16797 (java_complete_lhs): Labeled blocks containing no statement are
16798 marked as completing normally.
16800 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16802 * xref.c (xref_set_current_fp): New function, defined.
16803 * xref.h (xref_set_current_fp): New function, prototyped.
16805 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16807 * check-init.c (check_init): Take into account that
16808 LABELED_BLOCK_STMT can be empty.
16810 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16812 * parse.y (java_check_regular_methods): Warning check on not
16813 overriding methods with default access in other packages does not
16814 apply to `<clinit>'.
16815 (java_complete_lhs): If block body is an empty_stmt_node, replace
16816 it by NULL_TREE. This prevents gcc from generating an irrelevant
16819 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16821 * check-init.c (check_init): Removed code accepting to see things
16822 falling through default:, when doing xrefs.
16823 * java-tree.h (do_not_fold): New global variable, declared.
16824 * parse.y (do_not_fold): New global variable, defined.
16825 (java_complete_expand_method): Set `do_not_fold' to the value of
16826 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16827 and reinstall them after them have been purged; do not check for
16828 initializations; do not issue missing return errors.
16829 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16831 (patch_binop): Skip the fold part when doing xrefs.
16832 (build_string_concatenation): Skip the concatenation part when
16834 (patch_synchronized_statement): Do not generate a try-finally when
16836 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16837 and keep the location where the throw was seen.
16838 * typeck.c (convert): When `do_not_fold' is set, do not attempt
16839 any treatment on the converted node an simply return a NOP_EXPR of
16841 * xref.c (xref_get_data): New function, defined.
16842 * xref.h (xref_get_data): New function, declared.
16843 (XREF_GET_DATA): Use xref_get_data.
16845 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16847 * gjavah.c (print_include): Cast the result of `strlen' to int
16848 when comparing against a signed value.
16849 (add_namelet): Likewise.
16851 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16853 * expr.c (expand_invoke): Mark parameter `nargs' with
16855 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16857 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16860 * jcf-reader.c (get_attribute): Cast a value to long
16861 when comparing against a signed expression. Likewise.
16863 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16864 HOST_BITS_PER_CHAR.
16866 1999-05-11 Andrew Haley <aph@cygnus.com>
16868 * parse.y (source_end_java_method): If the current method contains
16869 any exception handlers, force asynchronous_exceptions: this is
16870 necessary because signal handlers in libjava may throw exceptions.
16871 * decl.c (end_java_method): Ditto.
16873 1999-05-11 Tom Tromey <tromey@cygnus.com>
16875 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16877 * jvspec.c (THREAD_NAME): Removed.
16878 (GC_NAME): Likewise.
16879 (MATHLIB): Likewise.
16880 (WITHLIBC): Likewise.
16882 (THREADLIB): Likewise.
16883 (MATH_LIBRARY): Likewise.
16884 (lang_specific_driver): Don't add `-l' options to command line.
16885 Instead, add a single --specs option. Recognize `-L' options and
16886 use them to search for spec file.
16887 (find_spec_file): New function.
16888 (SPEC_FILE): New define.
16890 1999-05-11 Dave Brolley <brolley@cygnus.com>
16892 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16893 cpplib-enabled build.
16895 1999-05-05 Per Bothner <bothner@cygnus.com>
16897 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16898 temporarily zero it while calling rest_of_decl_compilation.
16900 * java-tree.h (string_ptr_type_node): Add declaration.
16901 * decl.c: Define and initialize string_ptr_type_node.
16902 * parse.y (patch_string_cst): Use string_ptr_type_node.
16904 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16905 * parse.y (for_statement): Now unconditionally exit_block.
16906 (finish_labeled_statement): No longer exit_block if for-loop.
16907 (patch_loop_statement): Check harder if the loop is already labeled.
16909 * parse.y (patch_initialized_static_field): Removed function.
16910 (maybe_generate_clinit): Removed special handling for interfaces.
16911 (java_complete_expand_methods): Do a preliminary java_complete_tree
16912 on <clinit> to determine if it can be removed.
16913 (java_complete_expand_method): Remove special handling for <clinit>.
16914 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16915 optimize if we get back empty_stmt_node.
16916 For MODIFY_EXPR, re-do checking of static initializers.
16917 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16918 For VAR_DECL, pass correct context.
16920 * verify.c (verify_jvm_instructions): Better error messages.
16922 1999-05-03 Tom Tromey <tromey@cygnus.com>
16924 * parse-scan.y (interface_declaration): Call
16925 report_class_declaration for interfaces.
16927 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
16929 * Makefile.in: Remove -v from bison command lines.
16931 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16933 * check-init.c (check_init): Exclude a case of error when doing
16935 * class.c (layout_class_method): Don't generate the error message
16936 twice when compiling from source.
16937 * lang-options.h: Added `-Wredundant-modifers' and
16938 `-Wunusupported-jdk11' flags and help text.
16939 * lang.c (lang_decode_option): Added support for
16940 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16941 flag_static_local_jdk11 and flag_redundant set accordingly.
16942 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16943 * parse.h (EXPR_WFL_ADD_COL): New macro.
16944 (DECL_END_SOURCE_LINE): Likewise.
16945 (DECL_INHERITED_SOURCE_LINE): Likewise.
16946 * parse.y (static_ref_err): New function, prototyped.
16947 (CCB_TK): Now tagged <operator>.
16948 (class_body:): Remember the location of the closing '}' of a class
16949 definition when doing xrefs.
16950 (block:): Likewise.
16951 (block_end:): Likewise.
16952 (create_class): Remember the location of the inherited class
16953 identifier when doing xrefs.
16954 (register_fields): Added test on first operand of `init' before
16955 testing it TREE_CODE.
16956 (method_header): Store the location of the class identifier in the
16957 class decl when doing xrefs.
16958 (finish_method_declaration): Don't combine first/last method line
16960 (java_check_regular_methods): Warning check on not overriding
16961 methods with default access on other packages move before check on
16962 static methods. Initialization of `aflags' also moved up.
16963 (resolve_expression_name): Call static_ref_err to report the error.
16964 (static_ref_err): New function, implemented.
16965 (resolve_field_access): Returned simplified static field access
16967 (resolve_qualified_expression_name): Check for illegal use of
16968 static fields in a non static context. Call static_ref_err to
16969 report error in various places.
16970 (java_complete_tree): Do not fold initialized static fields when
16972 (java_complete_lhs): Likewise.
16974 1999-04-29 Anthony Green <green@cygnus.com>
16976 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16977 create internal labels.
16978 (lookup_label): Ditto.
16980 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16982 * class.c (layout_class_method): Generate <clinit>'s rtl for
16984 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16985 for interfaces' <clinit>.
16986 * expr.c (lookup_field): Search for fields in interfaces.
16987 (expand_invoke): Fixed indentation.
16988 (expand_java_field_op): Likewise. Use IS_CLINIT.
16989 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16990 (IS_CLINIT): New macro.
16991 * parse.y (type_declaration:): Call maybe_generate_clinit after an
16992 interface was parsed.
16993 (maybe_generate_clinit): Don't generate if the current class is an
16994 interface with only fields of primitive types.
16995 (reset_method_name): Use IS_CLINIT.
16996 (java_complete_expand_method): Expand <clinit> when it exists for
16997 interfaces. Use IS_CLINIT.
16998 (resolve_expression_name): Use DECL_CONTEXT instead of
16999 current_class to build static field references.
17000 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
17001 ARRAY_REF when doing xreferencing.
17002 (check_final_assignment): Fixed typo in leading comment. Use
17004 (patch_array_ref): Don't fully expand array references when
17006 (patch_return): Use IS_CLINIT.
17007 (patch_throw_statement): Likewise.
17009 1999-04-22 Tom Tromey <tromey@cygnus.com>
17011 * Make-lang.in (JAVA_SRCS): Added check-init.c.
17013 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17015 * decl.c (predef_filenames, predef_filenames_size): New globals
17016 (init_decl_processing): predef_filenames and predef_filenames_size
17018 * java-tree.h (predef_filenames, predef_filenames_size): Declared
17020 * jcf-parse.c (predefined_filename_p): New function.
17021 (yyparse): Check that files on the command line are specified only
17022 once and issue a warning otherwise.
17023 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
17024 * parse.y (source_end_java_method): Nullify NOP method bodies, to
17025 avoid a gcc warning with -W -Wall turned on.
17026 (java_expand_classes): Abort if errors were encountered.
17027 (java_complete_lhs): If the cross reference flag is set, wrap
17028 field DECL node around a WFL when resolving expression name.
17030 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17032 * lang.c (lang_decode_option): Fixed returned value when parsing
17033 `-fxref=...' and `-Wall'.
17034 * parse.y (source_end_java_method): Do not generate code when
17035 flag_emit_xref is set.
17036 (resolve_expression_name): Do not build static field access when
17037 flag_emit_xref is set.
17038 (resolve_field_access): No special treatment on `length' when
17039 flag_emit_xref is set. Do not build qualified static field access
17040 when flag_emit_xref is set.
17041 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
17042 when flag_emit_xref is set.
17043 (patch_assignment): Do not generate array store runtime check when
17044 flag_emit_xref is set.
17045 * xref.c (xref_flag_value): Fixed function declaration
17047 (xset_set_data): New function.
17048 * xref.h (xref_set_data): Added prototype for new function.
17049 (typedef struct xref_flag_table): New field data.
17050 (XREF_GET_DATA): New macro.
17052 1999-04-19 Tom Tromey <tromey@cygnus.com>
17054 * xref.h (enum): Removed trailing comma.
17056 * parse.y (resolve_qualified_expression_name): Added missing
17059 1999-04-15 Anthony Green <green@cygnus.com>
17061 * gjavah.c: New prototypes for java_float_finite and
17062 java_double_finite.
17064 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17066 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
17069 1999-04-06 Jeffrey A Law (law@cygnus.com)
17071 * Makefile.in (TREE_H): Add tree-check.h.
17072 (RTL_H): Add genrtl.h.
17074 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
17076 * parse.y (patch_assignment): Added ArrayStoreException runtime
17079 1999-04-06 Per Bothner <bothner@cygnus.com>
17081 * expr.c (pop_type_0): New function.
17082 (pop_type): Use pop_type_0.
17083 * java-tree.h (pop_type_0): New declaration.
17084 * verify.c (verify_jvm_instructions): Check return instructions.
17086 * parse.y (patch_binop): Don't fold if non-constant and emiting
17089 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17091 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
17093 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
17094 (main_jcf): Don't define.
17095 (process_file): Don't set `main_jcf'.
17097 * java-tree.h (main_jcf): Don't declare.
17099 * jcf-parse.c (main_jcf): Add static definition.
17101 * lang.c (main_jcf): Don't define.
17103 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17105 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
17107 * decl.c (copy_lang_decl): Likewise for `bcopy'.
17109 * jcf-depend.c: Include "config.h", not <config.h>.
17111 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
17114 * jcf-path.c: Include "config.h", not <config.h>.
17116 * lex.c: Don't include various system header files.
17117 (java_init_lex): Cast the argument of `bzero' to PTR
17119 * parse-scan.y (java_push_parser_context): Likewise.
17121 * parse.y (java_push_parser_context): Likewise.
17122 (patch_bc_statement): Match format specifier to variable argument.
17124 * xref.c: Don't include <stdio.h>.
17126 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
17128 * parse.y (struct parser_ctxt *ctxp): Now global.
17129 (declare_local_variables): Use WFL compound value for the
17130 declaration source line value, when doing cross-referencing.
17132 1999-03-31 Tom Tromey <tromey@cygnus.com>
17134 * gjavah.c (print_field_info): Allow constants of other types.
17135 (print_include): Generate include when new name is proper prefix
17136 of already printed name.
17137 (add_namelet): Likewise.
17138 (cxx_keyword_subst): New function.
17139 (print_method_info): Use it.
17140 (print_field_name): New function.
17141 (get_field_name): New function.
17142 (print_field_info): Use get_field_name and print_field_name.
17144 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17146 * Makefile.in (keyword.h): Generate using gperf language 'C', not
17147 'KR-C', so gperf uses the `const' keyword on strings.
17149 * keyword.gperf (java_keyword): Const-ify a char*.
17151 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17153 * parse.y (patch_bc_statement): Fixed identation and a bogus
17156 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17158 * parse.y (patch_assignment): Allow static variables in other
17159 classes to be assigned.
17161 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17163 * class.c (maybe_add_interface): Remove unused variable
17165 (make_class_data): Use = for assignment, not ==. Likewise.
17166 (emit_register_classes): Remove unused variable `decl'.
17168 * lex.c: Fix comment so as not to contain an embedded `/*'.
17170 * verify.c (verify_jvm_instructions): Remove unused variable
17173 1999-03-27 Per Bothner <bothner@cygnus.com>
17175 * parse.y (complete_loop_body): Rename to finish_loop_body.
17176 (complete_labeled_statement): Rename to finish_labeled_statement.
17177 (complete_for_loop): Rename to finish_for_loop.
17178 (complete_method_declaration): Rename to finish_method_declaration.
17180 * java-tree.h (continue_identifier_node): New global node.
17181 * decl.c: Define and initialize continue_identifier_node.
17182 * parse.y (generate_labeled_block): Remove - no longer needed.
17183 (build_loop_body): Use continue_identifier_node for continue block.
17184 (finish_labeled_statement): Also do pop_labeled_block actions.
17185 (java_complete_lhs): POP_LOOP even if error.
17186 (build_labeled_block): Special handling for continue_identifier_node.
17187 (patch_loop_statement): Re-organize.
17188 (patch_bc_statement): Re-write.
17190 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17192 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17193 using a WFL compound value.
17194 * parse.y (xref.h): Include.
17195 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17196 WFL compound value.
17197 (register_fields): Set WFL compound value to lineno if doing
17199 (java_complete_expand_method): Call expand_xref if flag_emit_xref
17201 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17202 * xref.h (expand_xref): Prototype renamed from xref_generate.
17204 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17206 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17207 (GET_CURRENT_BLOCK): New macro.
17208 * parse.y (current_static_block): New global variable.
17209 (method_body:): Define action.
17210 (complete_method_declaration): Set current_function_decl to NULL
17211 when work on the current method is done.
17212 (declare_local_variables): Use GET_CURRENT_BLOCK.
17213 (java_method_add_stmt): Likewise.
17214 (java_complete_expand_method): Disable the use of `this' when
17215 expanding <clinit>.
17216 (enter_a_block): If no current method exist, use
17217 current_static_block to link static initializer blocks.
17218 (exit_block): Rewritten to use current_static_block when no current
17219 method decl exists.
17220 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17221 (patch_return): Forbid the use of `return' in static initializers.
17222 (patch_throw_statement): Fixed indentation. Issue specific error
17223 for uncaught thrown checked exception in static initializer
17224 blocks. Removed FIXME.
17226 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
17228 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17229 Link gcj from gcc.o.
17231 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
17233 * parse.y (find_applicable_accessible_methods_list): When dealing
17234 with interface: ensure that a given interface or java.lang.Object
17235 are searched only once.
17237 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17239 * gjavah.c (print_c_decl): Remove unused argument `flags'.
17241 * jcf-dump.c (print_access_flags): Add braces around if-else.
17243 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17246 * lex.c (build_wfl_node): Add static prototype.
17248 * lex.h (build_wfl_node): Remove static prototype.
17250 * parse.y: Include lex.c early enough to declare everything needed.
17251 Ensure calls to `build_wfl_node' pass the proper arguments.
17252 (create_class): Remove unused variable `super_decl'.
17253 (get_printable_method_name): Initialize variable `name'.
17255 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17257 * Changelog: Fixed 1999-03-22 typos.
17258 * lang.c (lang_decode_option): Fixed typo in error string in the
17261 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17263 * Makefile.in (JAVA_OBJS): Added entry xref.o.
17264 (xref.o): New rule.
17265 * java-tree.h (flag_emit_xref): Declared extern.
17266 * lang.c (xref.h): Included.
17267 (flag_emit_xref): New global variable.
17268 (lang_decode_option): Added support for -fxref.
17270 * xref.h: Likewise.
17272 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
17274 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17277 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17279 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17280 $(srcdir)/../system.h and $(JAVA_TREE_H).
17281 (jcf-io.o): Depend on $(JAVA_TREE_H).
17282 (mangle.o): Likewise.
17284 * check-init.c (check_cond_init): Add static prototype.
17286 * class.c (build_java_method_type, hashUtf8String,
17287 make_field_value, get_dispatch_vector, get_dispatch_table,
17288 append_gpp_mangled_type, mangle_static_field): Likewise.
17289 (strLengthUtf8): Hide unused definition.
17290 (hashUtf8String): Const-ify.
17291 (make_field_value): Un-ANSI-fy.
17293 * constants.c: Move inclusion of jcf.h above java-tree.h.
17294 (set_constant_entry, find_class_or_string_constant,
17295 find_name_and_type_constant, get_tag_node,
17296 build_constant_data_ref): Add static prototype.
17298 * decl.c (push_jvm_slot, builtin_function,
17299 lookup_name_current_level): Likewise.
17300 (builtin_function): Const-ify.
17302 * except.c (expand_start_java_handler, expand_end_java_handler):
17303 Add static prototype.
17305 * expr.c (flush_quick_stack, push_value, pop_value,
17306 java_stack_swap, java_stack_dup, build_java_athrow,
17307 build_java_jsr, build_java_ret, expand_java_multianewarray,
17308 expand_java_arraystore, expand_java_arrayload,
17309 expand_java_array_length, build_java_monitor, expand_java_pushc,
17310 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17311 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17312 expand_compare, expand_test, expand_cond, expand_java_goto,
17313 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17314 expand_java_field_op, java_push_constant_from_pool): Likewise.
17316 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17317 (build_java_arraynull_check): Mark parameters `node' and `type'
17318 with ATTRIBUTE_UNUSED.
17319 (note_label): Likewise for parameter `current_pc'.
17320 (expand_java_call, expand_java_ret): Hide unused definition.
17322 * java-tree.h (make_class, build_constants_constructor,
17323 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17324 init_outgoing_cpool, register_class, emit_register_classes,
17325 java_layout_seen_class_methods): Prototype.
17326 (unicode_mangling_length): Const-ify.
17327 (append_gpp_mangled_name, append_gpp_mangled_classtype,
17328 emit_unicode_mangled_name, format_int, format_uint,
17329 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17330 jcf_print_utf8_replace, open_class): Prototype.
17332 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
17333 <stdio.h>. Include tree.h/java-tree.h.
17334 (utf8_equal_string usage, process_class): Add static prototype.
17335 (open_class): Don't prototype this here.
17336 (utf8_equal_string): Match arguments to format specifiers.
17337 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17338 TABLE_SWITCH, disassemble_method): Likewise.
17340 * jcf-io.c: Include tree.h/java-tree.h.
17341 (open_class, find_classfile, jcf_print_utf8,
17342 jcf_print_utf8_replace): Const-ify.
17344 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17345 parse_class_file): Add static prototype.
17346 (find_in_current_zip): Match definition to existing static
17349 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17350 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17351 finish_jcf_block, define_jcf_label, get_jcf_label_here,
17352 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17353 write_chunks, adjust_typed_op, generate_bytecode_conditional,
17354 generate_bytecode_return, perform_relocations, init_jcf_state,
17355 init_jcf_method, release_jcf_state, generate_classfile):
17356 Add static prototype.
17357 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17358 (make_class_file_name): Const-ify.
17360 * jcf.h (find_classfile): Const-ify.
17362 * jv-scan.c (reset_report): Remove prototype.
17364 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17365 (error): Rewrite to allow varargs.
17367 * lang.c (lang_f_options): Const-ify.
17369 * lex.c (java_parse_escape_sequence): Add static prototype.
17370 (java_allocate_new_line): Match definition to existing static
17373 * mangle.c Include tree.h/java-tree.h.
17374 (unicode_mangling_length, emit_unicode_mangled_name,
17375 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17377 * parse.h (jdep_code): Remove trailing comma in enumeration.
17378 (java_get_line_col): Move prototype outside of !JC1_LITE test.
17379 (reset_report): Add prototype.
17381 * verify.c (push_pending_label, merge_types): Add static
17384 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17386 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17388 * parse.y (find_applicable_accessible_methods_list): Extend the
17389 search to superinterfaces when relevant.
17390 (search_applicable_methods_list): New function.
17392 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17394 * class.c (unmangle_classname): Implemented stricter testing
17395 before setting the QUALIFIED_P flag on an identifier.
17397 1999-03-16 Per Bothner <bothner@cygnus.com>
17399 * parse.y (java_complete_lhs): Call force_evaluation_order
17400 after patch_newarray.
17401 (patch_binop): Don't call fold if there are side effects.
17403 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17405 * parse.y (java_stabilize_reference): Use save_expr instead of
17406 building a SAVE_EXPR node.
17407 (java_complete_lhs): Patch the resulting string of the `+='
17408 operator (if necessary) and complete the RHS after having built
17411 1999-03-15 Per Bothner <bothner@cygnus.com>
17413 * class.c (make_class): Don't set CLASS_P here (because
17414 this function is also called by build_java_array_type).
17415 (push_class): Set CLASS_P here instead.
17416 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
17418 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
17419 context. If the context is class, perfer "super" over "synchronized".
17420 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
17422 * parse.y (create_class): Don't call parser_check_super here;
17423 it is not robust. Always wait until later.
17425 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
17426 match what JDK 1.2 does), but don't set ACC_PUBLIC.
17428 1999-03-13 Per Bothner <bothner@cygnus.com>
17430 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
17431 * lex.h (UNGETC): Change misleading macro.
17433 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17435 * parse.y (java_stabilize_reference): Return NODE when patching a
17437 (java_complete_lhs): Put parenthesis around truth values.
17439 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17441 * class.c (layout_class_method): Don't make rtl for interface
17443 * parse.h (GET_TYPE_NAME): New macro.
17444 * parse.y (if_then_statement:): Fixed indentation.
17445 (if_then_else_statement:): Likewise.
17446 (for_statement:): Fixed spacing.
17447 (try_statement:): Fixed indentation.
17448 (create_interface): Don't force interfaces to be abstract.
17449 (method_header): Abstract methods are OK in interfaces.
17450 (declare_local_variables): Fixed typo in comment.
17451 (java_complete_expand_method): Fixed indentation.
17452 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17453 non accessible fields.
17454 (java_stabilize_reference): New function.
17455 (java_complete_lhs): Fixed indentation. Use
17456 java_stabilize_reference in compound assignment. Insert the
17457 cast. If not processing `+' fix string constants before processing
17460 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17462 * constants.c (find_class_or_string_constant): Cast variable `j'
17463 to a `jword' when comparing against one.
17465 * expr.c (java_lang_expand_expr): Remove unused variables
17466 `has_finally_p' and `op0'.
17468 * gjavah.c (print_field_info): Cast a value to jint when comparing
17469 against one. Likewise for a jlong.
17470 (add_namelet): Likewise cast a `sizeof' to an int when comparing
17471 against a signed quantity.
17473 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17474 (print_signature): Don't needlessly dereference variable `str'
17476 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17477 `max_locals' with ATTRIBUTE_UNUSED.
17478 (jcf_parse_class): Likewise for variable `index'.
17480 * parse.h (reverse_jdep_list): Remove static prototype.
17482 * parse.y (build_jump_to_finally): Remove prototype and definition.
17483 (reverse_jdep_list): Add static prototype.
17485 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17486 `assignment' and `expr_decl'.
17488 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17490 1999-03-12 Andrew Haley <aph@cygnus.com>
17492 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17493 we'll need a directory separator and a null character.
17495 1999-03-10 Per Bothner <bothner@cygnus.com>
17497 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
17499 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
17501 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17504 1999-03-05 Per Bothner <bothner@cygnus.com>
17506 * lex.c (java_parse_end_comment): Take extra parameter (next char).
17508 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
17510 * class.c (layout_class_method): A static method in a base class
17511 is never overridden, so treat it like it doesn't exist.
17512 However, do complain about private non-static method overriding
17513 public static method.
17515 * parse.y: Don't set unused INITIALIZED_P flag.
17516 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17518 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17519 (build_array_from_name): Re-order &index[string] to &string[index].
17521 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
17522 error_mark (it might catch more errors, but it is more likely to lose).
17524 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17526 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17527 (parse-scan.o): Depend on toplev.h.
17529 * class.c (make_method_value): Add prototype. Make it static.
17530 Remove unused second argument, caller changed.
17532 * expr.c (java_lang_expand_expr): Remove unused variable
17535 * java-tree.h: Don't prototype find_in_current_zip.
17536 Add prototypes for verify_constant_pool, start_java_method,
17537 end_java_method, give_name_to_locals, expand_byte_code,
17538 open_in_zip, set_constant_value, find_constant1, find_constant2,
17539 find_utf8_constant, find_string_constant, find_class_constant,
17540 find_fieldref_index, find_methodref_index, write_constant_pool,
17541 count_constant_pool_bytes and encode_newarray_type.
17543 * jcf-dump.c: Remove unused variable `LONG_temp'.
17545 * jcf-parse.c: Include parse.h.
17546 (jcf_parse_source): Remove unused parameter, all callers changed.
17547 (jcf_figure_file_type): Add static prototype.
17548 (find_in_current_zip): Likewise. Also remove unused parameter,
17549 all callers changed.
17550 (read_class): Initialize variable `saved_pos'.
17552 * jcf-reader.c (jcf_parse_preamble): Mark variables
17553 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17555 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17556 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17557 (java_parse_doc_section): Initialize variable `seen_star'.
17558 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17559 (java_lex_error): Mark parameters `msg' and `forward' with
17561 (java_get_line_col): Mark parameters `filename' and `line' with
17564 * parse-scan.y: Include toplev.h.
17565 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17567 * parse.h: use `struct JCF', not plain `JCF'.
17568 (java_parser_context_save_global, java_expand_classes
17569 java_parser_context_restore_global, java_parse): Add prototypes.
17571 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17574 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
17576 * check-init.c (check_init): COPYN takes word count, not bit count.
17578 1999-02-26 Per Bothner <bothner@cygnus.com>
17580 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17581 explicit build_decl. (Avoids crash in reload when optimizing.)
17583 1999-02-25 Per Bothner <bothner@cygnus.com>
17585 * decl.c (complete_start_java_method): Handle synchronized method
17586 even when compiling from bytecode.
17588 1999-02-26 Tom Tromey <tromey@cygnus.com>
17590 * gjavah.c (add_class_decl): Only generate `#include' if outer
17591 class is not the name of the class we are processing. Correctly
17592 append `.h' in #include.
17593 (process_file): Clean up newlines around generated `#include's.
17594 (decode_signature_piece): Correctly handle inner classes.
17595 (struct include): New structure.
17596 (all_includes): New global.
17597 (print_include): New function.
17598 (add_class_decl): Use it.
17599 (process_file): Likewise.
17600 (add_class_decl): Generate include for java-array.h if array
17602 (process_file): Don't generate java-array.h include.
17604 * gjavah.c (add_namelet): Check for standard package names here.
17605 (add_class_decl): Don't check for standard package names here.
17607 1999-02-25 Tom Tromey <tromey@cygnus.com>
17609 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17610 When reading a zip file, only use strncmp if both strings are
17611 bigger than the buffer length. Initialize `k' when looping
17614 1999-02-24 Tom Tromey <tromey@cygnus.com>
17616 * gjavah.c (struct namelet): New structure.
17617 (add_namelet): New function.
17618 (print_namelet): New function.
17619 (print_class_decls): Use add_namelet and print_namelet to generate
17620 namespaces and not classes.
17621 (method_printed): New global.
17622 (HANDLE_END_METHOD): Examine method_printed.
17623 (print_method_info): Set method_printed when required. Print
17624 error if function to be ignored is marked virtual. Handle $finit$
17626 (METHOD_IS_FINAL): New macro.
17627 (print_field_info): Use it.
17628 (HANDLE_METHOD): Clear method_printed.
17629 (method_pass): New global.
17630 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17631 (process_file): Do two passes over both fields and methods.
17632 (HANDLE_METHOD): Examine method_pass.
17633 (root): New global.
17634 (add_class_decl): New function.
17635 (print_class_decls): Don't scan over entire constant pool.
17637 1999-02-23 Tom Tromey <tromey@cygnus.com>
17639 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17640 disable linking in that case.
17642 1999-02-20 Tom Tromey <tromey@cygnus.com>
17644 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17647 1999-02-21 Per Bothner <bothner@cygnus.com>
17649 * decl.c (build_result_decl), java-tree.h: New method.
17650 (complete_start_java_method): Handle synchronized methods.
17651 Don't build DECL_RESULT here. (Ordering dependency problem.)
17652 (start_java_method): Call build_result_decl here instead ...
17653 * parse.y (java_complete_expand_method): ... and here.
17654 (expand_start_java_method): Don't call complete_start_java_method here.
17655 (java_complete_expand_method): Call it here instead.
17656 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17657 * java-tree.h: ... here.
17659 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17660 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17661 for ARRAY_REF - it doesn't work when array bounds are checked.
17662 (patch_array_ref): Handle it here instead.
17664 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17666 1999-02-19 Per Bothner <bothner@cygnus.com>
17668 Force left-to-right evaluation of binary operations etc.
17669 * expr.c (force_evaluation_order), java-tree.h: New function.
17670 * parse.y (java_complete_lhs): Pass binary operations, procedure
17671 calls, and ARRAY_REFs to force_evaluation_order.
17672 (various): Set TREE_SIDE_EFFECTS more carefully.
17674 Tolerate random (non-UTF8) encoding in comments without complaining.
17675 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17676 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17678 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17679 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17681 * parse.y (java_complete_lhs): Ignore an empty statement in a
17682 COMPOUND_EXPR. Don't complain about empty statement after return.
17684 1999-02-19 Per Bothner <bothner@cygnus.com>
17686 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17687 in TREE_LIST - just chain the POINTER_TYPEs together.
17688 (resolve_class): If type already resolved, return decl.
17689 After resolving, update TREE_TYPE(class_type), and name (if array).
17690 * parse.h (do_resolve_class), parse.y: Make non-static.
17691 * class.c (maybe_layout_super_class): Take this_class argument.
17692 Do do_resolve_class if necessary.
17693 (layout_class, layout_class_methods): Adjust calls appropriately.
17694 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17695 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17696 * typeck.c (build_java_array_type): Don't call layout_class.
17698 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17700 * parse.y (check_pkg_class_access): Allow private class access
17701 within the same package.
17702 (strip_out_static_field_access_decl): New function.
17703 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17704 operator argument before testing its nature.
17706 1999-02-03 Per Bothner <bothner@cygnus.com>
17708 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17709 (TRY_EXPR): Simplify - it no longer has a finally clause.
17710 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17711 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17712 * expr.c (java_lang_expand_expr): Likewise.
17713 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17714 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17715 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17716 (build_try_statement): Remove finally parameter and handling.
17717 (build_try_finally_statement): New function.
17718 (patch_try_statement): No longer need to support finally clause.
17719 (try_statement): Update grammar action rules.
17720 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17721 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17723 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17725 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17726 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17728 1999-02-17 Andrew Haley <aph@cygnus.com>
17730 * class.c (build_utf8_ref): Back out broken patch which was
17731 intended to to output signatures using '.' as a separator.
17733 * class.c (make_class_data): Output signatures using '.' as a
17734 separator, rather than '/'.
17735 (mangled_classname): Likewise.
17736 (make_field_value): Likewise.
17737 (make_method_value): Likewise.
17738 * constants.c (alloc_class_constant): Likewise.
17739 * expr.c (build_invokeinterface): Likewise.
17741 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17743 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17744 of an ancient workaround.
17746 1999-02-10 Jeffrey A Law (law@cygnus.com)
17748 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17751 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17753 * lex.c (yylex): Encode \0 as UTF8.
17755 1999-02-10 Tom Tromey <tromey@cygnus.com>
17757 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17758 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17759 (libgcj_zip): Renamed.
17760 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17762 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17764 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17765 (GC_NAME): Renamed -lgc to -lgcjgc.
17767 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17769 * lex.c (java_lang_cloneable): Initialize.
17770 * parse.y (java_lang_cloneable): New static variable.
17771 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17772 doing one more qualification round.
17773 (valid_ref_assignconv_cast_p): Reject null source or
17774 destination. Allow an array to be cast into java.lang.Cloneable.
17775 (patch_cast): Swapped two first arguments to first call to
17776 valid_ref_assignconv_cast_p.
17778 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17780 * parse.h: DECL_P renamed JDECL_P.
17781 * parse.y: DECL_P replaced by JDECL_P.
17782 (build_array_from_name): Always use pointer's type.
17783 (patch_bc_statement): Extra code to search continue target in a
17784 for loop. Fixed comments. Continue target is current loop when
17787 1999-02-05 Andrew Haley <aph@cygnus.com>
17789 * class.c (make_class_data): The superclass of an interface should
17790 be null, not class Object.
17792 * lex.c (java_lex): Sign extend hex literals.
17794 1999-02-04 Andrew Haley <aph@cygnus.com>
17796 * class.c (build_utf8_ref): Output signatures using '.' as a
17797 separator, rather than '/'.
17798 (make_class_data): Likewise.
17800 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17802 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17803 mkstemp.o. Get them from libiberty now.
17805 1999-02-02 Jeffrey A Law (law@cygnus.com)
17807 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17809 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17811 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17814 1999-02-02 Per Bothner <bothner@cygnus.com>
17816 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17817 * jcf-write.c (generate_bytecode_return): New function.
17818 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17820 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17821 generate special [fd]const_[01] instructions.
17823 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17825 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17826 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17828 1999-02-01 Per Bothner <bothner@cygnus.com>
17830 * parse.y (patch_method_invocation): Handle calling static methods,
17831 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17833 * parse.y (java_complete_lhs): Don't complain about unreachable
17834 exit condition in a do-while statement.
17836 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
17838 * lex.c (java_read_char): Fixed utf8 decoding.
17839 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17841 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17842 comments. Local variable `all_primitive' is gone. Broadened
17843 acceptance of `0' to floating point targets. `long' can now be
17844 widened to `double' or `float'.
17845 (valid_method_invocation_conversion_p): Added leading
17846 comment. Fixed tabulation.
17847 (build_string_concatenation): Optimize out left or right empty
17850 1999-01-28 Per Bothner <bothner@cygnus.com>
17852 * jcf-write.c (localvar_alloc): Only emit entry for
17853 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17854 (generate_bytecode_insns): Only call put_linenumber if
17855 debug_info_level > DINFO_LEVEL_NONE.
17856 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17857 is specified, add -g1 (for compatibility wih javac).
17859 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
17861 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17862 gjavah.o, check-init.o, jv-scan.o
17864 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17866 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17868 * gjavah.c: Include config.h and system.h.
17870 * javaop.h (inline): Don't define, its handled by system.h.
17871 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17872 from `inline' to `static inline'.
17874 * jcf.h (inline): Don't define, its handled by system.h.
17876 * lex.c (inline): Likewise.
17878 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
17880 * lang-specs.h: Map -Qn to -fno-ident.
17882 1999-01-29 Richard Henderson <rth@cygnus.com>
17884 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17886 1999-01-29 Tom Tromey <tromey@cygnus.com>
17888 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17889 then cast it to Object before calling `append' method.
17891 1999-01-28 Per Bothner <bothner@cygnus.com>
17893 * check-init.c (check_bool2_init, check_bool_init, check_init):
17894 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17895 * jcf-write.c (generate_bytecode_insns): Likewise.
17897 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17899 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17900 * parse.y (patch_cast): Allow a boolean to be cast into a
17903 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17905 * parse.y: (class_declaration:): Fixed indentation.
17906 (class_member_declaration:): Extra `;' after field declaration now
17908 (interface_declaration:): Removed debug messages in error reports.
17909 (patch_binop): Nodes created and returned inherit the orignal
17910 node's COMPOUND_ASSIGN_P flag value.
17911 (patch_cast): Fix cast from char to floating point.
17913 1999-01-25 Andrew Haley <aph@cygnus.com>
17915 * except.c, java-except.h (expand_resume_after_catch): new
17917 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17918 to branch back to main flow of control after a catch block.
17920 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17922 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17923 $(srcdir)/../system.h.
17924 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17925 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17926 (jcf-write.o): Likewise.
17927 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17928 (mangle.o): Depend on $(srcdir)/../toplev.h.
17929 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17930 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17932 * class.c: Include output.h and parse.h.
17933 (mangled_classname): Add the `const' keyword to a char*.
17934 (find_named_method): Hide unused function definition.
17935 (build_utf8_ref): Change type of variable `c' to unsigned char.
17936 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17937 (build_class_ref): Add the `const' keyword to a char*.
17938 (layout_class_method): Remove unused variable `buf'.
17940 * decl.c (find_local_variable): Remove unused variable `rtl'.
17941 (pushdecl): Likewise for variables `different_binding_level' and
17943 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17944 (maybe_build_cleanup): Likewise for parameter `decl'.
17946 * except.c (expand_start_java_handler): Mark parameter `range'
17947 with ATTRIBUTE_UNUSED.
17949 * expr.c: Include except.h.
17950 (pop_type): Remove unused variable `i'.
17951 (pop_value): Likewise for variables `n_words' and `i'.
17952 (expand_java_arrayload): Likewise for variable `convert'.
17953 (java_lang_expand_expr): Likewise for variables `op0', `type',
17954 `mode', `unsignedp', `node' and `elements'.
17955 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17957 (process_jvm_instruction): Add a `const' qualifier to a char*.
17959 * gjavah.c (output_directory): Add the `const' keyword to a char*.
17960 (temp_directory): Likewise.
17961 (print_c_decl): Likewise.
17962 (print_method_info): Likewise.
17963 (decode_signature_piece): Likewise.
17964 (print_mangled_classname): Likewise.
17966 * java-except.h: Provide prototypes for maybe_start_try,
17967 maybe_end_try and add_handler.
17969 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17970 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
17971 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17972 init_expr_processing, push_super_field, init_class_processing,
17973 can_widen_reference_to, class_depth, verify_jvm_instructions,
17974 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17975 set_local_type, merge_type_state, push_type, load_type_state,
17976 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17977 emit_unicode_mangled_name): Add prototypes.
17979 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17980 (print_signature_type): Use ISDIGIT, not isdigit.
17981 (print_signature): Remove unused variable `j'.
17983 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17984 int when comparing against one.
17986 * jcf-parse.c: Include toplev.h.
17988 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
17989 (localvar_free): Remove unused variable `i'.
17990 (generate_bytecode_conditional): Likewise for variable `kind'.
17992 * jv-scan.c: Include config.h and system.h. Remove redundant
17993 OS header and gansidecl.h includes.
17994 (warning): Add the `const' keyword to a char*. Also add
17995 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
17996 __STDC__, when determining whether to use ANSI-isms.
17997 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
17998 (xmalloc): Don't redundantly prototype here.
17999 (main): Remove unused parameter `envp'. Also fix the arguments
18000 passed to function `fatal' to match the format specifier.
18002 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
18004 * mangle.c: Include toplev.h.
18005 (emit_unicode_mangled_name): Declare parameter `len'.
18007 * parse.y (parse_warning_context): Add the `const' keyword to a
18008 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
18009 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
18010 (issue_warning_error_from_context): Add the `const' keyword to
18012 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
18013 not `__STDC__' for whether to use ANSI-isms.
18015 * typeck.c (incomplete_type_error): Mark parameters `value' and
18016 `type' with ATTRIBUTE_UNUSED.
18017 (parse_signature_type): Use ISDIGIT, not isdigit.
18019 * verify.c (check_pending_block): Add the `const' keyword to a char*.
18020 (verify_jvm_instructions): Likewise. Remove unused variables
18021 `field_name' and `default_val'.
18023 * zextract.c: Include config.h and system.h. Remove redundant
18024 OS header includes.
18026 * zipfile.h: Prototype `read_zip_archive'.
18028 1999-01-21 Andrew Haley <aph@cygnus.com>
18030 * typeck.c (convert): Allow conversions to void type: some
18031 optimizations in gcc do this.
18033 1999-01-21 Andrew Haley <aph@cygnus.com>
18035 * typeck.c (convert_ieee_real_to_integer): New function.
18036 (convert): When not using fast-math and using hardware fp, convert
18037 an IEEE NaN to zero.
18039 1999-01-18 Andrew Haley <aph@cygnus.com>
18041 * parse.y (patch_binop): Do a type conversion from signed to
18042 unsigned and then back to signed when a ">>>" is found.
18044 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
18046 * java-tree.h: (check_for_initialization): Added prototype.
18047 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
18048 * parse.y (do_resolve_class): Removed unused locals.
18049 (read_import_dir): Likewise.
18050 (resolve_qualified_expression_name): Array creation
18051 expressions are valid primary expressions.
18052 (qualify_ambiguous_name): Likewise.
18053 (patch_synchronized_statement): Removed unused local.
18055 1999-01-17 Jeffrey A Law (law@cygnus.com)
18057 * Makefile.in (zextract.o): Add dependencies.
18059 * Makefile.in: Do not put ^Ls at the start of a line.
18061 1999-01-15 Per Bothner <bothner@cygnus.com>
18063 * expr.c (process_jvm_instruction): Coerce to correct Throwable
18064 sub-type the result of the call that gets the exception value.
18066 * parse.y (java_complete_expand_methods): If flags_syntax_only,
18067 don't call finish_class.
18069 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
18070 clear found before continuing.
18072 * verify.c (verify_jvm_instructions): On an array load, allow
18073 and handle top of stack to be TYPE_NULL.
18075 * gjavah.c (generate_access): Translate Java package private or
18076 protected access to C++ public, but with a comment.
18078 1999-01-13 Andrew Haley <aph@cygnus.com>
18080 * expr.c (generate_name): Name prefix changed to avoid clashes
18081 with assembler temp labels.
18083 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
18084 MODIFY_EXPR. Without this, code for the assignment may not be
18085 generated at all and the synchronized statement will read an
18086 uninitialized variable.
18088 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
18090 * class.c (maybe_layout_super_class): Fixed returned value.
18091 * lex.c: Added 1999 to the copyright.
18092 (java_init_lex): Initialize java_lang_imported.
18093 * lex.h: Added 1999 to the copyright.
18094 * parse.h: Added 1999 to the copyright.
18095 (REGISTER_IMPORT): Fixed typo in trailing macro.
18096 (CURRENT_OSB): New macro.
18097 (struct parser_ctxt): New fields osb_depth, osb_limit.
18098 * parse.y (java_lang_id): New global variable.
18099 (type_import_on_demand_declaration): Don't import java.lang.* twice.
18100 (array_creation_expression:): Use CURRENT_OSB.
18101 (dims:): Uses a stack to keep track of array dimensions.
18102 (cast_expression:): Use CURRENT_OSB.
18103 (find_expr_with_wfl): Return NULL if node found doesn't meet the
18105 (register_fields): Fixed typos in comment.
18106 (check_method_redefinition): Fixed comment indentation.
18107 (java_check_regular_methods): Set saved found wfl to NULL after
18108 having reinstalled it in the previously found DECL_NAME.
18110 1999-01-10 Richard Henderson <rth@cygnus.com>
18112 * gjavah.c (java_float_finite): Use a union to do type punning.
18113 (java_double_finite): Likewise.
18115 1999-01-09 Per Bothner <bothner@cygnus.com>
18117 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
18118 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18119 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
18120 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
18121 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18122 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
18124 1999-01-08 Per Bothner <bothner@cygnus.com>
18126 * check-init.c (check_init): If compiling to native, we don't
18127 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
18129 1999-01-08 Tom Tromey <tromey@cygnus.com>
18131 * parse-scan.y (variable_declarator_id): Set or increment
18133 (bracket_count): New global.
18134 (formal_parameter): Handle case where bracket pairs trail variable
18137 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
18139 * jcf-parse.c (yyparse): variable len changed from a char to an
18140 int to prevent overflow.
18142 1999-01-06 Per Bothner <bothner@cygnus.com>
18144 * java-tree.h: Declare read_class.
18145 * jcf-parse.c (read_class): New function.
18146 (load_class): Now just call read_class.
18148 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
18149 * jcf-parse.c (parse_source_file): Declare save_error_count,
18150 which is needed by java_parse_abort_on_error macro,
18151 * parse.y (java_layout_classes, java_expand_classes): Likewise.
18153 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
18154 constructor, if initializing a static field.
18155 (patch_new_array_init): Set TREE_CONSTANT if it is.
18156 * expr.c (java_lang_expand_expr): For a static array constructor
18157 of primitive elements, allocate the array itself statically.
18158 Disabled until we can set the vtable field statically.
18160 * check-init.c: New file. Checks for definite assignment.
18161 * Makefile.in (JAVA_OBJS): Add check-init.o.
18162 * parse.y (java_complete_expand_method): Call check_for_initialization.
18163 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
18165 1999-01-06 Graham <grahams@rcp.co.uk>
18167 * parse.y : include system.h instead of including
18168 standard headers directly with the exception of <dirent.h>.
18170 1999-01-06 Per Bothner <bothner@cygnus.com>
18172 * lex.h: Moved static function declarations to lex.c,
18173 to shut up some -Wall warnings.
18174 * lex.c: Static function declarations moved here.
18175 * jcf-dump.c: Small fixes to shut up -Wall warnings.
18177 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18179 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18181 1998-12-22 Per Bothner <bothner@cygnus.com>
18183 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
18184 * verify.c (verify_jvm_instructions): Fix off-by-one error.
18186 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
18187 (localvar_alloc): Change return type to void,
18188 (emit_unop): Remove unused variable size.
18190 * jcf-write.c (struct jcf_block): Add new union.
18191 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
18192 (call_cleanups): New functions.
18193 (struct jcf_partial): New fields num_finalizers and return_value_decl.
18194 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
18195 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18196 * lang.c (lang_init): Call using_eh_for_cleanups.
18197 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
18198 completing operands to patch_synchronized_statement.
18199 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18200 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18201 WITH_CLEANUP_EXPR instead of TRY_EXPR.
18203 1998-12-20 John F. Carr <jfc@mit.edu>
18205 * Make-lang.in: Comment out control-Ls; they upset some makes.
18207 1998-12-18 Tom Tromey <tromey@cygnus.com>
18209 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18212 1998-12-17 Tom Tromey <tromey@cygnus.com>
18214 * parse.y (DIR_SEPARATOR): New define.
18215 (check_class_interface_creation): Use it.
18217 * parse-scan.y (report_main_declaration): Recognize
18218 `java.lang.String' in argument to main.
18220 1998-12-16 Per Bothner <bothner@cygnus.com>
18222 * parse.y (create_interface): Remove bogus test.
18224 1998-12-16 Per Bothner <bothner@cygnus.com>
18226 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
18227 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
18229 1998-12-16 Tom Tromey <tromey@cygnus.com>
18231 * parse-scan.y (qualified_name): Use correct sprintf format.
18233 1998-12-15 Tom Tromey <tromey@cygnus.com>
18235 * gjavah.c (print_field_info): Changed how most negative number is
18238 1998-12-14 Per Bothner <bothner@cygnus.com>
18240 * parse.y (fold_constant_for_init): New function.
18241 (resolve_expression_name): Don't replace static final
18242 constant-initialized fields by its value.
18243 (java_complete_lhs): New. Same as java_complete_tree, except does
18244 not replace static final constant-initialized fields by their values.
18245 (register_fields): If there is an initializer, set DECL_INITIAL and
18246 MODIFY_EXPR_FROM_INITIALIZATION_P.
18247 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
18248 Only call patch_initialized_static_field if
18249 MODIFY_EXPR_FROM_INITIALIZATION_P.
18250 (patch_initialized_static_field): If not valid constant, clear
18253 * parse.y (lookup_field_wrapper): Fix thinko.
18255 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
18256 set and restore global lineno.
18258 1998-12-14 Tom Tromey <tromey@cygnus.com>
18260 * gjavah.c (print_field_info): If value to print is the smallest
18261 value of its size, then print as hex to avoid later warnings from
18264 1998-12-14 Tom Tromey <tromey@cygnus.com>
18266 * gjavah.c (decompile_method): Decompile `return null'.
18267 (process_file): Generate `#pragma interface'.
18268 (method_declared): New global.
18269 (print_method_info): Set it.
18270 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18271 (print_method_info): Handle abstract methods.
18273 1998-12-13 Per Bothner <bothner@cygnus.com>
18275 * parse.y (patch_method_invocation): If class_decl is null
18276 (e.g. an array type), use original type.
18278 * parse.y (check_thrown_exceptions): Temporary hack to suppress
18279 errors about uncaught exception from clone (of array, specifically).
18281 1998-12-13 Tom Tromey <tromey@cygnus.com>
18283 * gjavah.c (decompile_method): Handle all types of `return'
18284 opcode. Decompile `return this' and `return'.
18285 (method_access): New global.
18286 (print_method_info): Set it.
18287 (decompile_method): Don't decompile a synchronized method.
18289 1998-12-13 Tom Tromey <tromey@cygnus.com>
18291 * jcf-reader.c (jcf_parse_one_method): Recognize
18293 * gjavah.c (HANDLE_END_METHOD): New macro.
18294 (HANDLE_CODE_ATTRIBUTE): New macro.
18295 (decompile_method): New function.
18296 (print_method_info): Don't print `;\n' at end of function decl.
18297 Include java-opcodes.h.
18298 (decompiled): New global.
18300 1998-12-12 Per Bothner <bothner@cygnus.com>
18302 * class.c (build_class_ref): Handle PRIMTYPE.class if
18303 flag_emit_class_files.
18304 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
18305 if flag_emit_class_files.
18306 * parse.y (java_complete_tree): Pre-liminary support for
18307 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18309 * parse.y (patch_synchronized_statement): Don't call monitorexit
18310 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
18312 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
18314 * zipfile.h (opendir_in_zip): New declaration.
18315 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
18316 (opendir_in_zip): New function, using code from open_in_zip.
18317 (open_in_zip): Call opendir_in_zip.
18318 (find_class): Remove no-longer-used do_class_file parameter,
18319 but add source_ok parameter. Change logic so if we find a .java file,
18320 we don't look for .class in later classpath emtries.
18321 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
18322 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
18323 * gjavah.c: Update call to find_class.
18324 * jcf-dump.c: Likewise.
18326 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
18327 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
18328 nothing if body is empty_stmt_node.
18329 Various little fixes so SP gets correctly adjusted.
18330 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18331 For CALL_EXPR, test if static first.
18332 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
18333 such as the ones we create for Object and Class.
18334 Set and restore current_function_decl.
18335 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18336 (note_possible_classname): New function.
18337 (read_import_entry): Removed. Merged with read_import_dir.
18338 (read_import_dir): Don't call find_class - that only gives us
18339 the first classpath entry having the needed package.
18340 Use the struct buffer data structure from buffer.h.
18341 (read_import_dir, find_in_imports_on_demand): The remembered
18342 class names now use '.' (not '/') as package separator.
18344 * parse.y (java_complete_expand_methods): Call write_classfile
18345 here, and not in java_expand_classes (which only gets first class).
18347 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
18349 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
18350 (register_fields): If a static fields has an initializer, just
18351 chain it on ctxp->static_initialized, and handle later.
18352 (java_complete_expand_methods): Force <clinit> first.
18353 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
18354 - it's already been completed.
18355 (patch_initialized_static_field): New function.
18356 (java_complete_field): Call it.
18358 1998-12-12 Per Bothner <bothner@cygnus.com>
18360 * expr.c (encode_newarray_type, build_new_array): New functions.
18361 * java-tree.h: Declare build_new_array.
18362 * jcf-write.c (patch_newarray): Use build_new_array.
18364 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
18365 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
18367 * parse.y (patch_new_array_init): Re-organize.
18368 Now is passed the actual array (pointer) type of the value.
18369 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18370 (patch_array_constructor): Removed - merged into patch_new_array_init.
18371 (java_complete_tree): Update patch_new_array_init.
18373 * jcf-write.c (find_constant_index): New function.
18374 (generate_bytecode_insns): Use find_constant_index.
18375 (generate_classfile): Use find_constant_index for ConstantValue.
18377 1998-12-11 Tom Tromey <tromey@cygnus.com>
18379 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18380 * decl.c (init_decl_processing): Renamed dtable -> vtable.
18381 * class.c (make_class_data): Renamed dtable -> vtable, and
18382 dtable_method_count -> vtable_method_count.
18384 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18386 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18387 global variables, initialized.
18388 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18389 Declared new global variables.
18390 * lex.c (java_lex): Return long_zero_node, float_zero_node,
18391 double_zero_node, integer_zero_node upon direct matching.
18392 * parse.y (purify_type_name): Added function prototype.
18393 (duplicate_declaration_error_p): Consider new_type as potentially
18394 being a incomplete type. Use purify_type_name on type string.
18395 (method_header): saved_type: unused variable removed. Don't figure
18396 return type if method name is invalid.
18397 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18398 processed by patch_unaryop.
18399 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18400 increment/decrement node into its original type after binary
18401 numeric promotion on its operands.
18403 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18405 * parse.y (array_initializer:): Array init operand is NULL_TREE
18406 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18407 now an error. Fixed indentation problems.
18408 (patch_string): Handle error_mark_node as an argument.
18409 (patch_new_array_init): Fixed indentation problems.
18410 (array_constructor_check_entry): Removed check on null wfl_value.
18411 Return an error if wfl_value's walk returns an error.
18413 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
18415 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18416 * lex.c (java_lex): Remember column position before advancing one
18417 token. Retain location information on OCB_TK.
18418 * lex.h (typedef struct java_lc): Added new field.
18419 * parse.h (GET_SKIP_TYPE): New macro.
18420 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18421 * parse.y (build_new_array_init, patch_new_array_init,
18422 patch_array_constructor, maybe_build_array_element_wfl,
18423 array_constructor_check_entry): New function prototypes.
18424 (switch_block:): Tagged <node>.
18425 (OCB_TK): Tagged <operator>.
18426 (array_initializer:): Installed actions.
18427 (variable_initializer): Build location information on element if
18429 (switch_statement:): Fixed indentation typo.
18430 (switch_block:): Redefined default action.
18431 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18432 (patch_assignment): Removed duplicate code.
18433 (maybe_build_array_element_wfl, build_new_array_init,
18434 patch_new_array_init, patch_array_constructor,
18435 array_constructor_check_entry): New functions.
18437 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
18439 * parse.y (array_initializer): Tagged <node>.
18440 (variable_initializer:): Use default rule.
18441 (array_initializer:): Defined actions.
18442 (variable_initializers:): Likewise.
18443 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18444 non-static field accesses.
18445 (patch_invoke): Fixed indentation typo.
18446 (java_complete_tree): Likewise.
18447 (build_labeled_block): Changed leading comment. Generate an error
18448 in case of duplicate loop labels.
18449 (patch_conditional_expr): Patch results of string concatenation
18452 1998-12-06 Per Bothner <bothner@cygnus.com>
18454 * constants.c (find_methodref_index): When the class is an interface,
18455 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18457 * decl.c (finit_identifier_node): Use "$finit$", rather than
18458 "<finit>" (which Sun's verifier rejects).
18459 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
18460 (generate_field_initialization_code): Removed.
18461 (fix_constructors) Don't add call to $finit$ here (wrong order).
18462 (patch_method_invocation): Add $finit$ call here.
18464 * java-tree.h (CALL_USING_SUPER): New macro.
18465 * parse.y (patch_invoke): Remove im local variable.
18466 (patch_method_invocation, patch_invoke): Don't pass super parameter.
18467 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
18468 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
18470 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
18472 * parse.y (java_complete_tree): Don't complain about unreachable
18473 statement if it is empty_stmt_node.
18475 * jcf-write.c (find_constant_wide): New function.
18476 (push_long_const): Use find_constant_wide.
18478 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
18479 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
18480 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18481 Emit invokeinterface when calling an interface method.
18482 Emit invokespecial also when calling super or private methods.
18484 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
18486 1998-12-06 Per Bothner <bothner@cygnus.com>
18488 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
18490 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18492 * java-tree.h (java_layout_seen_class_methods): New function
18494 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18495 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18496 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18497 * parse.y (method_declarator:): Defined action.
18498 (issue_warning_error_from_context): input_filename saved, set to
18499 the appropriate value and restored after java_error is called.
18500 (build_unresolved_array_type): Fixed comment.
18501 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18502 (method_header): Deal with return type the same way type are
18503 handled for fields and method's parameters and local variables
18505 (check_method_redefinition): Removed extra CR.
18506 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18507 (java_layout_seen_class_methods): New function.
18508 (java_layout_classes): Call java_layout_seen_class_methods.
18510 1998-12-03 Per Bothner <bothner@cygnus.com>
18512 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
18514 1998-12-03 Per Bothner <bothner@cygnus.com>
18516 * jcf-dump.c (main): Fix error message.
18517 * jcf-path.c (add_entry): Style fix.
18519 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18521 * class.c (layout_class_method): Call build_java_argument_signature
18522 on constructors too.
18523 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18524 (patch_method_invocation): Define a primary when resolving an
18525 expression name. Augmented comment on code checking illegal `this'
18526 usage. Loosened it test by accepting NEW_CLASS_EXPR.
18528 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18530 * class.c (layout_class_method): Don't report error on non-static
18531 overriding static if the method is private.
18532 * java-tree.h (finish_class): Prototype added.
18533 * lex.c (java_get_line_col): Handle col argument -2 value.
18534 * parse.h: All static method declarations moved to parse.y.
18535 * parse.y: Now contains all static method declarations previously
18537 (find_expr_with_wfl, missing_return_error,
18538 unreachable_stmt_error): New functions.
18539 (java_get_real_method_name): Identify constructors bearing class
18540 names in source code compiled classes only.
18541 (java_complete_expand_methods): Call missing_return_error.
18542 (invocation_mode): Private methods invoked as static methods.
18543 (java_complete_tree): Call unreachable_stmt_error.
18545 1998-12-01 Tom Tromey <tromey@cygnus.com>
18547 * Makefile.in (+target): Removed.
18548 (+xmake_file): Likewise.
18549 (+tmake_file): Likewise.
18550 (.NOEXPORT): Removed duplicate.
18552 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18554 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18556 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
18558 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18559 libiberty.h. Provide an xmalloc definition.
18561 * jvspec.c: Remove the xmalloc prototype.
18563 * parse-scan.y: Include config.h and system.h. Don't include
18564 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18565 Provide an xstrdup definition.
18567 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
18569 * jcf-path.c (add_entry): Recognize ".jar" too.
18570 * lang-specs.h: Likewise.
18572 1998-11-26 Per Bothner <bothner@cygnus.com>
18574 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18575 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18577 * jcf-write.c (generate_bytecode_insns):
18578 Handle pre/post-increment/decrement of long.
18580 * jcf-write.c (generate_bytecode_insns):
18581 Handle missing exception handler (finally for synchronized).
18583 1998-11-25 Per Bothner <bothner@cygnus.com>
18585 * java-tree.h (end_params_node): Declare global.
18586 * decl.c (end_params_node): New global.
18587 (init_decl_processing, start_java_method): Use end_params_node for
18588 end of list of parameter types. Follows correct gcc conventions.
18589 * expr.c (pop_argument_types, pop_arguments): Likewise.
18590 * lang.c (put_decl_node): Likewise.
18591 * typeck.c (various places): Likewise.
18592 * class.y (various places): Likewise.
18593 * parse.y (various places): Likewise.
18595 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18596 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18598 * class.c: Add #include flags.h, remove no-longer needed declaration.
18600 * class.c (layout_class_method): Remove commented-out code, re-format.
18601 Don't add vtable entry (or index) for private methods.
18602 * expr.c (expand_invoke): A private method is implicitly final.
18603 * class.c (make_class_data): If inlining or optimizing,
18604 skip private methods.
18606 * class.c (finish_class): New function. Calls existing methods,
18607 but alls emits deferred inline functions.
18608 * jcf-parse.c (parse_class_file): Call finish_class.
18609 * parse.y (java_complete_expand_methods): Likewise.
18611 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18613 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18615 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18617 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18619 1998-11-24 Per Bothner <bothner@cygnus.com>
18621 * (generate_classfile): Always write class access flag with
18624 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18626 * class.c (maybe_layout_super_class): New function.
18627 (layout_class): Reorganized. Loop on class methods dispatched into
18628 a new function. Call maybe_layout_super_class.
18629 (layout_class_methods, layout_class_method): New functions.
18630 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18632 (expand_invoke): Likewise.
18633 * java-tree.h (all_class_list): New global variable declared.
18634 (layout_class_methods, layout_class_method): New function
18636 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18637 * jcf-parse.c (all_class_list): New global variable.
18638 (load_class): Extended what class_or_name can be. Use parser
18639 context mechanism to save globals before calling jcf_parse.
18640 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18641 is set on the file name.
18642 (jcf_parse): Layout class methods when Object is loaded, otherwise
18643 record class in all_class_list for delayed method layout.
18644 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18645 * lang.c (put_decl_node): Decode <init> into the decl context
18647 * lex.c (java_allocate_new_line): Use xmalloc.
18648 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18649 pointers, not TREE_LIST elements.
18650 (struct parser_ctxt): Fixed comment indentations, added comments
18651 and reordered some fields.
18652 (java_check_methods): Function prototype removed.
18653 * parse.y (java_push_parser_context): Use xmalloc.
18654 (java_parser_context_restore_global): Pop extra pushed ctxp only
18655 when there's nothing next.
18656 (maybe_create_class_interface_decl): Fixed comment, add new
18657 created class decl to all_class_list.
18658 (method_header): Use GET_REAL_TYPE on argument's types.
18659 (method_declarator): Use GET_REAL_TYPE, change type to the real
18660 type in TREE_LIST dependency node. Build argument list with the
18662 (create_jdep_list): Use xmalloc. Removed allocation error message.
18663 (obtain_incomplete_type): Fixed leading comment. Broadened
18664 incoming argument meaning.
18665 (register_incomplete_type): Use xmalloc. Removed allocation error
18667 (safe_layout_class): Fixed leading comment.
18668 (jdep_resolve_class): Reversed if statement condition and switch
18669 if and else bodies.
18670 (resolve_and_layout): Fixed leading comment. Broadened incoming
18672 (complete_class_report_errors): New local variable name, for
18673 clarity. purify_type_name used for all error cases.
18674 (java_get_real_method_name): Stricter check on constructors.
18675 (java_check_regular_methods): Reverse methods list only if not
18676 already laid out. Layout artificial constructor.
18677 (java_check_methods): Deleted.
18678 (source_start_java_method): Obtain incomplete type for patchable
18680 (java_layout_classes): Fixed leading comment. Use
18681 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18682 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18683 before returning. Fixed comments.
18684 (java_expand_classes): Check for errors up front.
18685 (patch_method_invocation): Class to search is resolved and laid
18688 1998-11-24 Per Bothner <bothner@cygnus.com>
18690 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18692 * javaop.h (int8): Removed - not used.
18693 (jbyte): Redefine portably with correct signedness.
18695 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18697 * jcf-write.c (generate_bytecode_insns): Fix typo
18698 OPCODE_getstatic to OPCODE_getfield.
18700 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18701 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18702 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18704 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18706 * jcf-parse.c (jcf_parse_source): Function returned type is
18707 void. Added prototype.
18708 (jcf_parse): Function returned type is void.
18709 (yyparse): Remove call to fclose on the last parsed file.
18711 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18713 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18715 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18716 (layout_class): Cope with methods featuring WFL in decl names.
18717 * decl.c (unqualified_object_id_node): New global variable,
18719 (build_decl_no_layout): Removed.
18720 * expr.c (build_primtype_type_ref): Handle Double.
18721 (java_lang_expand_expr): Fixed indentations.
18722 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18723 (flag_wall, flag_redundant, flag_not_overriding,
18724 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18725 variable declarations.
18726 (build_decl_no_layout): Removed prototype.
18727 (java_get_real_method_name): Added prototype.
18728 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18729 (java_parse_abort_on_error): Macro now just returns.
18730 * jcf-parse.c (jcf_parse_source): Check fclose returned
18731 value. Call emit_register_classes if java_report_errors returns
18733 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18734 flag_static_local_jdk1_1): New integer flags.
18735 (lang_decode_option): New flags set here.
18736 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18737 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18738 the flag_redundant variable.
18739 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18740 when parsing java.lang.Object class.
18741 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18742 NULL_TREE to build.
18743 (resolve_qualified_expression_name): Fixed indentation.
18744 (patch_array_ref): Changed prototype.
18745 (not_initialized_as_it_should_p): Prototype removed.
18746 (java_report_errors): Added function prototype.
18747 * parse.y (formal_parameter:): Changed error message for not yet
18748 supported final parameters.
18749 (class_type_list:): Set both PURPOSE and VALUE of created
18750 TREE_LIST to be class_type.
18751 (primary_no_new_array:): Handle class literals on primitive types.
18752 (parse_warning_context): Reinstalled correct force_error and
18753 do_warning flags setups.
18754 (java_report_errors): Changed prototype. Return java_error_count
18756 (variable_redefinition_error): Consider treating variable type as
18758 (create_interface): Warn about redundant abstract modifier if
18759 flag_redundant is set. Changed error message.
18760 (lookup_field_wrapper): Save/restore globals before/after looking
18762 (duplicate_declaration_error_p): Consider treating declaration
18763 type as a fake pointer.
18764 (register_fields): Extract real type from dependency node. Check
18765 for duplicate field declaration after type adjustment. Use
18766 DECL_INITIAL to store static final initialized values.
18767 (method_header): Extract real function type from dependency node.
18768 (check_abstract_method_header): Use GET_METHOD_NAME.
18769 (obtain_incomplete_type): Layout fake pointer type.
18770 (safe_layout_class): Don't try to check for methods before layout.
18771 (java_complete_class): Don't check for correct throws clause
18772 elements inheritance here.
18773 (resolve_and_layout): Broadened name parameter meaning.
18774 (reset_method_name): Use GET_METHOD_NAME.
18775 (java_get_real_method_name): New function.
18776 (java_check_regular_methods): Don't check methods in
18777 java.lang.Object. Verify lineage of throws clause elements. Use
18778 flag_no_overriding in warning report.
18779 (check_throws_clauses): Don't check if class was from
18780 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18781 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18782 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18783 warning on unsupported final local variables. Use build_decl
18784 instead of build_decl_no_layout. Get real local variable type from
18786 (source_start_java_method): Get real parameter type from
18787 dependency node. Call build_decl instead of build_decl_no_layout.
18788 (java_layout_classes): Reverse tree and layout type and class as
18789 required. Mark class as loaded when done.
18790 (resolve_field_access): Fixed indentation. Restricted condition
18791 leading to static field access code generation. Set field_type
18792 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18793 (resolve_qualified_expression_name): Initialize type_found to
18794 null. Handle static field resolved during qualification. Fixed
18795 layout on non primitive field decl types.
18796 (not_accessible_p): Fixed typo in comment.
18797 (patch_method_invocation): Resolve and layout class to search from
18799 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18800 layout non primitive type, if necessary. Make method node only to
18802 (find_applicable_accessible_methods_list): Consider WFL'ed method
18803 decl names. Fixed indentation.
18804 (argument_types_convertible): Resolve and layout target type if
18806 (java_complete_tree): Fixed indentation problems. Rewrote
18807 CALL_EXPR thrown exceptions check. Re-installed further processing
18808 of the assignment in certain cases.
18809 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18810 inlining on class literals.
18811 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18813 (valid_method_invocation_conversion_p): Likewise.
18814 (patch_string): Temporary disable forbidden use of `this' in
18815 explicit constructor invocations when doing string concatenation
18816 within their scope.
18817 (patch_unaryop): Added comment. Reinstalled code to disable
18818 further check on assignment operation with cast expression RHS.
18819 (patch_switch_statement): Fixed indentation.
18820 (build_try_statement): Call build_decl instead of
18821 build_decl_no_layout.
18822 (patch_synchronized_statement): Likewise.
18823 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18824 IS_UNCHECKED_EXPRESSION_P.
18825 (check_thrown_exceptions_do): Changed leading comment. Resolve and
18826 layout argument exception type.
18827 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18828 of IS_UNCHECKED_EXPRESSION_P.
18830 1998-11-18 Anthony Green <green@cygnus.com>
18832 * jcf-parse.c (yyparse): Open class file in binary mode.
18834 1998-11-15 Per Bothner <bothner@cygnus.com>
18836 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18838 * jcf-write.c (perform_relocations): Move check out one loop.
18840 1998-11-15 Anthony Green <green@hoser.cygnus.com>
18842 * Make-lang.in: Fix reference to srcdir.
18843 * jv-scan.c: Add missing xmalloc prototype.
18844 * jvgenmain.c: Ditto.
18846 1998-11-15 Per Bothner <bothner@cygnus.com>
18848 * decl.c (error_mark_node), java-tree.h: New global.
18849 * parse.y: Use empty_stmt_node instead of size_zero_node.
18850 (build_if_else_statement): If missing else, use empty_stmt_node.
18852 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18853 (java_complete_expand_method): Complain if return is missing.
18854 (java_check_regular_methods): Comment out incorrect error check.
18855 (not_accessible_p): Fix incorrect handling of protected methods.
18856 (patch_method_invocation): Pass correct context to not_accessible_p.
18857 (find_applicable_accessible_methods_list): Likewise.
18858 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18859 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18860 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18861 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18863 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18864 (push_int_const): Remove reundant NOTE_PUSH.
18865 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18866 (- case SWITCH_EXPR): Fix code generation bug.
18867 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18868 (generate_classfile): More robust for abstract methods.
18870 1998-11-15 Anthony Green <green@cygnus.com>
18872 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18873 * Make-lang.in: Ditto.
18875 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18876 * jvgenmain: Ditto.
18878 1998-11-15 Per Bothner <bothner@cygnus.com>
18880 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18882 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18884 1998-11-14 Per Bothner <bothner@cygnus.com>
18886 Allow uses of interface types to verify. This is not really
18887 type-safe, but it matches what Sun does, and is OK as long as
18888 there are appropriate run-time checks.
18889 * verify.c (merge_types): If merging two interface types,
18890 just set the result to java.lang.Object.
18891 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18893 1998-11-13 Tom Tromey <tromey@cygnus.com>
18895 * gjavah.c (main): Handle --output-class-directory argument.
18896 * jvspec.c (lang_specific_driver): Translate `-d' into
18897 -foutput-class-dir.
18898 * jcf.h (jcf_write_base_directory): Declare.
18899 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18900 * lang-options.h: Mention -foutput-class-dir.
18901 * jcf-write.c (jcf_write_base_directory): New global.
18902 (make_class_file_name): Put generated .class file into `-d'
18903 directory, or into source directory if -d not given. Function now
18905 (write_classfile): Free class file name. Handle case where class
18907 (DIR_SEPARATOR): New macro.
18908 Include <sys/stat.h>
18910 * Makefile.in (prefix): New macro.
18912 1998-11-12 Per Bothner <bothner@cygnus.com>
18914 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18915 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18916 here (done in patch_invoke instead).
18917 (case_identity): Moved here from parse.y.
18919 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18920 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18921 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18922 so they can be efficiently scanned without recursion.
18923 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18924 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
18925 in BLOCK iteratively, rather than recursively.
18927 * parse.y (do_unary_numeric_promotion): New function.
18928 (patch_unaryop, patch_binop, patch_array_ref): Use it.
18930 * parse.y (patch_newarray): Various fixes.
18932 Re-do handling of switch statements (for proper block scoping).
18933 * parse.y: Add just a single block for the enture switch block,
18934 but don't create any "case blocks".
18935 (group_of_labels): Rmeoved unneeded non-terminal.
18936 CASE_EXPR and DEFAULT_EXPR are added to current block.
18937 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
18938 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18939 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
18940 * parse.y (wfl_operator, print_int_node): Make non-static.
18941 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
18942 as part of recursive scan of block.
18943 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
18944 (patch_switch_statement): Most tests move dinto java_complete_tree.
18946 * parse.y: Make various production be non-typed (void).
18947 * parse.y (parse_error): Merged into issue_warning_error_from_context.
18948 * parse.y (add_stmt_to_compound): Don't create/change extra node.
18949 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
18951 * jcf-write.c (struct jcf_handler): New type.
18952 (struct jcf_switch_state): New type.
18953 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
18954 (alloc_handler, emit_unop, emit_reloc): New functions.
18955 (adjust_typed_op): Add extra parameter ("max type" offset).
18956 (emit_switch_reloc, emit_case-reloc): New function.
18957 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
18958 (generate_bytecode_insns): Support REAL_CST, switch statements,
18959 exception handling, method calls, object/array creation, and more.
18961 * class.c: Remove some unused variables.
18962 * constants.c (find_string_constant): New function.
18963 (count_constant_pool_bytes): Fix to correctly handle wide constants.
18964 * decl.c (complete_start_java_method): Don't _Jv_InitClass
18965 if flag_emit_class_files.
18967 1998-11-12 Tom Tromey <tromey@cygnus.com>
18969 * jcf-io.c (find_class): Added explanatory comment.
18971 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
18972 trailing slash to `.zip' entries.
18974 * jvspec.c (lang_specific_driver): Correctly handle case where
18975 GC_NAME not defined.
18977 1998-11-11 Tom Tromey <tromey@cygnus.com>
18979 * jvspec.c (GC_NAME): New define.
18980 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
18982 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18984 1998-11-11 Per Bothner <bothner@cygnus.com>
18986 * jcf-dump.c (TABLE_SWITCH): Fix typos.
18988 1998-11-11 Tom Tromey <tromey@cygnus.com>
18990 * jcf-dump.c (main): Correctly recognize `--'-style long options.
18992 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18994 * class.c (is_compiled_class): Call safe_layout_class for class
18995 compiled from source.
18996 * conver.h (convert_to_integer, convert_to_real,
18997 convert_to_pointer): Added prototypes.
18998 * decl.c (init_decl_processing): Non longer push the decls of
18999 `methodtable', `constants', `Class', `Field', `dispatchTable'
19000 `jexception' and `Method'.
19001 * expr.c (build_invokeinterface): New function.
19002 (expand_invoke): static variable CLASS_IDENT now in
19003 build_invokeinterface. Use build_invokeinterface.
19004 (expand_java_field_op): Moved code to inline
19005 java.lang.PRIMTYPE.TYPE into a function.
19006 (build_primtype_type_ref): New function.
19007 * java-tree.def (INSTANCEOF_EXPR): New tree code.
19008 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
19009 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
19010 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
19011 (DECL_LOCAL_STATIC_VALUE): New macro.
19012 (build_invokeinterface, build_primtype_type_ref): New function
19014 (java_parse_abort_on_error): Macro rewritten.
19015 * jcf-parse.c (current_method): Add comment to declaration.
19016 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
19017 Function prototypes fixed.
19018 (jcf_parse_source): push/pop parser context. save/restore global.
19019 (parse_source_file): Fixed leading comment. Now take a
19020 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
19021 classes and pop the parser context anymore.
19022 (yyparse): Push parser context, save globals, parse the source
19023 file, restore globals and pop the parser context when processing a
19025 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
19026 * lex.c (java_parse_doc_section): New function.
19027 (java_lex): Call java_parse_doc_section when appropriate. Build an
19028 operator around INSTANCEOF_TK.
19029 * lex.h (java_lineterminator, java_sprint_unicode,
19030 java_unicode_2_utf8, java_lex_error, java_store_unicode):
19031 Prototypes rewritten.
19032 (java_parse_escape_sequence, java_letter_or_digit_p,
19033 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
19034 java_read_unicode, java_store_unicode, java_read_char,
19035 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
19036 Added function prototypes.
19037 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
19039 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
19041 (struct parser_ctxt): New fields: deprecated,
19042 current_parsed_class_un, gclass_list.
19043 (fix_method_argument_names, issue_warning_error_from_context,
19044 resolve_package, lookup_package_type): New function prototypes.
19045 (resolve_expression_name): Fixed function prototype.
19046 (find_applicable_accessible_methods_list): Fixed indentation, added
19047 extra argument in prototype.
19048 (check_final_assignment, build_null_of_type, check_deprecation,
19049 check_method_redefinition, reset_method_name,
19050 java_check_regular_methods, java_check_abstract_methods,
19051 maybe_build_primttype_type_ref): New function prototype.
19052 * parse.y (conver.h): Include.
19053 (INSTANCEOF_TK): Tagged <operator>.
19054 (single_type_import_declaration): Use REGISTER_IMPORT macro.
19055 (relational_expression:): Build binop for instanceof.
19056 (java_push_parser_context): Remember ctxp->gclass_list across
19058 (java_pop_parser_context): Simply return if no context
19059 exists. Remember gclass_list across contexts.
19060 (issue_warning_error_from_context): New function.
19061 (parse_error_context): Don't setup ctxp->elc here. Call
19062 issue_warning_error_from_context instead.
19063 (parse_warning_context): Likewise.
19064 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
19065 setup. Link new class/interface to ctxp->gclass_list.
19066 (add_superinterfaces): Register interface as incomplete if not
19068 (create_class): Remember class unqualified name in
19069 ctxp->current_parsed_class_un. Check class deprecation.
19070 (register_fields): Check field deprecation. Remember static final
19071 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
19073 (method_header): New local variable ORIG_ARG. Use unqualified
19074 current class name for check on constructor errors. Promote return
19075 type if of record type. Argument list fix moved in
19076 fix_method_argument_names, called here. Check method deprecation.
19077 (fix_method_argument_names): New function.
19078 (method_declarator): Promote record typed arguments.
19079 (safe_layout_class): Check class methods before layout.
19080 (java_complete_class): Compute field layout when patched.
19081 (do_resolve_class): Try to load class after having it renamed
19082 after the package name.
19083 (get_printable_method_name): Use DECL_CONTEXT.
19084 (reset_method_name): New function.
19085 (check_method_redefinition): Use reset_method_name.
19086 (java_check_regular_methods): New local variable
19087 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
19088 names for error report. Check for compile-time error when method
19089 found has default (package) access.
19090 (java_check_abstract_methods): Now takes an interface DECL node as
19091 an argument. Also reinstall real name on unchecked
19092 overriding/hiding methods for error report.
19093 (java_check_methods): Fixed leading comment. Get classes to verify
19094 from ctxp->gclass_list. Use CHECK_METHODS macro and set
19095 CLASS_METHOD_CHECKED_P on class verification.
19096 (lookup_java_method2): Get real method name if necessary.
19097 (find_in_imports): Don't check package class access here.
19098 (resolve_package, lookup_package_type): New functions.
19099 (java_layout_classes): Fixed leading comment. Take classes to be
19100 laid out from ctxp->gclass_list.
19101 (java_complete_expand_methods): Don't expand native and abstract
19103 (java_expand_classes): New function.
19104 (resolve_expression_name): Use additional argument ORIG. Retrieve
19105 values of static final field of primitive types.
19106 (resolve_field_access): Handles static final field of promotive
19108 (resolve_qualified_expression_name): Handle STRING_CST as
19109 primaries and package name resolution. Check deprecation on found
19110 decls. Set where_found and type_found on non static field resolved
19111 during qualification. Layout non primitive field decl types.
19112 (check_deprecation): New function.
19113 (maybe_access_field): Simplified.
19114 (patch_method_invocation_stmt): Local variable CLASS_TYPE
19115 removed. Reverse method's argument when primary is a type. Don't
19116 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19117 instead. Include abstract class in the list of class searchable
19118 for constructors. Use DECL_CONTEXT of found method for access
19119 checks. Check method deprecation.
19120 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
19121 converting arguments. Handle INVOKE_INTERFACE.
19122 (lookup_method_invoke): Search constructor using existing
19123 infrastructure (don't rely on lookup_java_constructor anymore).
19124 (find_applicable_accessible_methods_list): Extra argument flag
19125 LC. Now include constructor in the search.
19126 (qualify_ambiguous_name): Conditional expression are primaries.
19127 (not_initialized_as_it_should_p): static final are always
19129 (java_complete_tree): Pass extra NULL argument to
19130 resolve_expression_name. Stricter test to carry on patching
19131 assignments. New case for INSTANCEOF_EXPR.
19132 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19133 (check_final_assignment, maybe_build_primttype_type_ref): New
19135 (patch_assignment): Detect resolved static finals and carry normal
19136 assignment error check on them. Inline PRIMTYPE.TYPE read access.
19137 (try_builtin_assignconv): Access constant 0 on all primitive
19139 (valid_builtin_assignconv_identity_widening_p): Accept identical
19140 types. Accept all promoted type on int type.
19141 (valid_ref_assignconv_cast_p): Accept a null pointer to be
19142 assigned to a reference.
19143 (valid_method_invocation_conversion_p): Accept to check null
19145 (build_binop): Merge declaration and initialization of local
19147 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
19148 numeric types. Improved validity test for qualify operators on
19150 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
19151 and PREINCREMENT_EXPR. Also detect resolved static finals of a
19152 primitive type and issue the appropriate error message.
19153 (resolve_type_during_patch): Mark class loaded when resolved.
19154 (patch_cast): Allow null to be cased to reference types.
19155 (build_null_of_type): New function.
19156 (patch_array_ref): Handle array on references correctly.
19157 (patch_return): Removed unused local variable MODIFY. Force
19158 boolean to be returned as integers. Allows null to be returned by
19159 a function returning a reference.
19160 * typeck.c (convert_to_integer, convert_to_real,
19161 convert_to_pointer): Prototypes moved to convert.h
19162 (lookup_argument_method): Use method real name, if necessary.
19164 1998-10-30 Tom Tromey <tromey@cygnus.com>
19166 * class.c (build_class_ref): Changed name of primitive classes to
19169 * class.c (make_class_data): Renamed fields: nmethods to
19170 method_count, method_count to dtable_method_count. Always set
19171 `state' field to 0.
19172 * decl.c (init_decl_processing): Likewise.
19174 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
19176 * class.c (layout_class): Don't mangle <finit>, produce
19177 __finit<class> instead. Don't verify artificial methods.
19178 * decl.c (finit_identifier_node): New declared global.
19179 (init_decl_processing): finit_identifier_node initialized.
19180 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19181 * java-tree.h (finit_identifier_node): Declared as extern.
19182 (struct lang_decl): New field called_constructor.
19183 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19184 (CLASS_HAS_FINIT_P): New macro.
19185 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19186 explicit constructor invocation.
19187 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19188 CALL_SUPER_CONSTRUCTOR_P): New macros.
19189 (write_classfile): Added prototype.
19190 * jcf-parse.c (jcf_parse_source): Parse and remember for
19191 generation if the file was seen on the command line.
19192 (parse_source_file): Don't write the class file here.
19193 (yyparse): Loop on files rewritten. Set current_jcf.
19194 (parse_zip_file_entries): Parse class file only if it was found.
19195 * lang.c (init_parse): Don't open command line provided filename
19197 (lang_parse): Don't set main_jcf anymore.
19198 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19199 (JCONSTRUCTOR_CHECK): New macro.
19200 (JBSC_TYPE_P): New macro.
19201 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19202 (COMPLETE_CHECK_OP_2): New macro.
19203 (struct parse_ctxt): New field explicit_constructor_p.
19204 (check_class_interface_creation): Fixed prototype indentation.
19205 (patch_method_invocation_stmt): Prototype reflects added argument.
19206 (patch_invoke): Likewise.
19207 (complete_method_declaration, build_super_invocation,
19208 verify_constructor_circularity,
19209 build_this_super_qualified_invocation, get_printable_method_name,
19210 patch_conditional_expr, maybe_generate_finit, fix_constructors,
19211 verify_constructor_super, create_artificial_method,
19212 start_artificial_method_body, end_artificial_method_body,
19213 generate_field_initialization_code): New function prototypes.
19214 * parse.y: Fixed leading comment
19215 (constructor_header:, constructor_body:, block_end:): Rules tagged
19217 (type_declaration:): Call maybe_generate_finit.
19218 (method_declaration:): Action for method_body: placed in new
19219 function complete_method_declaration, called here.
19220 (constructor_declaration:): Defined actions. Removed leading
19222 (constructor_header:): New rule with action.
19223 (constructor_body:): Rule rewritten using block_begin: and
19224 block_end:. Defined actions.
19225 (constructor_declarator:, explicit_constructor_invocation:):
19227 (block:): Use new rules block_begin: block_end:.
19228 (block_begin:, block_end:): New rules and actions.
19229 (block_statements:): Fixed error message for explicit
19231 (method_invocation:): Call build_this_super_qualified_invocation
19232 if primary is `this' or `super' was seen.
19233 (conditional_expression:): Action defined.
19234 (extra_ctxp_pushed_p): New static global flag.
19235 (java_parser_context_save_global): Create parser context if
19236 necessary. Use extra_ctxp_pushed_p to remember it.
19237 (java_parser_context_restore_global): Pop extra parser context if
19239 (build_array_from_name): Array on primitive types are marked
19241 (register_fields): Restore new name in field initializer
19242 expression if type was altered. Non static fields initialized upon
19243 declaration marked initialized.
19244 (maybe_generate_finit): New function.
19245 (maybe_generate_clinit): Use create_artificial_method,
19246 start_artificial_method_body, end_artificial_method_body. Generate
19247 debug info for enclosed initialization statements.
19248 (method_header): Fixed leading comment. Check constructor
19249 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19251 (complete_method_declaration, constructor_circularity_msg,
19252 verify_constructor_circularity): New functions.
19253 (get_printable_method_name): New function.
19254 (check_method_redefinition): Don't rename <finit> methods. Fix
19255 declared constructor names. Error message for
19256 constructors modified.
19257 (java_check_regular_methods): Local variable seen_constructor
19258 renamed saw_constructor. Skip verification on constructors. Create
19259 default constructor with create_artificial_method.
19260 (java_check_methods): Removed unnecessary empty line.
19261 (create_artificial_method, start_artificial_method_body,
19262 end_artificial_method_body): New functions.
19263 (java_layout_classes): Changed leading comment. Reverse fields
19264 list if necessary. Always layout java.lang.Object if being
19266 (java_complete_expand_methods): Verify constructor circularity.
19267 (java_complete_expand_method): Call fix_constructor on
19268 constructors. Local variable no_ac_found removed. Restore
19269 bindings if method body expansion failed.
19270 (fix_constructors, verify_constructor_super,
19271 generate_field_initialization_code): New function.
19272 (java_expand_classes): Fixed leading comment. Write class file
19274 (resolve_expression_name): Check for illegal instance variable
19275 usage within the argument scope of an explicit constructor
19277 (resolve_qualified_expression_name): Pass extra from_super flag
19278 when invoking patch_method_invocation_stmt. New case for
19279 conditional expression when used as a primary. Check for error
19280 when acquiring super.
19281 (patch_method_invocation_stmt): Added extra argument super. New
19282 local variable is_static_flag. Set class_to_search according to
19283 the nature of the constructor invocation. Don't add `this'
19284 argument when expanding NEW_CLASS_EXPR. Check for illegal method
19285 invocation within the argument scope of explicit constructor
19286 invocation. Set is_static according to is_static_flag. Provide
19287 extra `super' argument to patch_invoke invocation.
19288 (patch_invoke): New argument from_super. Loop on arguments
19289 indentation fixed. Pass from_super to invocation_mode. New switch
19290 case INVOKE_SUPER. Fixed error message in switch default case.
19291 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19293 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19294 (lookup_method_invoke): Fixed prototypes in candidates list. Error
19295 message takes constructors into account.
19296 (find_applicable_accessible_methods_list): Fixed indentation.
19297 (qualify_ambiguous_name): Take explicit constructor invocation
19298 into account. Deal with a conditional expression as a primary to
19300 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19301 case. Added extra argument to patch_method_invocation_stmt.
19302 Register calls made to explicit constructor `this'. Don't call
19303 save_expr in ARRAY_REF case when emitting class files. Check for
19304 illegal use of this when expanding explicit constructor invocation
19306 (complete_function_arguments): Set and reset parser context
19307 explicit_constructor_p field value when appropriate.
19308 (build_super_invocation, build_this_super_qualified_invocation):
19310 (patch_assignment): Fixed typo.
19311 (patch_unaryop): Check on final fields occurs only when a decl
19313 (patch_return): Take constructors into account.
19314 (patch_conditional_expr): New function.
19315 * typeck.c (build_java_signature): Removed unnecessary empty line.
19317 1998-10-28 Jeffrey A Law (law@cygnus.com)
19319 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19321 1998-10-28 Tom Tromey <tromey@cygnus.com>
19323 * decl.c (init_decl_processing): Renamed fields.
19324 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19325 interface_len, msize fields.
19327 * class.c (make_class_data): Removed subclass_head and
19328 subclass_next fields.
19329 * decl.c (init_decl_processing): Removed subclass_head and
19330 subclass_next fields.
19332 1998-10-28 Jeffrey A Law (law@cygnus.com)
19334 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19335 * mangle.c (emit_unicode_mangled_name): Similarly.
19337 1998-10-26 Nick Clifton <nickc@cygnus.com>
19339 * jcf-parse.c (get_constant): Place braces around code to compute
19340 'd' when REAL_ARITHMETIC is not defined.
19342 1998-10-25 H.J. Lu (hjl@gnu.org)
19344 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19347 1998-10-23 Tom Tromey <tromey@cygnus.com>
19349 * lang-specs.h: `.zip' files are input to jc1.
19351 1998-10-22 Per Bothner <bothner@cygnus.com>
19353 * jvspecs.c: Add (but don't enable) support for combining multiple
19354 .class and .java input filenames to a single jc1 invocation.
19355 Add support for -C flag (copile to .class files).
19356 Translate -classpath and -CLASSPATH arguments.
19357 * lang-specs.h: Don't set %2 spec.
19359 1998-10-22 Tom Tromey <tromey@cygnus.com>
19361 * jcf-path.c (add_entry): Don't add trailing separator if entry is
19363 (add_path): Don't add trailing separator to non-empty path
19366 * lang.c (lang_decode_option): Check for -fclasspath and
19367 -fCLASSPATH before examining other `-f' options.
19369 * java-tree.h (finalize_identifier_node): Don't declare.
19370 * class.c (make_class_data): Don't push "final" field.
19371 * decl.c (init_decl_processing): Don't push "final" field.
19372 (finalize_identifier_node): Removed.
19373 (init_decl_processing): Don't set finalize_identifier_node.
19375 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19377 1998-10-11 Anthony Green <green@cygnus.com>
19379 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19380 (JV_SCAN_SOURCES): New macro.
19381 (JCF_DUMP_SOURCES): Likewise.
19382 (jcf-dump$(exeext)): New target.
19383 (jv-scan$(exeext)): New target.
19385 1998-10-22 Tom Tromey <tromey@cygnus.com>
19387 * Makefile.in (LEX): Removed.
19388 (LEXFLAGS): Likewise.
19389 (SET_BISON): New macro.
19391 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
19392 spurious diffs in parse.c.
19393 ($(PARSE_SCAN_C)): Likewise.
19394 (PARSE_DIR): New macro.
19396 (PARSE_SCAN_C): Likewise.
19397 (PARSE_RELDIR): New macro.
19399 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19401 * jcf-io.c (find_class): Use saw_java_source to determine when to
19402 look for `.java' file.
19403 * jcf-parse.c (saw_java_source): New global.
19404 (yyparse): Set it if `.java' file seen.
19406 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19407 (GCJH_SOURCES): Likewise.
19408 * Makefile.in (datadir): New macro.
19409 (libjava_zip): Likewise.
19410 (JAVA_OBJS): Added jcf-path.o.
19411 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19412 (../gcjh$(exeext)): Likewise.
19413 (jcf-path.o): New target.
19414 * java-tree.h (fix_classpath): Removed decl.
19415 * jcf-parse.c (fix_classpath): Removed.
19416 (load_class): Don't call fix_classpath.
19417 * parse.y (read_import_dir): Don't call fix_classpath.
19418 * lex.h: Don't mention classpath.
19419 * lex.c (java_init_lex): Don't initialize classpath.
19420 * jcf-io.c (classpath): Removed global.
19421 (find_class): Use jcf_path iteration functions. Correctly search
19422 class path for .java file.
19423 (open_in_zip): New argument `is_system'.
19424 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
19425 classpath-related options.
19426 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19428 (lang_init): Call jcf_path_init.
19429 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19430 * lang-specs.h: Handle -I. Minor cleanup to -M options.
19431 Correctly put braces around second string in each entry.
19432 * gjavah.c (main): Call jcf_path_init. Recognize all the new
19433 classpath-related options.
19434 (help): Updated for new options.
19435 * jcf.h: Declare functions from jcf-path.c. Don't mention
19436 `classpath' global.
19437 * jcf-path.c: New file.
19439 * jcf-depend.c: Include jcf.h.
19441 * jcf-write.c (localvar_alloc): Returns `void'.
19442 (localvar_free): Removed unused variable.
19444 * lang.c (OBJECT_SUFFIX): Define if not already defined.
19445 (init_parse): Use OBJECT_SUFFIX, not ".o".
19447 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
19449 * class.c (emit_register_classes): Renamed from
19450 emit_register_class.
19451 * java-tree.h (emit_register_classes): Prototype renamed from
19452 emit_register_class.
19453 * jcf-parse.c (yyparse): Call emit_register_classes once before
19455 * parse.y (java_expand_classes): No longer register classes.
19457 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
19459 * class.c (is_compiled_class): New local variable
19460 seen_in_zip. Identify classes found in currently compiled source
19462 * decl.c (complete_start_java_method): Fixed typo.
19463 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19464 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19465 (CLASS_P): Moved around.
19466 (java_parse_abort_on_error): Macro moved from jcf-parse.c
19467 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19469 (jcf_parse_source): Changed leading comment. Removed unnecessary
19470 fclose and CLASS_FROM_SOURCE_P marking.
19471 (parse_source_file): New local variables remember_for_generation
19472 and filename. Mark parsed file name identifier node. Removed block
19473 executed when parse_only was null. Set remember_for_generation.
19474 Use it as an argument to java_pop_parser_context.
19475 (yyparse): New local variables several_files, list, next node and
19476 current_file_list. Split ampersand separated file names into
19477 current_file_list. Iterate through the list and parse accordingly.
19478 * parse.h (java_pop_parser_context): New function prototype.
19479 * parse.y (ctxp_for_generation): New static global variable.
19480 (java_pop_parser_context): New argument generate. Link popped ctxp
19481 to ctxp_for_generation list accordingly.
19482 (java_complete_expand_methods): Fixed indentation.
19483 (java_expand_classes): New function.
19485 1998-10-17 Per Bothner <bothner@cygnus.com>
19487 * Makefile.in: Link with libiberty.a instead of memmove.o.
19489 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19491 * lex.c (setjmp.h): No longer included.
19492 * lex.h (setjmp.h): Included.
19493 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19494 (duplicate_declaration_error_p): Renamed from
19495 duplicate_declaration_error.
19496 (build_array_from_name): New function prototype.
19497 * parse.y (setjmp.h): No longer included.
19498 (variable_declarator_id): Define action.
19499 (build_array_from_name): New function.
19500 (duplicate_declaration_error_p): Renamed from
19501 duplicate_declaration_error. Fixed leading comment.
19502 (register_fields): Main `for' loop reorganized. Uses
19503 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19504 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19505 build_array_from_name.
19506 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19508 (read_import_dir): Don't try to skip `.' and `..'.
19509 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19510 build_array_from_name. Main `for' loop reorganized.
19511 (resolve_qualified_expression_name): When building access to a
19512 field, use the type where the field was found, not its own type.
19513 (maybe_access_field): Use field DECL_CONTEXT if the type where the
19514 field was found is null.
19515 (qualify_ambiguous_name): Sweep through all successive array
19518 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19520 * java-tree.h (pop_labeled_block, lang_printable_name,
19521 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19522 interface_of_p, inherits_from_p, fix_classpath,
19523 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19524 make_class_data, register_class, alloc_name_constant): New
19525 function prototypes.
19526 * lang.c (lang_decode_option): Set argc argument unused. Fixed
19527 indentation. Added cast to remove warning.
19528 (lang_printable_name): Set v argument unused.
19529 (lang_print_error): Added argument to lang_printable_name call.
19530 (java_dummy_print, print_lang_decl, print_lang_type,
19531 print_lang_identifier, lang_print_xnode): All argument marked
19533 * lex.c (java_unget_unicode): Removed unnecessary argument.
19534 (java_allocate_new_line): Unused local variable is gone.
19535 (java_read_char): Added parenthesis in expressions to remove
19536 warnings. Added final return statement.
19537 (java_read_unicode): Added parenthesis in expression to remove
19539 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19540 (java_parse_escape_sequence): Likewise.
19541 (java_lex): Unused local variables are gone. Fixed
19542 java_unget_unicode invocation.
19543 * lex.h (set_float_handler): Prototype added when JC1_LITE not
19545 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19546 lang_printable_name invocation in macro.
19547 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19549 (duplicate_declaration_error): Suppressed unused argument in
19551 (identical_subpath_p): Function declaration is gone.
19552 (patch_invoke): Suppressed unused argument in prototype.
19553 (patch_cast, build_labeled_block, check_thrown_exceptions):
19555 * parse.y (setjmp.h): Included
19556 (toplev.h): Likewise.
19557 (field_declaration:): Suppressed unused local
19558 (label_decl:): Fixed build_labeled_block invocation.
19559 (java_pop_parser_context): Put extra parenthesis around assignment
19561 (yyerror): Suppressed unused local variables.
19562 (variable_redefinition_error): Fixed lang_printable_name
19564 (create_interface): Suppressed unused local variables.
19565 (create_class): Likewise.
19566 (duplicate_declaration_error): Suppressed unused argument. Fixed
19567 lang_printable_name invocation.
19568 (register_fields): Suppressed unused local variable. Fixed
19569 duplicate_declaration_error invocation.
19570 (method_header): Suppressed unused local variable.
19571 (method_declarator, parser_check_super): Likewise.
19572 (java_complete_class): Suppressed unused local variable. Fixed
19573 fatal error message.
19574 (complete_class_report_errors): Added default: in switch.
19575 (java_check_regular_methods): Fixed lang_printable_name
19577 (check_throws_clauses): Likewise.
19578 (java_check_abstract_methods): Suppressed unused local
19579 variable. Fixed lang_printable_name invocation.
19580 (read_import_entry): Added supplemental return statement.
19581 (read_import_dir): Suppressed unused local variables.
19582 (check_pkg_class_access, declare_local_variables): Likewise.
19583 (source_start_java_method): Suppressed unused extern variable
19585 (expand_start_java_method): Suppressed unused extern and local
19586 variable declarations.
19587 (java_complete_expand_methods): Likewise.
19588 (java_complete_expand_method): Suppressed unused local variables.
19589 (make_qualified_name): Likewise.
19590 (resolve_qualified_expression_name): Added default: in
19591 switch. Fixed lang_printable_name invocation.
19592 (class_instance_creation_expression): Added parenthesis around
19594 (patch_method_invocation_stmt): Fixed lang_printable_name and
19595 patch_invoke invocations.
19596 (check_for_static_method_reference): Fixed lang_printable_name
19598 (patch_invoke): Suppressed unused arguments and local variables.
19599 (lookup_method_invoke): Suppressed unused local variables.
19600 (qualify_ambiguous_name): Added default: in switch.
19601 (identical_subpath_p): Function removed.
19602 (patch_assignment): Suppressed unused local variables. Suppressed
19603 unnecessary if statement. Fixed lang_printable_name invocations.
19604 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19605 (valid_ref_assignconv_cast_p): Parenthesis around
19606 expression. Suppressed unused local variables.
19607 (build_binop): Suppressed unused local variables. fixed
19608 lang_printable_name invocations.
19609 (string_constant_concatenation): Suppressed unused local
19611 (patch_unaryop): Fixed lang_printable_name invocation.
19612 (patch_cast): Suppressed unnecessary argument. Fixed
19613 lang_printable_name invocation.
19614 (patch_array_ref): Fixed lang_printable_name invocation.
19615 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19616 (build_labeled_block): Suppressed unused argument.
19617 (generate_labeled_block): Fixed build_labeled_block invocation.
19618 (build_loop_body): Suppressed unused local variables.
19619 (patch_loop_statement): Likewise.
19620 (patch_exit): Fixed lang_printable_name invocation.
19621 (patch_switch_statement): Likewise.
19622 (case_identity): First argument marked unused.
19623 (patch_try_statement): Fixed lang_printable_name invocations.
19624 (patch_synchronized_statement, patch_throw_statement): Likewise.
19625 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19626 lang_printable_name invocations.
19627 (check_thrown_exceptions_do): Suppressed unused argument.
19629 1998-10-14 Tom Tromey <tromey@cygnus.com>
19631 * jcf-write.c (write_classfile): Add output class file as target.
19632 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19633 * jcf.h: Added declarations for dependency-tracking functions.
19634 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19635 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19636 (finish_parse): Call jcf_dependency_write.
19637 (dependency_tracking): New global.
19638 (DEPEND_SET_FILE): New define.
19639 (DEPEND_ENABLE): New define.
19640 (init_parse): Enable dependency tracking if required.
19642 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19643 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19644 (../gcjh$(exeext)): Likewise.
19645 (jcf-depend.o): New target.
19646 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19647 (GCJH_SOURCES): Likewise.
19648 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19650 (find_classfile): Added dep_name argument.
19651 (find_class): Compute name of dependency.
19652 (open_in_zip): Call jcf_dependency_add_file.
19653 * gjavah.c (output_file): No longer global.
19654 (usage): Don't mention "gjavah".
19656 (java_no_argument): Likewise.
19657 (version): Likewise.
19658 (main): Recognize and handle -M family of options.
19659 (print_mangled_classname): Return is void.
19660 (process_file): Handle case where output is suppressed.
19661 (HANDLE_END_FIELD): Likewise.
19662 (HANDLE_METHOD): Likewise.
19663 * jcf-depend.c: New file.
19665 1998-10-13 Jeffrey A Law (law@cygnus.com)
19667 * java-tree.def: Add missing newline at EOF.
19669 1998-10-13 Tom Tromey <tromey@cygnus.com>
19671 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19672 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19674 Include <config.h> and "system.h".
19675 (disassemble_method): Undefine RET to avoid clash with
19676 config/i386/i386.h.
19678 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19680 * decl.c (runtime_exception_type_node, error_exception_type_node):
19681 New global variables.
19682 (init_decl_processing): Initialized.
19683 * expr.c (java_lang_expand_expr): Set caught exception type to
19684 null if catch handler argument doesn't exit.
19685 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19687 * java-tree.h (runtime_exception_type_node,
19688 error_exception_type_node): Global variables declared.
19689 (DECL_FUNCTION_THROWS): New macro.
19690 (DECL_FUNCTION_BODY): Modified comment.
19691 (DECL_SPECIFIC_COUNT): Likewise.
19692 (struct lang_decl): New field throws_list.
19693 (IS_UNCHECKED_EXPRESSION_P): New macro.
19694 * lex.c (java_lex): Generate location information for THROW_TK.
19695 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19696 EXCEPTIONS_P): New macros.
19697 (enum jdep_code): New value JDEP_EXCEPTION.
19698 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19699 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19700 PATCH_METHOD_RETURN_ERROR): New macros.
19701 (patch_method_invocation_stmt): Added new argument to prototype.
19702 (patch_synchronized_statement, patch_throw_statement,
19703 check_thrown_exceptions, check_thrown_exceptions_do,
19704 purge_unchecked_exceptions, check_throws_clauses): New function
19706 * parse.y Fixed typo in keyword section.
19707 (throw:): Rule tagged <node>.
19708 (THROW_TK): Keyword tagged <operator>.
19709 (method_header:): Last argument to call to method_header passed
19711 (throws:, class_type_list:, throw_statement:,
19712 synchronized_statement:, synchronized:): Defined actions.
19713 (method_header): New local variable current. Register exceptions
19714 from throws clause.
19715 (java_complete_tree): Complete and verify exceptions from throws
19717 (complete_class_report_errors): Error message on exceptions not
19719 (java_check_regular_methods): Fixed typo. Shortcut on private
19720 overriding methods. Changed error message on method
19721 redefinition. Check for throws clause compatibility.
19722 (check_throws_clauses): New function.
19723 (java_check_abstract_methods): Use DECL_NAME for wfl or current
19724 method. Changed error message on method redefinition.
19725 (currently_caught_type_list): New static variable.
19726 (java_complete_expand_methods): Purge unchecked exceptions from
19727 throws clause list. Call PUSH_EXCEPTIONS before walk and
19728 POP_EXCEPTIONS after.
19729 (resolve_qualified_expression_name): Pass new argument as NULL to
19730 patch_method_invocation_stmt.
19731 (patch_method_invocation_stmt): New argument ref_decl. Invoke
19732 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19733 argument list when appropriate. Use new argument if non null to
19734 store selected method decl.
19735 (patch_invoke): Convert if necessary args of builtin types before
19736 forming CALL_EXPR. Argument list no longer reversed here.
19737 (invocation_mode): Treat final methods as static methods.
19738 (java_complete_tree): New cases for THROW_EXPR: and
19739 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19741 (complete_function_arguments): No more RECORD_TYPE
19742 conversion. Function parameter nodes no longer saved.
19743 (valid_ref_assignconv_cast_p): Avoid handling null type.
19744 (patch_binop): Fixed null constant reference handling.
19745 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19746 BUILD_THROW macros.
19747 (patch_try_statement): Fixed comments. Record caught types in
19748 list, push the list, expand try block and pop the list.
19749 (patch_synchronized_statement, patch_throw_statement,
19750 check_thrown_exceptions, check_thrown_exceptions_do,
19751 purge_unchecked_exceptions): New functions.
19752 * typeck.c (lookup_argument_method): Allow WFL in place of method
19753 DECL_NAME during method definition check
19755 1998-10-09 Tom Tromey <tromey@cygnus.com>
19757 * gjavah.c (decode_signature_piece): New function.
19758 (print_c_decl): Use it. Added `name_override' argument.
19759 (print_method_info): Use name_override argument to print_c_decl.
19760 (seen_fields): Removed.
19761 (print_field_info): Don't update seen_fields.
19762 (struct method_name): New structure.
19763 (method_name_list): New global.
19764 (print_method_info): Add new method to list of methods.
19765 (name_is_method_p): New function.
19766 (print_field_info): If field name has same name as method, then
19768 (process_file): Parse methods before fields.
19769 (field_pass): New global.
19770 (HANDLE_END_FIELD): Take field_pass into account.
19772 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19774 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19775 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19777 1998-10-03 Anthony Green <green@cygnus.com>
19779 * jvspec.c: Fix bug in jvgenmain_spec patch.
19781 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19783 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19784 * decl.c (soft_exceptioninfo_call_node): New global variable.
19785 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19786 takes extra integer argument. soft_exceptioninfo_call_node
19788 * except.c (java_set_exception_lang_code): New function
19789 (method_init_exceptions): Called here.
19790 (prepare_eh_table_type): New function.
19791 (expand_end_java_handler): Called here.
19792 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19793 one argument. Modified generation of call to
19794 soft_badarrayindex_node to use new argument.
19795 (build_java_arrayaccess): Pass faulty index value to
19796 build_java_throw_out_of_bounds_exception.
19797 (generate_name): New function.
19798 (java_lang_expand_expr): New local variables node, current,
19799 has_finally_p. Expand TRY_EXPR node.
19800 (process_jvm_instruction): Replace top of the stack with thrown
19801 object reference when entering exception handler.
19802 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19803 specific tree codes.
19804 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19806 (DECL_SPECIFIC_COUNT): New macro.
19807 (prepare_eh_table_type, java_set_exception_lang_code,
19808 generate_name): New function declarations.
19809 (match_java_method): Declaration deleted.
19810 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19812 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19813 * parse.h (redefinition_error, refine_accessible_methods_list,
19814 can_cast_to_p): Function declaration removed.
19815 (classitf_redefinition_error, variable_redefinition_error,
19816 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19817 find_most_specific_methods_list, argument_types_convertible,
19818 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19819 valid_cast_to_p, valid_method_invocation_conversion_p,
19820 try_reference_assignconv, add_stmt_to_compound,
19821 build_jump_to_finally, build_tree_list, patch_try_statement,
19822 java_get_catch_block): New function declarations.
19823 * parse.y (string_buffer_type): Global variable deleted.
19824 (group_of_labels, catches, catch_clause, catch_clause_parameter,
19825 finally): Rules tagged <node>.
19826 (TRY_TK, CATCH_TK): Token tagged <operator>.
19827 (class_body_declaration:, class_member_declaration:,
19828 formal_parameter:, explicit_constructor_invocation:,
19829 interface_member_declaration:, constant_declaration:,
19830 primary_no_new_array:, class_instance_creation_expression:,
19831 array_creation_expression:): Issue error on unsuported JDK1.1
19833 (try_statement:, catches:, finally:): Define actions.
19834 (catch_clause_parameter): New rule.
19835 (catch_clause:): Use new rule catch_clause_parameter.
19836 (parse_jdk1_1_error): New function.
19837 (redefinition_error): Renamed classitf_redefinition_error.
19838 (variable_redefinition_error): New function.
19839 (check_class_interface_creation): Call
19840 classitf_redefinition_error.
19841 (java_complete_tree): Added error message on JDEP_TYPE: case.
19842 (complete_class_report_errors): Fixed indentation.
19843 (declare_local_variables): Call variable_redefinition_error.
19844 (source_end_java_method): Call java_set_exception_lang_code and
19845 emit_handlers where appropriate.
19846 (java_method_add_stmt): Call add_stmt_to_block.
19847 (add_stmt_to_block): New function.
19848 (lookup_method_invoke): Fixed outside comment. new local variable
19849 candicates. Call find_applicable_accessible_methods_list and
19850 find_most_specific_methods_list when searching for a
19851 method. Modified error report to list possible candidates when
19853 (find_applicable_accessible_methods_list,
19854 find_most_specific_methods_list, argument_types_convertible): New
19856 (refine_accessible_methods_list): Function deleted.
19857 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19858 expr (if applicable) before calling patch_array_ref.
19859 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19860 (enter_block): Fixed comment.
19861 (enter_a_block): New function.
19862 (patch_assignment): Reorganized. Call try_reference_assignconv for
19863 references. Call valid_cast_to_p instead of can_cast_to_p.
19864 (try_reference_assignconv,
19865 valid_builtin_assignconv_identity_widening_p): New functions.
19866 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19867 (valid_cast_to_p, valid_method_invocation_conversion_p): New
19869 (build_string_concatenation): Don't resolve StringBuffer.
19870 (patch_cast): Fixed inverted arguments.
19871 (patch_array_ref): Code to save array expr deleted. Call
19872 valid_cast_to_p instead of can_cast_to_p.
19873 (generate_labeled_block): Call generate_name.
19874 (build_jump_to_finally, build_try_statement, java_get_catch_block,
19875 patch_try_statement): New functions.
19876 * typeck.c (match_java_method): Function deleted.
19878 1998-10-02 Anthony Green <green@cygnus.com>
19880 * jvspec.c: jvgenmain_spec uses different temporary file names.
19882 1998-10-02 Anthony Green <green@cygnus.com>
19884 * jvspec.c (lang_specific_driver): Fail if user specifies
19885 --main= when not linking.
19887 1998-09-28 Tom Tromey <tromey@cygnus.com>
19889 * class.c (make_class_data): Push value for `thread' field.
19890 * decl.c (init_decl_processing): Added `thread' field to class.
19892 * class.c (add_field): Always make static fields externally
19895 1998-09-26 Anthony Green <green@cygnus.com>
19897 * expr.c (build_java_athrow,
19898 build_java_throw_out_of_bounds_exception, expand_invoke,
19899 build_newarray, expand_java_multianewarray, build_java_monitor):
19900 Update comments to reflect _Jv_* function names.
19902 1998-09-25 Per Bothner <bothner@cygnus.com>
19904 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19905 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19906 * parse.y (expand_start_java_method): Likewise.
19908 1998-09-24 Per Bothner <bothner@cygnus.com>
19910 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19912 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19913 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19914 * expr.c: Remove no-longer-needed calls to promote_type.
19915 * decl.c (give_name_to_locals): Liekwise.
19916 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19917 * parse.y: Add/remove promote_type calls as appropriate.
19918 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19919 (parse_signature_string): Likewise.
19920 (build_java_array_type): Fix for now signature convenions.
19922 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19924 1998-09-23 Tom Tromey <tromey@cygnus.com>
19926 * class.c (init_class_processing): libjava function renamed to
19929 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19931 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19932 * java-tree.def: Fixed DEFTREECODE third argument.
19933 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19934 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19935 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19936 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19937 JAVA_THIS_EXPR): Now replaced by tree code definitions.
19938 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19939 * lang.c (java_tree_code_type, java_tree_code_length,
19940 java_tree_code_name): New arrays.
19941 (lang_init): Append Java tree node definitions to Gcc ones.
19942 * lex.c (expression_obstack): Declared as extern when JC1_LITE
19944 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19946 (java_lex): Allow declaration of empty string constants. Retain
19947 location information on CASE_TK and DEFAULT_TK.
19948 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19949 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19950 Modified to be more robust.
19951 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19952 (build_new_invocation, try_builtin_assignconv,
19953 patch_switch_statement, string_constant_concatenation,
19954 build_string_concatenation, patch_string_cst, patch_string,
19955 java_expand_switch): New function declarations.
19956 * parse.y: Rules related to switch and EH tagged <node>.
19957 (label_id): Set to NULL_TREE
19958 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19960 (this_or_super:): Fixed indentation.
19961 (statement:, statement_nsi:, statement_without_trailing_substatement:,
19962 statement_expression:): Removed call to RULE on all sub-rules.
19963 (switch_expression:, switch_labels:): New rules.
19964 (switch_statement:, switch_block:, switch_block_statement_groups:,
19965 switch_block_statement_group:, switch_labels:, switch_label:):
19967 (throw_statement:, synchronized_statement:, try_statement:):
19968 Defined temporary actions.
19969 (class_instance_creation_expression:): Call
19970 build_new_invocation. Fixed indentation.
19971 (field_access): Fixed indentation.
19972 (method_invocation): Likewise.
19973 (make_qualified_primary): Use THIS_EXPR.
19974 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19975 resolving from SUPER, set *type_found.
19976 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19977 (java_complete_tree): Removed unused local variable `location'. Case
19978 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19979 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19980 on MODIFY_EXPR: and all binary operator tree code cases. Removed
19981 STRING_CST: case. default: checks for patchable strings.
19982 (complete_function_arguments): Transform string constant or
19983 crafted StringBuffer if necessary.
19984 (build_method_invocation): Fixed comments.
19985 (build_new_invocation): New function.
19986 (patch_assignment): Call try_builtin_assignconv to figure a valid
19987 assignment conversion between builtin types.
19988 (try_builtin_assignconv): New function.
19989 (build_binop): Use URSHIFT_EXPR directly to call build.
19990 (operator_string): Use UNARY_PLUS_EXPR.
19991 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19993 (do_merge_string_cste, merge_string_cste,
19994 string_constant_concatenation, build_string_concatenation,
19995 patch_string, patch_string_cst): New function.
19996 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19997 (patch_unaryop): Likewise. New test of valid ++/-- operands.
19998 (build_newarray_node): Use NEW_ARRAY_EXPR.
19999 (build_this): Use THIS_EXPR.
20000 (build_return): Enable debug information on return statement.
20001 (build_if_else_statement): Likewise.
20002 (complete_labeled_statement): Fixed related comment.
20003 (build_loop_body): Fixed comment.
20004 (build_bc_statement): Enable debug information on break/continue
20006 (patch_bc_statement): Fixed typos. Handle SWITCH statement
20008 (patch_switch_statement, case_identity, java_expand_switch): New
20011 1998-09-21 Per Bothner <bothner@cygnus.com>
20013 * buffer.h (BUFFER_INIT): New macro.
20014 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
20015 Pass (struct jcf_partial *state) to most functions.
20016 (jcf_block, jcf_relocation): New types.
20017 Support labels, branches, conditionals, loops.
20019 1998-09-21 Tom Tromey <tromey@cygnus.com>
20021 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
20023 1998-09-21 Per Bothner <bothner@cygnus.com>
20025 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
20026 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
20027 not integer_type_node (INT_TYPE_SIZ bits).
20029 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
20031 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
20032 * jcf-dump.c (print_exception_table): New function.
20033 (disassemble_method): Better handling of wide instructions.
20034 Make more robust for bad input.
20036 1998-09-30 Jeffrey A Law (law@cygnus.com)
20038 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
20041 1998-09-17 Jeffrey A Law (law@cygnus.com)
20043 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
20045 1998-09-17 Tom Tromey <tromey@cygnus.com>
20047 * Makefile.in ($(PARSE_H)): Removed target.
20049 1998-09-17 Jeffrey A Law (law@cygnus.com)
20051 * Makefile.in (JAVA_OBJS): Add memmove.o
20052 (memmove.o): New target & rules.
20054 1998-09-15 Tom Tromey <tromey@cygnus.com>
20056 * expr.c (expand_invoke): Don't generate a call to the class init
20059 1998-09-14 Jeffrey A Law (law@cygnus.com)
20061 * Makefile.in: Add many missing dependencies.
20062 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
20064 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
20065 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
20067 1998-09-11 Per Bothner <bothner@cygnus.com>
20069 * decl.c (complete_start_java_method): If method is static (and
20070 not private) call _Jv_InitClass.
20071 * expr.c (expand_invoke): Don't call build_class_init.
20073 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
20075 1998-09-10 Jeffrey A Law (law@cygnus.com)
20077 * Make-lang.in (GCJ): Define before using.
20079 1998-09-09 Jeffrey A Law (law@cygnus.com)
20081 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
20082 losing due to namespace pollution in GNU getopt.h
20084 1998-09-09 Tom Tromey <tromey@cygnus.com>
20086 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
20087 (java.all.cross): Likewise.
20088 (java.rest.encap): Likewise.
20090 1998-09-08 Jeffrey A Law (law@cygnus.com)
20092 * gjavah.c (print_class_decls): Fix thinko in arglist
20093 * jcv-io.c (find_classfile): Similarly.
20095 1998-09-07 Jeffrey A Law (law@cygnus.com)
20097 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
20099 1998-09-05 Tom Tromey <tromey@cygnus.com>
20101 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
20102 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
20103 * Makefile.in (PARSE_C): New macro.
20104 (PARSE_H): Likewise.
20105 (PARSE_SCAN_C): Likewise.
20106 ($(PARSE_C)): Target renamed from parse.c.
20107 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
20108 (clean): Remove parse-scan.c as well.
20109 (parse.o): Depend on $(PARSE_C).
20111 1998-09-05 Anthony Green <green@cygnus.com>
20113 * README, license.terms: Removed.
20115 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20116 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20117 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20118 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20119 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20120 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20121 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20122 and Java trademark attribution.
20124 1998-09-04 Tom Tromey <tromey@cygnus.com>
20126 * Makefile.in: Use gcjh, not gjavah.
20127 * config-lang.in (stagestuff): Use gcjh, not gjavah.
20128 * Make-lang.in: Changed gjavah to gcjh everywhere.
20130 1998-09-03 Per Bothner <bothner@cygnus.com>
20132 * gjavah.c: Support new -prepend -add -append flags.
20133 (print_method_info): Method is not virtual if class is final.
20135 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20137 * jv-scan.c: Fixed copyright assignment.
20138 * keyword.gperf: Likewise.
20139 * keyword.h: Likewise.
20140 * lex.c: Fixed copyright assignment.
20141 (java_lex): Push unicode back when parsing '<'.
20142 * lex.h: Fixed copyright assignment.
20143 * parse-scan.y: Likewise.
20144 * parse.h: Fixed copyright assignment.
20145 (build_debugable_stmt, complete_for_loop): New function prototypes.
20146 * parse.y: Fixed copyright assignment.
20147 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
20148 size_zero_node when completing a loop with no exit condition.
20149 (for_statement_nsi:): Define action.
20150 (for_init:, for_update:): Return size_zero_node when empty.
20151 (declare_local_variables): Call build_debugable_stmt.
20152 (build_debugable_stmt): New function.
20153 (build_loop_body): Build debugable statement around loop
20155 (complete_loop_body): Take into account the debugable statement
20156 around the EXIT_EXPR.
20157 (complete_loop_body): New function.
20158 (patch_exit_expr): Fixed condition inversion.
20160 1998-09-02 Tom Tromey <tromey@cygnus.com>
20162 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20163 name of thread define.
20164 * jvspec.c (THREAD_NAME): New macro.
20166 (THREADLIB): Likewise.
20167 (lang_specific_driver): Recognize attempt to link with thread
20168 library or gc library. Recognize -ljava on command line so it
20169 isn't linked against more than once.
20171 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20173 * parse-scan.y (report_main_declaration): Name of the class
20174 containing `main' can be a qualified name.
20176 1998-08-31 Tom Tromey <tromey@cygnus.com>
20178 * config-lang.in: Changed gjavac to gjc everywhere.
20179 * Make-lang.in: Changed gjavac to gjc everywhere.
20181 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20183 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20184 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20185 and install the files.
20186 * Makefile.in (JAVA_OBJS_LITE): New variable.
20187 (compiler:): Now include jv-scan as a dependency.
20188 (../jv-scan$(exeext), parse-scan.c): New targets.
20189 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20190 * config-lang.in (compilers): Removed gcj, gjavah from the list.
20191 * jcf-parse.c (parse_source_file): Call java_layout_classes and
20192 check for errors even if parse_only.
20193 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20195 (yylex): New function. Uses java_lex body.
20196 (java_lex): Removed commented out statement. Remove local variable
20197 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20198 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20199 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20200 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20201 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20202 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20204 (java_lex_error): Empty if JC1_LITE is defined.
20205 (java_get_line_col): Return 0 if JC1_LITE is defined.
20206 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20207 SET_MODIFIER_CTX): Moved into the section containing the macros
20208 conditionally defined by JC1_LITE.
20209 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20210 argument if JC1_LITE is defined.
20211 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20212 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20214 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20215 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20216 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20217 to different values according to JC1_LITE.
20218 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20219 declared if JC1_LITE set.
20220 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20221 defined if JC1_LITE not set.
20222 (struct parser_ctx): Reorganized and skip the jc1 front end part
20224 (java_layout_classes): New function definition.
20225 (java_push_parser_context, java_init_lex, yyparse, yylex,
20226 yyerror): Prototype always declared. All other static function
20227 prototypes declared only if JC1_LITE is not set.
20228 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20229 declared in parse.h.
20230 (java_layout_classes): New function.
20231 (java_complete_expand_methods): No longer layout the class here.
20232 * parse-scan.y: New file.
20233 * jv-scan.c: New file.
20235 1998-08-25 Tom Tromey <tromey@cygnus.com>
20237 * gjavah.c (main): Handle -friend option.
20238 (friend_specs): New global.
20239 (generate_access): Handle friend_specs.
20240 (process_file): Likewise.
20241 (MAX_FRIENDS): New macro.
20242 (friend_count): New global.
20243 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
20244 Changed all callers.
20246 1998-08-24 Per Bothner <bothner@cygnus.com>
20248 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
20249 (main): Handle processing all the entries of a named .zip archive.
20250 * jcf-io.c (jcf_trim_old_input): New function.
20251 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
20253 1998-08-24 Per Bothner <bothner@cygnus.com>
20255 * lang.c (flag_assume_compiled): Make default be on.
20257 1998-08-21 Per Bothner <bothner@cygnus.com>
20259 * jcf-dump.c: Add bunches of flags to control output more.
20260 (process_class): New function; support printing more than one class.
20261 (main): Support new --print-main and --javap flags.
20262 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
20263 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
20265 1998-08-20 Per Bothner <bothner@cygnus.com>
20267 Change mangling of dispatch table to match C++ vtable (w/thunks).
20268 * class.c (build_dtable_decl), java-tree.h: New function.
20269 (make_class_data): Call it.
20270 * decl.c (init_decl_processing): Likewise.
20272 1998-08-19 Warren Levy <warrenl@cygnus.com>
20274 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20275 soft_anewarray; adjust args passed.
20276 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20277 match _Jv_NewObjectArray.
20279 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
20281 * decl.c (push_labeled_block, pop_labeled_block): New functions.
20282 * expr.c (loopup_label): Call create_label_decl.
20283 (create_label_decl): New function.
20284 (java_lang_expand_expr): Call expand_start_bindings with argument
20286 * java-tree.h Added space after PROTO in function declarations
20288 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20289 (create_label_decl, push_labeled_block): New function
20291 * lex.c (label_id): Initialize.
20292 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20294 * parse.h Added space after PROTO in function declarations when
20296 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20297 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20298 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20299 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20301 (struct parser_ctxt): New fields current_loop,
20302 current_labeled_block.
20303 (build_if_else_statement, patch_if_else_statement,
20304 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20305 generate_labeled_block, complete_labeled_statement,
20306 build_bc_statement, patch_bc_statement, patch_loop_statement,
20307 build_new_loop, build_loop_body, complete_loop_body): New function
20309 * parse.y (java_warning_count): New global variable.
20310 (label_id): New static variable.
20311 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20312 (block:): Return size_zero_node when block is empty.
20313 (empty_statement:): Return size_zero_node.
20314 (statement:): Implement supplemental action when for_statement: is
20316 (label_decl:): New rule.
20317 (labeled_statement:): Rewritten using label_decl. Actions
20319 (labeled_statement_nsi:): Likewise.
20320 (if_then_statement): Actions implemented.
20321 (while_expression): New rule.
20322 (while_statement:): Rewritten using while_expression. Actions
20324 (while_statement_nsi:): Likewise.
20325 (do_statement_begin:): New rule.
20326 (do_statement:): Rewritten using do_statement_begin. Actions
20328 (for_statement:): Rewritten using for_begin. Actions implemented.
20329 (for_statement_nsi:): Likewise.
20330 (for_header:, for_begin:): New rules.
20331 (for_init:): Actions implemented.
20332 (statement_expression_list:, break_statement:,
20333 continue_statement:): Likewise.
20334 (yyerror): Count number of issued warning(s).
20335 (java_report_errors): Report error(s) and/or warning(s).
20336 (java_complete_class): Use build_java_argument_signature to
20337 recompute completed method signature.
20338 (java_check_regular_methods): New locals method_wfl and aflags.
20339 Use method_wfl instead of lookup_cl during error reports. Fixed
20340 indentation and modified some error messages. Use
20341 lang_printable_name in method instead of the DECL_NAME. New code
20342 to issue warnings on methods not overriding corresponding methods
20343 private to a different package.
20344 (java_method_add_stmt): Call add_stmt_to_compound.
20345 (add_stmt_to_compound): New function.
20346 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20347 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20348 (build_if_else_statement, patch_if_else_statement,
20349 build_labeled_block, generate_labeled_block,
20350 complete_labeled_statement, build_new_loop, build_loop_body,
20351 complete_loop_body, patch_loop_statement, build_bc_statement,
20352 patch_bc_statement, patch_exit_expr): New functions.
20353 * typeck.c (build_java_signature): Build argument signature before
20354 enclosing it in between parenthesis.
20356 1998-08-17 Warren Levy <warrenl@cygnus.com>
20358 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20359 (JAVA_OBJS): Added reminder comment
20361 1998-08-13 Nick Clifton <nickc@cygnus.com>
20363 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20364 be interpreted as a long long.
20366 1998-08-13 Warren Levy <warrenl@cygnus.com>
20368 * decl.c (init_decl_processing): Use _Jv_InitClass, not
20369 soft_initialise_class. Use _Jv_NewMultiArray, not
20370 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
20371 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
20372 _Jv_CheckArrayStore, not soft_checkarraystore. Use
20373 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20375 1998-08-12 Per Bothner <bothner@cygnus.com>
20377 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20378 length_identifier_node): New global tree node constants.
20379 * parse.y (kw_super, kw_this, kw_length): Removed globals.
20380 Replace uses by super_identifier_node etc.
20381 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
20383 * parse.y (resolve_field_access): Don't special-case ".length" if
20384 flag_emit_class_files.
20385 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
20386 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
20389 1998-08-11 Per Bothner <bothner@cygnus.com>
20391 * decl.c (init_decl_processing): Remove unused method_type_node fields.
20392 * class.c (make_method_value): Remove init for removed fields.
20394 * class.c (layout_class): Use build_java_argument_signature.
20395 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
20397 * typeck.c (push_java_argument_signature): Removed. Merged into ...
20398 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
20399 (build_java_signature): Don't use push_java_argument_signature.
20401 * typeck.c (lookup_argument_method): New function.
20402 * parse.y (java_check_regular_methods): Use lookup_argument_method
20403 instead of lookup_java_method2 followed by lookup_java_method.
20405 * parse.y (check_method_redefinition): Minor optimization.
20407 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
20408 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20410 1998-08-10 Tom Tromey <tromey@cygnus.com>
20412 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20415 * gjavah.c (java_float_finite): Use K&R-style definition.
20416 (java_double_finite): Likewise.
20417 (generate_access): Now returns void. Changed all callers.
20418 (last_access_generated): Removed.
20419 (process_file): Only make a single pass over the .class file.
20421 1998-07-29 Per Bothner <bothner@cygnus.com>
20423 * class.c (get_dispatch_table): Add extra dummy vtable entry,
20424 for compatibility for G++ (with -fvtable-thunks).
20425 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
20427 * gjavah.c (process_file): Use public inheritance for super-class.
20429 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
20431 * lex.c (java_init_lex): Initialize ctxp->package.
20432 * parse.h (struct parser_ctxt): package and package_len replaced
20433 by tree package, an identifier node. Field method_decl_list is
20434 gone. Fixed comments.
20435 (lookup_field_wrapper, merge_qualified_name, not_accessible,
20436 class_in_current_package): New function prototypes.
20437 * parse.y (array_type:): Set class loaded flag on primitive type
20439 (package_declaration:): Assign ctxp->package to the
20441 (method_invocation:): Handle invocation of method qualified by
20443 (single_type_import_declaration:): Removed ambiguity check.
20444 (java_pop_parser_context): New local variable `next'. Reset and
20445 set IMPORT_CLASSFILE_NAME flags on current and previous import
20447 (java_accstring_lookup): Use new local macro COPY_RETURN.
20448 (lookup_field_wrapper): New function.
20449 (parser_qualified_classname): Use merge_qualified_name.
20450 (parser_check_super_interface): Broaden error message.
20451 (do_resolve_class): Check for qualified class name in the current
20452 compilation unit if appropriate.
20453 (process_imports): Check for already defined classes.
20454 (check_pkg_class_access): Got rid of call to
20455 get_access_flags_from_decl.
20456 (java_complete_expand_methods): Call safe_layout_class based on
20457 the current class size.
20458 (make_qualified_primary): Build a WFL qualification on primary if
20460 (merge_qualified_name): New function.
20461 (make_qualified_name): Use merge_qualified_name.
20462 (resolve_expression_name): Use safe_lookup_field.
20463 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20464 (resolve_qualified_expression_name): Likewise. Check on resolved
20465 element accessibility.
20466 (not_accessible_p, class_in_current_package): New functions.
20467 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20468 (patch_method_invocation_stmt): Merged common pieces. Check
20469 accessibility of invoked method.
20470 (check_for_static_method_reference): Add returned type in error
20472 (invocation_mode): Get rid of bogus check on PRIVATE methods.
20473 (refine_accessible_methods_list): Merged two conditions in test.
20474 (java_complete_class): Sanity check on stabilize_ref gone.
20475 * zextract.c (read_zip_archive): Cast lseek second argument to long.
20477 1998-07-28 Per Bothner <bothner@cygnus.com>
20479 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
20481 1998-07-24 Tom Tromey <tromey@cygnus.com>
20483 * gjavah.c (F_NAN): Removed.
20484 (F_NAN_MASK): New macro.
20485 (F_POSITIVE_INFINITY): Removed.
20486 (F_NEGATIVE_INFINITY): Likewise.
20487 (java_float_finite): Rewrote.
20488 (D_NAN_MASK): Renamed.
20489 (java_double_finite): Rewrote.
20490 (D_POSITIVE_INFINITY): Removed.
20491 (D_NEGATIVE_INFINITY): Likewise.
20493 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20494 If verbose, print underlying representation of value in hex.
20496 1998-07-24 Per Bothner <bothner@cygnus.com>
20498 * buffer.h, buffer.c: New files.
20499 * Makefile.in (JAVA_OBJS): Add buffer.o.
20501 Support locals variables and writing their debug entries to .class.
20502 * jcf-write.c: Simplify some by user new buffer type.
20503 (vode_buffer_grow): Removed.
20504 (struct localvar_info): New type.
20505 (localsvars, localvartable): New buffers.
20506 (localvar_alloc, localvar_free): New functions.
20507 (generate_bytecode_insns): Handle local variables.
20508 (generate_classfile): Write LocalVariableTable attribute.
20510 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
20512 * jcf-io.c (open_in_zip): Check the zipfile magic number.
20513 * zipfile.h (ZIPMAGIC): New macro.
20515 1998-07-24 Tom Tromey <tromey@cygnus.com>
20517 * Makefile.in (gjavah.o): Updated dependencies.
20518 (jcf-dump.o): Likewise.
20519 (all.indirect): Use ../gjavah.
20520 (../gjavah$(exeext)): Likewise.
20521 (clean): Don't remove gjavah.
20522 (clean): Remove parse.c, not java/parse.c.
20523 * Make-lang.in (java): Added gjavah.
20524 (gjavah$(exeext)): New target.
20525 (GJAVAH_SOURCES): New macro.
20526 (java.all.build): Added gjavah.
20527 (java.all.cross): Likewise.
20528 (java.rest.encap): Likewise.
20529 * config-lang.in (compilers, stagestuff): Added gjavah.
20531 1998-07-23 Tom Tromey <tromey@cygnus.com>
20533 * gjavah.c (java_float_finite): New function.
20534 (java_double_finite): Likewise.
20535 (F_POSITIVE_INFINITY): New macro.
20536 (F_NEGATIVE_INFINITY): Likewise.
20538 (D_POSITIVE_INFINITY): Likewise.
20539 (D_NEGATIVE_INFINITY): Likewise.
20541 (print_field_info): Use java_float_finite and java_double_finite.
20543 1998-07-23 Per Bothner <bothner@cygnus.com>
20545 * parse.y (method_header): Name "this" implicit argument.
20547 1998-07-22 Per Bothner <bothner@cygnus.com>
20549 * jcf-write.c: Write out LineNumberTable attribute in .class file.
20550 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
20551 (put_linenumber): New function.
20552 (generate_bytecode_insns, generate_classfile): Write line numbers.
20554 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20556 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20557 (lookup_name, build_known_method_ref, build_class_init,
20558 build_invokevirtual, invoke_build_dtable, match_java_method,
20559 build_field_ref, pushdecl_force_head, build_java_binop,
20560 binary_numeric_promotion, build_decl_no_layout,
20561 build_java_arrayaccess, build_newarray, build_anewarray,
20562 build_java_array_length_access, build_java_arraynull_check): New
20563 extern function prototypes.
20564 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20565 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20567 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20569 * jcf.h (jcf_out_of_synch): New extern function prototype.
20570 * parse.h: Static/global function implemented in parse.y
20571 prototyped and declarations moved at the end of the file.
20572 (DECL_P): Check that the argument isn't null.
20573 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20574 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20575 (QUAL_DECL_TYPE): New macro.
20576 (PARAMS): Macro definition removed.
20577 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20578 (return_statement:): Call build_return.
20579 (field_access:): Call make_qualified_primary in sub rule.
20580 (method_invocation:): Build method invocation and call
20581 make_qualified_primary when processing primaries.
20582 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20583 get_type_from_signature.
20584 (java_check_regular_method): Extra integer 0 argument when calling
20585 lookup_java_method2.
20586 (lookup_java_interface_method2): Extra method DECL argument when
20587 calling lookup_java_interface_method2.
20588 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20589 COMPOUND_EXPR node.
20590 (java_complete_expand_method): Layout current class iff not
20591 already done. Don't process interface's methods.
20592 (java_complete_expand_method): Use super class only if it
20593 exists. Use current class otherwise.
20594 (make_qualified_primary): New function.
20595 (resolve_expression_name): Process qualified expression or
20596 expression from primary the same way.
20597 (resolve_expression_name): Two last arguments to
20598 resolve_field_access are now NULL_TREEs.
20599 (resolve_field_access): New variable is_static. Local field must
20600 be DECLs. is_static computed on field DECLs only. Append code in
20601 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20602 to initialize field_type.
20603 (resolve_qualified_expression_name): New local variable,
20604 previous_call_static and is_static. Handle primaries with function
20605 calls, casts, array references and `this'. `super' now handled as
20606 `(super_class)this'. Use is_static to clarify boolean expressions.
20607 Added code to handle case where a proper handle is required to
20608 access a field. Use QUAL_DECL_TYPE where applicable.
20609 (maybe_access_field): New function.
20610 (patch_method_invocation_stmt): New arguments primary, where,
20611 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20612 deleted. Use `where' as a type to search from if specified. Check
20613 for static method reference where forbidden. Append primary or
20614 current_this to the argument list if not calling constructor nor
20616 (check_for_static_method_reference): New function.
20617 (patch_invoke): Layout the class on which new is done if
20619 (lookup_method_invoke): Changed format to report errors on
20621 (qualify_ambiguous_name): New local variable this_found. Now
20622 handle things from primaries. Method call are considered
20624 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20625 changed into NULLs.
20626 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20627 (java_complete_tree): New case fo RETURN_EXPR. Process function
20628 call arguments in separate function.
20629 (complete_function_arguments): New function.
20630 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20632 (patch_assignment): Take the return function slot into account as
20633 a RHS. Distinguish assignment from a return.
20634 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20635 when checking methods in interfaces.
20636 (resolve_type_during_patch): NULL argument to unresolve_type_p
20637 instead of NULL_TREE.
20638 (patch_newarray): Fixed typo in comment.
20639 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20640 (build_return, patch_return): New functions.
20641 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20643 1998-07-21 Per Bothner <bothner@cygnus.com>
20645 * constants.c (find_name_and_type_constant, find_fieldref_index,
20646 find_methodref_index): New methods.
20647 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20648 just return given method. Also, rename to build_known_method_ref.
20649 (expand_invoke): Rename call to build_invoke_non_interface.
20650 * java-tree.h, parse.h: Update prototype.
20651 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20652 (such as expand_expr_stmt) if flag_emit_class_files.
20653 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20654 STACK_TARGET, IGNORE_TARGET): New macros.
20655 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20656 (generate_bytecode_insn): New function to generate method's bytecode.
20657 (generate_classfile): Node generate Code attribute for a method.
20658 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20659 push_long_const, field_op, adjust_typed_op, maybe_wide):
20660 New functions used by generate_bytecode_insn.
20662 * typeck.c (signature_include_return): Remove variable.
20663 (push_java_argument_signature, build_java_argument_signature): New.
20664 (build_java_signature): Use push_java_argument_signature.
20665 * parse.y: Use build_java_argument_signature instead of fiddling
20666 with signature_include_return.
20668 1998-07-17 Tom Tromey <tromey@cygnus.com>
20670 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20673 * Makefile.in (all.indirect): Added gjavah$(exeext).
20674 (gjavah$(exeext)): Added $(exeext).
20677 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20679 * class.c (layout_class): Call to java_layout_parsed_class replace
20680 by safe_layout_class.
20681 * expr.c (build_java_array_length_access): Removed static storage
20682 class in the function definition.
20683 (build_java_arraynull_check): Likewise.
20684 Also fixed typos in two comments.
20685 * lex.c (java_init_lex): Initialize static global kw_length.
20686 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20687 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20689 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20690 * parse.h (resolve_no_layout): New static function declaration.
20691 (get_identifier_in_static): Declaration removed.
20692 (java_layout_parsed_class): Function name declaration changed to
20694 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20695 not_initialized_as_it_should_p, build_this): New static function
20697 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20698 binary_numeric_promotion, stabilize_reference,
20699 build_decl_no_layout, build_java_arrayaccess): Extern function
20700 declarations moved into their own section.
20701 (build_newarray, build_anewarray, build_java_array_length_access,
20702 build_java_arraynull_check): New extern function declarations.
20703 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20704 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20706 (CALL_CONSTRUCTOR_P): New macro.
20707 * parse.y (kw_length): New static global tree node.
20708 (return_statement): Tagged <node>.
20709 (RETURN_TK): Tagged <operator>.
20710 (variable_declarator_id:): Build variable declaration with an
20711 empty initialization value if a syntax error was found in the
20712 initialization part of the variable declaration.
20713 (statement_without_trailing_substatement:): return_statement: now
20714 uses the default rule.
20715 (return_statement:): Temporarily fixed to return NULL_TREE.
20716 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20717 (class_instance_creation_expression:): Class creation rules now
20718 call build_method_invocation upon reduction.
20719 (array_creation_expression:): Rules call build_newarray_node upon
20721 (dim_exprs:): Build a list of dimension expressions.
20722 (dim_expr:): Store location of the OSB_TK in the dimension
20724 (method_invocation:): Added a new error rule.
20725 (build_unresolved_array_type): WFL argument may also be an array
20726 on a primitive type. Name of the argument changed to reflect this.
20727 (method_declarator): Insert argument type at the beginning of the
20728 argument type list and later reverse the list.
20729 (unresolved_type_p): Argument 'returned' may be optionally
20731 (java_layout_class_from_source): Function renamed
20733 (resolve_and_layout): Now call resolve_no_layout and
20735 (resolve_no_layout): New function.
20736 (purify_type_name): New function.
20737 (complete_class_report_errors): Call purify_type_name during error
20738 report on a type not found.
20739 (process_imports): error_found local variable doesn't need to be
20740 initialized to zero.
20741 (declare_local_variables): New local type_wfl. Fixed typo in error
20742 message. type_wfl assigned to unresolved type and used to register
20743 incomplete type. Build a WFL around the variable initialization
20744 statement so that debug info can be generated on it.
20745 (source_start_java_method): Reverse argument list after they've
20747 (current_this): New static global variable.
20748 (java_complete_expand_methods): Set current_this when appropriate.
20749 (resolve_expression_name): Build correct static and non static
20750 field access bearing a simple name.
20751 (resolve_field_access): Resolve the length field of arrays. Handle
20753 (patch_method_invocation_stmt): Set the type of the method
20754 invocation to error_mark_node. This value is later overridden by a
20755 valid type, if any. Don't handle qualified constructor invocation
20756 as qualified method invocation. Call lookup_method_invoke with its
20757 new flag. It's no longer necessary to access the selected method
20758 as the value of a tree list. Handle constructor invocation.
20759 (patch_invoke): Reverse argument list when invoking non interface
20760 methods. Insert call to new as the first argument of the
20762 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20763 defined within a final class. Return INVOKE_STATIC if the invoked
20764 method is a constructor.
20765 (lookup_method_invoke): New lc argument is a flag to indicate a
20766 constructor lookup. Now handle constructor lookup. Choose the most
20767 specific method in case several were matching the invocation
20768 requirements. Return a method decl instead of a tree list featuring
20769 one single method decl element.
20770 (refine_accessible_methods_list): New lc flag argument to
20771 indicate that a constructor is being looked up.
20772 (not_initialized_as_it_should_p): New function.
20773 (java_complete_tree): Now process fake tree codes
20774 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20775 save_expr on resolved function call arguments. Case on
20776 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20777 (patch_assignment): LHS can be a field access expression. When
20778 dealing with reference, lhs_type is the promoted type of the
20779 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20781 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20782 (patch_binop): Use not_initialized_as_it_should_p where
20784 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20785 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20787 (resolve_type_during_patch): New function.
20788 (patch_cast): Call resolve_type_during_patch to resolve type and
20789 report error accordingly.
20790 (patch_array_ref): Use not_initialized_as_it_should_p where
20791 applicable. Array base expression is saved before being
20792 used. Promote the type of an array elements if it contains non
20794 (build_newarray_node, patch_newarray, build_this): New functions.
20796 1998-07-16 Tom Tromey <tromey@cygnus.com>
20798 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20799 increment it in `for' statement.
20800 (print_field_info): If number is inf or nan, don't print it.
20801 (print_method_info): If method name is `delete', just ignore it.
20802 (print_c_decl): Special-case jstringArray.
20804 * gjavah.c (help): New function.
20805 (no_argument): New function.
20806 (usage): Changed text.
20807 (main): Rewrote argument handling. Now handles -v, --help,
20809 (version): New function.
20810 (found_error): New global.
20811 (main): Return found_error.
20812 (generate_access): Set found_error.
20813 (print_c_decl): Likewise.
20815 1998-07-15 Tom Tromey <tromey@cygnus.com>
20817 * gjavah.c (print_c_decl): Don't print "," when examining field.
20818 Skip type name when looking at "[L" types.
20819 (process_file): Now static.
20820 (generate_access): Now returns int.
20821 (last_access_generated): New global.
20822 (process_file): Clear last_access_generated; make multiple passes
20824 (print_field_info): Just return if generate_access returns true.
20825 (print_method_info): Likewise. Also, allow <init> functions to
20827 (print_c_decl): Added is_init argument. Print constructors
20829 (print_cxx_classname): Use UTF8_GET to extract characters from
20831 (print_base_classname): New function.
20832 (print_class_decls): New function.
20833 (process_file): Use it.
20834 (utf8_cmp): New function.
20836 1998-07-13 Nick Clifton <nickc@cygnus.com>
20838 * lang-options.h: Format changed to match changes in gcc/toplev.c
20839 to implement a --help option.
20841 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
20843 * decl.c (init_decl_processing): Revert change to dtable_type.
20845 1998-07-09 Per Bothner <bothner@cygnus.com>
20847 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20849 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
20851 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20853 * lang.c (lang_init): Default flag_exceptions to 1, without
20854 checking to see if it's 2 first.
20856 1998-07-08 Jeffrey A Law (law@cygnus.com)
20858 * constants.c: Include "system.h".
20859 * decl.c: Likewise.
20860 * lang.c (flag_new_exceptions): Get via extern now.
20861 (lang_init_options): New functions. Turn on flag_new_exceptions.
20863 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
20865 * lex.c (java_lex): Return 0 when we see an invalid character in
20868 * lex.c (java_read_char): Specify extra argument when calling
20870 (java_read_unicode, java_parse_end_comment,
20871 java_parse_escape_sequence): Likewise,
20872 (java_lex): Specify extra argument when calling
20873 java_lex_error. Test that IDs are beginning with a legal character
20874 for IDs. Handle invalid characters with an error message and a
20875 call to java_lex_error.
20876 (java_lex_error): Adjust column position by new argument
20877 `forward'. Issue an error even if in the middle of reporting an
20880 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
20882 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20883 we don't explicitly put a null pointer when we're copying it.
20885 1998-07-07 Tom Tromey <tromey@cygnus.com>
20887 * gjavah.c (print_cxx_classname): New function.
20888 (super_class_name): Likewise.
20889 (print_super_fields): Removed.
20890 (in_super): Removed.
20891 (print_field_info): Never generate #defines.
20892 (print_c_decl): Changed generated types to match JNI. No longer
20893 print class name before method name.
20894 (print_method_info): Print "static" before static methods.
20895 Print "virtual" before non-final methods.
20896 (usage): Use exit(1), not exit(-1).
20898 (print_field_info): Use %.17g to print a double.
20899 (last_access): New globals.
20900 (process_file): Initialize last_access.
20901 (usage): Now static.
20902 (ACC_VISIBILITY): New define.
20903 (generate_access): New function.
20904 (print_field_info): Call it.
20905 (print_method_info): Likewise. Also, generate information for all
20906 methods, not just native methods. Return void.
20907 (print_c_decl): Return void.
20908 (print_field_info): Return void.
20910 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20912 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20913 processing the jc1 grammar file. Prefix bison functions and
20914 variables with java_.
20915 (parse.c): Dependencies on parse.h and lex.h
20916 * expr.c (build_java_arrayaccess): Function now global.
20917 * java-tree.h: Comment reorganized to carry on previous
20918 classification effort.
20919 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20920 RESOLVE_TYPE_NAME_P): New flags on WFLs.
20921 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20922 java_parse (new prefix java_ generated by bison).
20923 (java_layout_parsed_class, java_register_parsed_class): Function
20925 (yyparse): Removed unnecessary call to init_outgoing_cpool.
20926 * lex.c (static tree wfl_op): Variable deleted.
20927 (java_init_lex): Initialize kw_super and kw_this. Initialize more
20928 ctxp fields to NULL_TREE.
20929 (java_lex): No longer create WFL for operators. Filename caching
20930 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20931 created as STRING_CST and later expanded. Removed extra argument
20932 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20934 (build_wfl_node): Removed code in comments.
20935 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20936 store token and location data in the current bison token.
20937 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20938 static/extern function declaration at the beginning of the file.
20939 (struct qualification): Data structure definition deleted.
20940 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20941 (qualify_ambiguous_name): Function declaration modified. Function
20942 now returns nothing.
20943 (build_array_ref, patch_array_ref, make_qualified_name,
20944 resolve_qualified_expression_name, maybe_generate_clinit,
20945 resolve_field_access): New static function declarations.
20946 (build_java_arrayaccess): New extern function declaration.
20947 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20948 (CALL_EXPR_PRIMARY): Macro deleted.
20949 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20950 (struct parser_ctxt): Field initialized_final
20951 removed. non_static_initialized, static_initialized: New fields.
20952 * parse.y (static tree kw_super, static tree kw_this): New global
20954 (%union): tree wfl field of operator member replaced by int
20955 location. WFLs are non longer created for operators.
20956 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20957 (qualified_name:): Now calls make_qualified_name to build the
20959 (type_declaration:): Consider generating <clinit> when class
20961 (variable_declarator:): Directly build an assignment node when the
20962 variable is initialized when declared.
20963 (this_or_super:): Build a WFL and set current location when THIS
20964 or SUPER are parsed.
20965 (expression_statement:): Wrap statement around a WFL.
20966 (primary_no_new_array:): Fixed typo. Changed value returned by
20967 THIS_TK because of its new type (temporary).
20968 (dim_exprs:): Temporary fix because of OSB_TK's new type.
20969 (field_access:): Build qualified name with SUPER.
20970 (method_invocation:): Fixed returned value because of SUPER's new
20972 (array_access:): Use OSB_TK location information.
20973 (post_increment_expression:, post_decrement_expression:,
20974 unary_expression:, pre_increment_expression:,
20975 pre_decrement_expression:, unary_expression_not_plus_minus:,
20976 cast_expression:, multiplicative_expression:,
20977 additive_expression:, shift_expression:, relational_expression:,
20978 equality_expression:, and_expression:, exclusive_or_expression:,
20979 inclusive_or_expression:, conditional_and_expression:,
20980 conditional_or_expression:, assignment:): Use new location/token
20981 information available on operators.
20982 (create_class): Set super_decl_type to NULL_TREE when processing
20984 (register_fields): Field initialization is now a MODIFY_EXPR
20985 node. Chain initialization code to the matching lists (according
20986 to the field declaration modifiers).
20987 (maybe_generate_clinit): New function.
20988 (method_header): Don't set method's DECL_NAME to a WFL when adding
20989 methods to java.lang.Object.
20990 (resolve_and_layout): Now can return NULL_TREE if the type
20991 resolution fails. Otherwise, return the class DECL instead of its
20993 (check_method_redefinition): Don't patch method DECL_NAME if it
20994 belongs to java.lang.Object.
20995 (process_imports): Simply assign error_found to the value returned
20996 by check_pkg_class_access.
20997 (declare_local_variables): Don't use their init statements (if
20998 any) when parsing error were previously found. Reuse MODIFY_EXPR
20999 build during parsing as an init statement.
21000 (java_method_add_stmt): Now return the current method body.
21001 (java_layout_parsed_class, java_register_parsed_class): Functions
21003 (java_complete_expand_methods): Initialize the constant pool on a
21004 per class basis. Layout the classes before expanding their method
21005 bodies. Don't try expand artificial constructor code if error were
21006 found. Make the classes data and register them if no error were
21008 (java_complete_expand_method): Retrieve an artificial constructor
21009 argument list before entering its body. Assign the top block to
21010 the artificial constructor function body and set types of declared
21011 blocks and compound statements to void. Walk method body if not an
21012 artificial constructor.
21013 (make_qualified_name, cut_identifier_in_qualified): New functions.
21014 (resolve_expression_name): Fixed comments. Save/restore the
21015 current class CLASS_LOADED_P flag value. Build non qualified
21016 static field access and handle qualified expression names.
21017 (resolve_field_access, resolve_qualified_expression_name): New
21019 (patch_method_invocation_stmt): Use the new expression resolution
21020 scheme, calling resolve_field_access when the function call is
21021 resolved as an expression.
21022 (qualify_ambiguous_name): Function rewritten to work on qualified
21023 expression produced by make_qualified_name.
21024 (java_complete_tree): Promote type when function's argument are
21025 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
21026 the assignment to discover further errors if RHS is a expression
21027 name that fails to evaluate. Declare LHS initialized even though
21028 the assignment failed. Don't use the location variable and removed
21029 extra argument in patch function calls. Now handle the ARRAY_REF
21030 case and build internal string representation when STRING_CSTs are
21032 (build_method_invocation): Don't wrap function call around a WFL.
21033 (build_assignment): Likewise. Use the operator location
21035 (patch_assignment): Handle array access LHSs. Handle error
21036 provenance, resulting in a better error report.
21037 (build_binop): Use op_location from operator as binop location
21039 (build_unaryop, build_incdec, build_cast): Likewise.
21040 (patch_binop): Extract location information from the node. Fixed
21041 typo in error message.
21042 (patch_unary_op): Extract location information from the node.
21043 (build_array_ref, patch_array_ref): New functions.
21045 1998-07-01 Tom Tromey <tromey@cygnus.com>
21047 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
21048 match _Jv_IsInstanceOf.
21049 * decl.c (init_decl_processing): Use _Jv_NewArray, not
21050 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
21052 1998-06-30 Tom Tromey <tromey@cygnus.com>
21054 * decl.c (init_decl_processing): Functions are now named
21055 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
21057 1998-06-29 Per Bothner <bothner@cygnus.com>
21059 * java-tree.h (load_class): Add prototype.
21060 * class.c (is_compiled_class): Add missing arg to load_class.
21061 * expr.c (expand_java_NEW): Call load_class.
21062 * parse.y (process_import): Removed bogus use of void return value.
21064 1998-06-25 Per Bothner <bothner@cygnus.com>
21066 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
21067 Function name is "_Jv_Throw" instead of "soft_athrow".
21068 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
21069 Function name is "_Jv_AllocObject" instead of "soft_new".
21070 Takes an extra parameter (object size).
21071 * expr.c: Update calls.
21073 1998-06-24 Per Bothner <bothner@cygnus.com>
21075 * lex.c (java_get_line_col): Handle end-of-file.
21076 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
21078 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
21080 * lang.c (lang_init): Make -fexceptions the default.
21081 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
21082 exception handling is not turned on.
21084 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
21086 * lang.c (flag_new_exceptions): Make this this default.
21087 * decl.c (end_java_method): Call emit_handlers.
21088 * except.c (method_init_exceptions): Set language code and version.
21089 (expand_start_java_handler): Enable exception, and call
21090 expand_eh_region_start.
21091 (expand_end_java_handler): Enable exception, and set up catch blocks.
21092 (emit_handlers): New routine to generate the saved handlers.
21093 * java-except.h (emit_handlers): Add prototype.
21095 1998-06-12 Per Bothner <bothner@cygnus.com>
21097 We used to have three different representations of the constant pool:
21098 the CPool structure, the tree_constant_pool, and the constructures
21099 used to build the Class object (which may need class and string
21100 constants) in compiled code. None were appropriate for compiling
21101 to .class files, so I did a major overhaul.
21103 First, the tree_constant_pool array was removed. Things were
21104 modified to the CPool structure in the JCF could be used.
21105 Second, a "capacity" field was added to the CPool, and functions
21106 written to search for a matching constant, adding one if not found.
21107 The code that generated the Class object was changed to use a CPool.
21108 The actual TREE_LISTs used to build the CONSTRUCTORs used for
21109 the static Class object are now only in build_constants_constructor.
21110 Finally, I wrote code which can generate a .class file (including its
21111 constant pool) from the RECORD_TYPE of a class. This is a big step
21112 on the way to compiling Java source into .class files.
21114 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
21115 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
21117 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21118 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
21119 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21120 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21121 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
21122 (lang_type): Removed constant_pool field.
21123 * jcf.h (CPool): Renamed size to count. Added field capacity.
21124 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21125 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
21126 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21128 * constants.c (current_constant_pool_tags, current_constant_pool_data,
21129 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21130 * constants.c (build_constants_constructor): Use new outgoing_cpool.
21131 (set_constant_entry, find_constant1, find_constant2,
21132 find_class_constant, count_constant_pool_bytes, write_constant_pool,
21133 find_utf8_constant, find_class_or_string_constant): New functions.
21135 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
21136 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
21137 (give_name_to_class, get_class_constant): Likewise.
21138 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
21139 (get_name_and_type_constant, get_ref_constant): Removed.
21140 * parse.h (parser_ctxt): Remove field tree_constant_pool.
21141 * parse.y: Don't save/restore tree_constant_pool.
21142 * verify.c (verify_jvm_instructions): Update for new approach.
21143 * expr.c (expand_invoke, expand_java_field_op): Likewise.
21145 * lang-options.h: Added -femit-class-file, -femit-class-files.
21146 * lang.c (flag_emit_class_files), java-tree.h: New flag.
21147 (lang_f_options): Added "emit-class-file(s)".
21149 * expr.c (build_java_arrayaccess): Generate more efficient array
21150 bounds checking, by using unsigned compare.
21152 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
21154 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
21156 * parse.h: New comment on the handling of unresolved type
21157 identifiers. JDEPs are now part of the jdep_code enum.
21158 (typedef struct jdep): Now use enum jdep_code or int, depending on
21159 availability. Both are narrowed down to an 8 bits bitfield.
21160 (CALL_EXPR_PRIMARY): Fixed comment.
21162 1998-06-10 Tom Tromey <tromey@cygnus.com>
21164 * Make-lang.in (java): Added gjavac and jvgenmain.
21165 (java.start.encap): Depend on gjavac.
21166 (java.rest.encap): Depend on jvgenmain.
21168 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21169 (JAVA_CROSS_NAME): Likewise.
21170 (java.all.build): Depend on jvgenmain and gjavac.
21171 (java.all.cross): Depend on jvgenmain and gjavac-cross.
21172 (jvgenmain$(exeext)): New target.
21173 (java.install-common): Wrote.
21174 * config-lang.in (compilers, stagestuff): Added gjavac and
21177 1998-06-10 Dave Brolley <brolley@cygnus.com>
21179 * lang.c (lang_decode_option): New argc/argv interface.
21181 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21183 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21184 * decl.c (build_decl_no_layout): New function.
21185 * expr.c (java_lang_expand_expr): Layout declarations found in
21186 blocks before they're pushed.
21187 * jcf-parse.c (load_class): Save current line when parsing class
21189 (parse_source_file): Register class before expanding their
21191 * lang.c (put_decl_node): Produce `null' when `void *' is
21193 * lex.c (static tree wfl_op): New static global, for error report
21195 (java_init_lex): wfl_operator and wfl_op initialized
21196 here. Filename caching added for wfl_op. Return wfl_op when `(' is
21198 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21199 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21200 build_unresolved_array_type): New static function definitions.
21201 (build_decl_no_layout): New extern function declared.
21202 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21203 faulty modifier exists.
21204 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21205 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21206 (UNARY_PLUS_EXPR): New fake operator.
21207 (struct parser_ctxt): New field osb_number.
21208 * parse.y (static tree wfl_operator): New static WFL for operator
21209 bound error messages.
21210 (DECR_TK, INCR_TK): Moved.
21211 (OP_TK): Tagged <operator>.
21212 (array_type:): Now call build_unresolved_array_type.
21213 (dim_expr:): Count the number of '[' seen.
21214 (post_increment_expression, post_decrement_expression,
21215 pre_increment_expression, pre_decrement_expression,
21216 unary_expression_not_plus_minus, unary_expression:): Actions are
21217 now building the corresponding unary expressions.
21218 (cast_expression:): Actions are now building cast expressions.
21219 (build_unresolved_array_type): New function.
21220 (create_interface): Reset the number of declared interfaces.
21221 (create_class): Likewise.
21222 (method_header): Methods declared within the scope of an interface
21223 are now implicitly set public and abstract.
21224 (java_complete_class): Variable's and parameter's type are patched
21225 with a promoted type.
21226 (declare_local_variables): Resolved non builtin types are promoted
21227 before being used to build a variable decl. Removed type patch
21228 posted on variable initialization statement.
21229 (source_start_java_method): Use build_decl_no_layout to build the
21230 decl of a parameter of incomplete type.
21231 (java_register_parsed_class): Process interfaces too. Call
21232 rest_of_decl_compilation on each processed class declarations.
21233 (java_complete_expand_methods): Don't attempt to expand things in
21235 (java_complete_tree): Process CONVERT_EXPR, even though it always
21236 has a type. Propagate error_mark_node to node's type too. Promote
21237 method's call argument type and return error_mark_node if
21238 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21239 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21240 handle unary operator nodes.
21241 (build_assignment): Added comment.
21242 (print_int_node): New function.
21243 (patch_assignment): New second argument. New error handling. Use
21244 print_int_node. Handle references. Use can_cast_to_p to issue
21245 different error message according to the context and check upon
21246 the initialization of the RHS.
21247 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21248 (operator_string): Handle more operators.
21249 (patch_binop): No longer use a function static
21250 wfl_operator. Improved error message on shift distance.
21251 (build_unaryop, build_incdec, build_cast, patch_unaryop,
21252 patch_cast): New functions.
21254 1998-06-05 Per Bothner <bothner@cygnus.com>
21256 * jvspec.c: New file.
21257 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
21259 * java-tree.h (identifier_subst): Add declaration.
21261 1998-06-04 Tom Tromey <tromey@cygnus.com>
21263 * jvgenmain.c (main): Generate call to JvRunMain.
21265 * class.c (make_class_data): Push value for "sync_info" field.
21266 * decl.c (init_decl_processing): Push "sync_info" field.
21268 1998-06-03 Per Bothner <bothner@cygnus.com>
21270 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
21271 Java (source) name, not signature.
21272 Set TYPE_ALIGN to (at least) that of element_type.
21274 1998-06-02 Per Bothner <bothner@cygnus.com>
21276 * class.c: Moved classname-mangling-rekated code to ...
21277 * mangle.c: ... this new file.
21278 * jvgenmain.c: New program (needs mangle.c) to generate main program.
21279 * Makefile.in: Update for above changes.
21281 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21283 * expr.c (truthvalue_conversion): Convert integer and floating
21284 point value to their truth value.
21285 * lex.c (java_lex): Handle the `null' literal.
21286 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21287 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21288 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21291 * parse.y: Reorganization/documentation on token declaration.
21292 (binop_lookup[]): New added new tree codes.
21293 (relational_expression): Build corresponding binary operators.
21294 (equality_expression, conditional_and_expression,
21295 conditional_or_expression): Likewise.
21296 (java_complete_class): Fix crash in debug message.
21297 (java_complete_tree): Check initialization of method call
21298 arguments. Further bogus node evaluation to detect more error
21299 during assignments. Handles more binary operators.
21300 (patch_assignment): Use DECL_P.
21301 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21303 (operator_string): Handle more case. Compacted source.
21304 (patch_binop): Changed function comment. Checking for
21305 uninitialized first operand takes the compound assignment into
21306 account and uses DECL_P. Checking for uninitialized second operand
21307 delayed to routine's end. Use macros to issue type bound error
21308 messages and issue messages on both operands if their types are
21309 different. Force fixed type into node. Handle all binary
21312 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21314 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21315 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21316 build operator node and return tokens.
21317 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21318 * parse.h (java_complete_tree): Changed returned type in prototype.
21319 (build_method_invocation, build_assignment, patch_assignment,
21320 patch_binop): New static function declarations.
21321 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21322 BUILD_EXPR_WFL): New macros.
21323 * parse.y (enum tree_code binop_lookup[]): New static for token to
21325 (%union): Parser union has new sub-structure `operator'.
21326 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21327 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21328 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21329 ASSIGN_ANY_TK): Tokens tagged `operator'.
21330 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21331 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21332 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21333 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21334 (assignment_operator:): Rule tagged `operator'.
21335 (expression_statement:): Re-installed default rule.
21336 (method_invocation:): Sub rules call build_method_invocation.
21337 (postfix_expression:): Don't attempt to resolve name here. Just
21339 (multiplicative_expression:): Sub-rules build corresponding binop
21341 (additive_expression:, shift_expression:, and_expression:,
21342 exclusive_or_expression:, inclusive_or_expression:): Likewise.
21343 (assignment:): Sub rule invoke build_assignment.
21344 (assignment_operator:): Default rules on sub rules.
21345 (force_error): Added documentation on this variable.
21346 (declare_local_variables): Build initialization calling
21348 (expand_start_java_method): Removed unused rtx declaration. Mark
21349 arguments as already initialized.
21350 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21351 (java_complete_expand_methods): Don't process next method if
21352 completion of the previous one triggered errors.
21353 (java_complete_expand_method): Call source_end_java_method if no
21354 error were found during completion.
21355 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21356 locals declaratilon. Handle names found within a class. Return
21357 error_mark_node when things aren't found.
21358 (patch_method_invocation_stmt): Return error_mark_node on failures.
21359 (patch_invoke): Removed unused local. Return the correct node.
21360 (java_complete_tree): Now returns a value. The BLOCK section binds
21361 local identifiers and the type of a BLOCK is now void. Assign the
21362 result of operand completion on COMPOUND_EXPR. Assign the
21363 encapsulated node of a WFL to the result of its completion, except
21364 when the node is an identifier. Now handle MODIFY_EXPR and several
21365 binary operators. Return error_mark_node on errors.
21366 (build_method_invocation, build_assignment, patch_assignment,
21367 build_binop, operator_string, patch_binop): New functions.
21368 * typeck.c (binary_numeric_promotion): New function.
21370 1998-05-21 Per Bothner <bothner@cygnus.com>
21372 * class.c (identifier_subst): New convenience wrapper for ident_subst.
21373 Replace most uses of ident_subst by identifier_subst.
21375 * class.c (push_class_static_dummy_field): Removed function.
21376 (build_class_ref): Find Class object decl by looking up "CNAME.class",
21377 instead of looking got "class" static field. Create that decl here.
21378 (class_identifier_node): Removed; no longer needed.
21379 (init_class_processing): Don't init class_identifier_node.
21380 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
21381 Do nreverse 0 times (instead of twice) for Object and Class.
21382 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21384 1998-05-20 Per Bothner <bothner@cygnus.com>
21386 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
21387 while initializing linenumber_count and linenumber_table.
21388 Do it before init_function_start (which calls emit_line_note).
21389 * expr.c (expand_byte_code): Don't need to clear lineno here.
21391 1998-05-18 Tom Tromey <tromey@cygnus.com>
21393 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21394 then mangle number as _N_.
21396 * class.c (mangle_class_field): New function.
21397 (build_class_ref): Set assembler name of class reference using
21398 mangle_class_field.
21399 (push_class_static_dummy_field): Likewise.
21401 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
21403 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21404 of assigning to TREE_CODE. The latter method exploits a feature
21405 of GCC that is not ANSI compliant.
21407 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21409 * decl.c (pushdecl_force_head): New function.
21410 (pushlevel): Removed conditional printf.
21411 (complete_start_java_method): Don't enter local variable scope if
21412 function is compiled from source code.
21413 * expr.c: parse.h now included
21414 (java_lang_expand_expr): New function.
21415 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21416 printf. Terminate buffer when doing directories.
21417 * jcf-parse.c (parse_source_file): Call lang_init_source before
21418 parsing and before code generation.
21419 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21420 use printf if the macro is defined.
21421 * lang.c (lang_init): Install lang_expand_expr hook on
21422 java_lang_expand_expr.
21423 (java_dummy_print): New function.
21424 (lang_init_source): New function.
21425 * lex.c (java_lex): Remember location of an opening brace at the
21426 second nesting level.
21427 (java_is_eol): Unget character seen after a CR if it is EOF.
21428 * parse.h: Now includes lex.h
21429 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21430 printf if the macro is defined.
21431 (expand_start_java_method, build_expr_block, enter_block,
21432 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21433 New static function declarations.
21434 (pushdecl_force_head): New extern function declaration.
21435 (INCOMPLETE_TYPE_P): New macro.
21436 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21437 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21438 BLOCK_EXPR_ORIGIN): New macros.
21439 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21440 DECL_SOURCE_LINE_LAST): New macros.
21441 (struct parser_ctxt): Removed field current_method_decl, redundant
21442 with the field current_function_decl. Added fields
21443 first_ccb_indent1 and pending_block.
21444 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21445 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21447 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21448 (compilation_unit:): Cosmetic on sub rule.
21449 (type_declaration:): Cosmetic on sub rules. Added an error rule.
21450 (variable_initializer:): Installed default rule on expression:.
21451 (method_declaration:): method_header: starts a new
21452 method. method_body: installs the function body, absorbs blocks
21453 emitted for temporary variable scopings, pops function's body block
21454 and merges function's last statement lineno in DECL_SOURCE_LINE.
21455 (method_body:): Installed default rules.
21456 (block:): Call enter_block when an opening brace is seen. Absorb
21457 scoping blocks and call exit_block when a closing brace is seen.
21458 (block_statement:): Cosmetic changes.
21459 (method_invocation:): Create WFL around CALL_EXPR node.
21460 (patch_stage): Added comment around definition.
21461 (method_header): Try to use first_ccb_indent1 as the first line of
21462 the method, so BP debug info are emitted at the first opening
21463 brace of the function. If the function has no body, use the
21464 location of the function's name. Override currently defined method
21465 name with the matching WFL so we can point redefinition errors
21466 using the location where the function's name was declared.
21467 (check_abstract_method_header): Interprets DECL_NAME as an
21468 identifier or as a WFL, accordingly.
21469 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21470 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21471 location and name information out of it and reinstall DECL_NAME to
21472 its original identifier node value.
21473 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21474 function's source code).
21475 (read_import_dir): Test the value returned by find_class and issue
21476 a fatal accordingly.
21477 (declare_local_variables): Push a new block for the scope of the
21478 new variable(s) if code has been already generated at that nesting
21479 level. Pinpoint redefinition errors using the variable id
21480 WFLs. Generate initialization code if necessary. If the variable
21481 type is incomplete, register a patch on its decl.
21482 (source_start_java_method): Rewritten. Define a new block for the
21483 function's parameters. Build parameter decl out of function's
21484 arguments and register them for a patch if their types are
21486 (expand_start_java_method): Includes the part of
21487 source_start_java_method that was pushing the parameter decls and
21488 completing the method start code.
21489 (source_end_java_method): Removed call the expand_end_bindings and
21490 poplevel (already taken care of). Reinstall function's arguments
21491 and get function's last line of code before calling
21492 expand_function_end.
21493 (java_method_add_stmt): New comment before the function's
21494 code. Complement the second operand of the current COMPOUND_EXPR
21496 (java_complete_expand_methods): Don't generate debug info on line
21497 zero when expanding a generated constructor.
21498 (java_complete_expand_method): Set start and end line numbers for
21499 a artificially generated constructor to one and manually call
21500 enter_block and exit_block when defining it. For all methods:
21501 expand function's start calling the new expand_start_java_method
21502 and invoke java_complete_tree on the effective method's body, if
21504 (resolve_expression_name): Now use lookup_name_in_blocks to search
21505 local variable decls and print out an error when variables are
21507 (patch_method_invocation_stmt): Inserted comment before the
21509 (lookup_method_invoke): Chain method's arguments using chainon
21510 with the current arg list as a second argument. Inserted missing
21511 IDENTIFIER_POINTER when reporting an error on methods not found.
21512 (refine_accessible_methods_list): Don't retain constructors.
21513 (patch_arguments): Function removed.
21514 (java_complete_tree): Inserted comment before the function's
21515 code. New case for BLOCKs. Moved the WFL case a bit
21516 further. Complete function's arguments.
21517 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21518 maybe_absorb_scoping_blocks): New functions.
21520 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21522 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21524 * jcf-parse.c (parse_source_file, java_error_count): New forward
21525 and extern declarations.
21526 (java_parse_abort_on_error): Macro moved.
21527 (jcf_parse_source): fatal called if fopen fails. Now calls
21529 (parse_source_file): New parse_only parameter. Reflects the
21530 elimination of the second pass.
21531 (yyparse): parse_source_file called with argument set to 0.
21532 * jcf.h (JCF_ZERO): Sets java_source to zero.
21533 * lex.c (java_init_lex): pass argument is gone. Function modified
21534 to be called once during the analysis of a file.
21535 (java_unget_unicode): Fixed typo in fatal message.
21536 (java_get_line_col): Likewise.
21537 (java_lval): Likewise. String literals no longer built during
21539 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21541 * parse.h (MODIFIER_WFL): New macro.
21542 (parse_check_super, parser_check_super_interface): Now return int.
21543 (parser_chain_incomplete_item, not_builtin_p,
21544 complete_method_decl): Declarations removed.
21545 (build_method_invocation_stmt, build_invoke): Renamed using the
21546 `patch' instead of `build'
21547 (register-incomplete_type, obtain_incomplete_type,
21548 java_complete_tree, java_complete_expand_method,
21549 unresolved_type_p, create_jdep_list): New function declarations.
21550 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21551 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21552 (jdep): New typedef on new struct _jdep.
21553 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21554 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21555 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21556 JDEP_RESOLVED_P): New macros.
21557 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21558 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21559 JDEP_VARIABLE): New enum values and jdep kinds.
21560 (jdeplist): New typedef on struct _jdeplist.
21561 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21563 (CALL_EXPR_PRIMARY): New macro.
21564 (struct parser_ctxt): Fields java_pass, current_method_decl,
21565 method_decl_list deleted. New field jdeplist.
21566 (INCOMPLETE_P): Macro deleted.
21567 * parse.y (single_type_import_declaration:): Removed pass switch.
21568 (type_import_on_demand_declaration): Likewise.
21569 (field_declaration:): Removed pass switch on all sub rules.
21570 (class_declaration:): Call the complete_class_decl removed on
21572 (method_declaration:): Removed second pass switch. No longer chain
21573 methods decl when method_header reduced.
21574 (method_header:): Sub rules no longer depend on pass switch.
21575 (method_declarator:): Likewise.
21576 (method_body:): Likewise.
21577 (abstract_method_declaration:): Likewise.
21578 (block_statement:): Likewise.
21579 (local_variable_declaration:): Likewise.
21580 (argument_list:): Likewise.
21581 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21582 removed. Partial CLASS_EXPR tree node built instead.
21583 (postfix_expression:): Removed pass switch on all sub rules.
21584 (java_pop_parser_context): Free classd_list content.
21585 (yyerror): Call obstrack_grow0 to finalize error message.
21586 (check_class_interface_creation): Comment modified to reflect new
21587 returned value meaning. Removed second pass switch. Return 1 if an
21588 error was found, 0 otherwise. Adjust pointer on filename if a
21589 leading path separator was found.
21590 (maybe_create_class_interface_decl): Removed first pass switch
21591 when linking the class decl to the class_list. Install a new
21592 jdep_list for the class.
21593 (add_superinterfaces): List of unresolved interfaces is
21594 gone. Unresolved interfaces are directly added to the current
21596 (create_interface): Second pass shortcut removed.
21597 ctpx->modifier_ctx access through MODIFIER_WFL.
21598 (create_class): Second pass shortcut removed. Call to
21599 register_incomplete_type replaces the call to
21600 parser_chain_incomplete_item.
21601 (complete_class_decl): Function removed.
21602 (duplicate_declaration_error): New way of retrieving redeclared
21604 (register_fields): Call to lookup_modifier_cl replaced by
21605 MODIFIER_WFL. New way of handling unresolved type, using
21606 unresolved_type_p and obtain_incomplete_type.
21607 register_incomplete_type replaces call to parser_chain_incomplete_item.
21608 (patch_stage): New static global variable.
21609 (method_header): New way of handling unresolved type, using
21610 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21611 indicates that the method decl needs to be patched.
21612 (check_abstract_method_header): Call to lookup_modifier_cl
21613 replaced by MODIFIER_WFL.
21614 (method_declarator): Incomplete argument type are registered
21615 calling register_incomplete_type. Patch on the declared method is
21616 issued in that case.
21617 (unresolved_type_p): New function.
21618 (parser_check_super_interface): New comment to reflect function's
21619 modified returned type (int). Function and has a new argument
21620 this_wfl. Call to parse_error_context uses this_wfl instead of
21621 relying on lookup_cl.
21622 (parser_check_super): Comment reflects function's new returned
21623 type (int). Function returns nonzero value on error.
21624 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21625 register_incomplete_type, jdep_resolve_class): New functions to
21626 handle incomplete types in declarations.
21627 (java_complete_class): Rewritten to work with the new incomplete
21628 type handling scheme.
21629 (complete_class_report_errors): Likewise.
21630 (complete_method_decl): Removed: it jobs is now handled by
21631 java_complete_class.
21632 (do_resolve_class): Class loaded in not already loaded and not
21633 found in Java source code.
21634 (java_check_regular_methods, java_check_abstract_methods): Don't
21635 call complete_method_decl anymore.
21636 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21637 (read_import_dir): Got rid of the pass number dependency.
21638 (declare_local_variables): New handling of unresolved types (patch
21640 (source_start_java_method): New parameter level. Function called
21641 with level set to 1 when argument types are potentially
21642 unresolved. Called to complete the job with level set to 2 once
21643 types are complete.
21644 (source_end_java_method): Call to permanent_allocation
21645 removed. Waiting to be replaced by a more suitable obstack
21647 (java_complete_expand_methods, java_complete_expand_method,
21648 java_expand_finals): New functions.
21649 (build_method_invocation_stmt): Renamed
21650 patch_method_invocation_stmt. Extracts function call expression
21651 (wfl) and arguments (args) from CALL_EXPR tree operands.
21652 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21653 call. Patch the function and argument operand of the CALL_EXPR
21655 (patch_argument, java_complete_tree): New functions.
21657 1998-04-20 Per Bothner <bothner@cygnus.com>
21659 Recover from missing fields and methods (i.e. error instead of fatal).
21660 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21661 * expr.c (expand_invoke): Recover from missing method.
21662 (expand_java_field_op): Recover from missing field.
21663 Inline references to java.lang.{Integer,Char,...}.TYPE.
21664 * typeck.c (get_type_from_signature), java-tree.h: New function.
21665 * class.c (add_method): Use get_type_from_signature.
21666 (build_class_ref): Handle a class that was not found.
21667 * typeck.c (convert): Handle conversion to pointers (for convenience).
21668 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21669 instead of lookup_field to handle missing fields.
21671 * jcf-parse.c (process_zip_dir): Set java_source.
21673 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21675 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21677 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21679 * jcf-parse.c (load_class): Don't change input_filename before
21680 calling jcf_parse_source (but still do it before calling
21682 (jcf_parse_source): Assign input_filename after having saved the
21684 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21685 list. ctxp->modifier_ctx zeroed according to its new
21686 definition. ctxp->filename initialized. Removed
21687 JAVA_MODIFIER_CTX_UNMARK.
21688 (java_unget_unicode): Update the character based column position.
21689 (java_allocate_new_line): ref_count not used anymore. Always free
21690 ctxp->p_line. Initialize c_line->char_col to 0.
21691 (java_get_unicode): Update the character based column position.
21692 (java_lex): Use ctxp->elc to store current position in source
21693 file, at the beginning of the parsed token. Set modifier_ctx entry
21694 corresponding to the parse modifier to a WFL node. Return a WFL
21695 node when an identifier is parsed.
21696 (java_lex_error): Now uses ctxp->elc to store current position in
21698 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21699 * lex.h (build_wfl_node): New function definitions.
21700 (struct java_line): ref_count and next fields are gone. New field
21702 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21703 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21704 (JAVA_COLUMN_DELTA): New macro.
21705 (java_lc): New typedef on new struct _java_lc.
21706 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21707 (parse_error_context, parse_warning_context): Changed prototypes.
21708 (java_get_line_col): Added as an available global function.
21709 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21710 (IC_DECL): Replaced by macro IC_TYPE
21711 (DEPEND_WFL): New macro.
21712 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21714 (exit_java_complete_class): Removed a commented out statement.
21715 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21716 now an array of tree nodes. Deleted fields line_list and
21717 e_line. New field elc, to replace e_line.
21718 * parse.y (array_type:): Build WFL node.
21719 (qualified_name:): Build a single WFL node out of two. Retain
21720 the location information of the first node in the resulting node.
21721 (package_declaration:): Use package name as a WFL node
21722 (single_type_import_declaration:): Use imported name as a WFL node.
21723 (type_import_on_demand_declaration:): Use root of the imported
21724 packages as a WFL node.
21725 (field_declaration:): Removed unused local variable cl.
21726 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21727 (yyerror): New static elc. Removed static error_line, error_pos.
21728 New local code_from_source. Save ctxp->elc into elc at the first
21729 pass. Call java_get_line_col to get a string of the line where
21730 the error occurred.
21731 (debug_line): Removed static function.
21732 (parse_error_context, parse_warning_context): Parameter cl is now
21733 a WFL node. Use its value to initialize ctxp->elc.
21734 (redefinition_error): Parameter cl is now a WFL node.
21735 (parse_add_interface): New parameter wfl. No longer call
21736 lookup_cl, use wfl instead.
21737 (check_class_interface_creation): Parameter cl is now a WFL node.
21738 (maybe_create_class_interface_decl): Likewise.
21739 (add_superinterfaces): New function.
21740 (create_interface): Removed local cl, node, super_decl,
21741 super_decl_type. Function now uses id as a WFL node. Better
21742 warning/error report on obsolete or forbidden mix of
21743 modifiers. Now calls add_superinterfaces to register interfaces.
21744 (create_class): Removed local cl, node. Local variable id is used
21745 as a WFL node. Better error report on forbidden modifier
21746 mix. Uses add_superinterfaces to register interfaces.
21747 (find_field): Argument cl is now a WFL node. Now store the WFL
21748 node of a fields that needs to be checked for their
21750 (method_header): Local variable node non longer used. Local
21751 variable id replaces cl.
21752 (check_modifiers_consistency): Local variable cl is now a WFL
21754 (method_declarator): Local variable cl replaced by parameter id.
21755 (parser_qualified_name): Now uses parameter name as a WFL node.
21756 (parser_check_super_interface): New parameter wfl, for achieve
21757 greater accuracy during error reports.
21758 (parser_chain_incomplete_item): New parameter named location. Used,
21759 along the decl, to construct the incomplete item node.
21760 (java_complete_class): resolve_class now uses WFL node extracted
21761 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21763 (complete_method_decl): Unresolved function's argument types are WFL.
21764 (resolve_class): Parameter cl is now a WFL node.
21765 (resolve_and_layout): Likewise.
21766 (do_resolve_class): Likewise. Try first to use cl and then do the
21767 lookup on the decl when calling check_pkg_class_access.
21768 (complete_class_report_errors): Use IC_TYPE in place of
21769 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21770 instead of doing a lookup over the decl.
21771 (java_check_final): Use WFL info from field tree list.
21772 (lookup_cl): Rewritten and returns a statically defined WFL node.
21773 (lookup_modifier_cl): Now uses information from WFL nodes.
21774 (process_imports): Likewise.
21775 (read_import_dir): name and cl arguments replaced by a single WFL
21776 node. Function modified accordingly.
21777 (find_in_imports_on_demand): Now uses WFL node.
21778 (check_pkg_class_access): cl argument is now a WFL node.
21779 (declare_local_variables): Fixed to use WFL nodes.
21780 (resolve_expression_name): Likewise.
21781 (build_method_invocation_stmt): name_combo argument renamed
21782 wfl. Function modified to use WFL nodes.
21783 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21784 (lookup_method_invoke): cl is now a WFL node. Added missing
21785 IDENTIFIER_POINTER to class type decl name.
21787 1998-04-14 Dave Brolley <brolley@cygnus.com>
21789 * lang.c (init_parse): Now returns char* containing the filename.
21791 1998-04-10 Per Bothner <bothner@cygnus.com>
21793 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21795 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21796 * class.c (make_class_data): If flag_assume_compiled, initial class
21797 state is CSTATE_PREPARED; make superclass and interfaces direct
21798 references, rather than constant pool indexes.
21800 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21802 * parser.y: Include flags.h. Removed debug variable pl.
21803 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21804 (block:): Likewise.
21805 (labeled_statement_nsi:): Generate debug info when reducing
21806 expression_statement:.
21807 (check_pkg_class_access): get_access_flags_from_decl invocation
21808 fixed for new CLASS_* flags location.
21809 (source_end_java_method): Save/restore parser context when
21810 entering/leaving this routine. Restore lineno to its right value
21811 before calling expand_end_bindings.
21812 (build_method_invocation_stmt): build_invoke called with the
21813 current line information.
21814 (build_invoke): New argument cl. Wrap the function call around a
21816 (refine_accessible_methods_list): Changed comment, removed
21818 * parse.h: Fixed typo in comments.
21819 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21820 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21821 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21823 * lex.c (java_lex): Record the last closing curly bracket of a
21825 * jcf-parse.c (jcf_parse_source): Now calls
21826 java_check_methods. Clarified comment, fixed typo.
21828 1998-04-09 Dave Brolley <brolley@cygnus.com>
21830 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21831 (finish_parse): Expose for non USE_CPPLIB builds.
21833 1998-04-08 Jeffrey A Law (law@cygnus.com)
21835 * lang.c (lang_print_xnode): New function.
21837 1998-04-03 Per Bothner <bothner@cygnus.com>
21839 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21840 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21841 used to build a class's dispatch table.
21842 (make_class_data): Generate dispatch table if flag_assume_compiled.
21843 Set dtable of class object to address of class_dtable_decl.
21845 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21846 be volatile and have side effects - generates better code.
21848 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21849 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21851 * expr.c (expand_invoke): If class is final, method is
21852 effectively final, so can call it directly.
21854 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21856 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21858 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
21860 * parse.y (build_method_invocation_stmt): Removed extra argument
21863 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
21865 * expr.c (dtable_indent): Now static global.
21866 (expand_invoke): Now call invoke_build_dtable and
21867 build_invokevirtual.
21868 (invoke_build_dtable, build_invokevirtual): New functions.
21869 * jcf-io.c (find_class): Defer issuing a warning by setting
21870 jcf->outofsynch to 1.
21871 * jcf-parse.c (jcf_out_of_synch): New function.
21872 (load_class): Test this_jcf.outofsynch flag and call
21873 jcf_out_of_synch accordingly.
21874 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21875 comment indentation.
21876 * lex.c (java_get_unicode): Fixed code indentation.
21877 (java_lex): Create string literal. Fixed typo. Removed several
21878 premature obstack_free.
21879 * parse.h: New enums for name resolution and invocation mode.
21880 (struct qualification): New data structure.
21881 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21882 (do_resolve_class, build_method_invocation_stmt,
21883 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21884 debug_line, identical_subpath_p, invocation_mode,
21885 refine_accessible_methods_list, build_invoke,
21886 lookup_method_invoke): New functions declared.
21887 (build_invokevirtual, invoke_build_dtable, match_java_method,
21888 build_field_ref, jcf_out_of_synch): New references to external
21890 (struct parse_ctxt): Removed artificial_constructor field.
21891 * parse.y: (array_type:): Type defined for this rule.
21892 (class_type:): Installed default rule for interface_type:.
21893 (array_type:): Now build Java array type.
21894 (qualified_name:): Now use obstack_grow0.
21895 (method_declaration:): Skip the artificial constructor added to
21897 (abstract_method_declaration:): Execute the code only during pass 1.
21898 (block:): Installed default rule in block_statements:.
21899 (block_statement:): Add the statement to the method during pass 2.
21900 (statement_expression): Installed default rule for
21901 method_invocation:.
21902 (argument_list:): Added code to build the argument list.
21903 (method_invocation:): Added call to create the method invocation
21905 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21906 (debug_line): New function for debug.
21907 (complete_class_decl): No longer do something during pass 1.
21908 (method_header): Use BUILD_PTR_FROM_NAME.
21909 (parser_qualified_classname): Use obstack_grow0. Removed bogus
21911 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21912 function's main comment.
21913 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21915 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21916 (resolve_class): Now works with arrays.
21917 (do_resolve_class, resolve_and_layout): New functions.
21918 (java_check_regular_methods): Reverse method list before and after
21919 having processed it. No longer set ctxp->artificial_constructor.
21920 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21921 accordingly. Fixed typo in issued error message. Now use
21923 (find_in_imports_on_demand): Now use obstack_grow0.
21924 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21925 (source_end_java_method): Call expand_expr_stmt instead of
21926 expand_expr. Calls it before calling expand_function_end.
21927 (java_method_add_stmt): Do nothing if errors were found during
21929 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21930 (build_method_invocation_stmt, build_invoke, invocation_mode,
21931 lookup_method_invoke, refine_accessible_methods_list,
21932 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21934 * typeck.c (build_java_signature): Properly end method signature
21935 if return type skipped.
21936 (match_java_method): New function.
21938 1998-03-16 Per Bothner <bothner@cygnus.com>
21940 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
21942 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
21944 * expr.c (build_invoke_non_interface): New function.
21945 (methods_ident, ncode_ident): Now static globals.
21946 (expand_invoke): Use build_invoke_non_interface.
21947 * java-tree.h (struct lang_decl): New field function_decl_body.
21948 (DECL_FUNCTION_BODY): New macro.
21949 * jcf-parse.c (jcf_parse_source): Deeper check before setting
21950 CLASS_FROM_SOURCE_P.
21951 (parse_source_file): Fixed typos. Call java_layout_parsed_class
21952 before starting pass 2. Call to java_generate_parsed_class replaced
21953 by java_register_parsed_class.
21954 * lex.c: Fixed typo in header. Some line width related formating.
21955 * lex.h: Some line width related formating.
21956 * parse.h (source_end_java_method, resolve_expression_name,
21957 complete_class_decl, maybe_create_class_interface_decl,
21958 check_class_interface_creation): New static function declarations.
21959 (java_layout_parsed_class, java_method_add_stmt): New function
21961 (struct parser_ctxt): Field mark_class_generate removed. New
21962 fields class_list and artificial_constructor.
21963 * parse.y: Fixed typo in header.
21964 (class_declaration:): Call complete_class_decl when class body
21966 (method_declaration:): Call source_end_java_method in pass 2 when
21967 the method body is defined.
21968 (postfix_expression:): Do expression name resolution on sub-rule
21969 name during pass 2.
21970 (create_class, create_interface): Merged common pieces.
21971 (check_class_interface_creation, maybe_create_class_interface_decl):
21973 (complete_class_decl): New function.
21974 (register_fields): Fixed line width related typo.
21975 (method_header): Correctly skip first argument when fixing
21976 argument line. Changed the loop.
21977 (java_check_circular_reference): Now use ctxp->class_list.
21978 (java_complete_class): Removed start/stop marking.
21979 (java_check_regular_methods): Now takes a class decl as an
21980 argument. Add default constructor if none were encountered.
21981 (java_check_methods): Now use ctxp->class_list. Changed call to
21982 java_check_regular_methods.
21983 (source_start_java_method): Set DECL_ARG_TYPE for each function
21985 (source_end_java_method, java_method_add_stmt): New functions.
21986 (java_generate_parsed_class): No longer exists.
21987 (java_layout_parsed_class, java_register_parsed_class): New functions.
21988 (resolve_expression_name): New function.
21990 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21992 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21993 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21994 until pass initializations are done. Call read_import_dir with
21996 * parse.h: (lookup_modifier_cl): New function declared.
21997 (INTERFACE_FIELD_MODIFIERS): New macro.
21998 (OBSOLETE_MODIFIER_WARNING): New macro.
21999 * parse.y: (register_fields): Class type and current field name in
22000 local variables. Check modifier(s) if adding field(s) to an interface.
22001 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
22002 and report errors using the faulty modifier line context.
22003 (lookup_modifier_cl): New function.
22004 (read_import_dir): Detect and report default import processing
22007 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
22009 Add a pair of -fassume-compiled/-fno-assume-compiled options.
22010 * class.c (is_compiled_class): Return 1 after making sure it
22011 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
22012 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
22013 * java-tree.h (flag_assume_compiled): Add decl.
22014 * lang.c (lang_f_options): Add the flag.
22015 (flag_assume_compiled): Add decl, default to 0.
22017 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22019 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
22020 (is_compiled_class): Likewise.
22021 (layout_class): Likewise.
22022 (layout_class): Detect and lay out classes defined in source code.
22023 (interface_of_p, add_interface_do, may_add_interface): New
22025 (add_interface): Now use add_interface_do.
22026 (add_method_1): New function.
22027 (add_method): Now use add_method_1.
22028 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
22029 (complete_start_java_method): New function.
22030 (start_java_mehod): Now call complete_start_java_method.
22031 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
22032 (expand_invoke): Likewise and fixed typo.
22033 *gjava.c: (print_super_field): Use new argument to find_class
22036 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
22037 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
22038 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
22040 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
22041 (add_method_1, push_class): New prototypes.
22042 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
22043 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
22044 directory where the class was found.
22045 (find_class): New argument DO_CLASS_FILE. Function find_class
22046 modified accordingly.
22047 *jcf-parse.c: (fix_class_path): New function.
22048 (load_class): Use new VERBOSE argument. load_class now finds and
22049 loads/parses .class/.java files. Save read_state of current_jcf
22051 (java_parser_abort_on_error): New macro.
22052 (jcf_parse_source, parse_source_file): New function.
22053 (jcf_parse): Fixed typo.
22054 (yyparse): Call parse_source_file () only.
22055 (process_zip_dir): Fixed typo, fix zdir->filename_length when
22056 writing the real class name back in the zip directory entry.
22057 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
22058 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
22059 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
22060 (find_class): Prototype fixed.
22061 *lex.c: Added 1998 time stamp.
22062 Removed all static global variables, moved into the parser
22063 context data structure.. Now include unistd.h if SEEK_SET not
22065 (java_init_lex): Rewritten.
22066 (java_sneak_unicode): Modified current unicode access in current line.
22067 (java_unget_unicode): Likewise.
22068 (java_allocate_new_line): New allocation management.
22069 (java_read_char): Modified access and storage of unget_utf8_value.
22070 New way of processing current unicode.
22071 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
22072 (java_get_unicode): Now use the parser context.
22073 (java_lineterminator): Likewise.
22074 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
22075 of the reentrant parser implementation. Function now use the
22076 parser context data structure and java_lval. Fixed production of
22077 the float and double constant "out of range" error message. Fixed
22078 obstack use. Return integer value when hitting a modifier. Now
22079 return type for TRUE, FALSE and other predefined types. Return
22080 identifier as a TREE_LIST list containing the current line context
22081 as the TREE_VALUE sub-node.
22082 (java_unicode_2_utf8): Fixed typo in declaration.
22083 (java_lex_error): Now use the parser context data structure.
22084 *lex.h: Added 1998 time stamp.
22085 (struct java_line): New fields ref_count and next.
22086 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
22087 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
22088 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
22089 *parse.h: Added 1998 time stamp.
22090 (java_parse_source_file): Renamed from parse_source_file.
22091 (YYERROR_NOW, YYNOT_TWICE): Fixed.
22092 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
22093 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
22094 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
22095 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
22096 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
22097 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
22098 (struct parser_ctxt): New data structure to keep the parser context.
22099 *parse.y: Added 1998 time stamp, got rid of static global variables.
22100 (java_error_count, ctxp): New global variables.
22101 (%union): New value field.
22102 (numeric_type, integral_type): Rules removed.
22103 (primitive_type): Rule defined to handle integral, float, double and
22105 (qualified_name, package_declaration,
22106 single_type_import_declaration, type_import_on_demand_declaration,
22107 modifiers, class_declaration, super, interfaces,
22108 interface_type_list, class_body, field_declaration,
22109 field_declaration, variable_declarators, variable_declarator,
22110 variable_declarator_id, method_declaration, method_header,
22111 formal_parameter_list, formal_parameter, method_body, block,
22112 static, interface_declaration, extends_interfaces,
22113 abstract_method_declaration, local_variable_declarators): Rules now
22115 (force_error, do_warning): New global statics.
22116 (push_parser_context, parser_context_save_global,
22117 parser_context_restore_global, pop_parser_context): New functions.
22118 (yyerror): Now uses the global parser context. Fixed use of obstack.
22119 (parse_error, parse_error_context, parse_warning_context,
22120 java_accstring_lookup, redefinition_error, check_modifiers,
22121 parser_add_interface, create_interface, create_class, find_field,
22122 duplicate_declaration_error, register_fields, method_header,
22123 check_modifiers_consistency, check_abstract_method_header,
22124 method_declarator, parser_qualified_classname,
22125 parser_check_super_interface, parser_check_super,
22126 parser_chain_incomplete_item, java_check_circular_reference,
22127 layout_class_from_source, java_complete_class,
22128 complete_method_decl, resolve_class, complete_class_report_errors,
22129 java_check_final, check_method_redefinition,
22130 java_check_regular_methods, java_check_abstract_methods,
22131 java_check_methods, lookup_java_interface_method2,
22132 lookup_java_method2, lookup_cl, find_name_in_single_imports,
22133 process_imports, find_in_imports, read_import_entry,
22134 read_import_dir, find_in_imports_on_demand,
22135 check_pkg_class_access, not_builtin_p, declare_local_variables,
22136 source_start_java_method, java_generate_parsed_class): New
22138 *typeck.c: (signature_include_return): New global variable.
22139 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
22140 to add the function returned type in the signature.
22142 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
22144 * jcf-io.c (open_in_zip): Use strncmp and LEN.
22146 1998-01-29 Dave Brolley <brolley@cygnus.com>
22148 * Make-lang.in (java.info): Added.
22149 (java.install-info): Added
22151 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
22153 * Makefile.in (clean): Also remove java/parse.c.
22155 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
22157 Add a pair of -fbounds-check/-fno-bounds-check options.
22158 * lang.c (lang_decode_option): Add code to grok arguments.
22159 (flag_bounds_check): Add decl.
22160 (lang_f_options): New array w/ the option in it.
22161 * java-tree.h (flag_bounds_check): Add decl.
22162 * lang-options.h: New file.
22163 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22164 of a static macro value.
22165 (JAVA_ARRAY_EXCEPTION): Delete macro.
22167 1998-01-23 Per Bothner <bothner@cygnus.com>
22169 * typeck.c (build_java_array_type): Fix two bugs in previous change.
22170 * expr.c (build_anewarray): Add missing promote_type.
22172 1998-01-22 Per Bothner <bothner@cygnus.com>
22174 Add array types with known length to optimize bounds checking.
22175 * typeck.c (build_java_array_type): Take length parameter.
22176 (java_array_type_length, build_prim_array_type): New functions.
22177 * java-tree.h: Update for new functions.
22178 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22179 * class.c: Use build_prim_array_type.
22180 * expr.c (can_widen_reference_to): Handle known-length array types.
22181 (verify_jvm_instructions): Keep track of integer push instructions
22182 followed by newarray/anewarray, so we can build known-length arrays.
22183 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
22184 (java_array_data_offset): New function.
22185 (build_java_array_length_access): New function. Optimize if constant.
22186 (build_java_arrayaccess): Constant fold bounds check.
22187 (expand_java_newarray, expand_java_anewarray): Replaced by ...
22188 (build_newarray, build_anewarray): New functions.
22189 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
22190 * verify.c (merge_types): Handle known-lengh array types.
22192 1998-01-19 Per Bothner <bothner@cygnus.com>
22194 * expr.c (expand_byte_code): Fix performace bug, which caused
22195 searching linenumber_table to be linear rather than constant.
22197 1997-12-12 Per Bothner <bothner@cygnus.com>
22199 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
22201 * decl.c, java-tree.h (soft_fmod_node): New global.
22202 * decl.c (init_decl_processing): Define __builtin_fmod.
22203 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
22204 using __builtin_fmod.
22206 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
22208 * keyword.h: New file, output of keyword.gperf as processed by
22210 * lex.c (java_lex_init): Initialize java_error_flag.
22211 * parse.c (YYERROR_NOW): Uses java_error_flag.
22212 * parse.y: New static java_error_flag. Useless definition of
22214 * parse.y (java_error): Portable error recovery using
22215 java_error_flag (not yet completely tuned).
22217 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
22219 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22221 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
22223 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22224 (parse.c, lex.c, keyword.h): New rules for Java source code
22226 * parse.c: Renamed into jcf-parse.c.
22227 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22228 * keyword.gperf: New file, Java keywords.
22229 * parse.y: New file, Java language grammar.
22230 * parse.h: New file, Java language grammar definitions.
22231 * lex.c: New file, Java language lexer.
22232 * lex.h: New file, Java language lexer definitions.
22234 1997-12-03 Per Bothner <bothner@cygnus.com>
22236 * decl.c (clinit_identifier_node), java-tree.h: New global.
22237 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
22238 * verify.c (verify_jvm_instructions): Inline use of removed macros.
22239 * expr.c (expand_java_field_op): Check for invalid assignment
22242 * jcf-reader.c (get_attribute): Test for wrong attribute length.
22244 1997-10-27 Per Bothner <bothner@cygnus.com>
22246 * verify.c (verify_jvm_instructions): When processing a handler,
22247 attempt to set the current_subr to the right value.
22248 (More complicated code combines Sep 17 and Oct 22 versions.)
22250 1997-10-24 Per Bothner <bothner@cygnus.com>
22252 * class.c (push_class): Figure out (guess) name of source file.
22253 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
22254 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
22255 (parse_class_file): Change return type from int to void.
22256 Call debug_start_source_file/debug_end_source_file.
22258 * expr.c (build_java_binop): Fix masking 2nd operand.
22259 * decl.c (init_decl_processing): Set sizetype first.
22261 1997-10-22 Per Bothner <bothner@cygnus.com>
22263 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
22264 (Revert Sep 17 change.)
22266 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
22268 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22269 .class extension in their name and fix thing so we don't process
22270 them parse_zip_file_entries().
22271 (parse_zip_file_entries): Cleaned unused local variables.
22273 1997-10-20 Per Bothner <bothner@cygnus.com>
22275 * expr.c (can_widen_reference_to): Allows equal array element types.
22276 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
22277 * jcf-dump.c (RET): Get (and print) index.
22279 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22280 Promote element type to POINTER_TYPE.
22282 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22284 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22285 find_in_current_zip, jcf_figure_file_type): Moved from
22286 jcf-reader.c to parse.c.
22287 * zextract.c: (read_zip_archive): takes file_comment_length possible
22288 field into account.
22290 1997-10-20 Per Bothner <bothner@cygnus.com>
22292 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
22294 * verify.c (merge_types): Handle array types even better ...
22296 1997-10-17 Per Bothner <bothner@cygnus.com>
22298 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
22300 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
22301 * class.c (make_class_data): Don't build fields_decl if no fields.
22302 When building fields_decl, skip if DECL_ARTIFICIAL.
22304 * expr.c (java_stack_swap): Update stack_type_map.
22305 * verify.c (merge_types): Handle array types better.
22307 1997-10-15 Per Bothner <bothner@cygnus.com>
22309 * class.c (add_field): Don't promote short integral fields to
22310 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22311 * expr.c (push_value): Promote and convert short integral values.
22313 * decl.c, java-tree.h (integer_two_node): New constant node.
22314 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
22316 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22318 * class.c (append_gpp_mangled_type): Use function argument
22319 unpromoted type to generate mangled name.
22321 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
22323 * constants.c (build_constant_data_ref): Now uses current_class
22324 instead of main_class.
22325 (build_constants_constructor): Now uses current_class instead of
22327 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22328 of the global variable SeepZipFiles done here.
22329 * zextract.c (read_zip_archive): extra_field optional field taken
22330 into account while computing the position of the class file in the
22332 * verify.c (verify_jvm_instructions): Use current_jcf to search
22334 * parse.c (load_class): First search for the class to load in the
22335 current zip file. Saves current_jcf (restored before returning
22336 from that function). Don't call JCF_FINISH in the class was found
22337 in the current ZIP file.
22338 (jcf_parse): If the class was found in the current ZIP file, save
22339 its tree_constant_pool (for later reuse).
22340 (parse_class_file): New function. Process each method defined in
22341 the current class and record the class as to be later registered.
22342 (yyparse): Rewritten. Figure the type of the current file and switch
22344 * lang.c: New global variable current_jcf.
22345 (lang_init): Removed compiling_from_source test (done later, in
22346 yyparse). Removed call the jcf_parse ().
22347 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22348 (typedef struct JCF): New fields seen_in_zip (to mark a class found
22349 in the current ZIP file) and zip_offset (offset to the class data in
22350 the current zip file).
22351 * jcf-reader.c: zipfile.h included.
22352 localToFile: New ZipFileCache static global variable
22353 (parse_zip_file_entries): New function. Browse the current ZIP
22354 file directory and process each class found.
22355 (process_zip_dir): New function. Register each class found in the
22356 ZIP file directory. The class aren't parsed but a valid JCF is
22357 link to each of them.
22358 (find_in_current_zip): New function. Search for a class in the
22359 current ZIP file directory. If found, prepare the class so that it
22361 (jcf_figure_file_type): New function. Examine the file structure
22362 to figure a class file, a ZIP file. If none of these categories are
22363 matched, a source file is assumed.
22364 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22365 SeenZipFile: New global variable.
22366 (open_in_zip): Use zipmember's length to accelerate the search for
22367 a member. If zipmember was NULL and zip file successfully read,
22369 * java-tree.h: New global variable current_jcf declared. Added
22370 declaration for current_constant_pool_tags, current_constant_pool_data,
22371 current_constant_pool_length, current_constant_pool_data_ref.
22372 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22373 store the JCF of classes seen in a zip file) and tree *constant_pool
22374 (to save a loaded class constant pool). current_class declared here.
22375 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22376 retrieve method_ref_constant.
22377 (PUSHC): java_push_constant_from_pool now uses current_jcf.
22378 (OBJECT): get_class_constant now uses current_jcf.
22379 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22380 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22381 (expand_invoke): Now uses current_class instead of main_class
22382 (build_class_init): Now uses current_class instead of main_class
22383 * class.c: New static global variable registered_class.
22384 (register_class): New function.
22385 (emit_register_class): Modified to use registered_class instead of
22387 (is_compiled_class): Now take into account class seen in the archive.
22389 1997-10-06 Per Bothner <bothner@cygnus.com>
22391 * except.h: Renamed to: java-except.h.
22392 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
22393 * except.c: Add semi-working (commented out) implementation.
22395 * expr.c (expand_iinc): Add needed flush_quick_stack.
22396 * parse.c (set_source_filename): New function.
22397 (give_name_to_class): Set input_filename from package.classname.java.
22399 * jcf-io.c (find_class): Don't look first in ".".
22401 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22403 * zextract.c (read_zip_archive): Now takes into account the
22405 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22407 1997-09-20 Per Bothner <bothner@cygnus.com>
22409 * constants.c, java-tree.h (build_internal_class_name): New function.
22410 (alloc_class_constant): Re-implement using build_internal_class_name.
22411 * class.c (make_class_data): Likewise.
22412 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
22414 1997-09-17 Per Bothner <bothner@cygnus.com>
22416 * verify.c (verify_jvm_instructions): Temporarily set current_subr
22417 to NULL before pushing an exception handler target.
22419 * expr.c (flush_quick_stack): Save from low stack indexes to high.
22420 (java_stack_swap, java_stack_dup): Re-write to be safe from
22421 clobbering registers.
22422 (build_class_init): New function.
22424 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
22426 * typeck.c (build_java_array_type): Temporary use
22427 permanent_obstack to create the array 'length' field.
22428 * expr.c (lookup_label): Temporay use permanent_obstack to create
22429 label if not found.
22430 * class.c (push_super_field): Tempory use permanent_obstack.
22432 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22434 * typeck.c (type_for_mode): Now handles double_type_node and
22436 * verify.c (verify_jvm_instructions): The instruction following
22437 the wide bytecode is checked. OPCODE_ret added to the list of
22440 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22442 * class.c (make_class): Temporary use permanent_obstack. Set the
22443 class CLASS_P field to 1.
22444 (push_class): Temporary use permanent_obstack.
22445 (set_super_info): Temporary use permanent_obstack.
22446 (add_method): Temporary use permanent_obstack, set
22447 METHOD_TRANSIENT().
22448 (add_field): Temporary use permanent_obstack. Sets
22449 FIELD_VOLATILE() and FIELD_TRANSIENT().
22450 (build_class_ref): Temporary use permanent_obstack if the class
22452 (build_static_field_ref): Temporary use permanent_obstack when
22453 creating field's rtl.
22454 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22455 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22456 and fields. Function finalized, as far as flag handling.
22457 (push_class_static_dummy_field): Temporary use permanent_obstack.
22458 (emit_register_class): Force generation of class registration at
22460 * decl.c (end_java_method): Call permanent_allocation() before
22462 * expr.c (can_widen_reference_to): Added comment to interface
22463 handling, fixed typo.
22464 (lookup_field): Now uses CLASS_P() to correct FIXME
22465 (expand_invoke): Verification on public && !static &&
22466 !abstract moved into soft_lookupinterfacemethod (kaffe).
22467 Use Object class dtable if objectref is an array when expanding
22469 (java_push_constant_from_pool): Temporary use permanent_obstack
22470 for CONSTANT_string
22471 * parse.c (get_ref_constant): Temporary use permanent_obstack to
22472 create constant references.
22473 (get_constant): Temporary use permanent_obstack to create constant.
22474 (load_class): Temporary use permanent_obstack to load class.
22475 (jcf_parse): Temporary use permanent_obstack to perform class
22477 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22478 (build_java_signature): Temporary use permanent_obstack.
22479 * verify.c: (verify_jvm_instruction): removed unnecessary verification
22481 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22482 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22485 1997-09-11 Per Bothner <bothner@cygnus.com>
22487 * class.c (append_gpp_mangled_type): Fix typo.
22488 (emit_register_class): Use main_class to get class object, rather
22489 than looking for no-longer-existing static decl starting with _CL.
22490 * typeck.c (parse_signature_type): Promote array element type
22491 if it is a RECORD_TYPE.
22493 1997-09-10 Per Bothner <bothner@cygnus.com>
22495 * class.c (push_class_static_dummy_field): New function.
22496 (mangle_static_field): New. Do G++-style mangling of static fields.
22497 (layout_class): Mandle static fields here, not in add_field.
22498 (build_class_ref): The class object is now a dummy static field.
22499 * decl.c (find_local_variable): Look for best, instead of first match.
22500 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
22501 (build_java_athrow): Don't check here if exception is Throwable.
22502 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
22503 (TYPE_USED): Removed. No longer used ...
22504 * parse.c (jcf_parse): Call push_class_static_dummy_field.
22505 * verify.c (push_pending_label): New function.
22506 (push_pending_block): Renamed to check_pending_block.
22507 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
22508 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
22509 re-checking possible handlers) after a store (less wasted work).
22510 Check for null handler (finally) before calling add_handler.
22511 Various changes to (finally?) correctly handle try/finally.
22513 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
22515 * class.c: Include stdio.h.
22517 1997-09-04 Per Bothner <bothner@cygnus.com>
22519 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22520 to make sure class is initialized before static/special invoke.
22522 * verify.c (verify_jvm_instructions): On a store instruction,
22523 call find_local_variable to force pre-allocation of decl and rtx.
22524 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22526 1997-09-03 Per Bothner <bothner@cygnus.com>
22528 * class.c (build_class_ref): Strip off "promoted_" if need be.
22529 (make_field_value): Call build_java_signature when needed.
22530 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22531 * expr.c (build_java_athrow): Don't push_value of exception.
22532 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22533 match specification of [fd]cmp[lg] for NaNs.
22534 (expand_byte_code): Add support for exception handler ranges.
22535 * except.c: Add skeleton for EH code-generation.
22536 * verify.c (merge_types): Treat all promoted integral types as equal.
22537 * constants.c (build_constants_constructor): To force creation of
22538 current_constant_pool_data_ref, call build_constant_data_ref.
22540 * javaop.def (lload): Fix typo.
22541 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
22543 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
22545 * parse.c: Don't include function.h.
22547 1997-08-27 Per Bothner <bothner@cygnus.com>
22549 * except.[ch]: New files.
22550 * Makefile.in (JAVA_OBJS): Add except.o
22551 * expr.c: Temporary warning about unimplemented exceptions.
22552 * verify.c: Verify exception handlers.
22554 * jcf-dump.c (disassemble_method): Print exception table.
22556 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
22558 * expr.c (verify_jvm_instructions): Started a thorough
22559 verification of invoke* bytecodes.
22560 (expand_byte_code): flush quick stack if PC is the target of a
22561 branch. and undef RET (conflicting with config/i386/i386.h).
22562 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22564 (expand_invoke): Now handles invokeinterface and do more
22565 verification according to the bytecode.
22566 (lookup_field): Don't try to load the class if processing
22568 (can_widen_reference_to): Now handles interfaces.
22569 * decl.c (init_decl_processing): New global variable
22570 soft_lookupinterfacemethod_node, declared in java-tree.h.
22571 Call set_super_info on string_type_node.
22572 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22574 * class.c (set_super_info): Fills the CLASS_* flags according to
22576 (get_access_flags_from_decl): Handles all class flags.
22578 1997-08-26 Per Bothner <bothner@cygnus.com>
22580 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22581 * parse.c (yyparse): Check for abstract method, and missing code.
22582 * expr.c (expand_byte_code): Change interface.
22583 * lang.c (put_decl_node): Print promoted types prettier.
22584 * verify.c (verify_jvm_instruction): Change interface.
22585 Partial support for scanning exception table.
22586 For load instructions, handle promoted integral types.
22588 1997-08-21 Per Bothner <bothner@cygnus.com>
22590 * verify.c: New file, with contents moved from expr.c.
22591 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22592 * typeck.c (is_array_type_p): Moved here from expr.c.
22593 * java-tree.h: Add some now-needed function declarations.
22594 * Makefile.in (JAVA_OBJS): Added verify.o.
22596 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22598 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22599 METHOD_ABSTRACT flag.
22601 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22602 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22603 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22605 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22607 (start_java_method): Hook for SYNCHRONIZED methods.
22609 * expr.c (build_java_jsr, build_java_ret): New functions
22610 (JSR,PRE): New macros
22611 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22612 (verify_jvm_instructions): tableswitch, lookupswitch,
22613 monitorenter, monitorexit, goto_w: verified.
22614 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22615 (build_java_monitor): New function.
22616 (MONITOR_OPERATION): Modified to call build_java_monitor()
22617 (verify_jvm_instructions): Started a thorough verification of
22620 1997-08-19 Per Bothner <bothner@cygnus.com>
22622 Support verification of jsr/ret subroutines (used for try/finally).
22623 * decl.c (return_address_type_node): New type node.
22624 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22625 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22626 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22627 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22628 TYPE_USED): New macros for special types in type_map.
22630 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22631 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22633 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22635 * expr.c (can_widen_reference_to): New function.
22636 (pop_type): Use it.
22637 (merge_type_state): Support handling start of subroutine.
22638 (push_pending_block): Return char* error message, instead of calling
22639 fatal on an error. Also handle subroutines.
22640 (verify_jvm_instructions): Handle errors from push_poending_block.
22641 Support jsr and ret instructions.
22643 1997-08-19 Per Bothner <bothner@cygnus.com>
22645 * jcf-io.c (find_classfile): Fix thinko.
22646 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22648 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22650 * Makefile.in (BISON): Remove.
22652 1997-08-07 Per Bothner <bothner@cygnus.com>
22654 * Makefile.in: Convert to autoconf.
22655 * config-lang.in (outputs): Added java/Makefile.
22657 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22658 Rename cc1java to jc1.
22660 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22661 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22663 * class.c (class_depth): Do load_class if needed.
22665 Mostly better verification.
22666 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22667 (init_decl_processing): Change return type of soft_checkcast.
22668 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22669 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22670 lang_print_error): New functions.
22671 (lang_init): Set global hook print_error_function to lang_print_error.
22672 * expr.c: In the type_map ptr_type_node is only used for null now.
22673 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22674 (merge_types): Dererence pointer to record types before comparing.
22675 (decode_newarray_type, merge_types): On error just return NULL.
22676 (build_java_binop): Add preliminary implementation (with warning)
22677 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22678 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22679 (expand_compare, expand_java_goto, expand_java_call): Don't
22680 push_pending_block, since that only makes sense when verifying.
22681 (merge_type_state): Different return codes.
22682 (push_pending_block): A block may need to be verified more than once.
22683 (expand_byte_code): Warn about unused code at code generation time.
22684 (verify_jvm_instruction): Changed logic, since code may need to be
22685 re-verified if type-state has changed. Also, better error handling.
22686 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22687 Improve newarray, anewarray, ?aload, athrow,
22688 * java-tree.h (LABEL_CHANGED): New macro.
22690 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22692 * decl.c (soft_athrow_node): New global variable initialized.
22693 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22694 * typeck.c (convert): Added support for REAL_TYPE.
22695 (convert_to_char): New function.
22696 (convert): Handle CHAR_TYPE.
22697 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22698 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22699 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22701 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22702 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22703 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22704 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22705 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22706 to Use The Right Things.
22707 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22708 compatible with INT. BOOLEAN is made equivalent to BYTE.
22709 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22710 OPCODE_ifnonnull): Now supported.
22711 (build_java_athrow): New function.
22713 1997-08-04 Per Bothner <bothner@cygnus.com>
22715 Rename method name <init> to match G++ (and fix mangling).
22716 * class.c (layout_class): Replace method name of <init> by class name.
22717 (make_method_value): Do inverse renaming of constructor from <init>.
22718 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22719 * typeck.c (lookup_java_constructor): New function.
22720 * expr.c (expand_invoke): If method_name is <init>, call
22721 lookup_java_constructor to find constructor.
22723 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22725 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22727 * parse.c (get_class_constant): Modified to handle array "classes"
22728 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22730 (convert): Modified to handle real type.
22731 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22732 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22733 variables declared.
22734 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22735 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22736 global variables initialized.
22737 (find_local_variable): Handles the case of a pointer
22738 (end_java_method): Restore the use of one more scope
22739 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22740 build_java_array_length_access, expand_java_arrayload,
22741 expand_java_arraystore, expand_java_array_length,
22742 expand_java_multianewarray, expand_java_anewarray,
22743 build_java_check_indexed_type, is_array_type_p,
22744 build_java_throw_out_of_bound_exception): New functions.
22745 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22746 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22747 OPCODE_<t>aload): Implemented code for verification.
22748 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22749 ARRAY_NEW_MULTI): Macro defined.
22750 (CONVERT): Modified to invoke convert().
22751 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22753 1997-07-31 Per Bothner <bothner@cygnus.com>
22755 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22756 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22757 (make_class_data): Field name needs '/' as package prefix.
22758 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22760 1997-07-25 Per Bothner <bothner@cygnus.com>
22762 Implement debug information for local variables.
22763 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22764 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22765 DECL_LOCAL_SLOT_CHAIN): New macros.
22766 (struct lang_decl_var): New type.
22767 * parse.c (give_name_to_locals): Move to decl.c.
22768 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22769 (start_java_method): Re-write parameter handling.
22770 (pending_local_decls): New global variable.
22771 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22772 (find_local_variable): Accept pc so we can skips decls not in range.
22773 (struct binding_level): Add end_pc field.
22774 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22775 (various): Change so current pc gets passed to find_local_variable.
22777 * decl.c (init_decl_processing): Re-arrange fields in
22778 class_type_node and and method_type_node to match kaffe 0.9.1.
22779 * class.c (make_method_value, make_class_data): Update
22780 initializations to match.
22782 1997-07-16 Per Bothner <bothner@cygnus.com>
22784 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22785 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22786 (push_super_field): New function.
22787 (make_class_data): Handle inheritance of class static initializer.
22788 (layout_class): New name mangling.
22789 * constants.c (build_constant_data_ref): Init type of data array
22790 to a one-element array.
22791 (build_constants_constructor): Set DECL_SIZE from complete array type.
22792 * decl.c: Rename class_type, object_type etc to class_type_node,
22793 object_type_node etc. Make former inherit from latter.
22794 * expr.c (expand_invoke): Add cast of function address.
22795 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22796 * parse.c (yyparse): Don't call layout_class here.
22797 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22799 1997-06-14 Per Bothner <bothner@cygnus.com>
22801 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22802 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22803 (alloc_class_constant): New.
22804 * expr.c (expand_invoke): Make sure method's class is initialized.
22805 * class.c (interits_from_p, emit_register_class): New functions.
22806 * parse.c (yyparse): Call emit_register_class.
22808 1997-06-09 Per Bothner <bothner@cygnus.com>
22810 * constants.c: New file, to handle constant pool.
22811 * Makefile.in (JAVA_OBJS): Add constants.o.
22812 * decl.c (init_decl_processing): Update, fix, finish various structs.
22813 (pushdecl_top_level): New.
22814 * parse.c (layout_class): Moved to class.c.
22815 * expr.c (java_push_constant_from_pool): New function.
22816 * class.c (build_class_ref): Make work fully
22817 (make_class_data): Emit super-class, constant pool, interface vector.
22819 1997-06-03 Per Bothner <bothner@cygnus.com>
22821 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22822 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22823 * class.c (class_depth): New function.
22824 (lookup_named_class): Replaced by new function lookup_class.
22825 * decl.c (object_type_node, string_type_node): New.
22826 Remove various types that we no longer need.
22827 * expr.c (verify_jvm_instructions): New separate verifier pass.
22828 (push_type, pop_type): New functions for verifier.
22829 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22830 (expand_byte_code): Simplify, since we assume already verified.
22831 (expand_invoke): Now mostly works.
22832 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22833 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22834 * parse.c: Wait to allocate class object until we know its name.
22835 (layout_class): Calculate DECL_VINDEX for each virtual method.
22836 * typeck.c (get_array_type): Rename to ...
22837 (build_java_array_type): ... and provide working implementation.
22838 (build_java_signature): New function - build Java signature of type.
22839 (set_java_signature): New function - cache signature with type.
22840 (lookup_java_method): New function.
22842 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
22844 * class.c (ident_subst): Take extra SUFFIX parameter.
22845 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22846 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22847 (build_class_ref): Actually implement.
22848 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22849 * decl.c (builtin_function): New.
22850 (init_decl_processing): Update for current Kaffe. Declare some
22851 builtin Kaffe functions.
22852 * expr.c (build_address_of): New.
22853 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22854 Renamed (from expand_java_new etc), and added working implementations.
22855 (build_field_ref): Now also handle static fields.
22856 (expand_invoke): Implement invokestatic, and start implement rest.
22857 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22858 * javaop.def: Rename invokevirt -> invokevirtual.
22859 * lang.c (use_handles): Removed.
22860 * parse.c: Add support for ConstantValue attribute.
22861 Handle nested loading of a class. (JPOOL_UTF): New.
22863 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
22865 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22867 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
22869 * Make-lang.in (java.install-man): New empty rule.
22870 * typeck.c (set_local_type): New function.
22871 * expr.c (STORE_INTERNAL): Call find_local_variable,
22872 not find_stack_slot. Call set_local_type.
22874 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
22876 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22877 and building RECORD_TYPE CONSTRUCTORs.
22878 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22880 * lang.c (use_handles): Change the default to 0.
22881 * decl.c: Define and build class_type, field_type, utf8const_type.
22882 * class.c (make_class_data, make_field_value,
22883 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22884 hashUtf8String, strLengthUtf8, mangled_classname:
22885 Functions to build reflective data structures.
22886 * parse.c (yyparse): Call make_class_data.
22888 * jcf-io.c (open_class, find_classfile): New functions.
22889 * jcf-dump.c: Support reading classfile from explicitly-named
22890 class file (without CLASSPATH searching).
22892 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22894 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22895 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22896 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22897 (get_constant): Now trivial for CONSTANT_Utf8.
22899 * jcf.h: Make NEW_CPOOL the default.
22900 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
22902 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22907 Copyright (C) 1996-2014 Free Software Foundation, Inc.
22909 Copying and distribution of this file, with or without modification,
22910 are permitted in any medium without royalty provided the copyright
22911 notice and this notice are preserved.